caponemkd

Untitled

Nov 30th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.91 KB | None | 0 0
  1. #define DIALOG_CAROPTIONS 9846
  2.  
  3. if(dialogid == DIALOG_CAROPTIONS)
  4. {
  5. if(response)
  6. {
  7. if(listitem == 0)
  8. {
  9. new vehicleid = GetPlayerVehicleID(playerid);
  10. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  11. {
  12. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
  13. if(engine == 0 || engine == -1)
  14. {
  15. if(Gorivo[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid,-1, "{FF4040}GRESKA:{FFFFFF}Nemate dovolno gorivo, nemozete da go startuvate motorot.");
  16. format(string,sizeof(string), "|%s go stava klucot na bravata i se obiduva da go zapali motorot na voziloto.", GetName(playerid));
  17. ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  18. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  19. PaliMotor[vehicleid] = 1;
  20. Potrosnja[vehicleid] = 1;
  21. Kilometraza[vehicleid] = 1;
  22. }
  23. else if(engine == 1)
  24. {
  25. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  26. format(string,sizeof(string), "|%s go vrti klucot na levo i go gasi motorot na voziloto.", GetName(playerid));
  27. ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  28. Potrosnja[vehicleid] = 0;
  29. Kilometraza[vehicleid] = 0;
  30. }
  31. }
  32. }
  33. if(listitem == 1)
  34. {
  35. if(Svetla[playerid] == 0)
  36. {
  37. GetPlayerName(playerid, sendername, sizeof(sendername));
  38. format(string, sizeof(string), "|%s gi vklucuva svetlata.", sendername);
  39. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  40. SendClientMessage(playerid, -1, "{0049FF}SVETLA | {FFFFFF}Gi vklucivte svetlata.");
  41. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine , lights , alarm , doors , bonnet , boot , objective);
  42. SetVehicleParamsEx(GetPlayerVehicleID(playerid) , engine , 1 , alarm , doors , bonnet , boot , objective ) ;
  43. Svetla[playerid] = 1;
  44. }
  45. else
  46. {
  47. GetPlayerName(playerid, sendername, sizeof(sendername));
  48. format(string, sizeof(string), "|%s gi isklucuva svetlata.", sendername);
  49. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  50. SendClientMessage(playerid, -1, "{0049FF}SVETLA | {FFFFFF}Gi isklucivte svetlata.");
  51. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine , lights , alarm , doors , bonnet , boot , objective);
  52. SetVehicleParamsEx(GetPlayerVehicleID(playerid) , engine , 0 , alarm , doors , bonnet , boot , objective ) ;
  53. Svetla[playerid] = 0;
  54. }
  55. }
  56. if(listitem == 2)
  57. {
  58. if(Haulba[playerid] == 0)
  59. {
  60. GetPlayerName(playerid, sendername, sizeof(sendername));
  61. format(string, sizeof(string), "|%s ja otvara haulbata.", sendername);
  62. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  63. SendClientMessage(playerid, -1, "{0049FF}HAULBA | {FFFFFF}Ja otvorivte haulbata.");
  64. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine , lights , alarm , doors , bonnet , boot , objective);
  65. SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine , lights , alarm , doors , 1 , boot , objective);
  66. Haulba[playerid] = 1;
  67. }
  68. else
  69. {
  70. GetPlayerName(playerid, sendername, sizeof(sendername));
  71. format(string, sizeof(string), "|%s ja zatvara haulbata.", sendername);
  72. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  73. SendClientMessage(playerid, -1, "{0049FF}HAULBA | {FFFFFF}Ja zatvorivte haulbata.");
  74. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine , lights , alarm , doors , bonnet , boot , objective);
  75. SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine , lights , alarm , doors , 0 , boot , objective);
  76. Haulba[playerid] = 0;
  77. }
  78. }
  79. if(listitem == 3)
  80. {
  81. if(Gepeek[playerid] == 0)
  82. {
  83. GetPlayerName(playerid, sendername, sizeof(sendername));
  84. format(string, sizeof(string), "|%s go otvara gepekot.", sendername);
  85. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  86. SendClientMessage(playerid, -1, "{0049FF}GEPEK | {FFFFFF}Go otvorivte gepekot na voziloto.");
  87. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
  88. SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,1,objective);
  89. Gepeek[playerid] = 1;
  90. }
  91. else
  92. {
  93. GetPlayerName(playerid, sendername, sizeof(sendername));
  94. format(string, sizeof(string), "|%s go zatvara gepekot.", sendername);
  95. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  96. SendClientMessage(playerid, -1, "{0049FF}GEPEK | {FFFFFF}Go zatvorivte gepekot na voziloto.");
  97. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine , lights , alarm , doors , bonnet , boot , objective);
  98. SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine , lights , alarm , doors , bonnet , 0 , objective);
  99. Gepeek[playerid] = 0;
  100. }
  101. }
  102. if(listitem == 4)
  103. {
  104. if(Pojas[playerid] == 0)
  105. {
  106. GetPlayerName(playerid, sendername, sizeof(sendername));
  107. SCMF(playerid,COLOR_WHITE,"{0049FF}POJAS | {FFFFFF}Go stavivte pojasot.");
  108. format(string, sizeof(string), "|%s go zakaci negoviot sigurosen pojas.", sendername);
  109. ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  110. Pojas[playerid] = 1;
  111. }
  112. else
  113. {
  114. GetPlayerName(playerid, sendername, sizeof(sendername));
  115. SCMF(playerid,COLOR_WHITE,"{0049FF}POJAS | {FFFFFF}Go otkacivte pojasot.");
  116. format(string, sizeof(string), "|%s go otkaci negoviot sigurosen pojas.", sendername);
  117. ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  118. Pojas[playerid] = 0;
  119. }
  120. }
  121. if(listitem == 5)
  122. {
  123. new vehicleid = GetPlayerVehicleID(playerid);
  124. if(Prozorci[playerid] == 0)
  125. {
  126. SetVehicleParamsCarWindows(GetPlayerVehicleID(playerid), 0, 0, 0, 0);
  127. Prozorci[playerid] = 1;
  128. SCM(playerid, -1, "{0049FF}PROZORCI | {FFFFFF}Gi otvorivte prozorcite na voziloto.");
  129. GetPlayerName(playerid, sendername, sizeof(sendername));
  130. format(string, sizeof(string), "|%s gi otvori prozorcite na voziloto.", sendername);
  131. ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  132. }
  133. else
  134. {
  135. SetVehicleParamsCarWindows(GetPlayerVehicleID(playerid), 1, 1, 1, 1);
  136. Prozorci[playerid] = 0;
  137. SCM(playerid, -1, "{0049FF}PROZORCI | {FFFFFF}Gi zatvorivte prozorcite na voziloto.");
  138. GetPlayerName(playerid, sendername, sizeof(sendername));
  139. format(string, sizeof(string), "|%s gi zatvori prozorcite na voziloto.", sendername);
  140. ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  141. }
  142. }
  143. }
  144. return 1;
  145. }
  146.  
  147. if(newkeys & KEY_SUBMISSION)
  148. {
  149. new playerstate = GetPlayerState(playerid);
  150. if(playerstate == PLAYER_STATE_DRIVER)
  151. {
  152. SPD(playerid, DIALOG_CAROPTIONS, DIALOG_STYLE_LIST, "{0049FF}Izberete", "Motor [{6EF83C}ON{FFFFFF}/{FF4040}OFF{FFFFFF}]\nSvetla [{6EF83C}ON{FFFFFF}/{FF4040}OFF{FFFFFF}]\nHaulba [{6EF83C}ON{FFFFFF}/{FF4040}OFF{FFFFFF}]\nGepek [{6EF83C}ON{FFFFFF}/{FF4040}OFF{FFFFFF}]\nPojas [{6EF83C}ON{FFFFFF}/{FF4040}OFF{FFFFFF}]\nProzorci [{6EF83C}ON{FFFFFF}/{FF4040}OFF{FFFFFF}]", "Izberi", "Izlez");
  153. }
  154. }
  155. return 1;
  156. }
Advertisement
Add Comment
Please, Sign In to add comment