Help with ZCMD.. - 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: Help with ZCMD.. (
/showthread.php?tid=180464)
Help with ZCMD.. -
The_Moddler - 01.10.2010
I am using ZCMD, if I tipe a wrong command, it says "Server: Unknown command", but I want to change it.. I know that I must put like this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
return SendClientMessage(playerid, COLOR_GREY, "Invalid command");
}
But that doesn't work..
Thanks
Re: Help with ZCMD.. -
willsuckformoney - 01.10.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return SendClientMessage(playerid, COLOR_GREY, "Invalid command");
}
Re: Help with ZCMD.. -
The_Moddler - 01.10.2010
Thats what I am doing...
Re: Help with ZCMD.. -
mmrk - 01.10.2010
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid,COLORHERE,"Error: Invalid Command, Please Type /Help To Find Out More!");
return 1;
}
Re: Help with ZCMD.. -
The_Moddler - 01.10.2010
Quote:
Originally Posted by mmrk
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) SendClientMessage(playerid,COLORHERE,"Error: Invalid Command, Please Type /Help To Find Out More!"); return 1; }
|
Thanks