Advertisement
xt3z0ne

Untitled

Dec 23rd, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.12 KB | None | 0 0
  1. public OnPlayerEnterCheckpoint(playerid)
  2. {
  3. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && EsteMasinaJOB(GetPlayerVehicleID(playerid)))
  4. {
  5. if(PasJob[playerid] == 2 && IsPlayerInRangeOfPoint(playerid, 5, -233.0633,-1218.7089,6.5594))
  6. {
  7. DisablePlayerCheckpoint(playerid);
  8. SendClientMessage(playerid, 0xFFFFFFAA, "Parcheaza Masina in lateral.");
  9. SetPlayerCheckpoint(playerid, -242.7653,-1198.1378,7.4173, 5);
  10. PasJob[playerid] = 3;
  11. }
  12. else if(PasJob[playerid] == 3 && IsPlayerInRangeOfPoint(playerid, 5, -242.7653,-1198.1378,7.4173))
  13. {
  14. DisablePlayerCheckpoint(playerid);
  15. SendClientMessage(playerid, 0xFFFFFFAA, "Coboara din vehicul si dute la copacii pentru ai taia.");
  16. SetPlayerCheckpoint(playerid, -253.6463,-1220.2349,6.1858, 1.0);
  17. PasJob[playerid] = 4;
  18. }
  19. else if(PasJob[playerid] == 12 && IsPlayerInRangeOfPoint(playerid, 5, -380.8114,-1426.4735,25.7750))
  20. {
  21. new vehid;
  22. vehid = GetPlayerVehicleID(playerid);
  23. DisablePlayerCheckpoint(playerid);
  24. SendClientMessage(playerid, 0xFFFFFFAA, "Ai terminat slujba , ai primit : $100.000");
  25. GivePlayerMoney(playerid, 100000);
  26. DestroyPlayerObject(playerid, objjob[playerid]);
  27. SetVehicleToRespawn(vehid);
  28. SetPlayerSkin(playerid, 20);
  29. PasJob[playerid] = 0;
  30. masina[playerid] = 0;
  31. }
  32. }
  33. else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  34. {
  35. if(PasJob[playerid] == 4 && IsPlayerInRangeOfPoint(playerid, 1, -253.6463,-1220.2349,6.1858))
  36. {
  37. DisablePlayerCheckpoint(playerid);
  38. TogglePlayerControllable(playerid, 0);
  39. timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
  40. }
  41. else if(PasJob[playerid] == 5 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
  42. {
  43. DisablePlayerCheckpoint(playerid);
  44. if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  45. SendClientMessage(playerid, 0xFFFFFFAA, "Du-te acum la alt copac si taie-l.");
  46. SetPlayerCheckpoint(playerid, -245.1579,-1211.6552,6.7876, 1.0);
  47. PasJob[playerid] = 6;
  48. }
  49. else if(PasJob[playerid] == 6 && IsPlayerInRangeOfPoint(playerid, 1, -245.1579,-1211.6552,6.7876))
  50. {
  51. DisablePlayerCheckpoint(playerid);
  52. TogglePlayerControllable(playerid, 0);
  53. timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
  54. }
  55. else if(PasJob[playerid] == 7 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
  56. {
  57. DisablePlayerCheckpoint(playerid);
  58. if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  59. SetPlayerCheckpoint(playerid, -245.1579,-1211.6552,6.7876, 1.0);
  60. PasJob[playerid] = 8;
  61. }
  62. else if(PasJob[playerid] == 8 && IsPlayerInRangeOfPoint(playerid, 1, -245.1579,-1211.6552,6.7876))
  63. {
  64. DisablePlayerCheckpoint(playerid);
  65. TogglePlayerControllable(playerid, 0);
  66. timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
  67. }
  68. else if(PasJob[playerid] == 9 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
  69. {
  70. DisablePlayerCheckpoint(playerid);
  71. if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  72. SetPlayerCheckpoint(playerid, -255.9491,-1219.1299,6.5362, 1.0);
  73. PasJob[playerid] = 10;
  74. }
  75. else if(PasJob[playerid] == 10 && IsPlayerInRangeOfPoint(playerid, 1, -255.9491,-1219.1299,6.5362))
  76. {
  77. DisablePlayerCheckpoint(playerid);
  78. TogglePlayerControllable(playerid, 0);
  79. timecut[playerid] = SetTimerEx("timpjob",5000,false,"i", playerid);
  80. }
  81. else if(PasJob[playerid] == 11 && IsPlayerInRangeOfPoint(playerid, 2, -103.7549, -1546.4635, 2.6107))
  82. {
  83. DisablePlayerCheckpoint(playerid);
  84. if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  85. objjob[playerid] = CreatePlayerObject(playerid, 18609, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 300.0);
  86. AttachPlayerObjectToVehicle(playerid, objjob[playerid], masina[playerid], -0.06195, -4.93747, 0.73480, 0.00000, 0.00000, 5.00000);
  87. SendClientMessage(playerid, 0xFFFFFFAA, "Ai Adunat Lemnele necesare , urca in vehicul si dute sa duci lemnele la depozit.");
  88. SetPlayerCheckpoint(playerid, -380.8114,-1426.4735,25.7750, 5);
  89. PasJob[playerid] = 12;
  90. }
  91. }
  92. return 1;
  93. }
  94.  
  95. public timpjob(playerid)
  96. {
  97. if(PasJob[playerid] == 4)
  98. {
  99. TogglePlayerControllable(playerid, 1);
  100. SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  101. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  102. SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
  103. PasJob[playerid] = 5;
  104. SendClientMessage(playerid, 0xFFFFFFAA, "Du-te si incarca lemnele in masina.");
  105. }
  106. if(PasJob[playerid] == 6)
  107. {
  108. TogglePlayerControllable(playerid, 1);
  109. SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  110. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  111. SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
  112. PasJob[playerid] = 7;
  113. }
  114. if(PasJob[playerid] == 8)
  115. {
  116. TogglePlayerControllable(playerid, 1);
  117. SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  118. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  119. SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
  120. PasJob[playerid] = 9;
  121. }
  122. if(PasJob[playerid] == 10)
  123. {
  124. TogglePlayerControllable(playerid, 1);
  125. SetPlayerAttachedObject(playerid, 1, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  126. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  127. SetPlayerCheckpoint(playerid,-245.1016,-1198.7922,7.1984,2.0);
  128. PasJob[playerid] = 11;
  129. }
  130. return 1;
  131. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement