SA-MP Forums Archive
ZCMD little question [ REP + ] - 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 little question [ REP + ] (/showthread.php?tid=577720)



ZCMD little question [ REP + ] - _GHT_MarK445 - 13.06.2015

Hey guys, i have a question.

Is there in ZCMD some feature which allows me to do this thing?

If player writes command /lol it will show him what command he wrote. For example something like this, in this case is "command" the feature..

Код:
CMD:lol(playerid, params[])
{
new string[10];
format(string, sizeof(string), "You typed: %s", command);
SendClientMessage(playerid, -1, string);
return 1;
}
So yeah guys, i hope you know what i mean.. for example that could be used for admins, their CMD reading and stuff, so yeah, thanks.


Re: ZCMD little question [ REP + ] - MohammedZ - 13.06.2015

CMD:lol(playerid, params[])
{
format(astring,sizeof(astring),"%s [%d] typed: /lol",pName,playerid);
SendAdminMessage(GREY,astring);
return 1;
}
Example if you defined pname
But if you didnt

CMD:lol(playerid, params[])
{
SendClientMessage(playerid, Color ,"You Typed /lol");
return 1;
}


Re: ZCMD little question [ REP + ] - Konstantinos - 13.06.2015

There are two callbacks from ZCMD:
pawn Код:
OnPlayerCommandReceived(playerid, cmdtext[])
and
pawn Код:
OnPlayerCommandPerformed(playerid, cmdtext[], success)
If you want for commands that exist in the scripts, use the second one.


Re: ZCMD little question [ REP + ] - _GHT_MarK445 - 13.06.2015

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
There are two callbacks from ZCMD:
pawn Код:
OnPlayerCommandReceived(playerid, cmdtext[])
and
pawn Код:
OnPlayerCommandPerformed(playerid, cmdtext[], success)
If you want for commands that exist in the scripts, use the second one.
Thank You verry much sir!