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)
+--- Thread: ZCMD Question (
/showthread.php?tid=369392)
ZCMD Question -
nmader - 16.08.2012
Alright, I am using ZCMD as my current command processor and have noticed that if you type an incorrect command, nothing is said to state such. Is there a way for if an unknown command is entered to state such?
Kind Regards,
Nmader
Re: ZCMD Question -
xSiiLenTx - 16.08.2012
nativechecker?
Re: ZCMD Question -
Sandiel - 17.08.2012
Do you have return 1; as a value return in the command(s)?
Re: ZCMD Question -
nmader - 17.08.2012
Quote:
Originally Posted by Sandiel
Do you have return 1; as a value return in the command(s)?
|
Yes, I do.
Re: ZCMD Question -
CROSS_Hunter - 17.08.2012
type this before return 1;
pawn Код:
//at the very end of the command and before the return value
else
SendClientMessage(playerid, 0xFFFFFFFF, "blahblah");
//return 1;
Re: ZCMD Question -
nmader - 17.08.2012
Wouldn't that only do it for that one command and state all the other commands as unrecognized?
Re: ZCMD Question -
Sandiel - 17.08.2012
You must return 1; at all commands if you want them to be recognized.
Re: ZCMD Question -
CROSS_Hunter - 17.08.2012
DUDE! did i say make it on 1 commdand i just showed u a sample to use apply it to all commands now and dont forget to put it before return 1; and at the end of each command to Let the server know that this was a valid command
Re: ZCMD Question -
ReneG - 17.08.2012
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) {
SendClientMessage(playerid, -1, "SERVER: Unknown Command");
}
return 1;
}
Re: ZCMD Question -
kbalor - 17.08.2012
update your zcmd and sscanf.