ZCMD Unknown command problem - 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: ZCMD Unknown command problem (
/showthread.php?tid=461914)
ZCMD Unknown command problem (resolved) -
maxy153 - 04.09.2013
How do I change the text "
SERVER: Unknown command" in ZCMD
I searched and found this but it does not work:
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if (!success)
{
SendClientMessage(playerid, -1, "Wrong command");
}
}
Re: ZCMD Unknown command problem -
Misiur - 04.09.2013
You need to add return with a positive value - return 1, or just use value returned by SendClientMessage
pawn Код:
return SendClientMessage(playerid, -1, "Wrong command");
Re: ZCMD Unknown command problem -
maxy153 - 04.09.2013
Код:
zcmd.inc(127) : warning 209: function "OnPlayerCommandPerformed" should return a value
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if (!success)
{
return SendClientMessage(playerid, -1, "Wrong command"); - Line 127
}
}
Re: ZCMD Unknown command problem -
maxy153 - 04.09.2013
RESOLVED
Re: ZCMD Unknown command problem -
Misiur - 04.09.2013
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if (!success)
{
return SendClientMessage(playerid, -1, "Wrong command");
}
return 0;
}
#e: ಠ_ಠ
Re: ZCMD Unknown command problem -
FabianoC - 04.09.2013
return 0;