Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.38 KB | None | 0 0
  1. /////////////////////////////////////////////////////
  2. YCMD:prevozdrva(playerid, params[], help)
  3. {
  4. #pragma unused help
  5. #pragma unused params
  6. if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"UP:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
  7. if(PlayerInfo[playerid][pPosao] != POSAO_DRVOSECA) return SCM(playerid,-1,"UP:RP | "CRVENA"Niste drvoseca!");
  8. if(PosaoOprema[playerid] == 0) return SCM(playerid,-1,""SPLAVA"[UP:RP] "BELA"Niste uzeli opremu za posao (/oprema)!");
  9. if(PrevozDrva[playerid] != 0) return SCM(playerid,-1,""CRVENA"[UP:RP] "SIVA"Vec imas aktiviran posao!");
  10. if(GetPlayerVehicleID(playerid) >= vdrvoseca[0] && GetPlayerVehicleID(playerid) <= vdrvoseca[4])
  11. {
  12. SetPlayerCheckpoint(playerid, -2267.9983,-2221.3130,30.0496, 5.0); PrevozDrva[playerid] = 1;
  13. SCM(playerid,-1,"UP:RP | "SPLAVA"Krenuli ste sa prevozom drva, otidjite u sumu da utovarite drva!");
  14. }
  15. else return SCM(playerid,-1,"UP:RP | "CRVENA"Niste u kamionu!");
  16. return 1;
  17. }
  18. /////////////////////////////////////////////////////
  19. /////////////////////////////////PREVOZ DRVA DRVOSECA/////////////////////////////////
  20. if(PrevozDrva[playerid] == 1 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
  21. {
  22. if(IsPlayerInRangeOfPoint(playerid, 3.0, -2267.9983,-2221.3130,30.0496))
  23. {
  24. GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
  25. SetPlayerCheckpoint(playerid, -2288.2998,-2157.0940,48.2991, 3.0);
  26. PrevozDrva[playerid] = 2;
  27. }
  28. }
  29. if(PrevozDrva[playerid] == 2 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
  30. {
  31. if(IsPlayerInRangeOfPoint(playerid, 3.0, -2288.2998,-2157.0940,48.2991))
  32. {
  33. GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
  34. SetPlayerCheckpoint(playerid, -2101.9932,-1886.5752,110.5258, 3.0);
  35. PrevozDrva[playerid] = 3;
  36. }
  37. }
  38. if(PrevozDrva[playerid] == 3 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
  39. {
  40. if(IsPlayerInRangeOfPoint(playerid, 3.0, -2101.9932,-1886.5752,110.5258))
  41. {
  42. GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
  43. SetPlayerCheckpoint(playerid, -2196.9807,-2017.9189,119.5026, 3.0);
  44. PrevozDrva[playerid] = 4;
  45. }
  46. }
  47. if(PrevozDrva[playerid] == 4 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
  48. {
  49. if(IsPlayerInRangeOfPoint(playerid, 3.0, -2196.9807,-2017.9189,119.5026))
  50. {
  51. GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
  52. SetPlayerCheckpoint(playerid, -2477.5439,-2078.4978,124.9543, 3.0);
  53. PrevozDrva[playerid] = 5;
  54. }
  55. }
  56. if(PrevozDrva[playerid] == 5 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
  57. {
  58. if(IsPlayerInRangeOfPoint(playerid, 3.0, -2477.5439,-2078.4978,124.9543))
  59. {
  60. GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
  61. SetPlayerCheckpoint(playerid, -2665.0898,-1922.7791,131.2359, 3.0);
  62. PrevozDrva[playerid] = 6;
  63. }
  64. }
  65. if(PrevozDrva[playerid] == 6 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
  66. {
  67. if(IsPlayerInRangeOfPoint(playerid, 3.0, -2665.0898,-1922.7791,131.2359))
  68. {
  69. TogglePlayerControllable(playerid, 0);
  70. utovar[playerid] = SetTimerEx("preposta", 5000, false, "d", playerid);
  71. GameTextForPlayer(playerid, "~b~utovar drva...", 5000, 3);
  72. SetPlayerCheckpoint(playerid, -2816.2312,-1512.2799,139.2891, 3.0);
  73. PrevozDrva[playerid] = 7;
  74. }
  75. }
  76. if(PrevozDrva[playerid] == 7 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
  77. {
  78. if(IsPlayerInRangeOfPoint(playerid, 3.0, -2816.2312,-1512.2799,139.2891))
  79. {
  80. GameTextForPlayer(playerid, "~b~nastavite...", 5000, 3);
  81. SetPlayerCheckpoint(playerid, -2037.0625,-2380.2134,30.6250, 3.0);
  82. PrevozDrva[playerid] = 8;
  83. }
  84. }
  85. if(PrevozDrva[playerid] == 8 && CID >= vdrvoseca[0] && CID <= vdrvoseca[4] && GetPlayerState(playerid) == 2)
  86. {
  87. if(IsPlayerInRangeOfPoint(playerid, 3.0, -2037.0625,-2380.2134,30.6250))
  88. {
  89. new bonus = random(30), string[120];
  90. g_NovacPlus(playerid, 750+bonus);
  91. format(string,sizeof(string),""SPLAVA"Uspesno ste zavrsili prevoz drva!\n\n"BELA"Plata: "SPLAVA"750$\n"BELA"Bonus: "SPLAVA"%d$",bonus);
  92. ShowPlayerDialog(playerid,DIALOG_ISPLATA,DIALOG_STYLE_MSGBOX,"Kraj prevoza drva",string,"Ok","");
  93. PrevozDrva[playerid] = 0; DisablePlayerCheckpoint(playerid);
  94. }
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement