Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. if(job_Start[playerid] == 1 && job_TempVar[playerid]==0)
  2. {
  3. if(IsAValetCar(carid))
  4. {
  5. new atmid=-1;
  6. for(new i=0; i<totalATMs; i++)
  7. {
  8. if(PlayerToPoint(8, playerid,atm[i][pos][0],atm[i][pos][1],atm[i][pos][2]))
  9. {atmid = i; break;}
  10. }
  11. if(atmid == -1)
  12. {msg_Client(playerid,COLOR_JOB,"{F9442C}« Job »{FFC6BF} Aucun ATM à côté de vous."); return 1;}
  13. if(atm[atmid][cash] >=25000)
  14. {msg_Client(playerid,COLOR_JOB,"{F9442C}« Job »{FFC6BF} Atm déjà remplie.");return 1;}
  15.  
  16. msg_Client(playerid,COLOR_JOB,"{F9442C}« Job »{FFC6BF} L'atm se remplie...");
  17. SetTimerEx("job_ResetFreeze",4000,0,"id",playerid,atmid); // 4 secondes
  18. TogglePlayerControllable(playerid,false);
  19. job_TempVar[playerid]=1;
  20. return 1;
  21. }
  22. }
  23. if(job_Start[playerid] == 1 && PlayerInfo[playerid][pJob] == 4)
  24. {
  25. if(!IsPlayerInAnyVehicle(playerid))
  26. {
  27. new Float:x,Float:y,Float:z;
  28. GetVehiclePos(job_CarId[playerid],x,y,z);
  29. if(PlayerToPoint(7.0,playerid,x,y,z))
  30. {
  31. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
  32. RemovePlayerAttachedObject(playerid,job_HoldingObjectSlot[playerid]);
  33. PlayerInfo[playerid][pJobExp]++;job_UpdateTexts(playerid);
  34. job_CheckPoints[playerid]++;
  35. trash[job_TempVar[playerid]][quantity]=0;
  36. trash_UpdateInfos(job_TempVar[playerid]); trash_Save(job_TempVar[playerid]);
  37. if(job_CheckPoints[playerid]==10)
  38. {job_TakePay(playerid,PlayerInfo[playerid][pJob]);job_CheckPoints[playerid]=0;}
  39. job_TempVar[playerid] = random(totalTrash);
  40. SetPlayerCheckpoint(playerid,trash[job_TempVar[playerid]][pos][0],trash[job_TempVar[playerid]][pos][1],trash[job_TempVar[playerid]][pos][2],3.0);
  41. msg_Client(playerid,COLOR_JOB,"{F9442C}« Job »{FFC6BF} Poubelle vidée, retourné dans votre camion.");
  42. }
  43. return 1;
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement