Problem with disabling commands
#3

PHP код:
Top of your script:
new 
InDM[MAX_PLAYERS]; 
Under onplayerconnect:
InDM[playerid] = 0;
Under onplayerspawn:
InDM[playerid] = 0;
If 
he is in DM and uses the commandadd this line to your cmd.
CMD:test(playerid,params[])
        {
        if(
InDM[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You cant use commands in DM");
        return 
1;
        }
It sets him to DMZone with InDM[playerid]=1;
CMD:dm(playerid,params[])
        {
        if(
InDM[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You cant use commands in DM");
        
GivePlayerWeapon(playerid24,500);
        
GivePlayerWeapon(playerid,25,500);
        
InDM[playerid]=1;
        return 
1;
        } 
Reply


Messages In This Thread
Problem with disabling commands - by martoivanov - 19.06.2013, 16:31
Re: Problem with disabling commands - by Juanxz - 19.06.2013, 17:01
Re: Problem with disabling commands - by Can4ns - 19.06.2013, 17:09
Re: Problem with disabling commands - by Can4ns - 19.06.2013, 17:23
Re: Problem with disabling commands - by martoivanov - 19.06.2013, 17:25
Re: Problem with disabling commands - by Scenario - 19.06.2013, 17:47
Re: Problem with disabling commands - by martoivanov - 19.06.2013, 17:49
Re: Problem with disabling commands - by Scenario - 19.06.2013, 17:51
Re: Problem with disabling commands - by martoivanov - 19.06.2013, 17:56
Re: Problem with disabling commands - by Scenario - 19.06.2013, 18:04

Forum Jump:


Users browsing this thread: 1 Guest(s)