Not existing command message error -
x96664 - 31.05.2012
Hi, I have removed
under the OnPlayerCommandText lines and I have added
pawn Код:
return SendClientMessage(playerid,0xFFFFFFAA,"The command {FF0000}%s {FFFFFF}doesn't exist.");
}
To show the players the commands which aren't existing, but
maybe isn't the right function.
When I type wrong command it doesn't show this message it crashes the server.How can I fix that?
Re: Not existing command message error - Riddy - 31.05.2012
You gotta use a format for that, then use SendClientMessage(playerid, COLOR, string);
EDIT:
I'll help you :P...
new string[no. of strings];
format(string, sizeof(string), "%s has not been found, please use /help or /commands to check for the command list", commandname);
(You can do the command name part your self)
then
return SendClientMessage(playerid, 0xFFFFFFAA, string); <- try that... not sure if it works or not, just a guess
Re: Not existing command message error -
x96664 - 31.05.2012
I done that you said,but it shows ingame: has not been found, please use /help or /commands to check for the command list. I mean that it doesn't show the wrong command , for example:
It shows only
Код:
has not been found, please use /help or /commands to check for the command list
I want to see:
Код:
/testcmd has not been found, please use /help or /commands to check for the command list
Re: Not existing command message error - Riddy - 31.05.2012
if you use sscanf, try this:
new commandname; // If string is needed put a "," and add string[54]; or something
if(sscanf(cmd, "s", commandname)) // if its zcmd change cmd to params
format(string, sizeof(string), "%s has not been found", commandname);
return SendClientMessage(playerid, oxFFFFFFF, string);
Re: Not existing command message error -
MadeMan - 31.05.2012
pawn Код:
new string[128];
format(string, sizeof(string), "The command {FF0000}%s {FFFFFF}doesn't exist.", cmdtext);
return SendClientMessage(playerid,0xFFFFFFAA,string);
}
Re: Not existing command message error - Riddy - 31.05.2012
Quote:
Originally Posted by MadeMan
pawn Код:
new string[128]; format(string, sizeof(string), "The command {FF0000}%s {FFFFFF}doesn't exist.", cmdtext); return SendClientMessage(playerid,0xFFFFFFAA,string); }
|
You just taught me something (still a beginner scripter
![Cheesy](images/smilies/biggrin.png)
)