07.01.2018, 12:52
On top of your script:
The command:
anywhere in your script:
I still believe there's some errors with the cmd itself, But you didnt complain so yea.
Код:
new bool:CoolDown[MAX_PLAYERS];
Код:
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; }
Код:
forward JobCoolDown(playerid); public JobCoolDown(playerid) { CoolDown[playerid]=false; }