Little requests - 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: Little requests (
/showthread.php?tid=430227)
Little requests -
Syntax - 13.04.2013
Today, I have learnt ZCMD and besides the fact that the callback OnPlayerCommandText has been removed, two new callbacks have been added(OnPlayerCommandReceived and OnPlayerCommandPerformed). Can someone give me two examples? I'd really appreciate it if you could.
Re: Little requests -
RajatPawar - 13.04.2013
OnPlayerCommandText
HAS NOT been removed. The two other callbacks have
BEEN ADDED for efficient work with ZCMD.
For OPCR
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if( is_some_player_in_event_or_DM_match == true )
{
return SendClientMessage(playerid, -1, "You cannot use commands while in an event !");
}
return 1;
}
For OPCP
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if( !success ) return SendClientMessage(playerid, -1, "Use /commands to check out the commands on our server !");
return 1;
}