Advertisement
Guest User

OnPlayerStateChange

a guest
Mar 14th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.43 KB | None | 0 0
  1. public OnPlayerStateChange(playerid, newstate, oldstate)
  2. {
  3.  
  4. new string[182];
  5.  
  6. if(newstate == PLAYER_STATE_ONFOOT)
  7. {
  8. if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
  9. {
  10. PlayerInKart[playerid] = 0;
  11. KartingPlayers --;
  12. }
  13. if(TransportDuty[playerid] > 0)
  14. {
  15. if(TransportDuty[playerid] == 1)
  16. {
  17. TaxiDrivers -= 1;
  18. }
  19. TransportDuty[playerid] = 0;
  20. format(string, sizeof(string), "* Acum nu mai esti la servici si ai castigat $%d pentru cat ai lucrat.", TransportMoney[playerid]);
  21. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  22. GivePlayerCash(playerid, TransportMoney[playerid]);
  23. ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
  24. }
  25. if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
  26. {
  27. if(IsPlayerConnected(TransportDriver[playerid]))
  28. {
  29. TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
  30. TransportTime[TransportDriver[playerid]] = 0;
  31. TransportCost[TransportDriver[playerid]] = 0;
  32. format(string, sizeof(string), "~w~Calatoria a costat:~n~~r~$%d",TransportCost[playerid]);
  33. GameTextForPlayer(playerid, string, 5000, 1);
  34. format(string, sizeof(string), "~w~Pasagerul a iesit din taxi~n~~g~Ai castigat $%d",TransportCost[playerid]);
  35. GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
  36. GivePlayerCash(playerid, -TransportCost[playerid]);
  37. TransportCost[playerid] = 0;
  38. TransportTime[playerid] = 0;
  39. TransportDriver[playerid] = 999;
  40. }
  41. }
  42. }
  43.  
  44. /*if(IsABike(GetPlayerVehicleID(playerid)))
  45. {
  46. switch(GetPlayerSkin(playerid))
  47. {
  48. #define SPAO{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, SLOT, 18645, 2, (%0), (%1), (%2), (%3), (%4), (%5));
  49. case 0, 65, 74, 149, 208, 273: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000}
  50. case 1..6, 8, 14, 16, 22, 27, 29, 33, 41..49, 82..84, 86, 87, 119, 289: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 77.000000, 0.000000}
  51. case 7, 10: SPAO{0.090000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  52. case 9: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  53. case 11..13: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  54. case 15: SPAO{0.059999, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
  55. case 17..21: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  56. case 23..26, 28, 30..32, 34..39, 57, 58, 98, 99, 104..118, 120..131: SPAO{0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  57. case 40: SPAO{0.050000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  58. case 50, 100..103, 148, 150..189, 222: SPAO{0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  59. case 51..54: SPAO{0.100000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  60. case 55, 56, 63, 64, 66..73, 75, 76, 78..81, 133..143, 147, 190..207, 209..219, 221, 247..272, 274..288, 290..293: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  61. case 59..62: SPAO{0.079999, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
  62. case 77: SPAO{0.059999, 0.019999, 0.000000, 87.000000, 82.000000, 0.000000}
  63. case 85, 88, 89: SPAO{0.070000, 0.039999, 0.000000, 88.000000, 82.000000, 0.000000}
  64. case 90..97: SPAO{0.050000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  65. case 132: SPAO{0.000000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  66. case 144..146: SPAO{0.090000, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
  67. case 220: SPAO{0.029999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  68. case 223, 246: SPAO{0.070000, 0.050000, 0.000000, 88.000000, 82.000000, 0.000000}
  69. case 224..245: SPAO{0.070000, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
  70. case 294: SPAO{0.070000, 0.019999, 0.000000, 91.000000, 84.000000, 0.000000}
  71. case 295: SPAO{0.050000, 0.019998, 0.000000, 86.000000, 82.000000, 0.000000}
  72. case 296..298: SPAO{0.064999, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  73. case 299: SPAO{0.064998, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  74. }
  75. }*/
  76. new name[MAX_PLAYER_NAME];
  77. GetPlayerName(playerid, name, sizeof(name));
  78. new vehicleid = GetPlayerVehicleID(playerid);
  79. foreach(Player, i)
  80. {
  81. if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty[i] > 0)
  82. {
  83. if(GetPlayerCash(playerid) < TransportValue[i])
  84. {
  85. format(string, sizeof(string), "* Ai nevoie de $%d ca sa intri.", TransportValue[i]);
  86. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  87. RemovePlayerFromVehicle(playerid);
  88. }
  89. else
  90. {
  91. if(TransportDuty[i] == 1)
  92. {
  93. format(string, sizeof(string), "* Ai platit $%d taximetristului.", TransportValue[i]);
  94. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  95. format(string, sizeof(string), "* Pasagerul %s a intra in Taxi-ul tau.", name);
  96. SendClientMessage(i, COLOR_LIGHTBLUE, string);
  97. TransportTime[i] = 1;
  98. TransportTime[playerid] = 1;
  99. TransportCost[playerid] = TransportValue[i];
  100. TransportCost[i] = TransportValue[i];
  101. TransportDriver[playerid] = i;
  102. }
  103. GivePlayerCash(playerid, - TransportValue[i]);
  104. TransportMoney[i] += TransportValue[i];
  105. }
  106. }
  107. }
  108.  
  109. if(newstate == PLAYER_STATE_WASTED)
  110. {
  111. if(WantedLevel[playerid] >= 1)
  112. {
  113. new price = WantedLevel[playerid] * 600;
  114. new count;
  115. foreach(Player, i)
  116. {
  117. if(gTeam[i] == 2 && CrimInRange(20.0, playerid,i))
  118. {
  119. count = 1;
  120. format(string, sizeof(string), "~w~Suspectul~r~Mort~n~Bonus~g~$%d", price);
  121. GameTextForPlayer(i, string, 5000, 1);
  122. ConsumingMoney[i] = 1;
  123. GivePlayerCash(i, price / 2);
  124. PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  125. }
  126. }
  127. if(count == 1)
  128. {
  129. new celula = random(3);
  130. GivePlayerCash(playerid, - price);
  131. PlayerData[playerid][pWantedDeaths] += 1;
  132. if(celula == 1)
  133. {
  134. PlayerData[playerid][pJailed] = 2;
  135. }
  136. else if(celula == 2)
  137. {
  138. PlayerData[playerid][pJailed] = 3;
  139. }
  140. else
  141. {
  142. PlayerData[playerid][pJailed] = 1;
  143. }
  144. format(string, sizeof(string), "UPDATE players SET Jailed='%d' WHERE id=%d", PlayerData[playerid][pJailed], PlayerData[playerid][pSQLID]);
  145. mysql_query(string);
  146. PlayerData[playerid][pJailTime] = (WantedLevel[playerid])*(60);
  147. format(string, sizeof(string), "* Esti la puscarie pentru %d secunde si ai pierdut $%d deoarece ai murit iar in apropiere era un politai.", PlayerData[playerid][pJailTime], price);
  148. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  149. WantedPoints[playerid] = 0;
  150. WantedLevel[playerid] = 0;
  151. PlayerData[playerid][pWantedPoints] = WantedPoints[playerid];
  152. format(string, sizeof(string), "UPDATE players SET WantedLevel='%d' WHERE id=%d", WantedLevel[playerid], PlayerData[playerid][pSQLID]);
  153. mysql_query(string);
  154. format(string, sizeof(string), "UPDATE players SET WantedPoints='%d' WHERE id=%d", PlayerData[playerid][pWantedPoints], PlayerData[playerid][pSQLID]);
  155. mysql_query(string);
  156. format(string, sizeof(string), "UPDATE players SET WantedDeaths='%d' WHERE id=%d", PlayerData[playerid][pWantedDeaths], PlayerData[playerid][pSQLID]);
  157. mysql_query(string);
  158. format(string, sizeof(string), "UPDATE players SET JailTime='%d' WHERE id=%d", PlayerData[playerid][pJailTime], PlayerData[playerid][pSQLID]);
  159. mysql_query(string);
  160. }
  161.  
  162. }
  163. }
  164.  
  165. if(newstate == PLAYER_STATE_DRIVER)
  166. {
  167. //CarLabel[playerid] = CreateDynamic3DTextLabel(" ", -1, 0, 0, 0.9, 10.0, INVALID_PLAYER_ID, GetPlayerVehicleID(playerid), 0, -1, -1, playerid, 100.0);
  168. //UpdateBar(playerid);
  169. new newcar = GetPlayerVehicleID(playerid);
  170. new oldcar = gLastCar[playerid];
  171. new housecar = PlayerData[playerid][pPhousekey]+1;
  172.  
  173. if(newcar > PreVehicle)
  174. {
  175. if(CarData[newcar-PreVehicle][cExploded] == 1 &&(PlayerData[playerid][pPcarkey] == newcar-PreVehicle || PlayerData[playerid][pPcarkey2] == newcar-PreVehicle || PlayerData[playerid][pPcarkey3] == newcar-PreVehicle))
  176. {
  177. format(string,sizeof(string),"{FFFFFF}Masina ta a fost distrusa , plateste reparatia de {228B22}${FFFFFF}%d pentru a mai putea folosi masina.",GetVehicleAsigurare(newcar));
  178. ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"{1E90FF}Repair Car",string,"Platesc", "Close");
  179. CarExploded[playerid] = newcar-PreVehicle;
  180. return 1;
  181. }
  182. if(CarData[newcar-PreVehicle][cExploded] == 2 &&(PlayerData[playerid][pPcarkey] == newcar-PreVehicle || PlayerData[playerid][pPcarkey2] == newcar-PreVehicle || PlayerData[playerid][pPcarkey3] == newcar-PreVehicle))
  183. {
  184. format(string,sizeof(string),"{FFFFFF}Masina ta a fost distrusa , plateste reparatia de {228B22}${FFFFFF}%d pentru a mai putea folosi masina.",GetVehicleAsigurare(newcar));
  185. ShowPlayerDialog(playerid,11,DIALOG_STYLE_MSGBOX,"{1E90FF}Repair Car",string,"Platesc", "Close");
  186. CarExploded[playerid] = newcar-PreVehicle;
  187. return 1;
  188. }
  189. }
  190.  
  191. /*/ if(newcar > PreVehicle)
  192. {
  193. format(string, sizeof(string), "KM: %d", CarData[newcar-PreVehicle][cKM]);
  194. TextDrawSetString(TextDrawSpeed[playerid][4], string);
  195. TextDrawShowForPlayer(playerid, TextDrawSpeed[playerid][4]);
  196. /}*/
  197. AsADriver[playerid] = 1;
  198.  
  199. /* if(newcar > PreVehicle)
  200. {
  201. format(string, sizeof(string), "KM:~r~ %d", CarData[newcar-PreVehicle][cKM]);
  202. TextDrawSetString(TextDrawSpeed[playerid][4], string);
  203. TextDrawShowForPlayer(playerid, TextDrawSpeed[playerid][4]);
  204. TextDrawShowForPlayer(playerid, TextDrawSpeed[playerid][2]);
  205. TextDrawShowForPlayer(playerid, TextDrawSpeed[playerid][3]);
  206.  
  207. }
  208.  
  209. if(IsABike(GetPlayerVehicleID(playerid)))
  210. {
  211. switch(GetPlayerSkin(playerid))
  212. {
  213. #define SPAO{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, SLOT, 18645, 2, (%0), (%1), (%2), (%3), (%4), (%5));
  214. case 0, 65, 74, 149, 208, 273: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000}
  215. case 1..6, 8, 14, 16, 22, 27, 29, 33, 41..49, 82..84, 86, 87, 119, 289: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 77.000000, 0.000000}
  216. case 7, 10: SPAO{0.090000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  217. case 9: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  218. case 11..13: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  219. case 15: SPAO{0.059999, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
  220. case 17..21: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  221. case 23..26, 28, 30..32, 34..39, 57, 58, 98, 99, 104..118, 120..131: SPAO{0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  222. case 40: SPAO{0.050000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  223. case 50, 100..103, 148, 150..189, 222: SPAO{0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  224. case 51..54: SPAO{0.100000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  225. case 55, 56, 63, 64, 66..73, 75, 76, 78..81, 133..143, 147, 190..207, 209..219, 221, 247..272, 274..288, 290..293: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  226. case 59..62: SPAO{0.079999, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
  227. case 77: SPAO{0.059999, 0.019999, 0.000000, 87.000000, 82.000000, 0.000000}
  228. case 85, 88, 89: SPAO{0.070000, 0.039999, 0.000000, 88.000000, 82.000000, 0.000000}
  229. case 90..97: SPAO{0.050000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  230. case 132: SPAO{0.000000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  231. case 144..146: SPAO{0.090000, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
  232. case 220: SPAO{0.029999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  233. case 223, 246: SPAO{0.070000, 0.050000, 0.000000, 88.000000, 82.000000, 0.000000}
  234. case 224..245: SPAO{0.070000, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
  235. case 294: SPAO{0.070000, 0.019999, 0.000000, 91.000000, 84.000000, 0.000000}
  236. case 295: SPAO{0.050000, 0.019998, 0.000000, 86.000000, 82.000000, 0.000000}
  237. case 296..298: SPAO{0.064999, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  238. case 299: SPAO{0.064998, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  239. }
  240. }*/
  241. if(GetPlayerDrunkLevel(playerid) >= 25000)
  242. {
  243. if(WantedLevel[playerid] >= 6)
  244. {
  245. WantedLevel[playerid] = 6;
  246. }
  247. else
  248. {
  249. WantedLevel[playerid] += 1;
  250. format(string, sizeof(string), "UPDATE players SET WantedLevel='%d' WHERE id=%d", WantedLevel[playerid], PlayerData[playerid][pSQLID]);
  251. mysql_query(string);
  252. }
  253. new sendername[MAX_PLAYER_NAME];
  254. GetPlayerName(playerid,sendername,sizeof(sendername));
  255. SendClientMessage(playerid, COLOR_LIGHTRED, "Ai comis o crima ( Condus in stare de ebrietate ). Reporter: Necunoscut.");
  256. format(string, sizeof(string), "Current Wanted Level: %d", WantedLevel[playerid]);
  257. SendClientMessage(playerid, COLOR_YELLOW, string);
  258. foreach(Player, i)
  259. {
  260. if(PlayerData[i][pMember] == 1||PlayerData[i][pLeader] == 1||PlayerData[i][pMember] == 2||PlayerData[i][pLeader] == 2||PlayerData[i][pMember] == 3||PlayerData[i][pLeader] == 3)
  261. {
  262. SendClientMessage(i, TEAM_BLUE_COLOR, "HQ: Toate unitatile APB: Reporter: Unknown");
  263. format(string, sizeof(string), "HQ: Crima: Condus in stare de ebrietate, Suspect: %s",sendername);
  264. SendClientMessage(i, TEAM_BLUE_COLOR, string);
  265. }
  266. }
  267. }
  268. if((PlayerData[playerid][pCarLic] == 0 || PlayerData[playerid][pCarLic] == 2 || PlayerData[playerid][pCarLic] == 4 || PlayerData[playerid][pCarLic] == 1) && !IsPlayerNPC(playerid))
  269. {
  270. if(PlayerDrunk[playerid] >= 5)
  271. {
  272. WantedPoints[playerid] += 1;
  273. SetPlayerCriminal(playerid,255, "Condus in stare de ebrietate");
  274. PlayerData[playerid][pWantedPoints] = WantedPoints[playerid];
  275. format(string, sizeof(string), "UPDATE players SET WantedPoints='%d' WHERE id=%d", PlayerData[playerid][pWantedPoints], PlayerData[playerid][pSQLID]);
  276. mysql_query(string);
  277. }
  278. if(TakingLesson[playerid] == 1 || IsABmx(newcar) || IsSpawnCar(newcar) || Isferma(newcar))
  279. {
  280. }
  281. else
  282. {
  283. if(PlayerData[playerid][pCarLic] == 0)
  284. {
  285. RemovePlayerFromVehicle(playerid);
  286. SendClientMessage(playerid, COLOR_GRAD1,"Nu ai licenta de condus.");
  287. if(PlayerData[playerid][pOrigin] == 1)
  288.  
  289. CP[playerid] = 1000;
  290. SetPlayerCheckpoint(playerid,1413.3684,-1700.7410,13.5423,7.0);
  291. }
  292. else if(PlayerData[playerid][pOrigin] == 2)
  293. {
  294.  
  295. SendClientMessage(playerid, COLOR_WHITE, "Ti-am pus un checkpoint pe harta.");
  296. if(PlayerData[playerid][pCarLic] == 0)
  297. {
  298. SendClientMessage(playerid, COLOR_WHITE, "Dute la el pentru a da un examen pentru Carnetul de Conducere.");
  299. }
  300. else
  301. {
  302. SendClientMessage(playerid, COLOR_WHITE, "Dute la el pentru a da un examen pentru a primi mai repede permisul inapoi.");
  303. }
  304. }
  305. }
  306. }
  307.  
  308. //nume masina cand intrii
  309. {
  310. format(string,sizeof(string), "~b~%s",ArIsim[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
  311. GameTextForPlayer(playerid, string, 2000, 1);
  312. }
  313.  
  314.  
  315. if(newcar == Rentcar[1] || newcar == Rentcar[2] || newcar == Rentcar[3] || newcar == Rentcar[4])
  316. {
  317. format(string,sizeof(string),"{DB8E12}Model: {C4C4C4}%s \n\n{DB8E12}Pret: {D21938}${C4C4C4}5000 \n\n{DB8E12}Apasa: {C4C4C4}Rent pentru a inchiria \n",ArIsim[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
  318. ShowPlayerDialog(playerid, 967, DIALOG_STYLE_MSGBOX, "{C4C4C4}Rent Car LS:", string, "Rent", "Cancel");
  319. }
  320.  
  321.  
  322. if(newcar == Rentcar[5] ||newcar == Rentcar[6] || newcar == Rentcar[7] || newcar == Rentcar[8] || newcar == Rentcar[9] || newcar == Rentcar[10] || newcar == Rentcar[11] || newcar == Rentcar[12] || newcar == Rentcar[13])
  323. {
  324. format(string,sizeof(string),"{DB8E12}Model: {C4C4C4}%s \n\n{DB8E12}Pret: {D21938}${C4C4C4}5000 \n\n{DB8E12}Apasa: {C4C4C4}Rent pentru a inchiria \n",ArIsim[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
  325. ShowPlayerDialog(playerid, 968, DIALOG_STYLE_MSGBOX, "{C4C4C4}Rent Car SF:", string, "Rent", "Cancel");
  326. }
  327.  
  328.  
  329. if(vehicleid == TruckJob[1] || vehicleid == TruckJob[2] || vehicleid == TruckJob[3] || vehicleid == TruckJob[4] || vehicleid == TruckJob[5] || vehicleid == TruckJob[6] || vehicleid == TruckJob[7] || vehicleid == TruckJob[8] || vehicleid == TruckJob[9] || vehicleid == TruckJob[10] || vehicleid == TruckJob[11] || vehicleid == TruckJob[12])
  330. {
  331. if(PlayerData[playerid][pJob] == 12) // LS
  332. {
  333. if(JobTruckCP[playerid] == 0)
  334.  
  335. {
  336. CP[playerid] = 770;
  337. SetPlayerCheckpoint(playerid, -83.4907,-1126.2679,1.0847,7.0);
  338. JobTruckCP[playerid] = 1;
  339. }
  340. }
  341. }
  342.  
  343. if(vehicleid == TruckJob[20] || vehicleid == TruckJob[21] || vehicleid == TruckJob[22] || vehicleid == TruckJob[23] || vehicleid == TruckJob[24] || vehicleid == TruckJob[25])
  344. {
  345. if(PlayerData[playerid][pJob] == 12) // LV
  346. {
  347. if(JobTruckCP[playerid] == 0)
  348.  
  349. {
  350. CP[playerid] = 772;
  351. SetPlayerCheckpoint(playerid, 1607.7528,2294.6724,10.8203,7.0);
  352. JobTruckCP[playerid] = 1;
  353. }
  354. }
  355. }
  356.  
  357. if(vehicleid == TruckJob[13] || vehicleid == TruckJob[14] || vehicleid == TruckJob[15] || vehicleid == TruckJob[16] || vehicleid == TruckJob[17] || vehicleid == TruckJob[18] || vehicleid == TruckJob[19])
  358. {
  359. if(PlayerData[playerid][pJob] == 12) // SF
  360. {
  361. if(JobTruckCP[playerid] == 0)
  362.  
  363. {
  364. CP[playerid] = 771;
  365. SetPlayerCheckpoint(playerid, -2123.0281,-220.3708,35.3203,7.0);
  366. JobTruckCP[playerid] = 1;
  367. }
  368. }
  369. }
  370.  
  371. if(vehicleid == buscar[1] || vehicleid == buscar[2] || vehicleid == buscar[3] || vehicleid == buscar[4] || vehicleid == buscar[5])
  372.  
  373. {
  374. if(PlayerData[playerid][pJob] == 11)
  375. {
  376. new str2[182];
  377. TextDrawShowForPlayer(playerid, TextBusJob[playerid][2]);
  378. format(str2,sizeof(str2),"~w~Checkpoints: ~y~0~w~/~r~41");
  379. TextDrawSetString(TextBusJob[playerid][2], str2);
  380.  
  381. CP[playerid] = 2000;
  382. SetPlayerRaceCheckpoint(playerid, 0,1690.1359,-2197.4102,13.4788,270.6487,133,3,3);
  383. GameTextForPlayer(playerid, "~g~Urmeaza CheckPointurile de Map~n~~w~Succes", 5000, 3);
  384. }
  385. else
  386. {
  387. SendClientMessage(playerid, COLOR_GREY, "Nu esti Sofer de autobuz.");
  388. RemovePlayerFromVehicle(playerid);
  389. }
  390.  
  391. return 1;
  392. }
  393.  
  394. if(IsACopCar(newcar))
  395. {
  396. if(IsACop(playerid)) { }
  397. else
  398. {
  399. RemovePlayerFromVehicle(playerid);
  400. SendClientMessage(playerid, COLOR_GRAD1,"Nu poti conduce o masina de politie.");
  401. }
  402. }
  403. else if(IsAnAmbulance(newcar))
  404. {
  405. if(PlayerData[playerid][pMember] == 4 || PlayerData[playerid][pLeader] == 4) { }
  406. else
  407. {
  408. RemovePlayerFromVehicle(playerid);
  409. SendClientMessage(playerid, COLOR_GRAD1,"Nu poti conduce o ambulanta.");
  410. }
  411. }
  412. if(IsATruck(newcar))
  413. {
  414. format(string, sizeof(string), "Produse: %d/%d", PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
  415. SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
  416. SendClientMessage(playerid, COLOR_WHITE, "INFO: Poti sa livrezi produse la afaceri.");
  417. SendClientMessage(playerid, COLOR_WHITE, "INFO: Comenzile sunt /load /buyprods /sellprods");
  418. }
  419. if(newcar == RobCar)
  420. {
  421. if(PlayerData[playerid][pLevel] >= 5)
  422. {
  423. SendClientMessage(playerid, COLOR_YELLOW, "Tasteaza {FFFFFF}/rob{FFFFFF} pentru a jefui Banca!");
  424. }
  425. else
  426. {
  427. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai nevoie de Level 5 pentru a conduce aceasta Duba !");
  428. RemovePlayerFromVehicle(playerid);
  429. }
  430. if(IsACop(playerid))
  431. {
  432. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Politistii nu pot conduce aceasta duba pentru rob.");
  433. RemovePlayerFromVehicle(playerid);
  434. }
  435. }
  436. if(PlayerKarting[playerid] != 0)
  437. {
  438. new kart2 = GetPlayerVehicleID(playerid);
  439. if(kart2==kart[1]||kart2==kart[2]||kart2==kart[3]||kart2==kart[4]||kart2==kart[5]||kart2==kart[6])
  440. {
  441. PlayerInKart[playerid] = 1;
  442. KartingPlayers ++;
  443. }
  444. }
  445. if(newcar==kart[1]||newcar==kart[2]||newcar==kart[3]||newcar==kart[4]||newcar==kart[5]||newcar==kart[6])
  446. {
  447. if(PlayerKarting[playerid] != 1)
  448. {
  449. RemovePlayerFromVehicle(playerid);
  450. SendClientMessage(playerid, COLOR_GRAD1,"Nu ai inchiriat un kart.");
  451. }
  452. }
  453. if(newcar>PreVehicle)
  454. {
  455. if(CarData[newcar - PreVehicle][cOwned] == 0 && CarData[newcar - PreVehicle][cModel] >= 400 && CarData[newcar - PreVehicle][cModel] <= 611 && PreVehicle < newcar)
  456. {
  457.  
  458. TextDrawShowForPlayer(playerid, GireadaV4[playerid]);
  459. TextDrawShowForPlayer(playerid, GireadaV7[playerid]);
  460.  
  461. TextDrawShowForPlayer(playerid, GireadaV1[playerid]);
  462. TextDrawShowForPlayer(playerid, GireadaV2[playerid]);
  463. TextDrawShowForPlayer(playerid, GireadaV3[playerid]);
  464. TextDrawShowForPlayer(playerid, GireadaV5[playerid]);
  465. TextDrawShowForPlayer(playerid, GireadaV6[playerid]);
  466.  
  467.  
  468. new str2[182];
  469. format(str2, sizeof(str2), "Vehicul:~y~%s",ArIsim[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
  470. TextDrawSetString(GireadaV2[playerid], str2);
  471.  
  472. format(str2, sizeof(str2), "Pret:~y~%d~g~$",CarData[newcar- PreVehicle][cValue]);
  473. TextDrawSetString(GireadaV3[playerid], str2);
  474.  
  475. //format(string,sizeof(string),"~w~Vehicul: %s~n~Pret: ~g~%d~n~~w~/buyvehicle pentru a cumpara sau apasa~n~~r~ENTER ~w~ca sa cobori",CarData[newcar- PreVehicle][cDescription],CarData[newcar- PreVehicle][cValue]);
  476. //GameTextForPlayer(playerid,string,5000,5);
  477. }
  478.  
  479.  
  480. if(CarData[newcar - PreVehicle][cOwned] == 1 && CarData[newcar - PreVehicle][cModel] >= 400 && CarData[newcar - PreVehicle][cModel] <= 611 && PreVehicle < newcar)
  481. {
  482. format(string, sizeof(string), "{FFFFFF}Acest vehicul: {A5FA26}%s {FFFFFF} ii apartine lui:{FAA404} %s", ArIsim[GetVehicleModel(GetPlayerVehicleID(playerid))-400],CarData[newcar- PreVehicle][cOwner]);
  483. SendClientMessage(playerid, COLOR_WHITE, string);
  484. }
  485. }
  486.  
  487.  
  488. if(Radio[vehicleid] == 0)
  489. {
  490. {
  491. StopAudioStreamForPlayer(playerid);
  492. }
  493. }
  494. if(Radio[vehicleid] == 1)
  495. {
  496. {
  497. StopAudioStreamForPlayer(playerid);
  498. PlayAudioStreamForPlayer(playerid,"http://live1.radiovip.ro:8969");// Radio Vip Romania
  499. }
  500. }
  501. if(Radio[vehicleid] == 2){
  502. {
  503. StopAudioStreamForPlayer(playerid);
  504. PlayAudioStreamForPlayer(playerid,"http://www.radiotequila.ro/hiphop.m3u");// Radio Tequila Hip-Hop
  505. }
  506. }
  507. if(Radio[vehicleid] == 3){
  508. {
  509. StopAudioStreamForPlayer(playerid);
  510. PlayAudioStreamForPlayer(playerid,"http://mp3.radiohot.ro:8000/listen.pls");// Radio Hot
  511. }
  512. }
  513. if(Radio[vehicleid] == 4){
  514. {
  515. StopAudioStreamForPlayer(playerid);
  516. PlayAudioStreamForPlayer(playerid,"http://rbandit.dyndns.tv:8000");// Radio Bandit
  517. }
  518. }
  519. if(Radio[vehicleid] == 5){
  520. {
  521. StopAudioStreamForPlayer(playerid);
  522. PlayAudioStreamForPlayer(playerid,"http://live.radiogangsta.ro:8800");// Radio Gangsta
  523. }
  524. }
  525. if(Radio[vehicleid] == 6){
  526. {
  527. StopAudioStreamForPlayer(playerid);
  528. PlayAudioStreamForPlayer(playerid,"http://dance.radiogangsta.ro:8800");// Radio Gangsta Dance
  529. }
  530. }
  531. if(Radio[vehicleid] == 7){
  532. {
  533. StopAudioStreamForPlayer(playerid);
  534. PlayAudioStreamForPlayer(playerid,"http://www.radio-hit.ro/asculta.m3u");// Radio Hit Romania.
  535. }
  536. }
  537. if(Radio[vehicleid] == 8){
  538. {
  539. StopAudioStreamForPlayer(playerid);
  540. PlayAudioStreamForPlayer(playerid,"http://radiotaraf.com/live.m3u");// Radio Taraf Romania
  541. }
  542. }
  543. if(Radio[vehicleid] == 9){
  544. {
  545. StopAudioStreamForPlayer(playerid);
  546. PlayAudioStreamForPlayer(playerid,"http://stream.profm.ro:8012/profm.mp3");// Pro FM Romania
  547. }
  548. }
  549. if(Radio[vehicleid] == 10){
  550. {
  551. StopAudioStreamForPlayer(playerid);
  552. PlayAudioStreamForPlayer(playerid,"http://asculta.radiomynele.ro:8000");// Radio Mynele Romania
  553. }
  554. }
  555. if(Radio[vehicleid] == 11){
  556. {
  557. StopAudioStreamForPlayer(playerid);
  558. PlayAudioStreamForPlayer(playerid,"http://dubstep.fm/128.pls");// Radio Dubstep
  559. }
  560. }
  561. if(Radio[vehicleid] == 12){
  562. {
  563. StopAudioStreamForPlayer(playerid);
  564. PlayAudioStreamForPlayer(playerid,"http://nextgen.go.ro:8012");// Radio Greu de Difuzat Hip-Hop
  565. }
  566. }
  567. if(Radio[vehicleid] == 13){
  568. {
  569. StopAudioStreamForPlayer(playerid);
  570. PlayAudioStreamForPlayer(playerid,"http://live.radioclubmix.ro:9999");// Radio ClubMix Romania
  571. }
  572. }
  573. if(Radio[vehicleid] == 14){
  574. {
  575. StopAudioStreamForPlayer(playerid);
  576. PlayAudioStreamForPlayer(playerid,"http://pub2.radiotunes.com:80/radiotunes_urbanjamz");// SKY.FM - Urban Jamz
  577. }
  578. }
  579. if(Radio[vehicleid] == 15){
  580. {
  581. StopAudioStreamForPlayer(playerid);
  582. PlayAudioStreamForPlayer(playerid,"http://pub6.radiotunes.com:80/radiotunes_tophits");// SKY.FM - Top Hits
  583. }
  584. }
  585. if(Radio[vehicleid] == 16){
  586. {
  587. StopAudioStreamForPlayer(playerid);
  588. PlayAudioStreamForPlayer(playerid,"http://livemp3.radiopopular.ro:7777");// Radio Popular
  589. }
  590. }
  591. if(Radio[vehicleid] == 17){
  592. {
  593. StopAudioStreamForPlayer(playerid);
  594. PlayAudioStreamForPlayer(playerid,"http://www.partyradio.ro/live.m3u");// Radio Party Romania
  595. }
  596. }
  597. if(Radio[vehicleid] == 18){
  598. {
  599. StopAudioStreamForPlayer(playerid);
  600. PlayAudioStreamForPlayer(playerid,"http://www.radiodiz.com/livediz.m3u");// Radio Diz
  601. }
  602. }
  603. if(Radio[vehicleid] == 19){
  604. {
  605. StopAudioStreamForPlayer(playerid);
  606. PlayAudioStreamForPlayer(playerid,"http://7619.live.streamtheworld.com:80/977_HITS_SC");// .977 Hitz
  607. }
  608. }
  609. if(Radio[vehicleid] == 20){
  610. {
  611. StopAudioStreamForPlayer(playerid);
  612. PlayAudioStreamForPlayer(playerid,"http://7639.live.streamtheworld.com:80/977_MIX_SC");// .977 Mix
  613. }
  614. }
  615.  
  616.  
  617. if(newcar == ferma[1] || newcar == ferma[2] || newcar == ferma[3] || newcar == ferma[4] || newcar == ferma[5])
  618. {
  619. if(PlayerData[playerid][pJob] == 20)
  620. {
  621. SendClientMessage(playerid, COLOR_LIGHTBLUE, "{C4C4C4}Foloseste: {DB8E12}/baloti {C4C4C4}pentru a incepe munca");
  622. }
  623. else
  624. {
  625. SendClientMessage(playerid, COLOR_GREY, "Nu esti distribuitor de baloti !");
  626. RemovePlayerFromVehicle(playerid);
  627. }
  628. }
  629. if(newcar==tren[1]||newcar==tren[2]||newcar==tren[3]||newcar==tren[4])
  630. {
  631. if(PlayerData[playerid][pJob] == 17)
  632. {
  633. SendClientMessage(playerid, COLOR_LIGHTBLUE, "{C4C4C4}Foloseste: {DB8E12}/starttren {C4C4C4}pentru a incepe munca");
  634. }
  635. else
  636. {
  637. SendClientMessage(playerid, COLOR_GREY, "Nu esti sofer de tren !");
  638. RemovePlayerFromVehicle(playerid);
  639. }
  640. }
  641. if(newcar == barc[1] || newcar == barc[2] || newcar == barc[4] || newcar == barc[5])
  642. {
  643. if(PlayerData[playerid][pJob] == 15)
  644. {
  645. SendClientMessage(playerid, COLOR_LIGHTBLUE, "{C4C4C4}Foloseste: {DB8E12}/transporta {C4C4C4}pentru a incepe munca");
  646. }
  647. else
  648. {
  649. SendClientMessage(playerid, COLOR_GREY, "Nu esti Barcagiu !");
  650. RemovePlayerFromVehicle(playerid);
  651. }
  652. }
  653. if(newcar == ferma[8] || newcar == ferma[9] || newcar == ferma[10] || newcar == ferma[11] || newcar == ferma[12])
  654. {
  655. if(PlayerData[playerid][pJob] == 16)
  656. {
  657.  
  658. SendClientMessage(playerid, COLOR_LIGHTBLUE, "{C4C4C4}Foloseste: {DB8E12}/startar {C4C4C4}pentru a incepe munca");
  659. }
  660. else
  661. {
  662. SendClientMessage(playerid, COLOR_GREY, "Nu esti Tractorist.");
  663. RemovePlayerFromVehicle(playerid);
  664. }
  665. }
  666.  
  667. if(newcar==hitmancar[1]||newcar==hitmancar[2]||newcar==hitmancar[3]||newcar==hitmancar[4]||newcar==hitmancar[5]||newcar==hitmancar[6]||newcar==hitmancar[7]||newcar==hitmancar[8])
  668. {
  669. if(PlayerData[playerid][pMember] != 8 && PlayerData[playerid][pLeader] != 8 )
  670. {
  671. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din {91413C}Hitman Agency");
  672. RemovePlayerFromVehicle(playerid);
  673. }
  674. }
  675. if(newcar==sicar[1]||newcar==sicar[2]||newcar==sicar[3]||newcar==sicar[4]||newcar==sicar[5]||newcar==sicar[6]||newcar==sicar[7]||newcar==sicar[8])
  676. {
  677. if(PlayerData[playerid][pMember] != 7 && PlayerData[playerid][pLeader] != 7 )
  678. {
  679. SendClientMessage(playerid, COLOR_WHITE, "Nu esti instructor!");
  680. RemovePlayerFromVehicle(playerid);
  681. }
  682. }
  683. if(newcar==MechCar[1]||newcar==MechCar[2]||newcar==MechCar[3]||newcar==MechCar[4]||newcar==MechCar[5]||newcar==MechCar[6]||newcar==MechCar[7]||newcar==MechCar[8])
  684. {
  685. if(PlayerData[playerid][pJob] != 6)
  686. {
  687. SendClientMessage(playerid, COLOR_WHITE, "Nu esti Mecanic auto.");
  688. RemovePlayerFromVehicle(playerid);
  689. }
  690. }
  691. if(newcar==seccar[1]||newcar==seccar[2]||newcar==seccar[3]||newcar==seccar[4])
  692. {
  693. if(PlayerData[playerid][pMember] != 17 && PlayerData[playerid][pLeader] != 17 )
  694. {
  695. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din organizatia Total Security");
  696. RemovePlayerFromVehicle(playerid);
  697. }
  698. }
  699. if(newcar == dmv[1] || newcar == dmv[2] || newcar == dmv[3] || newcar == dmv[4])
  700. {
  701. if(TakingLesson[playerid] == 0)
  702. {
  703. SendClientMessage(playerid, COLOR_WHITE, "Aceasta masina poate fi condusa doar in timpul examenului auto.");
  704. RemovePlayerFromVehicle(playerid);
  705. }
  706. }
  707. if(newcar==guvcar[1]||newcar==guvcar[2]||newcar==guvcar[3]||newcar==guvcar[4]||newcar==guvcar[5]||newcar==guvcar[6])
  708. {
  709. if(PlayerData[playerid][pMember] != 18 && PlayerData[playerid][pLeader] != 18 )
  710. {
  711. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din factiunea Guvern");
  712. RemovePlayerFromVehicle(playerid);
  713. }
  714. }
  715. if(newcar==nrcar[1]||newcar==nrcar[2]||newcar==nrcar[3]||newcar==nrcar[4]||newcar==nrcar[5]||newcar==nrcar[6])
  716. {
  717. if(PlayerData[playerid][pMember] != 9 && PlayerData[playerid][pLeader] != 9 )
  718. {
  719. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din News Reporter!");
  720. RemovePlayerFromVehicle(playerid);
  721. }
  722. }
  723. if(newcar==smurdcar[1]||newcar==smurdcar[2]||newcar==smurdcar[3]||newcar==smurdcar[4]||newcar==smurdcar[5]||newcar==smurdcar[6]||newcar==smurdcar[7] ||newcar==smurdcar[8] ||newcar==smurdcar[9])
  724. {
  725. if(PlayerData[playerid][pMember] != 4 && PlayerData[playerid][pLeader] != 4 )
  726. {
  727. SendClientMessage(playerid, COLOR_WHITE, "Nu esti in S.M.U.R.D.");
  728. RemovePlayerFromVehicle(playerid);
  729. }
  730. }
  731. if(newcar==taxicar[1]||newcar==taxicar[2]||newcar==taxicar[3]||newcar==taxicar[4]||newcar==taxicar[5]||newcar==taxicar[6]||newcar==taxicar[7]||newcar==taxicarTune[1]||newcar==taxicarTune[2]||newcar==taxicarIN[1]||newcar==taxicarBU[1]||newcar==taxicarTU[1])
  732. {
  733. if(PlayerData[playerid][pMember] != 6 && PlayerData[playerid][pLeader] != 6 )
  734. {
  735. SendClientMessage(playerid, COLOR_WHITE, "Nu esti taximetrist!");
  736. RemovePlayerFromVehicle(playerid);
  737. }
  738. }
  739. if(newcar==FastCarSultan[1]||newcar==FastCarInfernus[1]||newcar==FastCarTurismo[1]||newcar==FastCarElegy[1]||newcar==FastCarBullet[1]||newcar==FastCarFlash[1]||newcar==FastCarJester[1]||newcar==FastCarUranus[1]||newcar==FastCarStratum[1])
  740. {
  741. if(PlayerData[playerid][pMember] != 19 && PlayerData[playerid][pLeader] != 19 )
  742. {
  743. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din {C70D7D}Fast and Furious");
  744. RemovePlayerFromVehicle(playerid);
  745. }
  746. }
  747.  
  748.  
  749. if(newcar==FarmCar[1]|| newcar==FarmCar[2]|| newcar==FarmCar[3]|| newcar==FarmCar[4])
  750. {
  751. if(PlayerData[playerid][pJob] == 13)
  752. {
  753. SendClientMessage(playerid, COLOR_LIGHTBLUE, "{C4C4C4}Foloseste: {DB8E12}/farm {C4C4C4}pentru a incepe munca");
  754. }
  755. else
  756. {
  757. SendClientMessage(playerid, COLOR_GREY, " Nu esti fermier !");
  758. RemovePlayerFromVehicle(playerid);
  759. }
  760. }
  761.  
  762.  
  763. if(newcar==FarmCar[1]|| newcar==FarmCar[2]|| newcar==FarmCar[3]|| newcar==FarmCar[4])
  764. {
  765. if(PlayerData[playerid][pJob] == 13)
  766. {
  767. Sweeps[playerid] = 2;
  768. SCM(playerid, COLOR_YELLOW, "Mergi cu tractorul 2 minute pentru a fi platit. ");
  769. MowerMoney[playerid] = 120;
  770. mowertimer[playerid] = SetTimerEx("SetMower", 1000, false, "i", playerid);
  771. }
  772. else
  773. {
  774. SendClientMessage(playerid, COLOR_GREY, " Nu esti fermier !");
  775. RemovePlayerFromVehicle(playerid);
  776. }
  777. }
  778.  
  779.  
  780. if(newcar==pizzaboyc[1]||newcar==pizzaboyc[2]||newcar==pizzaboyc[3]||newcar==pizzaboyc[4]||newcar==pizzaboyc[5]||newcar==pizzaboyc[6])
  781. {
  782. if(PlayerData[playerid][pJob] == 9)
  783. {
  784.  
  785. SendClientMessage(playerid, COLOR_LIGHTBLUE, "{C4C4C4}Foloseste: {DB8E12}/pizza {C4C4C4}pentru a incepe munca");
  786. }
  787. else
  788. {
  789. SendClientMessage(playerid, COLOR_GREY, " Nu esti Pizza Boy.");
  790. RemovePlayerFromVehicle(playerid);
  791. }
  792. }
  793.  
  794. if(newcar == gunoiercar[1] || newcar == gunoiercar[2] || newcar == gunoiercar[3] || newcar == gunoiercar[4] || newcar == gunoiercar[5])
  795. {
  796. if(PlayerData[playerid][pJob] == 14)
  797. {
  798. SendClientMessage(playerid, COLOR_LIGHTBLUE, "{C4C4C4}Foloseste: {DB8E12}/gunoi {C4C4C4}pentru a incepe munca");
  799. }
  800. else
  801. {
  802. SendClientMessage(playerid, COLOR_GREY, " Nu esti Gunoier.");
  803. RemovePlayerFromVehicle(playerid);
  804. }
  805. }
  806.  
  807. if(newcar==TruckJob[1]||newcar==TruckJob[2]||newcar==TruckJob[3])
  808. {
  809. if(PlayerData[playerid][pJob] == 12)
  810. {
  811.  
  812. SendClientMessage(playerid, COLOR_LIGHTBLUE, "{C4C4C4}Foloseste: {DB8E12}/truck {C4C4C4}pentru a incepe munca");
  813.  
  814. }
  815. else
  816. {
  817. SendClientMessage(playerid, COLOR_GREY, " Nu esti Camionagiu.");
  818. RemovePlayerFromVehicle(playerid);
  819. }
  820. }
  821.  
  822. if(IsAGroveStreetCar(newcar))
  823. {
  824. if(PlayerData[playerid][pMember] == 11 || PlayerData[playerid][pLeader] == 11 ) { }
  825. else
  826. {
  827. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din {1BC708}Grove Street!");
  828. RemovePlayerFromVehicle(playerid);
  829. }
  830. }
  831. if(IsATheBallasCar(newcar))
  832. {
  833. if(PlayerData[playerid][pMember] == 12 || PlayerData[playerid][pLeader] == 12 ) { }
  834. else
  835. {
  836. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din The Ballas!");
  837. RemovePlayerFromVehicle(playerid);
  838. }
  839. }
  840. if(IsALosVagosCar(newcar))
  841. {
  842. if(PlayerData[playerid][pMember] == 13 || PlayerData[playerid][pLeader] == 13 ) { }
  843. else
  844. {
  845. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din Los Vagos!");
  846. RemovePlayerFromVehicle(playerid);
  847. }
  848. }
  849. if(IsATheRussianMafiaCar(newcar))
  850. {
  851. if(PlayerData[playerid][pMember] == 16 || PlayerData[playerid][pLeader] == 16 ) { }
  852. else
  853. {
  854. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din {575757}The Russian Mafia!");
  855. RemovePlayerFromVehicle(playerid);
  856. }
  857. }
  858. if(IsALosAztecasCar(newcar))
  859. {
  860. if(PlayerData[playerid][pMember] == 15 || PlayerData[playerid][pLeader] == 15 ) { }
  861. else
  862. {
  863. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din Los Aztecas!");
  864. RemovePlayerFromVehicle(playerid);
  865. }
  866. }
  867. if(IsATheRifaCar(newcar))
  868. {
  869. if(PlayerData[playerid][pMember] == 14 || PlayerData[playerid][pLeader] == 14) { }
  870. else
  871. {
  872. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din The Rifa!");
  873. RemovePlayerFromVehicle(playerid);
  874. }
  875. }
  876.  
  877.  
  878. if(newcar == copcar[43] || newcar == copcar[42] || newcar == copcar[36] || newcar == copcar[40] || newcar == copcar[44] || newcar == copcar[45] || newcar == copcar[48] || newcar == copcar[47] || newcar == copcar[63] || newcar == copcar[64] || newcar == copcar[65] || newcar == copcar[66])
  879. {
  880. if(PlayerData[playerid][pMember] != 1 && PlayerData[playerid][pLeader] != 1)
  881. {
  882. SendClientMessage(playerid, COLOR_WHITE, "Nu esti membru Politia Romana.");
  883. RemovePlayerFromVehicle(playerid);
  884. }
  885. }
  886. if(newcar == copcar[13] || newcar == copcar[5] || newcar == copcar[28] || newcar == copcar[29] || newcar == copcar[30] || newcar == copcar[31] || newcar == copcar[33] || newcar == copcar[49] || newcar == copcar[46] || newcar == copcar[62] || newcar == copcar[75] || newcar == copcar[76])
  887. {
  888. if(PlayerData[playerid][pMember] != 1 && PlayerData[playerid][pLeader] != 1)
  889. {
  890. SendClientMessage(playerid, COLOR_WHITE, "Nu esti membru {1A2CED}Politia Romana");
  891. RemovePlayerFromVehicle(playerid);
  892. }
  893. }
  894. if(newcar == copcar[39] || newcar == copcar[58] || newcar == copcar[59] || newcar == copcar[60] || newcar == copcar[61] || newcar == copcar[54] || newcar == copcar[55] || newcar == copcar[56] || newcar == copcar[57])
  895. {
  896. if(PlayerData[playerid][pMember] != 1 && PlayerData[playerid][pLeader] != 1)
  897. {
  898. SendClientMessage(playerid, COLOR_WHITE, "Nu esti membru {1A2CED}Politia Romana.");
  899. RemovePlayerFromVehicle(playerid);
  900. }
  901. }
  902. if(newcar == FBICar[1] || newcar == FBICar[2] || newcar == copcar[34] || newcar == copcar[35] || newcar == copcar[38] || newcar == copcar[32] || newcar == copcar[14] || newcar == copcar[15])
  903. {
  904. if(PlayerData[playerid][pMember] != 2 && PlayerData[playerid][pLeader] != 2)
  905. {
  906. SendClientMessage(playerid, COLOR_WHITE, "Nu esti membru F.B.I.");
  907. RemovePlayerFromVehicle(playerid);
  908. }
  909. }
  910. if(newcar == PRCar[4] || newcar == PRCar[5] || newcar == PRCar[6])
  911. {
  912. if(PlayerData[playerid][pMember] != 1 && PlayerData[playerid][pLeader] != 1)
  913. {
  914. SendClientMessage(playerid, COLOR_WHITE, "Nu esti membru {1A2CED}Politia Roamana.");
  915. RemovePlayerFromVehicle(playerid);
  916. }
  917. }
  918. if(newcar == PRCar[1] || newcar == PRCar[2] || newcar == PRCar[3])
  919. {
  920. if(PlayerData[playerid][pMember] != 1 && PlayerData[playerid][pLeader] != 1)
  921. {
  922. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din {1A2CED}Politia Romana.");
  923. RemovePlayerFromVehicle(playerid);
  924. }
  925. }
  926. if(newcar == RromCar[1] || newcar == RromCar[2] || newcar == RromCar[3] || newcar == RromCar[4] || newcar == RromCar[5])
  927. {
  928. if(PlayerData[playerid][pMember] != 5 && PlayerData[playerid][pLeader] != 5)
  929. {
  930. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din Rromi Los Santos!");
  931. RemovePlayerFromVehicle(playerid);
  932. }
  933. }
  934. if(newcar == BikersLS[1] || newcar == BikersLS[2] || newcar == BikersLS[3] || newcar == BikersLS[4] || newcar == BikersLS[5] || newcar == BikersLS[6] || newcar == BikersLS[7] || newcar == BikersLS[8] || newcar == BikersLS[9] || newcar == BikersLS[10] || newcar == BikersLS[11] || newcar == BikersLS[12] || newcar == BikersLS[13] || newcar == BikersLS[14] || newcar == BikersLS[15] || newcar == BikersLS[16])
  935. {
  936. if(PlayerData[playerid][pMember] != 10 && PlayerData[playerid][pLeader] != 10)
  937. {
  938. SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din Bikers LS");
  939. RemovePlayerFromVehicle(playerid);
  940. }
  941. }
  942. if(newcar == copcar[68] || newcar == copcar[69] || newcar == copcar[70] || newcar == copcar[71] || newcar == copcar[72] || newcar == copcar[73]) // poponaut
  943. {
  944. if(PlayerData[playerid][pMember] != 3 && PlayerData[playerid][pLeader] != 3)
  945. {
  946. SendClientMessage(playerid, COLOR_WHITE, "Nu esti membru A.R.");
  947. RemovePlayerFromVehicle(playerid);
  948. }
  949. }
  950. if(newcar == copcar[16] || newcar == copcar[17] || newcar == copcar[74] || newcar == copcar[77] || newcar == copcar[78] || newcar == copcar[41] || newcar == copcar[4])
  951. {
  952. if(PlayerData[playerid][pMember] != 3 && PlayerData[playerid][pLeader] != 3)
  953. {
  954. SendClientMessage(playerid, COLOR_WHITE, "Nu esti membru A.R.");
  955. RemovePlayerFromVehicle(playerid);
  956. }
  957. }
  958. if(newcar == copcar[20] || newcar == copcar[21] || newcar == copcar[23] || newcar == copcar[24] || newcar == copcar[25] || newcar == copcar[26] || newcar == copcar[27])
  959. {
  960. if(PlayerData[playerid][pMember] != 3 && PlayerData[playerid][pLeader] != 3)
  961. {
  962. SendClientMessage(playerid, COLOR_WHITE, "Nu esti membru A.R.");
  963. RemovePlayerFromVehicle(playerid);
  964. }
  965. }
  966. if(oldcar != 301)
  967. {
  968. if((housecar != oldcar && oldcar != 0) && (HireCar[playerid] != oldcar && newcar != housecar))
  969. {
  970. if(gLastDriver[oldcar] == playerid && oldcar != newcar)
  971. {
  972. gLastDriver[oldcar] = 300;
  973. }
  974. }
  975. }
  976. gLastCar[playerid] = newcar;
  977. gLastDriver[newcar] = playerid;
  978. }
  979. if(newstate == PLAYER_STATE_SPAWNED)
  980. {
  981.  
  982. new Float: lwx, Float:lwy, Float:lwz;
  983. GetPlayerPos(playerid, lwx, lwy, lwz);
  984. if((lwz > 530.0 && PlayerData[playerid][pInt] == 0) || PlayerToPoint(1000.0, playerid, -1041.9,-1868.4,79.1))
  985. {
  986. SetPlayerSpawn(playerid);
  987. }
  988. if(PlayerData[playerid][pDonateRank] > 0) { SetPlayerHealth(playerid, 100.0); }
  989. else { SetPlayerHealth(playerid, 100); }
  990. gPlayerSpawned[playerid] = 1;
  991. SafeTime[playerid] = 60;
  992. }
  993. return 1;
  994. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement