Advertisement
Guest User

Untitled

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