SA-MP Forums Archive
Help with this jobhelp 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 jobhelp txt (/showthread.php?tid=67812)



Help with this jobhelp txt - linxx - 04.03.2009

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

Код:
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);
}



Re: Help with this jobhelp txt - Kanji_Suzuki - 04.03.2009

what errors and what lines?


Re: Help with this jobhelp txt - linxx - 04.03.2009

Quote:
Originally Posted by J.Bull
what errors and what lines?
well it wasnt so much errors when i tryed to link pjob2 to the bottom to carry it on it compiled ut when i went ig and done /jobhelp it spammed the txt but when its just the one job it works fine, i must be linking job2 wrongly?? can you give me an example on how i correctly do this for multiple jobs ??

thanks vry much kry


Re: Help with this jobhelp txt - linxx - 05.03.2009

can anyone plz help i would like this fixed b4 i put the server on the host im paying for


Re: Help with this jobhelp txt - Daren_Jacobson - 06.03.2009

return SetTimerEx("JobHelp", time, false, "ddd", playerid, time, block + 1);
you are telling it to call itself over and over and over again.


Re: Help with this jobhelp txt - linxx - 06.03.2009

that is now fixed but what i would like to no is how to place the next jobhelp onto this correctly so i can make a run of like 20 jobs