Advertisement
Darth_Vader

Untitled

Nov 16th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.64 KB | None | 0 0
  1. jaspawnou[playerid] = false;
  2. APlayerData[playerid][ssSpawn] = 0;
  3. sSpawn[playerid] = true;
  4. new bool:sSpawn[MAX_PLAYERS];
  5. new bool:jaspawnou[MAX_PLAYERS];
  6. #define DIALOG_SAPW 5570
  7.  
  8. if(dialogid == DIALOG_SAPW)
  9. {
  10. if(!response)
  11. {
  12. new classid;
  13. sSpawn[playerid] = true;
  14. jaspawnou[playerid] = false;
  15. SetPVarInt(playerid,"Escolhendo_Classe",1);
  16. TextDrawShowForPlayer(playerid, ProfsTextD[playerid]);
  17. switch (classid)
  18. {
  19. case 0, 1, 2, 3, 4, 5, 6, 7:
  20. {
  21. TextDrawSetString(ProfsTextD[playerid], "CAMINHONEIRO");
  22. //hehe
  23. APlayerData[playerid][PlayerClass] = ClassTruckDriver;
  24. }
  25. case 8, 9, 10:
  26. {
  27. TextDrawSetString(ProfsTextD[playerid], "~g~MOSTORISTA DE ONIBUS");
  28.  
  29. APlayerData[playerid][PlayerClass] = ClassBusDriver;
  30. }
  31. case 11, 12:
  32. {
  33. TextDrawSetString(ProfsTextD[playerid], "PILOTO");
  34.  
  35. APlayerData[playerid][PlayerClass] = ClassPilot;
  36. }
  37. case 13, 14, 15, 16, 17, 18:
  38. {
  39. TextDrawSetString(ProfsTextD[playerid], "~b~POLICIAL");
  40.  
  41. APlayerData[playerid][PlayerClass] = ClassPolice;
  42. }
  43. case 19, 20, 21:
  44. {
  45. TextDrawSetString(ProfsTextD[playerid], "~r~MAFIOSO");
  46.  
  47. APlayerData[playerid][PlayerClass] = ClassMafia;
  48. }
  49. case 22, 23:
  50. {
  51. TextDrawSetString(ProfsTextD[playerid], "~p~AGENTE DOS CORREIOS");
  52.  
  53. APlayerData[playerid][PlayerClass] = ClassCourier;
  54. }
  55. case 24:
  56. {
  57. TextDrawSetString(ProfsTextD[playerid], "~g~~h~MECANICO");
  58.  
  59. APlayerData[playerid][PlayerClass] = ClassAssistance;
  60. }
  61. case 25, 26, 27:
  62. {
  63. TextDrawSetString(ProfsTextD[playerid], "~y~OPERARIO DO DNIT");
  64.  
  65. APlayerData[playerid][PlayerClass] = ClassRoadWorker;
  66. }
  67. case 28, 29, 30:
  68. {
  69. TextDrawSetString(ProfsTextD[playerid], "~b~~h~MEDICO");
  70.  
  71. APlayerData[playerid][PlayerClass] = ClassMedic;
  72. }
  73. case 31, 32:
  74. {
  75. TextDrawSetString(ProfsTextD[playerid], "~b~~h~ADVOGADO");
  76.  
  77. APlayerData[playerid][PlayerClass] = ClassAdvogado;
  78. }
  79. case 33, 34:
  80. {
  81. TextDrawSetString(ProfsTextD[playerid], "~b~~h~BOMBEIRO");
  82.  
  83. APlayerData[playerid][PlayerClass] = ClassBombeiro;
  84. }
  85. }
  86. return 1;
  87. }
  88. switch (APlayerData[playerid][PlayerClass])
  89. {
  90. case ClassTruckDriver:
  91. {
  92. switch (listitem)
  93. {
  94. case 0:
  95. {
  96. SpawnPlayer(playerid);
  97. SetPlayerPos(playerid, 1376.6407,1020.3521,10.8203);
  98. RewardPlayer(playerid, -200, 0);
  99. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}LVA Freight Depot{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  100. }
  101. case 1:
  102. {
  103. SpawnPlayer(playerid);
  104. SetPlayerPos(playerid, -2135.7871,-247.5011,36.1588);
  105. RewardPlayer(playerid, -200, 0);
  106. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Doherty Depot{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  107. }
  108. case 2:
  109. {
  110. SpawnPlayer(playerid);
  111. SetPlayerPos(playerid, 2185.7600,-2256.5200,14.7734);
  112. RewardPlayer(playerid, -200, 0);
  113. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Armazem LS{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  114. }
  115. case 3:
  116. {
  117. SpawnPlayer(playerid);
  118. SetPlayerPos(playerid, -2424.0337,2116.4568,12.2353);
  119. RewardPlayer(playerid, -200, 0);
  120. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Bay Side{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  121. }
  122. case 4:
  123. {
  124. SpawnPlayer(playerid);
  125. SetPlayerPos(playerid, -3114.7031,1916.2468,12.0739);
  126. RewardPlayer(playerid, -200, 0);
  127. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgate Maritimo{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  128. }
  129. case 5:
  130. {
  131. RewardPlayer(playerid, -200, 0);
  132. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgate Maritimo{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  133. SpawnPlayer(playerid);
  134. SetPlayerPos(playerid, 2725.3513,-2569.1050,3.0000);
  135. }
  136. case 6:
  137. {
  138. RewardPlayer(playerid, -200, 0);
  139. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgate Maritimo{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  140. SpawnPlayer(playerid);
  141. SetPlayerPos(playerid, -2943.7280,483.8671,4.9103);
  142. }
  143. case 7:
  144. {
  145. RewardPlayer(playerid, -200, 0);
  146. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgate Maritimo{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  147. SpawnPlayer(playerid);
  148. SetPlayerPos(playerid, -2195.3701,2410.4751,4.9619);
  149. }
  150. case 8:
  151. {
  152. SpawnPlayer(playerid);
  153. SetPlayerPos(playerid, 2185.7600,-2256.5200,14.7734);
  154. new HouseList[1000];
  155. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  156. {
  157. // Check if this houseindex is occupied
  158. if (APlayerData[playerid][Houses][i] != 0)
  159. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  160. else
  161. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  162. }
  163. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  164. }
  165. case 9:
  166. {
  167. SpawnPlayer(playerid);
  168. SetPlayerPos(playerid, 2185.7600,-2256.5200,14.7734);
  169. new BusinessList[1000], BusID, BusType, Earnings;
  170. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  171. {
  172. // Get the business-id
  173. BusID = APlayerData[playerid][Business][i];
  174.  
  175. // Check if this businessindex is occupied
  176. if (BusID != 0)
  177. {
  178. // Get the business-type
  179. BusType = ABusinessData[BusID][BusinessType];
  180. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  181. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  182. }
  183. else
  184. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  185. }
  186. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  187. }
  188. }
  189. }
  190. case ClassBusDriver:
  191. {
  192. switch (listitem)
  193. {
  194. case 0:
  195. {
  196. RewardPlayer(playerid, -200, 0);
  197. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  198. SpawnPlayer(playerid);
  199. SetPlayerPos(playerid, 1782.1699, -1863.9131, 13.5745);
  200. }
  201. case 1:
  202. {
  203. RewardPlayer(playerid, -200, 0);
  204. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  205. SpawnPlayer(playerid);
  206. SetPlayerPos(playerid, -1983.0, 110.0, 27.7);
  207. }
  208. case 2:
  209. {
  210. RewardPlayer(playerid, -200, 0);
  211. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  212. SpawnPlayer(playerid);
  213. SetPlayerPos(playerid, 1060.0, 1260.0, 11.0);
  214. }
  215. case 3:
  216. {
  217. new HouseList[1000];
  218. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  219. {
  220. if (APlayerData[playerid][Houses][i] != 0)
  221. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  222. else
  223. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  224. }
  225. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  226. }
  227. case 4:
  228. {
  229. new BusinessList[1000], BusID, BusType, Earnings;
  230. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  231. {
  232. BusID = APlayerData[playerid][Business][i];
  233. if (BusID != 0)
  234. {
  235. BusType = ABusinessData[BusID][BusinessType];
  236. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  237. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  238. }
  239. else
  240. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  241. }
  242. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  243. }
  244. }
  245. }
  246. case ClassPilot:
  247. {
  248. switch (listitem)
  249. {
  250. case 0:
  251. {
  252. RewardPlayer(playerid, -200, 0);
  253. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  254. SpawnPlayer(playerid);
  255. SetPlayerPos(playerid, 2010.0, -2345.0, 13.6);
  256. }
  257. case 1:
  258. {
  259. RewardPlayer(playerid, -200, 0);
  260. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  261. SpawnPlayer(playerid);
  262. SetPlayerPos(playerid, -1211.0, -105.0, 14.2);
  263. }
  264. case 2:
  265. {
  266. RewardPlayer(playerid, -200, 0);
  267. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  268. SpawnPlayer(playerid);
  269. SetPlayerPos(playerid, 1630.0, 1615.0, 10.9);
  270. }
  271. case 3:
  272. {
  273. new HouseList[1000];
  274. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  275. {
  276. if (APlayerData[playerid][Houses][i] != 0)
  277. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  278. else
  279. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  280. }
  281. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  282. }
  283. case 4:
  284. {
  285. new BusinessList[1000], BusID, BusType, Earnings;
  286. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  287. {
  288. BusID = APlayerData[playerid][Business][i];
  289. if (BusID != 0)
  290. {
  291. BusType = ABusinessData[BusID][BusinessType];
  292. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  293. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  294. }
  295. else
  296. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  297. }
  298. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  299. }
  300. }
  301. }
  302. case ClassPolice:
  303. {
  304. switch (listitem)
  305. {
  306. case 0:
  307. {
  308. RewardPlayer(playerid, -200, 0);
  309. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  310. SpawnPlayer(playerid);
  311. SetPlayerPos(playerid, 1568.5, -1693.5, 6.0);
  312. }
  313. case 1:
  314. {
  315. RewardPlayer(playerid, -200, 0);
  316. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  317. SpawnPlayer(playerid);
  318. SetPlayerPos(playerid, -1590.0, 716.25, -5.0);
  319. }
  320. case 2:
  321. {
  322. RewardPlayer(playerid, -200, 0);
  323. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  324. SpawnPlayer(playerid);
  325. SetPlayerPos(playerid, 2275.0, 2460.0, 10.9);
  326. }
  327. case 3:
  328. {
  329. RewardPlayer(playerid, -200, 0);
  330. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  331. SpawnPlayer(playerid);
  332. SetPlayerPos(playerid, -212.8061,979.6884,19.3298);
  333. }
  334. case 4:
  335. {
  336. RewardPlayer(playerid, -200, 0);
  337. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  338. SpawnPlayer(playerid);
  339. SetPlayerPos(playerid, 24.1553,-2646.3928,40.4632);
  340. }
  341. case 5:
  342. {
  343. SpawnPlayer(playerid);
  344. new HouseList[1000];
  345. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  346. {
  347. if (APlayerData[playerid][Houses][i] != 0)
  348. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  349. else
  350. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  351. }
  352. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  353. }
  354. case 6:
  355. {
  356. SpawnPlayer(playerid);
  357. new BusinessList[1000], BusID, BusType, Earnings;
  358. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  359. {
  360. BusID = APlayerData[playerid][Business][i];
  361. if (BusID != 0)
  362. {
  363. BusType = ABusinessData[BusID][BusinessType];
  364. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  365. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  366. }
  367. else
  368. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  369. }
  370. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  371. }
  372. }
  373. }
  374. case ClassMafia:
  375. {
  376. switch (listitem)
  377. {
  378. case 0:
  379. {
  380. RewardPlayer(playerid, -200, 0);
  381. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  382. SpawnPlayer(playerid);
  383. SetPlayerPos(playerid, 2822.5, 898.5, 10.8);
  384. }
  385. case 1:
  386. {
  387. SpawnPlayer(playerid);
  388. new HouseList[1000];
  389. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  390. {
  391. if (APlayerData[playerid][Houses][i] != 0)
  392. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  393. else
  394. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  395. }
  396. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  397. }
  398. case 2:
  399. {
  400. SpawnPlayer(playerid);
  401. new BusinessList[1000], BusID, BusType, Earnings;
  402. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  403. {
  404. BusID = APlayerData[playerid][Business][i];
  405. if (BusID != 0)
  406. {
  407. BusType = ABusinessData[BusID][BusinessType];
  408. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  409. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  410. }
  411. else
  412. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  413. }
  414. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  415. }
  416. }
  417. }
  418. case ClassCourier:
  419. {
  420. switch (listitem)
  421. {
  422. case 0:
  423. {
  424. RewardPlayer(playerid, -200, 0);
  425. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  426. SpawnPlayer(playerid);
  427. SetPlayerPos(playerid, 798.0, -618.75, 16.4);
  428. }
  429. case 1:
  430. {
  431. RewardPlayer(playerid, -200, 0);
  432. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  433. SpawnPlayer(playerid);
  434. SetPlayerPos(playerid, -1849.25, -135.0, 12.0);
  435. }
  436. case 2:
  437. {
  438. RewardPlayer(playerid, -200, 0);
  439. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  440. SpawnPlayer(playerid);
  441. SetPlayerPos(playerid, 1050.5, 1931.0, 10.9);
  442. }
  443. case 3:
  444. {
  445. RewardPlayer(playerid, -200, 0);
  446. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  447. SpawnPlayer(playerid);
  448. SetPlayerPos(playerid, -2080.3877, -207.6221, 35.3203);
  449. }
  450. case 4:
  451. {
  452. SpawnPlayer(playerid);
  453. new HouseList[1000];
  454. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  455. {
  456. if (APlayerData[playerid][Houses][i] != 0)
  457. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  458. else
  459. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  460. }
  461. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  462. }
  463. case 5:
  464. {
  465. SpawnPlayer(playerid);
  466. new BusinessList[1000], BusID, BusType, Earnings;
  467. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  468. {
  469. BusID = APlayerData[playerid][Business][i];
  470. if (BusID != 0)
  471. {
  472. BusType = ABusinessData[BusID][BusinessType];
  473. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  474. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  475. }
  476. else
  477. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  478. }
  479. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  480. }
  481. }
  482. }
  483. case ClassAssistance:
  484. {
  485. switch (listitem)
  486. {
  487. case 0:
  488. {
  489. RewardPlayer(playerid, -200, 0);
  490. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  491. SpawnPlayer(playerid);
  492. SetPlayerPos(playerid, 211.25, 24.75, 2.6);
  493. }
  494. case 1:
  495. {
  496. SpawnPlayer(playerid);
  497. new HouseList[1000];
  498. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  499. {
  500. if (APlayerData[playerid][Houses][i] != 0)
  501. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  502. else
  503. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  504. }
  505. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  506. }
  507. case 2:
  508. {
  509. SpawnPlayer(playerid);
  510. new BusinessList[1000], BusID, BusType, Earnings;
  511. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  512. {
  513. BusID = APlayerData[playerid][Business][i];
  514. if (BusID != 0)
  515. {
  516. BusType = ABusinessData[BusID][BusinessType];
  517. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  518. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  519. }
  520. else
  521. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  522. }
  523. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  524. }
  525. }
  526. }
  527. case ClassRoadWorker:
  528. {
  529. switch (listitem)
  530. {
  531. case 0:
  532. {
  533. RewardPlayer(playerid, -200, 0);
  534. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  535. SpawnPlayer(playerid);
  536. SetPlayerPos(playerid, -1866.25, -1715.25, 22.7);
  537. }
  538. case 1:
  539. {
  540. SpawnPlayer(playerid);
  541. new HouseList[1000];
  542. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  543. {
  544. if (APlayerData[playerid][Houses][i] != 0)
  545. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  546. else
  547. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  548. }
  549. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  550. }
  551. case 2:
  552. {
  553. SpawnPlayer(playerid);
  554. new BusinessList[1000], BusID, BusType, Earnings;
  555. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  556. {
  557. BusID = APlayerData[playerid][Business][i];
  558. if (BusID != 0)
  559. {
  560. BusType = ABusinessData[BusID][BusinessType];
  561. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  562. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  563. }
  564. else
  565. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  566. }
  567. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  568. }
  569. }
  570. }
  571. case ClassMedic:
  572. {
  573. switch (listitem)
  574. {
  575. case 0:
  576. {
  577. RewardPlayer(playerid, -200, 0);
  578. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  579. SpawnPlayer(playerid);
  580. SetPlayerPos(playerid, 1007.5084,1069.9950,11.0000);
  581. }
  582. case 1:
  583. {
  584. RewardPlayer(playerid, -200, 0);
  585. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  586. SpawnPlayer(playerid);
  587. SetPlayerPos(playerid, 1182.2202,-1324.1368,13.5811);
  588. }
  589. case 2:
  590. {
  591. RewardPlayer(playerid, -200, 0);
  592. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  593. SpawnPlayer(playerid);
  594. SetPlayerPos(playerid, -1943.8208,563.5020,35.1985);
  595. }
  596. case 3:
  597. {
  598. SpawnPlayer(playerid);
  599. new HouseList[1000];
  600. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  601. {
  602. if (APlayerData[playerid][Houses][i] != 0)
  603. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  604. else
  605. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  606. }
  607. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  608. }
  609. case 4:
  610. {
  611. SpawnPlayer(playerid);
  612. new BusinessList[1000], BusID, BusType, Earnings;
  613. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  614. {
  615. BusID = APlayerData[playerid][Business][i];
  616. if (BusID != 0)
  617. {
  618. BusType = ABusinessData[BusID][BusinessType];
  619. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  620. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  621. }
  622. else
  623. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  624. }
  625. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  626. }
  627. }
  628. }
  629. case ClassAdvogado:
  630. {
  631. switch (listitem)
  632. {
  633. case 0:
  634. {
  635. RewardPlayer(playerid, -200, 0);
  636. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  637. SpawnPlayer(playerid);
  638. SetPlayerPos(playerid, 2288.6077,2426.9941,10.8203);
  639. }
  640. case 1:
  641. {
  642. RewardPlayer(playerid, -200, 0);
  643. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  644. SpawnPlayer(playerid);
  645. SetPlayerPos(playerid, 1480.6124,-1767.0293,18.7958);
  646. }
  647. case 2:
  648. {
  649. RewardPlayer(playerid, -200, 0);
  650. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  651. SpawnPlayer(playerid);
  652. SetPlayerPos(playerid, -1605.8877,717.2569,12.0448);
  653. }
  654. case 3:
  655. {
  656. SpawnPlayer(playerid);
  657. new HouseList[1000];
  658. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  659. {
  660. if (APlayerData[playerid][Houses][i] != 0)
  661. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  662. else
  663. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  664. }
  665. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  666. }
  667. case 4:
  668. {
  669. SpawnPlayer(playerid);
  670. new BusinessList[1000], BusID, BusType, Earnings;
  671. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  672. {
  673. BusID = APlayerData[playerid][Business][i];
  674. if (BusID != 0)
  675. {
  676. BusType = ABusinessData[BusID][BusinessType];
  677. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  678. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  679. }
  680. else
  681. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  682. }
  683. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  684. }
  685. }
  686. }
  687. case ClassBombeiro:
  688. {
  689. switch (listitem)
  690. {
  691. case 0:
  692. {
  693. RewardPlayer(playerid, -200, 0);
  694. SendClientMessage(playerid, -1, "{a9c4e4}Você foi para {ffffff}Resgatado{a9c4e4}. Isso lhe custou {00ff00}R${ffffff}200{a9c4e4}.");
  695. SpawnPlayer(playerid);
  696. SetPlayerPos(playerid, -2024.7880,67.1375,28.4387);
  697. }
  698. case 1:
  699. {
  700. SpawnPlayer(playerid);
  701. new HouseList[1000];
  702. for (new i; i < MAX_HOUSESPERPLAYER; i++)
  703. {
  704. if (APlayerData[playerid][Houses][i] != 0)
  705. format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
  706. else
  707. format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Vazio");
  708. }
  709. ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma casa para se teleportar:", HouseList, "Selecionar", "Cancelar");
  710. }
  711. case 2:
  712. {
  713. SpawnPlayer(playerid);
  714. new BusinessList[1000], BusID, BusType, Earnings;
  715. for (new i; i < MAX_BUSINESSPERPLAYER; i++)
  716. {
  717. BusID = APlayerData[playerid][Business][i];
  718. if (BusID != 0)
  719. {
  720. BusType = ABusinessData[BusID][BusinessType];
  721. Earnings = (BusinessTransactionTime - ABusinessData[BusID][LastTransaction]) * ABusinessInteriors[BusType][BusEarnings] * ABusinessData[BusID][BusinessLevel];
  722. format(BusinessList, 1000, "%s{00FF00}%s{FFFFFF} (ganhos: $%i)\n", BusinessList, ABusinessData[BusID][BusinessName], Earnings);
  723. }
  724. else
  725. format(BusinessList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", BusinessList, "Slot vazio");
  726. }
  727. ShowPlayerDialog(playerid, DialogGoBusiness, DIALOG_STYLE_LIST, "{FFFFFF}Selecione uma empresa para se teleportar:", BusinessList, "Selecionar", "Cancelar");
  728. }
  729. }
  730. }
  731. }
  732. }
  733. public OnPlayerRequestSpawn(playerid)
  734. {
  735. if(APlayerData[playerid][ssSpawn] == 5)
  736. {
  737. SendClientMessage(playerid, -1, "{FF0000}Voce foi kickado por suspeita de hack, lag ou zuar.");
  738. Kick(playerid);
  739. return 0;
  740. }
  741. if(sSpawn[playerid] == false)
  742. {
  743. return 0;
  744. }
  745. new Index, Float:x, Float:y, Float:z, Float:Angle, Name[24], Msg[128];
  746.  
  747. // Get the player's name
  748. GetPlayerName(playerid, Name, sizeof(Name));
  749.  
  750. // Choose a random spawnlocation based on the player's class
  751. switch (APlayerData[playerid][PlayerClass])
  752. {
  753. case ClassTruckDriver:
  754. {
  755. Index = random(sizeof(ASpawnLocationsTrucker)); // Get a random array-index to chose a random spawnlocation
  756. x = ASpawnLocationsTrucker[Index][SpawnX]; // Get the X-position for the spawnlocation
  757. y = ASpawnLocationsTrucker[Index][SpawnY]; // Get the Y-position for the spawnlocation
  758. z = ASpawnLocationsTrucker[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  759. Angle = ASpawnLocationsTrucker[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  760. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - LVA Freight Depot\r\n2 - Doherty Depot\r\n3 - Armazem LS\r\n4 - Bay Side\r\n5 - Resgate Maritimo\r\n6 - Los Santos [Maritimo]\r\n7 - San Fierro [Maritimo]\r\n8 - Bay Side [Maritimo]\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancelar");
  761. printf("%s entrou como um caminhoneiro", Name);
  762. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {FF9900}entrou como um {ffffff}caminhoneiro{FF9900}.", Name, playerid);
  763. jaspawnou[playerid] = true;
  764. sSpawn[playerid] = false;
  765. APlayerData[playerid][ssSpawn] ++;
  766. SendClientMessageToAll(-1, Msg);
  767. LP[playerid] = true;
  768. }
  769. case ClassBusDriver:
  770. {
  771. Index = random(sizeof(ASpawnLocationsBusDriver));
  772. x = ASpawnLocationsBusDriver[Index][SpawnX]; // Get the X-position for the spawnlocation
  773. y = ASpawnLocationsBusDriver[Index][SpawnY]; // Get the Y-position for the spawnlocation
  774. z = ASpawnLocationsBusDriver[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  775. Angle = ASpawnLocationsBusDriver[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  776. printf("%s entrou como um motorista de onibus", Name);
  777. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Los Santos\r\n2 - San Fierro\r\n3 - Las Venturas\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
  778. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {00FFFF}entrou como um {ffffff}motorista de ônibus{00FFFF}.", Name, playerid);
  779. jaspawnou[playerid] = true;
  780. sSpawn[playerid] = false;
  781. APlayerData[playerid][ssSpawn] ++;
  782. SendClientMessageToAll(-1, Msg);
  783. LP[playerid] = true;
  784. }
  785. case ClassPilot:
  786. {
  787. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Los Santos\r\n2 - San Fierro\r\n3 - Las Venturas\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
  788. x = ASpawnLocationsPilot[Index][SpawnX]; // Get the X-position for the spawnlocation
  789. y = ASpawnLocationsPilot[Index][SpawnY]; // Get the Y-position for the spawnlocation
  790. z = ASpawnLocationsPilot[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  791. Angle = ASpawnLocationsPilot[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  792. Index = random(sizeof(ASpawnLocationsPilot));
  793. printf("%s entrou como um piloto", Name);
  794. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {008080}entrou como um {ffffff}piloto de avião{008080}.", Name, playerid);
  795. jaspawnou[playerid] = true;
  796. sSpawn[playerid] = false;
  797. APlayerData[playerid][ssSpawn] ++;
  798. SendClientMessageToAll(-1, Msg);
  799. LP[playerid] = true;
  800. }
  801. case ClassPolice:
  802. {
  803. // Count the number of normal players (all classes except police) and count the amount of police players
  804. new NormalPlayers, PolicePlayers, bool:CanSpawnAsCop = false;
  805.  
  806. // Block this check if PlayersBeforePolice is set to 0 (this allows anyone to join as police)
  807. if (PlayersBeforePolice > 0)
  808. {
  809. // Loop through all players
  810. for (new pid; pid < MAX_PLAYERS; pid++)
  811. {
  812. // Exclude this player, as he doesn't have a class yet, he's still choosing here
  813. if (pid != playerid)
  814. {
  815. // Also exclude all players who are still in the class-selection screen, as they don't have a class selected yet
  816. if (GetPlayerInterior(pid) != 14)
  817. {
  818. // Check if this player is logged in
  819. if (APlayerData[pid][LoggedIn] == true)
  820. {
  821. // Count the amount of normal players and police players
  822. switch (APlayerData[pid][PlayerClass])
  823. {
  824. case ClassPolice:
  825. PolicePlayers++;
  826. case ClassTruckDriver, ClassBusDriver, ClassPilot, ClassMafia, ClassCourier, ClassAssistance, ClassRoadWorker, ClassMedic, ClassAdvogado, ClassBombeiro:
  827. NormalPlayers++;
  828. }
  829. }
  830. }
  831. }
  832. }
  833. // Check if there are less police players than allowed
  834. if (PolicePlayers < (NormalPlayers * PlayersBeforePolice))
  835. CanSpawnAsCop = true; // There are less police players than allowed, so the player can choose this class
  836. else
  837. CanSpawnAsCop = false; // The maximum amount of police players has been reached, the player can't choose to be a cop
  838.  
  839. // Check if the player isn't allowed to spawn as police
  840. if (CanSpawnAsCop == false)
  841. {
  842. // Let the player know the maximum amount of cops has been reached
  843. GameTextForPlayer(playerid, "O número máximo de COP's online foi atingido.", 5000, 4);
  844. SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}O número máximo de COP's online foi atingido, por favor selecione outra classe.");
  845. LP[playerid] = false;
  846. return 0; // Don't allow the player to spawn as police player
  847. }
  848. }
  849. if (APlayerData[playerid][PlayerScore] < 1200)
  850. {
  851. // Let the player know he needs 100 scorepoints
  852. GameTextForPlayer(playerid, "~y~Voce precisa de 1200 pontos para entrar na Policia.", 5000, 4);
  853. SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Você precisa de 1200 pontos para entrar na policia");
  854.  
  855. return 0; // Don't allow the player to spawn as police player
  856. }
  857. // If the player has a wanted level
  858. if (GetPlayerWantedLevel(playerid) > 0)
  859. {
  860. // Let the player know he cannot have a wanted level to join police
  861. GameTextForPlayer(playerid, "Voce nao pode ser um policial enquanto estiver sendo procurado", 5000, 4);
  862. SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Você não pode ser um policial enquanto estiver sendo procurado.");
  863. return 0; // Don't allow the player to spawn as police player
  864. }
  865. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Los Santos\r\n2 - San Fierro\r\n3 - Las Venturas\r\n4 - Fort Carson\r\n5 - Flint County\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
  866. printf("%s entrou como um policial", Name);
  867. Index = random(sizeof(ASpawnLocationsPolice));
  868. x = ASpawnLocationsPolice[Index][SpawnX]; // Get the X-position for the spawnlocation
  869. y = ASpawnLocationsPolice[Index][SpawnY]; // Get the Y-position for the spawnlocation
  870. z = ASpawnLocationsPolice[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  871. Angle = ASpawnLocationsPolice[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  872. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {0000FF}entrou como um {ffffff}policial{0000FF}.", Name, playerid);
  873. jaspawnou[playerid] = true;
  874. sSpawn[playerid] = false;
  875. APlayerData[playerid][ssSpawn] ++;
  876. SendClientMessageToAll(-1, Msg);
  877. }
  878. case ClassMafia:
  879. {
  880. if (APlayerData[playerid][PlayerScore] < 800)
  881. {
  882. GameTextForPlayer(playerid, "~y~Voce precisa de 800 pontos para entrar na Mafia", 5000, 4);
  883. SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Você precisa de 800 pontos para entrar na Máfia");
  884. return 0;
  885. }
  886. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Las Venturas\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
  887. printf("%s entrou como um mafioso", Name);
  888. Index = random(sizeof(ASpawnLocationsMafia));
  889. x = ASpawnLocationsMafia[Index][SpawnX]; // Get the X-position for the spawnlocation
  890. y = ASpawnLocationsMafia[Index][SpawnY]; // Get the Y-position for the spawnlocation
  891. z = ASpawnLocationsMafia[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  892. Angle = ASpawnLocationsMafia[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  893. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {8000FF}entrou como um {ffffff}mafioso{8000FF}.", Name, playerid);
  894. jaspawnou[playerid] = true;
  895. sSpawn[playerid] = false;
  896. APlayerData[playerid][ssSpawn] ++;
  897. SendClientMessageToAll(-1, Msg);
  898. LP[playerid] = true;
  899. }
  900. case ClassCourier:
  901. {
  902. printf("%s entrou como um agente de correio", Name);
  903. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Los Santos\r\n2 - San Fierro\r\n3 - Las Venturas\r\n4 - Biblioteca Doherty\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
  904. Index = random(sizeof(ASpawnLocationsCourier));
  905. x = ASpawnLocationsCourier[Index][SpawnX]; // Get the X-position for the spawnlocation
  906. y = ASpawnLocationsCourier[Index][SpawnY]; // Get the Y-position for the spawnlocation
  907. z = ASpawnLocationsCourier[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  908. Angle = ASpawnLocationsCourier[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  909. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {FF00FF}entrou como um {ffffff}agente dos correios{FF00FF}.", Name, playerid);
  910. jaspawnou[playerid] = true;
  911. sSpawn[playerid] = false;
  912. APlayerData[playerid][ssSpawn] ++;
  913. SendClientMessageToAll(-1, Msg);
  914. LP[playerid] = true;
  915. }
  916. case ClassAssistance:
  917. {
  918. printf("%s entrou como um mecanico", Name);
  919. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Las Venturas\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
  920. Index = random(sizeof(ASpawnLocationsAssistance));
  921. x = ASpawnLocationsAssistance[Index][SpawnX]; // Get the X-position for the spawnlocation
  922. y = ASpawnLocationsAssistance[Index][SpawnY]; // Get the Y-position for the spawnlocation
  923. z = ASpawnLocationsAssistance[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  924. Angle = ASpawnLocationsAssistance[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  925. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {A5ED54}entrou como um {ffffff}mecânico{A5ED54}.", Name, playerid);
  926. jaspawnou[playerid] = true;
  927. sSpawn[playerid] = false;
  928. APlayerData[playerid][ssSpawn] ++;
  929. SendClientMessageToAll(-1, Msg);
  930. LP[playerid] = true;
  931. }
  932. case ClassRoadWorker:
  933. {
  934. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Whesttone\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
  935. printf("%s entrou como um operario de dnit", Name);
  936. Index = random(sizeof(ASpawnLocationsRoadWorker));
  937. x = ASpawnLocationsRoadWorker[Index][SpawnX]; // Get the X-position for the spawnlocation
  938. y = ASpawnLocationsRoadWorker[Index][SpawnY]; // Get the Y-position for the spawnlocation
  939. z = ASpawnLocationsRoadWorker[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  940. Angle = ASpawnLocationsRoadWorker[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  941. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {FFFF80}entrou como um {ffffff}operário do DNIT{FFFF80}.", Name, playerid);
  942. jaspawnou[playerid] = true;
  943. sSpawn[playerid] = false;
  944. APlayerData[playerid][ssSpawn] ++;
  945. SendClientMessageToAll(-1, Msg);
  946. LP[playerid] = true;
  947. }
  948. case ClassMedic:
  949. {
  950. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Las Venturas\r\n2 - Los Santos\r\n3 - San Fierro\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
  951. printf("%s entrou como um medico", Name);
  952. Index = random(sizeof(ASpawnLocationsMedic));
  953. x = ASpawnLocationsMedic[Index][SpawnX]; // Get the X-position for the spawnlocation
  954. y = ASpawnLocationsMedic[Index][SpawnY]; // Get the Y-position for the spawnlocation
  955. z = ASpawnLocationsMedic[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  956. Angle = ASpawnLocationsMedic[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  957. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {AC46CF}entrou como um {ffffff}medico{AC46CF}.", Name, playerid);
  958. jaspawnou[playerid] = true;
  959. sSpawn[playerid] = false;
  960. APlayerData[playerid][ssSpawn] ++;
  961. SendClientMessageToAll(-1, Msg);
  962. LP[playerid] = true;
  963. }
  964. case ClassAdvogado:
  965. {
  966. if (APlayerData[playerid][PlayerScore] < 1000)
  967. {
  968. // Let the player know he needs 100 scorepoints
  969. SendClientMessage(playerid, 0xFFFFFFFF, "{ff0000}Requer no minimo 1000 pontos para advogado!");
  970. return 0; // Don't allow the player to spawn as police player
  971. }
  972. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - Las Venturas\r\n2 - Los Santos\r\n3 - San Fierro\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
  973. printf("%s entrou como um advogado", Name);
  974. Index = random(sizeof(ASpawnLocationsAdvogado));
  975. x = ASpawnLocationsAdvogado[Index][SpawnX]; // Get the X-position for the spawnlocation
  976. y = ASpawnLocationsAdvogado[Index][SpawnY]; // Get the Y-position for the spawnlocation
  977. z = ASpawnLocationsAdvogado[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  978. Angle = ASpawnLocationsAdvogado[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  979. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {FFC87A}entrou como um {ffffff}advogado{FFC87A}.", Name, playerid);
  980. jaspawnou[playerid] = true;
  981. sSpawn[playerid] = false;
  982. APlayerData[playerid][ssSpawn] ++;
  983. SendClientMessageToAll(-1, Msg);
  984. LP[playerid] = true;
  985. }
  986. case ClassBombeiro:
  987. {
  988. if (APlayerData[playerid][PlayerScore] < 100)
  989. {
  990. GameTextForPlayer(playerid, "~y~Voce precisa de 100 pontos de score, para entrar nos Bombeiros", 5000, 4);
  991. return 0;
  992. }
  993. ShowPlayerDialog(playerid, DIALOG_SAPW, DIALOG_STYLE_LIST, "Nascer em:", "1 - San Fierro\r\n{FFFF00}Minhas Casas\r\n{FFFF00}Minhas Empresas", "Ir", "Cancel");
  994. printf("%s entrou como um bombeiro", Name);
  995. Index = random(sizeof(ASpawnLocationsCourier));
  996. x = ASpawnLocationsBombeiro[Index][SpawnX]; // Get the X-position for the spawnlocation
  997. y = ASpawnLocationsBombeiro[Index][SpawnY]; // Get the Y-position for the spawnlocation
  998. z = ASpawnLocationsBombeiro[Index][SpawnZ]; // Get the Z-position for the spawnlocation
  999. Angle = ASpawnLocationsCourier[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
  1000. format(Msg, 128, "{B5B5B5}• {FFFFFF}%s {FF3030}entrou como um {ffffff}bombeiro{FF3030}.", Name, playerid);
  1001. jaspawnou[playerid] = true;
  1002. sSpawn[playerid] = false;
  1003. APlayerData[playerid][ssSpawn] ++;
  1004. SendClientMessageToAll(-1, Msg);
  1005. LP[playerid] = true;
  1006. }
  1007. }
  1008. //Spawn the player with his chosen skin at a random location based on his class
  1009. SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), x, y, z, Angle, 0, 0, 0, 0, 0, 0);
  1010. //SendClientMessageToAll(0x90EE90FF, Msg);
  1011. SendClientMessageToAll(0xEEDD82FF, Msg);
  1012. return 1;
  1013. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement