Removing "SERVER: 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: Removing "SERVER: Unknown Command!" (
/showthread.php?tid=410739)
Removing "SERVER: Unknown Command!" -
xDaidal0S - 26.01.2013
-SOLVED-.
Re: Removing "SERVER: Unknown Command!" -
Unknownich - 26.01.2013
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//commands here
return SendClientMessage(playerid, color, "Invalid command");
}
Re: Removing "SERVER: Unknown Command!" -
DaRk_RaiN - 26.01.2013
Quote:
Originally Posted by Unknownich
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { //commands here return SendClientMessage(playerid, color, "Invalid command"); }
|
This won't work if he's using a command processor try this
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid, -1, "The command you typed is invalid use/cmds");
return 1;
}
Re: Removing "SERVER: Unknown Command!" -
xDaidal0S - 26.01.2013
Quote:
Originally Posted by DaRk_RaiN
This won't work if he's using a command processor try this
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) SendClientMessage(playerid, -1, "The command you typed is invalid use/cmds"); return 1; }
|
Quote:
Originally Posted by Unknownich
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { //commands here return SendClientMessage(playerid, color, "Invalid command"); }
|
Thank you both , solved.