Advertisement
Guest User

Eo ti sve vezano oko ulaza i izlaza iz auta

a guest
May 29th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.54 KB | None | 0 0
  1. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  2. {
  3. new sendername[MAX_PLAYER_NAME];
  4. new stringent[64];
  5. GetPlayerName(playerid, sendername, sizeof(sendername));
  6. format(stringent, sizeof(stringent), " %s ulazi u vozilo.", sendername);
  7. ProxDetector(10.0, playerid, stringent,PROX,PROX,PROX,PROX,PROX);
  8. //------------------------------------------------------------------------//
  9. new Float:Poz[3]; GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  10. SCM(playerid,-1,"[Vozilo] "ZELENA"Ulazite u vozilo! TEMPOMAT - Y !");
  11. SCM(playerid,-1,"[Vozilo] "ZELENA"SVETLA - /svetlaon /svetlaoff!");
  12. new string[128], vozilo;
  13. for(new i = 0; i < sizeof(VoziloInfo); i++)
  14. {
  15. if(VoziloInfo[i][vID] == vozilo)
  16. {
  17. if(VoziloInfo[i][vImaVlasnika] == 1)
  18. {
  19. if(PlayerInfo[playerid][pAdmin] >= 5)
  20. {
  21. format(string,sizeof(string),""SPLAVA"Privatno Auto | "SIVA"Vlasnik: "SPLAVA"%s | "ZELENA"ID: %i", VoziloInfo[i][vVlasnik], i);
  22. SCM(playerid,-1,string);
  23. }
  24. else if(PlayerInfo[playerid][pPosedovanjeAuta] == i)
  25. {
  26. SCM(playerid,-1,"[LG:RP] "ZELENA"Ulazite u vase vozilo!");
  27. }
  28. else if(VoziloInfo[i][vZakljucan] == 0)
  29. {
  30. SCM(playerid,-1,""SPLAVA"Privatno Auto");
  31. }
  32. else
  33. {
  34. RemovePlayerFromVehicle(playerid);
  35. SCM(playerid,-1,""SPLAVA"Zakljucano Auto");
  36. }
  37. //--------------------------------------------------------------------//
  38. if(vehicleid >= vmotosalon[0] && vehicleid <= vmotosalon[9])
  39. {
  40. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  41. SCM(playerid,-1,"LG:RP | "CRVENA"Ne mozete uci u izlozbeno vozilo!");
  42. }
  43. if(vehicleid == IzlozbenoAuto)
  44. {
  45. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  46. SCM(playerid,-1,"LG:RP | "CRVENA"Ne mozete uci u izlozbeno vozilo!");
  47. }
  48. if(AutoSalonVozila(vehicleid))
  49. {
  50. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  51. SCM(playerid,-1,"LG:RP | "CRVENA"Ne mozete uci u izlozbeno vozilo!");
  52. }
  53. if(PolicijskaAuta(vehicleid))
  54. {
  55. if(PlayerInfo[playerid][pClan] != 1)
  56. {
  57. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  58. GameTextForPlayer(playerid, "~b~Los Santos Police Department!", 2500, 5);
  59. }
  60. }
  61. else if(TVFAuta(vehicleid))
  62. {
  63. if(PlayerInfo[playerid][pClan] != 2)
  64. {
  65. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  66. GameTextForPlayer(playerid, "~r~The Vinci Family!", 2500, 5);
  67. }
  68. }
  69. else if(BDTVozila(vehicleid))
  70. {
  71. if(PlayerInfo[playerid][pClan] != 3)
  72. {
  73. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  74. GameTextForPlayer(playerid, "~l~Black Dragon Triads!", 2500, 5);
  75. }
  76. }
  77. else if(GroveVozila(vehicleid))
  78. {
  79. if(PlayerInfo[playerid][pClan] != 4)
  80. {
  81. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  82. GameTextForPlayer(playerid, "~g~Grove Stret Family!", 2500, 5);
  83. }
  84. }
  85. else if(BallasVozila(vehicleid))
  86. {
  87. if(PlayerInfo[playerid][pClan] != 5)
  88. {
  89. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  90. GameTextForPlayer(playerid, "~w~Ballas!", 2500, 5);
  91. }
  92. }
  93. else if(NovinariVozila(vehicleid))
  94. {
  95. if(PlayerInfo[playerid][pClan] != 6)
  96. {
  97. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  98. GameTextForPlayer(playerid, "~y~Los Santos Novinari!", 2500, 5);
  99. }
  100. }
  101. else if(SherifVozila(vehicleid))
  102. {
  103. if(PlayerInfo[playerid][pClan] != 7)
  104. {
  105. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  106. GameTextForPlayer(playerid, "~y~Sherif!", 2500, 5);
  107. }
  108. }
  109. else if(PSVozila(vehicleid))
  110. {
  111. if(PlayerInfo[playerid][pClan] != 8)
  112. {
  113. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  114. GameTextForPlayer(playerid, "~y~Parking Servis!", 2500, 5);
  115. }
  116. }
  117. else if(CondorVozila(vehicleid))
  118. {
  119. if(PlayerInfo[playerid][pClan] != 9)
  120. {
  121. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  122. GameTextForPlayer(playerid, "~y~Condor!", 2500, 5);
  123. }
  124. }
  125. }
  126. }
  127. }
  128. return 1;
  129. }
  130. //----------------------------------------------------------------------------//
  131. public OnPlayerExitVehicle(playerid, vehicleid)
  132. {
  133. new sendername[MAX_PLAYER_NAME];
  134. new stringext[64];
  135. GetPlayerName(playerid, sendername, sizeof(sendername));
  136. format(stringext, sizeof(stringext), " %s izlazi iz vozila.", sendername);
  137. ProxDetector(10.0, playerid, stringext,PROX,PROX,PROX,PROX,PROX);
  138. return 1;
  139. }
  140. //----------------------------------------------------------------------------//
  141. public OnPlayerStateChange(playerid, newstate, oldstate)
  142. {
  143. new vozilo = GetPlayerVehicleID(playerid);
  144. new vIDs = GetPlayerVehicleID(playerid), vrsta[20];
  145. if(!VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
  146. {
  147. new string[128];
  148. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[0][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[0][playerid]);
  149. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[1][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[1][playerid]);
  150. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[2][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[2][playerid]);
  151. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[3][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[3][playerid]);
  152. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[4][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[4][playerid]);
  153. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[5][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[5][playerid]);
  154. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[6][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[6][playerid]);
  155. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[7][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[7][playerid]);
  156. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[8][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[8][playerid]);
  157. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[9][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[9][playerid]);
  158. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[10][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[10][playerid]);
  159. if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[11][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[11][playerid]);
  160. //--------------------------------------------------------------------//
  161. format(vrsta, sizeof(vrsta), "%s", ImenaVozila[GetVehicleModel(vozilo) - 400]);
  162. PlayerTextDrawSetString(playerid, BRZINOMER[9][playerid], vrsta);
  163. PlayerTextDrawSetPreviewVehCol(playerid, BRZINOMER[4][playerid], 1, 1);
  164. PlayerTextDrawSetPreviewModel(playerid, BRZINOMER[4][playerid], GetVehicleModel(vIDs));
  165. if(newstate == PLAYER_STATE_DRIVER)
  166. {
  167. PlayerTextDrawShow(playerid, BRZINOMER[5][playerid]);
  168. new engine, lights, alarm, doors, bonnet, boot, objective;
  169. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
  170. if(engine == 0 || engine == -1)
  171. {
  172. format(string, sizeof(string), "~r~o");
  173. PlayerTextDrawSetString(playerid,BRZINOMER[5][playerid], string);
  174. }
  175. else if(engine == 1)
  176. {
  177. format(string, sizeof(string), "~g~o");
  178. PlayerTextDrawSetString(playerid,BRZINOMER[5][playerid], string);
  179. }
  180. }
  181. }
  182. //------------------------------------------------------------------------//
  183. if(newstate == PLAYER_STATE_DRIVER)
  184. {
  185. for(new i = 0; i < sizeof(VoziloInfo); i++)
  186. {
  187. if(VoziloInfo[i][vID] == vozilo)
  188. {
  189. new cijena = CijeneAuta(GetVehicleModel(GetPlayerVehicleID(playerid)));
  190. if(VoziloInfo[i][vImaVlasnika] == 0)
  191. {
  192. SCM(playerid,-1,""SPLAVA"Polovan auto na prodaju | /kupiauto | /izlaz");
  193. new string[128];
  194. format(string, charsmax(string), ""SPLAVA"Cena: "BELA"%d$ | "SPLAVA"Model: "BELA"%s",AutoSalon[cijena][1]/2, ImenaVozila[GetVehicleModel(vozilo) - 400]);
  195. SCM(playerid,-1, string);
  196. UsaoAutoProdaja[playerid] = i; TogglePlayerControllable(playerid, 0);
  197. return 1;
  198. }
  199. }
  200. }
  201. //--------------------------------------------------------------------//
  202. for(new i = 0; i < sizeof(MotorInfo); i++)
  203. {
  204. if(MotorInfo[i][mID] == vozilo)
  205. {
  206. if(MotorInfo[i][mImaVlasnika] == 0)
  207. {
  208. SCM(playerid,-1,""ZUTA"Polovan motor na prodaju | /kupimotor | /izlaz");
  209. new string[128];
  210. format(string, charsmax(string), ""ZUTA"Cena: "BELA"%d$ | "ZUTA"Model: "BELA"%s",MotorInfo[i][mCijena]/2, ImenaVozila[GetVehicleModel(vozilo) - 400]);
  211. SCM(playerid,-1, string);
  212. UsaoMotorProdaja[playerid] = i; TogglePlayerControllable(playerid, 0);
  213. return 1;
  214. }
  215. }
  216. }
  217. //--------------------------------------------------------------------//
  218. for(new i = 0; i < sizeof(AvionInfo); i++)
  219. {
  220. if(AvionInfo[i][avID] == vozilo)
  221. {
  222. if(AvionInfo[i][avImaVlasnika] == 0)
  223. {
  224. SCM(playerid,-1,""ZUTA"Polovana letjelica na prodaju | /kupiletjelicu | /izlaz");
  225. new string[128];
  226. format(string, charsmax(string), ""ZUTA"Cena: "BELA"%d$ | "ZUTA"Model: "BELA"%s",AvionInfo[i][avCijena]/2, ImenaVozila[GetVehicleModel(vozilo) - 400]);
  227. SCM(playerid,-1, string);
  228. UsaoAvionProdaja[playerid] = i; TogglePlayerControllable(playerid, 0);
  229. return 1;
  230. }
  231. }
  232. }
  233. //--------------------------------------------------------------------//
  234. for(new i = 0; i < sizeof(PlovilaInfo); i++)
  235. {
  236. if(PlovilaInfo[i][plID] == vozilo)
  237. {
  238. if(PlovilaInfo[i][plImaVlasnika] == 0)
  239. {
  240. SCM(playerid,-1,""ZUTA"Polovno plovilo na prodaju | /kupiplovilo | /izlaz");
  241. new string[128];
  242. format(string, charsmax(string), ""ZUTA"Cena: "BELA"%d$ | "ZUTA"Model: "BELA"%s",PlovilaInfo[i][plCijena]/2, ImenaVozila[GetVehicleModel(vozilo) - 400]);
  243. SCM(playerid,-1, string);
  244. UsaoPloviloProdaja[playerid] = i; TogglePlayerControllable(playerid, 0);
  245. return 1;
  246. }
  247. }
  248. }
  249. //--------------------------------------------------------------------//
  250. if(vozilo >= vkarting[0] && vozilo <= vkarting[6])
  251. {
  252. if(Zeton[playerid] == 0)
  253. {
  254. SCM(playerid,-1,"LG:RP | "CRVENA"Morate kupiti zeton!"); RemovePlayerFromVehicle(playerid);
  255. return 1;
  256. }
  257. else if(Zeton[playerid] == 1)
  258. {
  259. SCM(playerid,-1,"[LG:RP] "ZUTA"Srecno u voznji, zeton traje 4 minuta!");
  260. zeton[playerid] = SetTimerEx("KartingZeton", 240000, false, "i", playerid);
  261. }
  262. }
  263. //--------------------------------------------------------------------//
  264. if(vozilo >= askolavozila[0] && vozilo <= askolavozila[8])
  265. {
  266. if(Poligon[playerid] == 0)
  267. {
  268. SCM(playerid, -1, ""PPLAVA"[AS]: "CRVENA"Nemate uplaceno polaganje...");
  269. RemovePlayerFromVehicle(playerid);
  270. return 1;
  271. }
  272. if(Poligon[playerid] == 1)
  273. {
  274. SetPlayerCheckpoint(playerid, 1544.3151,-2243.0063,13.5469, 2.5);
  275. SCM(playerid, -1, ""PPLAVA"[AS]: "BELA"Krenuli ste sa polaganjem pratite crvene markere!");
  276. }
  277. }
  278. //--------------------------------------------------------------------//
  279. if(BiciklaRent(vozilo))
  280. {
  281. if (Rentano[playerid] != vozilo)
  282. {
  283. TogglePlayerControllable(playerid, 0);
  284. GameTextForPlayer(playerid,"~w~Mozete rentati ovo biciklo ~b~/rent ~w~ili ~b~/izlaz~n~~w~Cena Renta: ~g~30$",5000,3);
  285. }
  286. }
  287. //--------------------------------------------------------------------//
  288. if(MotoRent(vozilo))
  289. {
  290. if (Rentano[playerid] != vozilo)
  291. {
  292. TogglePlayerControllable(playerid, 0);
  293. GameTextForPlayer(playerid,"~w~Mozete rentati ovaj motor ~b~/rent ~w~ili ~b~/izlaz~n~~w~Cena Renta: ~g~80$",5000,3);
  294. }
  295. }
  296. //--------------------------------------------------------------------//
  297. if(AutaRent(vozilo))
  298. {
  299. if (Rentano[playerid] != vozilo)
  300. {
  301. TogglePlayerControllable(playerid, 0);
  302. GameTextForPlayer(playerid,"~w~Mozete rentati ovo vozilo ~b~/rent ~w~ili ~b~/izlaz~n~~w~Cena Renta: ~g~120$",5000,3);
  303. }
  304. }
  305. //--------------------------------------------------------------------//
  306. if(SpawnRent(vozilo))
  307. {
  308. if (Rentano[playerid] != vozilo)
  309. {
  310. TogglePlayerControllable(playerid, 0);
  311. GameTextForPlayer(playerid,"~w~Mozete rentati ovo vozilo ~b~/rent ~w~ili ~b~/izlaz~n~~w~Cena Renta: ~g~130$",5000,3);
  312. }
  313. }
  314. //--------------------------------------------------------------------//
  315. if(VoziloJeKamion(GetVehicleModel(GetPlayerVehicleID(playerid))))
  316. {
  317. if(PlayerInfo[playerid][pKamionDozvola] <= 0)
  318. {
  319. SCM(playerid,-1,""CRVENA"[LG:RP]: "ZUTA"Nemate dozvolu za kamion, kupite je u auto skoli!");
  320. }
  321. }
  322. //--------------------------------------------------------------------//
  323. if(VoziloJeAvion(GetVehicleModel(GetPlayerVehicleID(playerid))))
  324. {
  325. if(PlayerInfo[playerid][pAvionDozvola] <= 0)
  326. {
  327. SCM(playerid,-1,""CRVENA"[LG:RP]: "ZUTA"Nemate dozvolu za letjelicu, kupite je u auto skoli!");
  328. RemovePlayerFromVehicle(playerid);
  329. }
  330. }
  331. //--------------------------------------------------------------------//
  332. if(VoziloJeBrod(GetVehicleModel(GetPlayerVehicleID(playerid))))
  333. {
  334. if(PlayerInfo[playerid][pBrodDozvola] <= 0)
  335. {
  336. SCM(playerid,-1,""CRVENA"[LG:RP]: "ZUTA"Nemate dozvolu za plovilo, kupite je u auto skoli!");
  337. RemovePlayerFromVehicle(playerid);
  338. }
  339. }
  340. //--------------------------------------------------------------------//
  341. if(VoziloJeMotor(GetVehicleModel(GetPlayerVehicleID(playerid))))
  342. {
  343. if(PlayerInfo[playerid][pMotorDozvola] <= 0)
  344. {
  345. SCM(playerid,-1,""CRVENA"[LG:RP]: "ZUTA"Nemate dozvolu za motor, kupite je u auto skoli!");
  346. }
  347. }
  348. //--------------------------------------------------------------------//
  349. if(!VoziloJeMotor(GetVehicleModel(GetPlayerVehicleID(playerid))) && !VoziloJeAvion(GetVehicleModel(GetPlayerVehicleID(playerid))) && !VoziloJeBrod(GetVehicleModel(GetPlayerVehicleID(playerid))) && !VoziloJeKamion(GetVehicleModel(GetPlayerVehicleID(playerid))) && !VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
  350. {
  351. if(PlayerInfo[playerid][pADozvola] <= 0)
  352. {
  353. SCM(playerid,-1,""CRVENA"[LG:RP]: "ZUTA"Nemate dozvolu za voznju, kupite je u auto skoli!");
  354. }
  355. }
  356. //--------------------------------------------------------------------//
  357. if(VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
  358. {
  359. new engine, lights, alarm, doors, bonnet, boot, objective;
  360. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
  361. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, lights, alarm, doors, bonnet, boot, objective);
  362. }
  363. //--------------------------------------------------------------------//
  364. if(!VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
  365. {
  366. new engine, lights, alarm, doors, bonnet, boot, objective;
  367. GetVehicleParamsEx(vozilo, engine, lights, alarm, doors, bonnet, boot, objective);
  368. if(engine == -1 && !VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
  369. {
  370. SetVehicleParamsEx(vozilo, 0, 0, alarm, doors, bonnet, boot, objective);
  371. }
  372. }
  373. //--------------------------------------------------------------------//
  374. if(BusVozila(vozilo))
  375. {
  376. if(PlayerInfo[playerid][pPosao] != POSAO_BUSVOZAC)
  377. {
  378. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao bus vozac!");
  379. RemovePlayerFromVehicle(playerid);
  380. }
  381. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/linija /prekiniposao");
  382. }
  383. //--------------------------------------------------------------------//
  384. if(KosenjeVozila(vozilo))
  385. {
  386. if(PlayerInfo[playerid][pPosao] != POSAO_KOSACTRAVE)
  387. {
  388. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao kosac trave!");
  389. RemovePlayerFromVehicle(playerid);
  390. }
  391. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/kositravu /prekiniposao");
  392. }
  393. //--------------------------------------------------------------------//
  394. if(MehanicarVozila(vozilo))
  395. {
  396. if(PlayerInfo[playerid][pPosao] != POSAO_MEHANICAR)
  397. {
  398. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao mehanicar!");
  399. RemovePlayerFromVehicle(playerid);
  400. }
  401. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"CTRL da zakacite/otkacite vozilo | /popravi | /napuni");
  402. }
  403. //--------------------------------------------------------------------//
  404. if(PostaVozila(vozilo))
  405. {
  406. if(PlayerInfo[playerid][pPosao] != POSAO_POSTAR)
  407. {
  408. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao postar!");
  409. RemovePlayerFromVehicle(playerid);
  410. }
  411. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/posta /prekiniposao");
  412. }
  413. //--------------------------------------------------------------------//
  414. if(KomunalnoVozila(vozilo))
  415. {
  416. if(PlayerInfo[playerid][pPosao] != POSAO_KOMUNALAC)
  417. {
  418. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao komunalac!");
  419. RemovePlayerFromVehicle(playerid);
  420. }
  421. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/komunalno /prekiniposao");
  422. }
  423. //--------------------------------------------------------------------//
  424. if(GradjevinarVozila(vozilo))
  425. {
  426. if(PlayerInfo[playerid][pPosao] != POSAO_GRADJEVINAR)
  427. {
  428. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao gradjevinar!");
  429. RemovePlayerFromVehicle(playerid);
  430. }
  431. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/malter /poravnaj /prekiniposao");
  432. }
  433. //--------------------------------------------------------------------//
  434. if(BolnicarVozila(vozilo))
  435. {
  436. if(PlayerInfo[playerid][pPosao] != POSAO_BOLNICAR)
  437. {
  438. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao bolnicar!");
  439. RemovePlayerFromVehicle(playerid);
  440. }
  441. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/izleci /oprema");
  442. }
  443. //--------------------------------------------------------------------//
  444. if(GrobarVozila(vozilo))
  445. {
  446. if(PlayerInfo[playerid][pPosao] != POSAO_GROBAR)
  447. {
  448. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao grobar!");
  449. RemovePlayerFromVehicle(playerid);
  450. }
  451. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/grobar /oprema");
  452. }
  453. //--------------------------------------------------------------------//
  454. if(FarmerVozila(vozilo))
  455. {
  456. if(PlayerInfo[playerid][pPosao] != POSAO_FARMER)
  457. {
  458. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao farmer!");
  459. RemovePlayerFromVehicle(playerid);
  460. }
  461. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/mleko /oranje /vrsenje");
  462. }
  463. //--------------------------------------------------------------------//
  464. if(vozilo == VozVozilo)
  465. {
  466. if(PlayerInfo[playerid][pPosao] != POSAO_MASINOVODJA)
  467. {
  468. new Float:Poz[3];
  469. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao masinovodja!");
  470. GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  471. SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]+0.5);
  472. }
  473. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/voz");
  474. }
  475. //--------------------------------------------------------------------//
  476. if(DostavljacVozila(vozilo))
  477. {
  478. if(PlayerInfo[playerid][pPosao] != POSAO_DOSTAVLJAC)
  479. {
  480. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao dostavljac!");
  481. RemovePlayerFromVehicle(playerid);
  482. }
  483. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/uzmikutiju /utovari /istovari");
  484. }
  485. //--------------------------------------------------------------------//
  486. if(KamiondzijaVozila(vozilo))
  487. {
  488. if(PlayerInfo[playerid][pPosao] != POSAO_KAMIONDZIJA)
  489. {
  490. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao kamiondzija!");
  491. RemovePlayerFromVehicle(playerid);
  492. }
  493. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/tura /oprema");
  494. }
  495. //--------------------------------------------------------------------//
  496. if(PilotVozila(vozilo))
  497. {
  498. if(PlayerInfo[playerid][pPosao] != POSAO_PILOT)
  499. {
  500. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao pilot!");
  501. RemovePlayerFromVehicle(playerid);
  502. }
  503. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/let /oprema");
  504. }
  505. //--------------------------------------------------------------------//
  506. if(ElektricarVozila(vozilo))
  507. {
  508. if(PlayerInfo[playerid][pPosao] != POSAO_ELEKTRICAR)
  509. {
  510. SCM(playerid, -1, ""CRVENA"[LG:RP]: "SIVA"Niste zaposleni kao elektricar!");
  511. RemovePlayerFromVehicle(playerid);
  512. }
  513. else return SCM(playerid, -1, ""SPLAVA"Komande posla: "BELA"/kvar /oprema");
  514. }
  515. }
  516. //------------------------------------------------------------------------//
  517. return 1;
  518. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement