SA-MP Forums Archive
SERVER: UNKNOWN COMMAND(How To Change this) - 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: SERVER: UNKNOWN COMMAND(How To Change this) (/showthread.php?tid=620541)



SERVER: UNKNOWN COMMAND(How To Change this) - RyderX - 31.10.2016

Hello There, im asking How Can i Change
PHP код:
SERVER:UNKNOWN COMMAND 
To For example
PHP код:
[SERVER]unknown Command please read /cmds and /help To Help You
i know it's Simple thing But i need help so pleae


Re: SERVER: UNKNOWN COMMAND(How To Change this) - NealPeteros - 31.10.2016

Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
  //Some commands
  return 0;
}
Replace return 0; to
Код:
return SendClientMessage(playerid,-1,"[SERVER]unknown Command please read /cmds and /help To Help You.  ");



Re: SERVER: UNKNOWN COMMAND(How To Change this) - RyderX - 31.10.2016

Thanks You Bro Rep+ For Helping me


Re: SERVER: UNKNOWN COMMAND(How To Change this) - NealPeteros - 31.10.2016

If you're using ZCMD, add this callback somewhere in your script, outside callbacks.
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
    if (!success) {
        SendClientMessage(playerid,-1,"[SERVER]unknown Command please read /cmds and /help To Help You.  ");
    }
}



Re: SERVER: UNKNOWN COMMAND(How To Change this) - RyderX - 31.10.2016

Oh So if i use ZCMD So i have To use this Callback and not have To use the First one Right?


Re: SERVER: UNKNOWN COMMAND(How To Change this) - NealPeteros - 31.10.2016

Right.