Sup? Help me out!
#7

On top of your script:

Код:
new bool:CoolDown[MAX_PLAYERS];
The command:

Код:
CMD:takejob(playerid, params[])
{
        if(CoolDown[playerid] == true) return SendClientMessage(playerid,RED, " You have to wait an hour between jobs");
	static
	    id = -1;

	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];
            SetTimerEx("JobCoolDown",60*60000,false,"i",playerid);
            CoolDown[playerid]=true;
	    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;
}
anywhere in your script:

Код:
forward JobCoolDown(playerid);
public JobCoolDown(playerid)
{
CoolDown[playerid]=false;
}
I still believe there's some errors with the cmd itself, But you didnt complain so yea.
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)