Timer for a command
#6

This will block the command for everybody and not per player.
PHP код:
new HealTime[MAX_PLAYERS];

CMD:heal(playeridparams[]) 
{  
    if(
HealTime[playerid] > gettime())  
    {
        
SendClientMessage(playerid, -,"You need to wait 1 minute before using /heal again");  
    }  
    else  
    {  
    
//ADD your command code here setplayerhealth and all other things 
        
HealTime[playerid] = gettime() + 60;  
    }  
    return 
1;  

Reply


Messages In This Thread
Timer for a command - by Gotham - 13.10.2016, 14:12
Re: Timer for a command - by StrikerZ - 13.10.2016, 14:18
Re: Timer for a command - by Gotham - 13.10.2016, 14:26
Re: Timer for a command - by Hunud - 13.10.2016, 14:28
Re: Timer for a command - by StrikerZ - 13.10.2016, 14:29
Re: Timer for a command - by Dayrion - 13.10.2016, 14:47
Re: Timer for a command - by Gotham - 13.10.2016, 14:49

Forum Jump:


Users browsing this thread: 1 Guest(s)