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.
problems with registerChatCommand...
Moderator: NADEO
-
- Nadeo
- Posts: 585
- Joined: 14 Jun 2010, 16:15
- Manialink: maniahome
- Location: In front of your hood with one lap late
Re: problems with registerChatCommand...
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.
For the parameters count, we'll maybe do something for this, but it's not a priority.
Also known as: satanasdiabolo
Who is online
Users browsing this forum: No registered users and 1 guest