Little ZCMD question. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Little ZCMD question. (
/showthread.php?tid=264927)
Little ZCMD question. -
GangsTa_ - 28.06.2011
Kinda beginner with zcmd, can you tell me where to write the return 0 instead of return 1?
Under OnPlayerCommandPerformed or Recieved?
Re: Little ZCMD question. -
PrawkC - 28.06.2011
For what?
Re: Little ZCMD question. -
GangsTa_ - 28.06.2011
For giving out a message like SERVER: Unknown Command.
I tried this once, but each command gives me an error with Unknown command even if it works..
Re: Little ZCMD question. -
Calgon - 28.06.2011
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
if(success == 0) return SendClientmessage(playerid, 0, "SERVER: Unknown command.");
}
Re: Little ZCMD question. -
Tachibana - 28.06.2011
Quote:
Originally Posted by Calg00ne
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(success == 0) return SendClientmessage(playerid, 0, "SERVER: Unknown command."); }
|
And
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
printf("%s(%d) Used Command - %s",Playername(playerid),playerid,cmdtext);
return 1;
}
Re: Little ZCMD question. -
GangsTa_ - 28.06.2011
Thanks a lot, glad that I asked...