Advertisement
Guest User

Untitled

a guest
Jan 20th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.04 KB | None | 0 0
  1. if(newkeys & KEY_SUBMISSION)
  2. {
  3. if(VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid)))) return 1;
  4. new engine, lights, alarm, doors, bonnet, boot, objective;
  5. new i = PlayerInfo[playerid][pPosedovanjeAuta];
  6. new idveh = GetPlayerVehicleID(playerid);
  7. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
  8. if(GetPlayerVehicleID(playerid) >= vmotosalon[0] && GetPlayerVehicleID(playerid) <= vmotosalon[10]) return SCM(playerid,-1,"TEST:RP | "CRVENA"Ne mozete upaliti motor na izlozbeno vozilo!");
  9. if(GetPlayerVehicleID(playerid) == IzlozbenoAuto) return SCM(playerid,-1,"TEST:RP | "CRVENA"Ne mozete upaliti motor na izlozbeno vozilo!");
  10. if(AutoSalonVozila(GetPlayerVehicleID(playerid))) return SCM(playerid,-1,"TEST:RP | "CRVENA"Ne mozete upaliti motor na izlozbeno vozilo!");
  11. //if(GetPlayerVehicleID(playerid) != VoziloInfo[i][vID]) return SCM(playerid,-1,"[TEST:RP] "CRVENA"Nemate kljuceve ovog vozila!");
  12. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  13. {
  14. if(VoziloJeMotor(GetVehicleModel(GetPlayerVehicleID(playerid))))
  15. {
  16. if(MotorInfo[idveh][mImaVlasnika] == 1)
  17. {
  18. if(MotorInfo[idveh][mID] != MotorInfo[i][mID])
  19. {
  20. SCM(playerid,-1,"[TEST:RP] "CRVENA"Nemate kljuceve ovog motora!");
  21. }
  22. else if(MotorInfo[idveh][mID] == MotorInfo[i][mID])
  23. {
  24. new CmdString[128];
  25. if(gEngine[playerid] == 1)
  26. {
  27. return 1;
  28. }
  29. if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid, -1, "Nemate goriva u vozilu, ne mozete upaliti motor!");
  30. new Float:HP;
  31. GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
  32. if(HP < 400.0) return SCM(playerid, -1, "* Vase vozilo je previse osteceno, ne mozete ga voziti!");
  33. if(engineOn[GetPlayerVehicleID(playerid)] == false)
  34. {
  35. palimotor[playerid]+=1;
  36. if(palimotor[playerid] == 1)
  37. {
  38. //SCM(playerid, -1, "Kako biste popravili ostecenje, pozovite mehanicare komandom /call");
  39. //SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  40. format(CmdString, 128, "* %s uzima kljuc vozila i pokusava da upali motor na vozilu.", GetName(playerid));
  41. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  42. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  43. GameTextForPlayer(playerid, "~w~Pokretanje motora...",3500,3);
  44. return 1;
  45. }
  46. }
  47. if(engineOn[GetPlayerVehicleID(playerid)] == true)
  48. {
  49. gEngine[playerid] = 0;
  50. format(CmdString, 128, "* %s gasi motor vozila.", GetName(playerid));
  51. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  52. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  53. engineOn[GetPlayerVehicleID(playerid)] = false;
  54. palimotor[playerid] = 0;
  55. GameTextForPlayer(playerid, " ",3500,3);
  56. return 1;
  57. }
  58. }
  59. }
  60. else if(MotorInfo[idveh][mImaVlasnika] == 0)
  61. {
  62. new CmdString[128];
  63. if(gEngine[playerid] == 1)
  64. {
  65. return 1;
  66. }
  67. if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid, -1, "Nemate goriva u vozilu, ne mozete upaliti motor!");
  68. new Float:HP;
  69. GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
  70. if(HP < 400.0) return SCM(playerid, -1, "* Vase vozilo je previse osteceno, ne mozete ga voziti!");
  71. if(engineOn[GetPlayerVehicleID(playerid)] == false)
  72. {
  73. palimotor[playerid]+=1;
  74. if(palimotor[playerid] == 1)
  75. {
  76. //SCM(playerid, -1, "Kako biste popravili ostecenje, pozovite mehanicare komandom /call");
  77. //SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  78. format(CmdString, 128, "* %s uzima kljuc vozila i pokusava da upali motor na vozilu.", GetName(playerid));
  79. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  80. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  81. GameTextForPlayer(playerid, "~w~Pokretanje motora...",3500,3);
  82. return 1;
  83. }
  84. }
  85. if(engineOn[GetPlayerVehicleID(playerid)] == true)
  86. {
  87. gEngine[playerid] = 0;
  88. format(CmdString, 128, "* %s gasi motor vozila.", GetName(playerid));
  89. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  90. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  91. engineOn[GetPlayerVehicleID(playerid)] = false;
  92. palimotor[playerid] = 0;
  93. GameTextForPlayer(playerid, " ",3500,3);
  94. return 1;
  95. }
  96. }
  97. }
  98. else if(VoziloJeBrod(GetVehicleModel(GetPlayerVehicleID(playerid))))
  99. {
  100. if(PlovilaInfo[idveh][plImaVlasnika] == 1)
  101. {
  102. if(PlovilaInfo[idveh][plID] != PlovilaInfo[i][plID])
  103. {
  104. SCM(playerid,-1,"[TEST:RP] "CRVENA"Nemate kljuceve ovog plovila!");
  105. }
  106. else if(PlovilaInfo[idveh][plID] == PlovilaInfo[i][plID])
  107. {
  108. new CmdString[128];
  109. if(gEngine[playerid] == 1)
  110. {
  111. return 1;
  112. }
  113. if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid, -1, "Nemate goriva u vozilu, ne mozete upaliti motor!");
  114. new Float:HP;
  115. GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
  116. if(HP < 400.0) return SCM(playerid, -1, "* Vase vozilo je previse osteceno, ne mozete ga voziti!");
  117. if(engineOn[GetPlayerVehicleID(playerid)] == false)
  118. {
  119. palimotor[playerid]+=1;
  120. if(palimotor[playerid] == 1)
  121. {
  122. //SCM(playerid, -1, "Kako biste popravili ostecenje, pozovite mehanicare komandom /call");
  123. //SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  124. format(CmdString, 128, "* %s uzima kljuc vozila i pokusava da upali motor na vozilu.", GetName(playerid));
  125. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  126. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  127. GameTextForPlayer(playerid, "~w~Pokretanje motora...",3500,3);
  128. return 1;
  129. }
  130. }
  131. if(engineOn[GetPlayerVehicleID(playerid)] == true)
  132. {
  133. gEngine[playerid] = 0;
  134. format(CmdString, 128, "* %s gasi motor vozila.", GetName(playerid));
  135. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  136. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  137. engineOn[GetPlayerVehicleID(playerid)] = false;
  138. palimotor[playerid] = 0;
  139. GameTextForPlayer(playerid, " ",3500,3);
  140. return 1;
  141. }
  142. }
  143. }
  144. else if(PlovilaInfo[idveh][plImaVlasnika] == 0)
  145. {
  146. new CmdString[128];
  147. if(gEngine[playerid] == 1)
  148. {
  149. return 1;
  150. }
  151. if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid, -1, "Nemate goriva u vozilu, ne mozete upaliti motor!");
  152. new Float:HP;
  153. GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
  154. if(HP < 400.0) return SCM(playerid, -1, "* Vase vozilo je previse osteceno, ne mozete ga voziti!");
  155. if(engineOn[GetPlayerVehicleID(playerid)] == false)
  156. {
  157. palimotor[playerid]+=1;
  158. if(palimotor[playerid] == 1)
  159. {
  160. //SCM(playerid, -1, "Kako biste popravili ostecenje, pozovite mehanicare komandom /call");
  161. //SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  162. format(CmdString, 128, "* %s uzima kljuc vozila i pokusava da upali motor na vozilu.", GetName(playerid));
  163. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  164. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  165. GameTextForPlayer(playerid, "~w~Pokretanje motora...",3500,3);
  166. return 1;
  167. }
  168. }
  169. if(engineOn[GetPlayerVehicleID(playerid)] == true)
  170. {
  171. gEngine[playerid] = 0;
  172. format(CmdString, 128, "* %s gasi motor vozila.", GetName(playerid));
  173. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  174. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  175. engineOn[GetPlayerVehicleID(playerid)] = false;
  176. palimotor[playerid] = 0;
  177. GameTextForPlayer(playerid, " ",3500,3);
  178. return 1;
  179. }
  180. }
  181. }
  182. else if(VoziloJeAvion(GetVehicleModel(GetPlayerVehicleID(playerid))))
  183. {
  184. if(AvionInfo[idveh][avImaVlasnika] == 1)
  185. {
  186. if(AvionInfo[idveh][avID] != AvionInfo[i][avID])
  187. {
  188. SCM(playerid,-1,"[TEST:RP] "CRVENA"Nemate kljuceve ove letjelice!");
  189. }
  190. else if(AvionInfo[idveh][avID] == AvionInfo[i][avID])
  191. {
  192. new CmdString[128];
  193. if(gEngine[playerid] == 1)
  194. {
  195. return 1;
  196. }
  197. if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid, -1, "Nemate goriva u vozilu, ne mozete upaliti motor!");
  198. new Float:HP;
  199. GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
  200. if(HP < 400.0) return SCM(playerid, -1, "* Vase vozilo je previse osteceno, ne mozete ga voziti!");
  201. if(engineOn[GetPlayerVehicleID(playerid)] == false)
  202. {
  203. palimotor[playerid]+=1;
  204. if(palimotor[playerid] == 1)
  205. {
  206. //SCM(playerid, -1, "Kako biste popravili ostecenje, pozovite mehanicare komandom /call");
  207. //SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  208. format(CmdString, 128, "* %s uzima kljuc vozila i pokusava da upali motor na vozilu.", GetName(playerid));
  209. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  210. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  211. GameTextForPlayer(playerid, "~w~Pokretanje motora...",3500,3);
  212. return 1;
  213. }
  214. }
  215. if(engineOn[GetPlayerVehicleID(playerid)] == true)
  216. {
  217. gEngine[playerid] = 0;
  218. format(CmdString, 128, "* %s gasi motor vozila.", GetName(playerid));
  219. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  220. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  221. engineOn[GetPlayerVehicleID(playerid)] = false;
  222. palimotor[playerid] = 0;
  223. GameTextForPlayer(playerid, " ",3500,3);
  224. return 1;
  225. }
  226. }
  227. }
  228. else if(AvionInfo[idveh][avImaVlasnika] == 0)
  229. {
  230. new CmdString[128];
  231. if(gEngine[playerid] == 1)
  232. {
  233. return 1;
  234. }
  235. if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid, -1, "Nemate goriva u vozilu, ne mozete upaliti motor!");
  236. new Float:HP;
  237. GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
  238. if(HP < 400.0) return SCM(playerid, -1, "* Vase vozilo je previse osteceno, ne mozete ga voziti!");
  239. if(engineOn[GetPlayerVehicleID(playerid)] == false)
  240. {
  241. palimotor[playerid]+=1;
  242. if(palimotor[playerid] == 1)
  243. {
  244. //SCM(playerid, -1, "Kako biste popravili ostecenje, pozovite mehanicare komandom /call");
  245. //SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  246. format(CmdString, 128, "* %s uzima kljuc vozila i pokusava da upali motor na vozilu.", GetName(playerid));
  247. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  248. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  249. GameTextForPlayer(playerid, "~w~Pokretanje motora...",3500,3);
  250. return 1;
  251. }
  252. }
  253. if(engineOn[GetPlayerVehicleID(playerid)] == true)
  254. {
  255. gEngine[playerid] = 0;
  256. format(CmdString, 128, "* %s gasi motor vozila.", GetName(playerid));
  257. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  258. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  259. engineOn[GetPlayerVehicleID(playerid)] = false;
  260. palimotor[playerid] = 0;
  261. GameTextForPlayer(playerid, " ",3500,3);
  262. return 1;
  263. }
  264. }
  265. }
  266. else if(VoziloJeKamion(GetVehicleModel(GetPlayerVehicleID(playerid))))
  267. {
  268. if(VoziloInfo[idveh][vImaVlasnika] == 1)
  269. {
  270. if(VoziloInfo[idveh][vID] != VoziloInfo[i][vID])
  271. {
  272. SCM(playerid,-1,"[TEST:RP] "CRVENA"Nemate kljuceve ovog kamiona!");
  273. }
  274. else if(VoziloInfo[idveh][vID] == VoziloInfo[i][vID])
  275. {
  276. new CmdString[128];
  277. if(gEngine[playerid] == 1)
  278. {
  279. return 1;
  280. }
  281. if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid, -1, "Nemate goriva u vozilu, ne mozete upaliti motor!");
  282. new Float:HP;
  283. GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
  284. if(HP < 400.0) return SCM(playerid, -1, "* Vase vozilo je previse osteceno, ne mozete ga voziti!");
  285. if(engineOn[GetPlayerVehicleID(playerid)] == false)
  286. {
  287. palimotor[playerid]+=1;
  288. if(palimotor[playerid] == 1)
  289. {
  290. //SCM(playerid, -1, "Kako biste popravili ostecenje, pozovite mehanicare komandom /call");
  291. //SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  292. format(CmdString, 128, "* %s uzima kljuc vozila i pokusava da upali motor na vozilu.", GetName(playerid));
  293. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  294. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  295. GameTextForPlayer(playerid, "~w~Pokretanje motora...",3500,3);
  296. return 1;
  297. }
  298. }
  299. if(engineOn[GetPlayerVehicleID(playerid)] == true)
  300. {
  301. gEngine[playerid] = 0;
  302. format(CmdString, 128, "* %s gasi motor vozila.", GetName(playerid));
  303. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  304. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  305. engineOn[GetPlayerVehicleID(playerid)] = false;
  306. palimotor[playerid] = 0;
  307. GameTextForPlayer(playerid, " ",3500,3);
  308. return 1;
  309. }
  310. }
  311. }
  312. else if(VoziloInfo[idveh][vImaVlasnika] == 0)
  313. {
  314. new CmdString[128];
  315. if(gEngine[playerid] == 1)
  316. {
  317. return 1;
  318. }
  319. if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid, -1, "Nemate goriva u vozilu, ne mozete upaliti motor!");
  320. new Float:HP;
  321. GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
  322. if(HP < 400.0) return SCM(playerid, -1, "* Vase vozilo je previse osteceno, ne mozete ga voziti!");
  323. if(engineOn[GetPlayerVehicleID(playerid)] == false)
  324. {
  325. palimotor[playerid]+=1;
  326. if(palimotor[playerid] == 1)
  327. {
  328. //SCM(playerid, -1, "Kako biste popravili ostecenje, pozovite mehanicare komandom /call");
  329. //SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  330. format(CmdString, 128, "* %s uzima kljuc vozila i pokusava da upali motor na vozilu.", GetName(playerid));
  331. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  332. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  333. GameTextForPlayer(playerid, "~w~Pokretanje motora...",3500,3);
  334. return 1;
  335. }
  336. }
  337. if(engineOn[GetPlayerVehicleID(playerid)] == true)
  338. {
  339. gEngine[playerid] = 0;
  340. format(CmdString, 128, "* %s gasi motor vozila.", GetName(playerid));
  341. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  342. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  343. engineOn[GetPlayerVehicleID(playerid)] = false;
  344. palimotor[playerid] = 0;
  345. GameTextForPlayer(playerid, " ",3500,3);
  346. return 1;
  347. }
  348. }
  349. }
  350. else
  351. {
  352. if(VoziloInfo[idveh][vImaVlasnika] == 1)
  353. {
  354. if(VoziloInfo[idveh][vID] != VoziloInfo[i][vID])
  355. {
  356. SCM(playerid,-1,"[TEST:RP] "CRVENA"Nemate kljuceve ovog vozila!");
  357. }
  358. else if(VoziloInfo[idveh][vID] == VoziloInfo[i][vID])
  359. {
  360. new CmdString[128];
  361. if(gEngine[playerid] == 1)
  362. {
  363. return 1;
  364. }
  365. if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid, -1, "Nemate goriva u vozilu, ne mozete upaliti motor!");
  366. new Float:HP;
  367. GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
  368. if(HP < 400.0) return SCM(playerid, -1, "* Vase vozilo je previse osteceno, ne mozete ga voziti!");
  369. if(engineOn[GetPlayerVehicleID(playerid)] == false)
  370. {
  371. palimotor[playerid]+=1;
  372. if(palimotor[playerid] == 1)
  373. {
  374. //SCM(playerid, -1, "Kako biste popravili ostecenje, pozovite mehanicare komandom /call");
  375. //SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  376. format(CmdString, 128, "* %s uzima kljuc vozila i pokusava da upali motor na vozilu.", GetName(playerid));
  377. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  378. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  379. GameTextForPlayer(playerid, "~w~Pokretanje motora...",3500,3);
  380. return 1;
  381. }
  382. }
  383. if(engineOn[GetPlayerVehicleID(playerid)] == true)
  384. {
  385. gEngine[playerid] = 0;
  386. format(CmdString, 128, "* %s gasi motor vozila.", GetName(playerid));
  387. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  388. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  389. engineOn[GetPlayerVehicleID(playerid)] = false;
  390. palimotor[playerid] = 0;
  391. GameTextForPlayer(playerid, " ",3500,3);
  392. return 1;
  393. }
  394. }
  395. }
  396. else if(VoziloInfo[idveh][vImaVlasnika] == 0)
  397. {
  398. new CmdString[128];
  399. if(gEngine[playerid] == 1)
  400. {
  401. return 1;
  402. }
  403. if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid, -1, "Nemate goriva u vozilu, ne mozete upaliti motor!");
  404. new Float:HP;
  405. GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
  406. if(HP < 400.0) return SCM(playerid, -1, "* Vase vozilo je previse osteceno, ne mozete ga voziti!");
  407. if(engineOn[GetPlayerVehicleID(playerid)] == false)
  408. {
  409. palimotor[playerid]+=1;
  410. if(palimotor[playerid] == 1)
  411. {
  412. //SCM(playerid, -1, "Kako biste popravili ostecenje, pozovite mehanicare komandom /call");
  413. //SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  414. format(CmdString, 128, "* %s uzima kljuc vozila i pokusava da upali motor na vozilu.", GetName(playerid));
  415. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  416. SetTimerEx("StartingTheVehicle",3000,0,"i",playerid);
  417. GameTextForPlayer(playerid, "~w~Pokretanje motora...",3500,3);
  418. return 1;
  419. }
  420. }
  421. if(engineOn[GetPlayerVehicleID(playerid)] == true)
  422. {
  423. gEngine[playerid] = 0;
  424. format(CmdString, 128, "* %s gasi motor vozila.", GetName(playerid));
  425. ProxDetector(10.0, playerid, CmdString, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  426. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
  427. engineOn[GetPlayerVehicleID(playerid)] = false;
  428. palimotor[playerid] = 0;
  429. GameTextForPlayer(playerid, " ",3500,3);
  430. return 1;
  431. }
  432. }
  433. }
  434. }
  435. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement