Little requests
#1

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.
Reply
#2

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)