05.12.2014, 08:43
Alright, basically i am using ZCMD.
And now i've been using OnPlayerCommandPerformed to display if it is unknown command, Basically that means the command doesn't exist, Now, The thing i want to do is how do i remove the parameters, For example, if player types a command with spaces and parameters like /noncmd Hi, It will only display this "SERVER: The command '/noncmd' doesn't exist, Please refer to /commands or /help" instead of "SERVER: The command '/noncmd Hi' doesn't exist, Please refer to /commands or /help"
When player types /noncmd (without the spaces and Hi) it will display the normal one like "SERVER: The command '/noncmd' doesn't exist, Please refer to /commands or /help"
And now i've been using OnPlayerCommandPerformed to display if it is unknown command, Basically that means the command doesn't exist, Now, The thing i want to do is how do i remove the parameters, For example, if player types a command with spaces and parameters like /noncmd Hi, It will only display this "SERVER: The command '/noncmd' doesn't exist, Please refer to /commands or /help" instead of "SERVER: The command '/noncmd Hi' doesn't exist, Please refer to /commands or /help"
When player types /noncmd (without the spaces and Hi) it will display the normal one like "SERVER: The command '/noncmd' doesn't exist, Please refer to /commands or /help"
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
new string[256];
format(string, sizeof(string), ""lightblue"SERVER: "white"The command '"lightred"%s"white"' doesn't exist, Please refer to "grey"/commands "white"or "grey"/help", cmdtext);
SendClientMessage(playerid, -1, string);
}
return 1;
}