problems with registerChatCommand...

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

Post Reply
reaby
Posts: 1032
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

problems with registerChatCommand...

Post by reaby »

i opened an issue to google code.. there is no way currently to use registerChatCommand to enter multiple words of as parameter into one variable. let's say i want to write personalmessage plugin or googletranslate... only way currently is to hookup to onPlayerChat and parse it by hand, which i think is kinda stupid.

*edit*

and maybe you could remove casesensitivity of chat command --> real command, as ppl in trackmania doesn't care much of case sensitivity on commands.

*edit2*

hmm.. the chatcommand fails to trigger if parameter count is not right.. says command *xx* doesn't exists try /help to see list...

How on earth i'm going to implement a plugin with selectable content, /gg should take either 0 or 1 parameters. 0 for general congratulations and 1 for player login.
farfa
Nadeo
Nadeo
Posts: 601
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: problems with registerChatCommand...

Post by farfa »

You just have to register 2 commands with the same callback. To work your callback method should have a default parameter.
For the parameters count, we'll maybe do something for this, but it's not a priority.
Also known as: satanasdiabolo
Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 1 guest