Advertisement
BCVBruno

[FS] GangZona Comprável - SA:MP Planet

Jul 9th, 2012
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.71 KB | None | 0 0
  1. / / Premium SAMP, parágrafo Tudo Seu Servidor SAMP, FS, a GM, e Muito Mais Inclui,
  2. / / Visite-nos: http://premium-samp.blogspot.com.br/
  3. // SA:MP Planet !
  4.  
  5. / / ************************************************ ****
  6. / / POR FAVOR NAO REMOVA OS Creditos
  7. / / Sistema de GangZonas Compraveis v1.0
  8. / / ************************************************ ****
  9. / / Créditos
  10. / / Retirado fazer: Las Venturas Brasil 7.0d
  11. / / Créditos Gerais: [Gangsta] Kasura EX: [Rockstar] Rell
  12. / / Desenvolvedores: BCO e BnO
  13. / / ************************************************ ****
  14.  
  15. # Include <a_samp>
  16.  
  17. # Pragma tabsize 0
  18.  
  19. # Define 0xAA3333AA Color_Red
  20. # Define COLOR_GREEN 0x33AA33AA
  21. # Define COLOR_GREY 0xAFAFAFAA
  22. # Define COLOR_ORANGE 0xFF9900AA
  23. # Define COLOR_YELLOW 0xFFFF00AA
  24.  
  25. # Define CP_GZ_AUTOBASE_LV 0
  26. # Define CP_GZ_CONSTRUCAO_LV 1
  27. # Define CP_GZ_RECINTO_LV 2
  28. # Define CP_GZ_FABRICA_LV 3
  29. # Define CP_GZ_AEROPLACE_LV 4
  30. # Define CP_GZ_DISNEY_LV 5
  31. # Define CP_GZ_EXERCITO_LV 6
  32. # Define CP_GZ_CALIGULAS_LV 7
  33. # Define CP_GZ_GOLF_LV 8
  34.  
  35. # Define P_GZ_AUTOBASE_LV 0
  36. # Define P_GZ_CONSTRUCAO_LV 1
  37. # Define P_GZ_RECINTO_LV 2
  38. # Define P_GZ_FABRICA_LV 3
  39. # Define P_GZ_AEROPLACE_LV 4
  40. # Define P_GZ_DISNEY_LV 5
  41. # Define P_GZ_EXERCITO_LV 6
  42. # Define P_GZ_CALIGULAS_LV 7
  43. # Define P_GZ_GOLF_LV 8
  44.  
  45. # Define P_OFFSET 14
  46. # Define MAX_GZS 9
  47. # Define MAX_GANGS 50
  48. # Define MAX_GANG_NAME 50
  49.  
  50. frente GzScoreUpdate ();
  51. frente PayPlayerInGz (playerid, GzID, Float: x1, Float: y1, Float: x2, Float: y2, dinheiro);
  52. frente getCheckpointType (playerid);
  53. frente isPlayerInArea (playerid, Float: dados [4]);
  54. frente checkpointUpdate ();
  55. frente PropertyScoreUpdate ();
  56.  
  57. gangNames novas [MAX_GANGS] [MAX_GANG_NAME];
  58. playerCheckpoint novo [MAX_PLAYERS];
  59. novo gangInfo [MAX_GANGS] [3];
  60. gz novo = 555;
  61. GZ novo [MAX_GZS];
  62. novo GZ_EXISTE [MAX_GZS] [2];
  63. novo gangZonaId [MAX_GZS];
  64. novo gangZonaIdAnter [MAX_GZS];
  65. novo playerGang [MAX_PLAYERS];
  66. novo PLAYERLIST_authed [MAX_PLAYERS];
  67.  
  68. # Define MAX_POINTS 9
  69.  
  70. Float novo: checkCoords [MAX_POINTS] [4] = {
  71. {1017.134948, 1222.946899, 1096.891235, 1361.736572}, / / ​​GZ_AUTOBASE_LV
  72. {2372.279052, 1832.521362, 2496.685302, 1962.471801}, / / ​​GZ_CONSTRUCAO_LV
  73. {2777.4753, 833.6251, 2894.6955, 1022.9479}, / / ​​GZ_RECINTO_LV
  74. {918.294555, 2043.856567, 996.507202, 2182.339599}, / / ​​GZ_FABRICA_LV
  75. {1638.5530,1284.3757, 1716.3368,1319.3700}, / GZ_AEROPLACE /
  76. {2079.743,978.1417, 2329.653,1171.545},
  77. {81.74512,1763.359, 362.0141,2055.306}, / / ​​GZ_EXERCITO
  78. {2099.267,1535.143, 2290.605,1728.547}, / / ​​GZ_CALIGULAS_LV
  79. {1111.341,2718.771, 1509.635,2842.55} / / GZ_GOLF_LV
  80. };
  81.  
  82. Float novo: checkpoints [MAX_POINTS] [3] = {
  83. {1040.142578,1305.848266,10.820312}, / / ​​GZ_AUTOBASE_LV
  84. {2436.580322,1913.306274,6.163729}, / / ​​GZ_CONSTRUCAO_LV
  85. {2814.641357,969.982727,10.750000}, / / ​​GZ_RECINTO_LV
  86. {929.612487,2068.309570,10.820312}, / / ​​GZ_FABRICA_LV
  87. {1647.4393,1301.9464,10.8203}, / GZ_AEROPLACE /
  88. {2273.6250,1044.2716,10.8203}, / / ​​GZ_DISNEY
  89. {202.9969,1888.7633,17.6481}, / / ​​GZ_EXERCITO
  90. {2288.2988,1567.0795,10.8203}, / / ​​GZ_CALIGULAS_LV
  91. {1457.4954,2773.3105,10.8203} / / GZ_GOLF_LV
  92. };
  93.  
  94. novas checkpointType [MAX_POINTS] = {
  95. CP_GZ_AUTOBASE_LV,
  96. CP_GZ_CONSTRUCAO_LV,
  97. CP_GZ_RECINTO_LV,
  98. CP_GZ_FABRICA_LV,
  99. CP_GZ_AEROPLACE_LV,
  100. CP_GZ_DISNEY_LV,
  101. CP_GZ_EXERCITO_LV,
  102. CP_GZ_CALIGULAS_LV,
  103. CP_GZ_GOLF_LV
  104. };
  105.  
  106. # Define MAX_PROPERTIES 9
  107.  
  108. propertyNames novas [MAX_PROPERTIES] [32] = {
  109. "Gang da Base Auto Zona",
  110. "Gang Zona Construção",
  111. "Gang Zona Recinto",
  112. "Gang Zona Fabrica",
  113. "Gang Local Zona Aero",
  114. "Gang Zona Disney",
  115. "Gang Zona Exercito",
  116. "Gang Zona Caligulas",
  117. "Gang Zona Golf"
  118. };
  119.  
  120. propertyValues ​​novas [MAX_PROPERTIES] = {
  121. 185000,
  122. 175000,
  123. 200000,
  124. 250000,
  125. 190000,
  126. 270000,
  127. 180000,
  128. 210000,
  129. 190000
  130. };
  131.  
  132. propertyEarnings novas [MAX_PROPERTIES] = {
  133. 0,
  134. 0,
  135. 0,
  136. 0,
  137. 0,
  138. 0,
  139. 0,
  140. 0,
  141. 0
  142. };
  143.  
  144. getCheckpointType pública (playerid) {
  145. voltar checkpointType [playerCheckpoint [playerid]];
  146. }
  147.  
  148. novo propertyOwner [MAX_PROPERTIES] = {} 999.999.999.999.999.999.999.999.999;
  149.  
  150. público PayPlayerInGz (playerid, GzID, Float: x1, Float: y1, Float: x2, Float: y2, dinheiro) / / ID_GZ
  151. {
  152.  
  153. if (IsPlayerConnected (playerid))
  154. {
  155. new Float: X, Float: Y, Float: Z, Float: Float Saúde: Armour;
  156.  
  157. GetPlayerPos (playerid, X, Y, Z);
  158. GetPlayerHealth (playerid, Saúde);
  159. GetPlayerArmour (playerid, Armour);
  160.  
  161. if ((X> = x1) && (X <= x2) && (Y> = y1) && (Y <= y2))
  162. {
  163. if (playerGang [playerid]> 0)
  164. {
  165. if (gangZonaId [GzID] == playerGang [playerid])
  166. {
  167. GivePlayerMoney (playerid, dinheiro);
  168. GivePlayerWeapon (playerid, 31, 2);
  169.  
  170. if (Saúde <105)
  171. {
  172. SetPlayerHealth (playerid, Saúde + 2);
  173. }
  174. if (Armour <105)
  175. {
  176. SetPlayerArmour (playerid, Armadura + 2);
  177. }
  178. }
  179. outro
  180. {
  181. if (GZ_EXISTE [GzID] [0] == 1)
  182. {
  183. if (Saúde> 2)
  184. {
  185. SetPlayerHealth (playerid, Saúde - 2,5);
  186. }
  187. }
  188. outro
  189. {
  190. retornar 1;
  191. }
  192. }
  193. / /}
  194. }
  195. outro
  196. {
  197. if (GZ_EXISTE [GzID] [0] == 1)
  198. {
  199. if (Saúde> 2)
  200. {
  201. SetPlayerHealth (playerid, Saúde - 2,5);
  202. }
  203. }
  204. outro
  205. {
  206. retornar 1;
  207. }
  208. }
  209. }
  210. retornar 1;
  211. }
  212. retornar 0;
  213. }
  214.  
  215. público GzScoreUpdate ()
  216. {
  217. para (novo i = 0; i <MAX_PLAYERS; i + +)
  218. {
  219. / GZ / AUTOBASE_LV
  220. PayPlayerInGz (i, 0, 1017,134948, 1222,946899, 1096,891235, 1361,736572, 500);
  221. / GZ / CONSTRUCAO_LV
  222. PayPlayerInGz (i, 1, 2372,279052, 1832,521362, 2496,685302, 1962,471801, 500);
  223. / GZ / RECINTO_LV
  224. PayPlayerInGz (i, 2, 2777,4753, 833,6251, 2894,6955, 1022,9479, 500);
  225. / GZ / FABRICA_LV
  226. PayPlayerInGz (i, 3, 918,294555, 2043,856567, 996,507202, 2182,339599, 500);
  227. / GZ / AEROPLACE_LV
  228. PayPlayerInGz (i, 4, 1638,5530, 1284,3757, 1716,3368, 1319,3700, 500);
  229. / GZ / Disney_LV
  230. PayPlayerInGz (i, 5, 2079,743, 978,1417, 2329,653, 1171,545, 500);
  231. / / GZ_EXERCITO_LV
  232. PayPlayerInGz (i, 6, 81,74512, 1763,359, 362,0141, 2055,306, 500);
  233. / GZ / CALIGULAS_LV
  234. PayPlayerInGz (i, 7, 2099,267, 1535,143, 2290,605, 1728,547, 500);
  235. / GZ / GOLF_LV
  236. PayPlayerInGz (i, 8, 1111,341, 2718,771, 1509,635, 2842,55, 500);
  237. }
  238. retornar 1;
  239. }
  240.  
  241. OnPlayerConnect pública (playerid)
  242. {
  243. playerGang [playerid] = 0;
  244. playerCheckpoint [playerid] = 999;
  245. para (novo g = 0; g <MAX_GZS; g + +)
  246. {
  247. if (GZ_EXISTE [g] [0] == 1)
  248. {
  249. GangZoneShowForPlayer (playerid, GZ [g], GZ_EXISTE [g] [1]);
  250. }
  251. }
  252. PLAYERLIST_authed [playerid] = false;
  253. return false;
  254. }
  255.  
  256. público OnPlayerCommandText (playerid, cmdtext [])
  257. {
  258.  
  259. new string [256];
  260. novo cmd [256];
  261. novo idx;
  262. cmd = strtok (cmdtext, idx);
  263.  
  264. if (strcmp (cmdtext, "/ gangue zona Comprar", true) == 0)
  265. {
  266. nova propriedade = 999;
  267.  
  268. if (IsPlayerInCheckpoint (playerid))
  269. {
  270. switch (playerCheckpoint [playerid])
  271. {
  272. caso CP_GZ_AUTOBASE_LV:
  273. {
  274. property = P_GZ_AUTOBASE_LV;
  275. gz = 0;
  276. }
  277. caso CP_GZ_CONSTRUCAO_LV:
  278. {
  279. property = P_GZ_CONSTRUCAO_LV;
  280. gz = 1;
  281. }
  282. caso CP_GZ_RECINTO_LV:
  283. {
  284. property = P_GZ_RECINTO_LV;
  285. gz = 2;
  286. }
  287. caso CP_GZ_FABRICA_LV:
  288. {
  289. property = P_GZ_FABRICA_LV;
  290. gz = 3;
  291. }
  292. caso CP_GZ_AEROPLACE_LV:
  293. {
  294. property = P_GZ_AEROPLACE_LV;
  295. gz = 4;
  296. }
  297. caso CP_GZ_DISNEY_LV:
  298. {
  299. property = P_GZ_DISNEY_LV;
  300. gz = 5;
  301. }
  302. caso CP_GZ_EXERCITO_LV:
  303. {
  304. property = P_GZ_EXERCITO_LV;
  305. gz = 6;
  306. }
  307. caso CP_GZ_CALIGULAS_LV:
  308. {
  309. property = P_GZ_CALIGULAS_LV;
  310. gz = 7;
  311. }
  312. caso CP_GZ_GOLF_LV:
  313. {
  314. property = P_GZ_GOLF_LV;
  315. gz = 8;
  316. }
  317. }
  318.  
  319. if (gz == 999 | | propriedade == 999)
  320. {
  321. SendClientMessage (playerid, Color_Red, "[INFO GZ] VA parágrafo checkpoint o e digite / gangue zona Comprar");
  322. retornar 1;
  323. }
  324.  
  325. if (GetPlayerMoney (playerid) <propertyValues ​​[propriedade])
  326. {
  327. SendClientMessage (playerid, Color_Red, "Voce nao <GZ Info> TEM DINHEIRO parágrafo Comprar ESSA Gang Zona!");
  328. retornar 1;
  329. }
  330.  
  331. if (playerGang [playerid]> 0)
  332. {
  333. if (gangZonaId [gz] == playerGang [playerid])
  334. {
  335. SendClientMessage (playerid, Color_Red, "[GZ]: ESSA JÁ Gang Zona e da Gang do Tua");
  336. retornar 1;
  337. }
  338.  
  339. novo playerCor = gangInfo [playerGang [playerid]] [2];
  340. / / GangInfo [playerGang [playerid]] [2] = playerColors [playerid];
  341.  
  342. if (GZ_EXISTE [gz] [0] == 1)
  343. {
  344. GangZoneDestroy (GZ [gz]);
  345. GZ [gz] = 555;
  346. }
  347.  
  348. if (gangZonaId [gz]> 0)
  349. {
  350. gangZonaIdAnter [gz] = gangZonaId [gz];
  351. }
  352.  
  353. switch (GZ)
  354. {
  355. case 0:
  356. {
  357. if ((GZ [gz]) | | | GZ ([gz] == 555))
  358. {
  359. GZ [gz] = GangZoneCreate (1017.134948, 1222.946899, 1096.891235, 1361.736572);
  360. GangZoneShowForAll (GZ [gz], playerCor);
  361. gangZonaId [gz] = playerGang [playerid];
  362. GZ_EXISTE [gz] [0] = 1;
  363. GZ_EXISTE [gz] [1] = playerCor;
  364. }
  365. }
  366. case 1:
  367. {
  368.  
  369. if ((GZ [gz]) | | | GZ ([gz] == 555))
  370. {
  371. GZ [gz] = GangZoneCreate (2372.279052, 1832.521362, 2496.685302, 1962.471801);
  372. GangZoneShowForAll (GZ [gz], playerCor);
  373. gangZonaId [gz] = playerGang [playerid];
  374. GZ_EXISTE [gz] [0] = 1;
  375. GZ_EXISTE [gz] [1] = playerCor;
  376. }
  377. }
  378. case 2:
  379. {
  380. if ((GZ [gz]) | | | GZ ([gz] == 555))
  381. {
  382. GZ [gz] = GangZoneCreate (2777.4753, 833.6251, 2894.6955, 1022.9479);
  383. GangZoneShowForAll (GZ [gz], playerCor);
  384. gangZonaId [gz] = playerGang [playerid];
  385. GZ_EXISTE [gz] [0] = 1;
  386. GZ_EXISTE [gz] [1] = playerCor;
  387. }
  388. }
  389. case 3:
  390. {
  391. if ((GZ [gz]) | | | GZ ([gz] == 555))
  392. {
  393. GZ [gz] = GangZoneCreate (918.294555, 2043.856567, 996.507202, 2182.339599);
  394. GangZoneShowForAll (GZ [gz], playerCor);
  395. gangZonaId [gz] = playerGang [playerid];
  396. GZ_EXISTE [gz] [0] = 1;
  397. GZ_EXISTE [gz] [1] = playerCor;
  398. }
  399. }
  400. case 4:
  401. {
  402. if ((GZ [gz]) | | | GZ ([gz] == 555))
  403. {
  404. GZ [gz] = GangZoneCreate (1638.5530, 1284.3757, 1716.3368, 1319.3700);
  405. GangZoneShowForAll (GZ [gz], playerCor);
  406. gangZonaId [gz] = playerGang [playerid];
  407. GZ_EXISTE [gz] [0] = 1;
  408. GZ_EXISTE [gz] [1] = playerCor;
  409. }
  410. }
  411. case 5:
  412. {
  413. if ((GZ [gz]) | | | GZ ([gz] == 555))
  414. {
  415. GZ [gz] = GangZoneCreate (2079.743, 978.1417, 2329.653, 1171.545);
  416. GangZoneShowForAll (GZ [gz], playerCor);
  417. gangZonaId [gz] = playerGang [playerid];
  418. GZ_EXISTE [gz] [0] = 1;
  419. GZ_EXISTE [gz] [1] = playerCor;
  420. }
  421. }
  422. case 6:
  423. {
  424. if ((GZ [gz]) | | | GZ ([gz] == 555))
  425. {
  426. GZ [gz] = GangZoneCreate (81,74512, 1763,359, 362,0141, 2055,306);
  427. GangZoneShowForAll (GZ [gz], playerCor);
  428. gangZonaId [gz] = playerGang [playerid];
  429. GZ_EXISTE [gz] [0] = 1;
  430. GZ_EXISTE [gz] [1] = playerCor;
  431. }
  432. }
  433. case 7:
  434. {
  435. if ((GZ [gz]) | | | GZ ([gz] == 555))
  436. {
  437. GZ [gz] = GangZoneCreate (2099.267, 1535.143, 2290.605, 1728.547);
  438. GangZoneShowForAll (GZ [gz], playerCor);
  439. gangZonaId [gz] = playerGang [playerid];
  440. GZ_EXISTE [gz] [0] = 1;
  441. GZ_EXISTE [gz] [1] = playerCor;
  442. }
  443. }
  444. case 8:
  445. {
  446. if ((GZ [gz]) | | | GZ ([gz] == 555))
  447. {
  448. GZ [gz] = GangZoneCreate (1111.341, 2718.771, 1509.635, 2842,55);
  449. GangZoneShowForAll (GZ [gz], playerCor);
  450. gangZonaId [gz] = playerGang [playerid];
  451. GZ_EXISTE [gz] [0] = 1;
  452. GZ_EXISTE [gz] [1] = playerCor;
  453. }
  454. }
  455.  
  456. default: return 1;
  457. }
  458. }
  459. outro
  460. {
  461. SendClientMessage (playerid, Color_Red, "[INFO GZ] e Preciso Estar in UMA gangue parágrafo Poder Comprar!");
  462. retornar 1;
  463. }
  464.  
  465. if (GZ_EXISTE [gz] [0] == 1)
  466. {
  467. GivePlayerMoney (playerid, 0-propertyValues ​​[propriedade]);
  468.  
  469. format (string, sizeof (string), "comprou uma gangue% s em% s da% s gangue!", gangNames [gangZonaId [gz]], propertyNames [propriedade], gangNames [gangZonaIdAnter [gz]]);
  470. SendClientMessageToAll (COLOR_GREEN, string);
  471. }
  472. }
  473. outro
  474. {
  475. SendClientMessage (playerid, Color_Red, "[INFO GZ] Estar necessario nenhum ponto de verificação parágrafo Poder / gangue zona Comprar");
  476. retornar 1;
  477. }
  478. retornar 1;
  479. }
  480.  
  481. retornar 0;
  482. }
  483.  
  484. OnPlayerEnterCheckpoint pública (playerid)
  485. {
  486.  
  487. new string [256];
  488.  
  489. switch (getCheckpointType (playerid))
  490. {
  491. caso CP_GZ_AUTOBASE_LV:
  492. {
  493. SendClientMessage (playerid, COLOR_ORANGE, "[GZ]: Gang da Base Auto Zona:");
  494. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Valor: 185 mil dólares, Pará Comprar digite / gangue zona Comprar");
  495. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Ganhe Dinheiro + Recuperação de Vida ficando NELA");
  496. gz = 0;
  497. }
  498. caso CP_GZ_CONSTRUCAO_LV:
  499. {
  500. SendClientMessage (playerid, COLOR_ORANGE, "[GZ]: Gang Zona Construção:");
  501. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Valor: 175000 dólares, Pará Comprar digite / gangue zona Comprar");
  502. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Ganhe Dinheiro + Recuperação de Vida ficando NELA");
  503. gz = 1;
  504. }
  505. caso CP_GZ_RECINTO_LV:
  506. {
  507. SendClientMessage (playerid, COLOR_ORANGE, "[GZ]: Gang Zona Recinto:");
  508. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Valor: 200000 dólares, Pará Comprar digite / gangue zona Comprar");
  509. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Ganhe Dinheiro + Recuperação de Vida ficando NELA");
  510. gz = 2;
  511. }
  512. caso CP_GZ_FABRICA_LV:
  513. {
  514. SendClientMessage (playerid, COLOR_ORANGE, "[GZ]: Gang Zona Fabrica:");
  515. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Valor: 250 mil dólares americanos, Pará Comprar digite / gangue zona Comprar");
  516. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Ganhe Dinheiro + Recuperação de Vida ficando NELA");
  517. gz = 3;
  518. }
  519. caso CP_GZ_AEROPLACE_LV:
  520. {
  521. SendClientMessage (playerid, COLOR_ORANGE, "[GZ]: Gang Zona Local Aero:");
  522. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Valor: 190 mil dólares, Pará Comprar digite / gangue zona Comprar");
  523. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Ganhe Dinheiro + Recuperação de Vida ficando NELA");
  524. gz = 4;
  525. }
  526. caso CP_GZ_DISNEY_LV:
  527. {
  528. SendClientMessage (playerid, COLOR_ORANGE, "[GZ]: Gang Zona Disney:");
  529. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Valor: 270000 dólares, Pará Comprar digite / gangue zona Comprar");
  530. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Ganhe Dinheiro + Recuperação de Vida ficando NELA");
  531. gz = 5;
  532. }
  533. caso CP_GZ_EXERCITO_LV:
  534. {
  535. SendClientMessage (playerid, COLOR_ORANGE, "[GZ]: Gang Zona Exercito:");
  536. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Valor: 180000 dólares, Pará Comprar digite / gangue zona Comprar");
  537. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Ganhe Dinheiro + Recuperação de Vida ficando NELA");
  538. gz = 6;
  539. }
  540. caso CP_GZ_CALIGULAS_LV:
  541. {
  542. SendClientMessage (playerid, COLOR_ORANGE, "[GZ]: Gang Zona Caligulas:");
  543. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Valor: 210000 dólares, Pará Comprar digite / gangue zona Comprar");
  544. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Ganhe Dinheiro + Recuperação de Vida ficando NELA");
  545. gz = 7;
  546. }
  547. caso CP_GZ_GOLF_LV:
  548. {
  549. SendClientMessage (playerid, COLOR_ORANGE, "[GZ]: Gang Golf Zona:");
  550. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Valor: 190 mil dólares, Pará Comprar digite / gangue zona Comprar");
  551. SendClientMessage (playerid, COLOR_YELLOW, "[GZ]: Ganhe Dinheiro + Recuperação de Vida ficando NELA");
  552. gz = 8;
  553. }
  554. }
  555.  
  556. if (getCheckpointType (playerid)> = P_OFFSET)
  557. {
  558. if (GZ_EXISTE [gz] [0] == 1)
  559. {
  560. format (string, sizeof (string), "[GZ]: ESSA Gang Gang atualmente e Zona da:% s.", gangNames [gangZonaId [gz]]);
  561. SendClientMessage (playerid, Color_Red, string);
  562. }
  563. }
  564. }
  565.  
  566. OnFilterScriptInit pública ()
  567. {
  568. SetTimer ("GzScoreUpdate", 2001, true);
  569. SetTimer ("checkpointUpdate", 1100, 1);
  570.  
  571. retornar 1;
  572. }
  573.  
  574.  
  575. público checkpointUpdate ()
  576. {
  577. para (novo i = 0; i <MAX_PLAYERS; i + +)
  578. {
  579. if (IsPlayerConnected (i)) {
  580. para (novo j = 0; J <MAX_POINTS; j + +) {
  581. if (isPlayerInArea (i, checkCoords [j])) {
  582. if (playerCheckpoint [i]! = j) {
  583. DisablePlayerCheckpoint (i);
  584. SetPlayerCheckpoint (i, checkpoints [j] [0], checkpoints [j] [1], checkpoints [j] [2], 2);
  585. playerCheckpoint [i] = j;
  586. }
  587. Else {}
  588. if (playerCheckpoint [i] == j) {
  589. DisablePlayerCheckpoint (i);
  590. playerCheckpoint [i] = 999;
  591. }
  592. }
  593. }
  594. }
  595. }
  596. }
  597.  
  598. público isPlayerInArea (playerid, Float: dados [4])
  599. {
  600. new Float: X, Float: Y, Float: Z;
  601.  
  602. GetPlayerPos (playerid, X, Y, Z);
  603. if (X> = data [0] && X <= data [2] && Y> = dados [1] && Y <= dados [3]) {
  604. retornar 1;
  605. }
  606. retornar 0;
  607. }
  608.  
  609. strtok (const string [], índice &)
  610. {
  611. novo comprimento = strlen (string);
  612. while (index (<comprimento) && (string [índice] <= ""))
  613. {
  614. index + +;
  615. }
  616.  
  617. novo deslocamento index =;
  618. novo resultado [20];
  619. while (index (<comprimento) && (string [índice]> '') && ((índice - offset) <(sizeof (resultado) - 1)))
  620. {
  621. resultado [índice - offset] = string [índice];
  622. index + +;
  623. }
  624. resultado [índice - offset] = EOS;
  625. resultado de retorno;
  626. }
  627.  
  628. público PropertyScoreUpdate ()
  629. {
  630. novos proprietários [MAX_PROPERTIES];
  631. novos pagamentos [MAX_PROPERTIES];
  632.  
  633. para (novo i = 0; i <MAX_PROPERTIES; i + +)
  634. proprietários [i] = 999;
  635.  
  636. para (novo i = 0; i <MAX_PROPERTIES; i + +)
  637. {
  638. if (propertyOwner [i] <999) {
  639.  
  640. para (novo j = 0; J <MAX_PROPERTIES; j + +) {
  641. (se os proprietários [j] == propertyOwner [i]) {
  642. pagamentos [j] + = propertyEarnings [i];
  643. MAX_PROPERTIES j =;
  644. } Else if (proprietários [j] == 999) {
  645. proprietários [j] = propertyOwner [i];
  646. pagamentos [j] + = propertyEarnings [i];
  647. MAX_PROPERTIES j =;
  648. }
  649. }
  650.  
  651. }
  652. }
  653. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement