04.03.2009, 15:31
Hiya guys im using this for my jobhelp but how can i carry it on to ad mutiple jobs, sorry for this stuped post but evertime i try and edit it i get errors as u can see this is pjob 1 so how can i ad pjob2 to the bottom to carry on the code for multiple jobs
Regards Krytan
Regards Krytan
Код:
if(!strcmp("/jobhelp", cmdtext, true)) return JobHelp(playerid, 20000, 0); forward JobHelp(playerid, time, block); public JobHelp(playerid, time, block) { switch(PlayerInfo[playerid][pJob]) { case 1: switch(block) { case 0: { SendClientMessage(playerid, COLOR_GREEN, "text here."); SendClientMessage(playerid, COLOR_YELLOW, "text here ."); SendClientMessage(playerid, COLOR_YELLOW, "text here."); } case 1: { SendClientMessage(playerid, COLOR_GREEN, "text here."); SendClientMessage(playerid, COLOR_YELLOW, "text here ."); SendClientMessage(playerid, COLOR_YELLOW, "text here."); } default: return true; //the default need to be added else this function will repeat and repeat :S } default: return SendClientMessage(playerid, COLOR_YELLOW, "Jobid isnt defined! Please report this to an admin!"); } return SetTimerEx("JobHelp", time, false, "ddd", playerid, time, block + 1); }