Unknown Command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Unknown Command (
/showthread.php?tid=474263)
Unknown Command -
AnonScripter - 07.11.2013
How to remove this:
Код:
SERVER: UNKNOWN COMMAND
And make another manual message ?
Re: Unknown Command -
Elie1996 - 07.11.2013
Under OnPlayerCommandText Change the return Value
Example:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
// YOUR COMMANDS UP HERE
return 0; // --> Change return 0 with --> return SendClientMessage(playerid, "Server: Command Doesn't exist!", COLOR);
}
You can change "ServerL Command Doesn't exist!" with whatever error message you want, and you're done
Re: Unknown Command -
Raza2013 - 07.11.2013
Use this code
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
new string[128];
if(!success)
{
format(string,sizeof(string),"ERROR: %s is Invalid Command!",cmdtext);
SendClientMessage(playerid,red,string);
}
return 1;
}
Re: Unknown Command -
AnonScripter - 07.11.2013
thank you