Help with this jobhelp txt
#1

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);
}
Reply
#2

what errors and what lines?
Reply
#3

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
Reply
#4

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)