ZCMD Command Restriction
#2

You need use OnPlayerCommandReceived callback

pawn Code:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
    if(PlayerInfo[playerid][pDM] == 1) // if is player in DM
    {
        if(!strcmp(cmdtext,"/exitdm",true)) return 1; // he can use only /exitdm
        return !SendClientMessage(playerid,0xFFFFFF,"You cant use commands in the DM Zone/Jail"); // return 0 is blocking all other commands
    }
    return 1;
}
Reply


Messages In This Thread
ZCMD Command Restriction - by YoussefHammad - 10.11.2015, 21:48
Re: ZCMD Command Restriction - by Jefff - 10.11.2015, 22:00
Re: ZCMD Command Restriction - by YoussefHammad - 10.11.2015, 22:03
Re: ZCMD Command Restriction - by Jefff - 10.11.2015, 22:07
Re: ZCMD Command Restriction - by YoussefHammad - 10.11.2015, 22:10
Re : ZCMD Command Restriction - by Dutheil - 11.11.2015, 00:54
Re: Re : ZCMD Command Restriction - by YoussefHammad - 11.11.2015, 01:01
Re : ZCMD Command Restriction - by Dutheil - 11.11.2015, 01:04
Re: Re : ZCMD Command Restriction - by YoussefHammad - 11.11.2015, 01:23
Re: Re : ZCMD Command Restriction - by PrO.GameR - 11.11.2015, 07:04

Forum Jump:


Users browsing this thread: 1 Guest(s)