Sup? Help me out!
#6

try this
PHP код:
new CoolDown[MAX_PLAYERS],
    
CoolDownTimer[MAX_PLAYERS];
    
CMD:takejob(playeridparams[])
{
    static
        
id = -1;
    if(
CoolDown[playerid]) 
        return 
SendClientMessage(playeridcolor"your message here because 1hr is not done");
    if ((
id Job_Nearest(playerid)) != -1)
    {
        if (
PlayerData[playerid][pJob] == JobData[id][jobType])
            return 
SendErrorMessage(playerid"You have this job already.");
        
PlayerData[playerid][pJob] = JobData[id][jobType];
        
CoolDown[playerid] = 60;
        
CoolDownTimer[playerid] = SetTimerEx("CheckCoolDown",60000,true,"i",playerid);
        return 
SendServerMessage(playerid"You are now a %s - type \"/jobcmds\" for job commands."Job_GetName(JobData[id][jobType]));
    }
    
SendErrorMessage(playerid"You are not in range of any job pickup.");
    return 
1;
}
forward CheckCoolDown(playerid);
public 
CheckCoolDown(playerid)
{
    if(
CoolDown[playerid] != 0)
    {
        
CoolDown[playerid]--;
    }
    else 
    {
        
KillTimer(CoolDownTimer[playerid]);
        
CoolDown[playerid] = 0;
    }    
        

Reply


Messages In This Thread
Sup? Help me out! - by BluePlayBG - 07.01.2018, 11:50
Re: Sup? Help me out! - by RowdyrideR - 07.01.2018, 11:54
Re: Sup? Help me out! - by BluePlayBG - 07.01.2018, 11:55
Re: Sup? Help me out! - by RowdyrideR - 07.01.2018, 12:33
Re: Sup? Help me out! - by BluePlayBG - 07.01.2018, 12:35
Re: Sup? Help me out! - by shourya - 07.01.2018, 12:51
Re: Sup? Help me out! - by RowdyrideR - 07.01.2018, 12:52
Re: Sup? Help me out! - by BluePlayBG - 07.01.2018, 12:55

Forum Jump:


Users browsing this thread: 1 Guest(s)