SA-MP Forums Archive
Help with this txt - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with this txt (/showthread.php?tid=66579)



Help with this txt - linxx - 23.02.2009

Hiya guys im using this fof 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 and so on

Regards Krytan

[quote]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);
}


Re: Help with this txt - MenaceX^ - 23.02.2009

Didn't read the code due to not posting the error, First show up the error and the correct line.



Re: Help with this txt - linxx - 23.02.2009

no if took it out for now but what i would like to no is how to carry this on in the proper manner for up 2 20 jobs this is pjob 1 so how do i link the next string for pjob2 correctly?

Regards krytan