toribio

toribio

Nov 10th, 2008
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 16.35 KB | None | 0 0
  1. #include <a_samp>
  2. #include <cpstream>
  3.  
  4. #pragma tabsize 0
  5.  
  6. #define COLOR_GREEN 0x33AA33AA //VERDE
  7. #define COLOR_DARKGREEN 0x006400 //VERDE ESCURO
  8. #define COLOR_PURPLE 0x9900FFAA //ROXO
  9. #define COLOR_YELLOW 0xFFFF00AA //AMARELO
  10. #define COLOR_LIGHTBLUE 0x91C8FF //AZUL CLARO
  11. #define COLOR_PINK 0xFF66FFAA //ROSA
  12. #define COLOR_WHITE 0xFFFFFFAA //BRANCO
  13. #define COLOR_RED 0xAA3333AA //VERMELHO
  14. #define COLOR_DARKRED 0x660000AA //VERMELHO ESCURO
  15. #define COLOR_BLACK 0x00000000 //Preto
  16. #define COLOR_ORANGE 0xFF9900AA //Laranja
  17. #define COLOR_LEMON 0xB4FC0A96 //Verde Limao
  18.  
  19. #define SOLDADO 1
  20. #define COP 2
  21. #define POLICIAL 3
  22. #define CHINES 4
  23. #define MEDICO 5
  24. #define PEDREIRO 6
  25. #define MANOBRISTA 7
  26. #define PILOTO 8
  27. #define SURFISTA 9
  28. #define KARATE 10
  29. #define GIRL 11
  30.  
  31. forward ZoneCheckpointChecker();
  32.  
  33. new gzcolor[12] = //11+1 (12) pois tem 11 GZs...
  34. {
  35.     0x33AA33AA, 0xFF9900AA, 0x00FFFFAA, 0xFF00FFAA, 0xFFFFFFAA, 0x006400AA,
  36.     0xFF0000AA, 0x9900FFAA, 0xFFFF00AA, 0x000000AA, 0xACFE01AA
  37. };
  38. new cpzone[MAX_PLAYERS][12]; //11+1 (12) pois tem 11 GZs...
  39. new lastcp[MAX_PLAYERS];
  40.  
  41. new Soldado;
  42. new Cop;
  43. new Policial;
  44. new Chines;
  45. new Medico;
  46. new Pedreiro;
  47. new Manobrista;
  48. new Piloto;
  49. new Surfista;
  50. new Karate;
  51. new Girl;
  52.  
  53. new cpsoldado;
  54. new cpcop;
  55. new cppolicial;
  56. new cpchines;
  57. new cpmedico;
  58. new cppedreiro;
  59. new cpmanobrista;
  60. new cppiloto;
  61. new cpsurfista;
  62. new cpkarate;
  63. new cpgirl;
  64.  
  65. new Gang[MAX_PLAYERS];
  66. new Kills[MAX_PLAYERS];
  67. new Mortes[MAX_PLAYERS];
  68. new TK[MAX_PLAYERS];
  69.  
  70. main()
  71. {
  72.     print("\n----------------------------------");
  73.     print(" [GM]Gang Zone - GZ By:MaxMillion");
  74.     print("----------------------------------\n");
  75.    
  76. }
  77.  
  78. public OnGameModeInit()
  79. {
  80.     SetGameModeText("BRASIL - DM~GZ");
  81.     SetTimer("ZoneCheckpointChecker", 1000, 1);
  82.     //Skin
  83.     AddPlayerClass(287,-1324.0948,497.2354,11.1953,137.1467,0,0,0,0,0,0);//Soldado
  84.     AddPlayerClass(285,-2650.4758,375.7504,6.1563,95.4077,0,0,0,0,0,0); //Cop
  85.     AddPlayerClass(281,-1635.5576,666.8273,7.1875,263.7441,0,0,0,0,0,0);//Policial
  86.     AddPlayerClass(123,-2185.7253,706.9626,53.8906,225.8146,0,0,0,0,0,0);//Chines
  87.     AddPlayerClass(274,-2655.1086,632.3919,14.4531,179.8741,0,0,0,0,0,0);//Medico
  88.     AddPlayerClass(260,-2077.5002,256.1515,39.3953,276.5512,0,0,0,0,0,0);//Pedreiro
  89.     AddPlayerClass(189,-1752.2679,960.0187,24.8828,180.9169,0,0,0,0,0,0);//Manobrista
  90.     AddPlayerClass(61,-1357.8954,-243.1245,14.1440,316.3803,0,0,0,0,0,0); //Piloto
  91.     AddPlayerClass(154,-2913.5051,8.2342,2.9290,94.1626,0,0,0,0,0,0); //Surfista
  92.     AddPlayerClass(204,-2265.8733,-152.0840,35.3203,93.8081,0,0,0,0,0,0); //Karate
  93.     AddPlayerClass(192,-1886.8282,-183.2980,18.3991,231.5110,0,0,0,0,0,0); //Girl
  94.     //Zona
  95.     Soldado = GangZoneCreate(-1753.477, 246.9049, -1007.979, 613.7866);
  96.     Cop = GangZoneCreate(-2802.677, -73.02245, -2367.859, 575.1719);
  97.     Policial = GangZoneCreate(-1989.101, 613.6215, -1394.325, 882.0442);
  98.     Chines = GangZoneCreate(-2379.232, 577.1168, -1988.689, 1489.569);
  99.     Medico = GangZoneCreate(-2974.085, 575.1168, -2379.232, 1552.688);
  100.     Pedreiro = GangZoneCreate(-2367.644, -73.96741, -1989.552, 577.0618);
  101.     Manobrista = GangZoneCreate(-1989.101, 882.0442, -1394.247, 1588.193);
  102.     Piloto = GangZoneCreate(-1753.34, -703.8315, -1081.37, 250.8499);
  103.     Surfista = GangZoneCreate(-2977.858, -817.4513, -2802.69, 575.538);
  104.     Karate = GangZoneCreate(-2802.402, -277.7754, -1988.689, -75.85734);
  105.     Girl = GangZoneCreate(-1989.963, -277.07748, -1754.928, 613.2269);
  106.     //Checkpont (crie os checkpoins na mesma ordem das GZs, sen�o da erro na hora de conquistar)
  107.     cpsoldado = CPS_AddCheckpoint(-1371.5627,492.2494,11.1953,2.0,80);
  108.     cpcop = CPS_AddCheckpoint(-2706.1462,376.1187,4.9685,2.0,80);
  109.     cppolicial = CPS_AddCheckpoint(-1616.3616,685.5773,7.1875,2.0,80);
  110.     cpchines = CPS_AddCheckpoint(-2206.7749,701.3187,49.4375,2.0,80);
  111.     cpmedico = CPS_AddCheckpoint(-2710.4080,639.0375,14.4531,2.0,80);
  112.     cppedreiro = CPS_AddCheckpoint(-2090.1113,304.9083,41.0800,2.0,80);
  113.     cpmanobrista = CPS_AddCheckpoint(-1712.2312,1000.0741,17.9141,2.0,80);
  114.     cppiloto = CPS_AddCheckpoint(-1345.4834,-291.7302,14.1484,2.0,80);
  115.     cpsurfista = CPS_AddCheckpoint(-2921.6548,-109.2787,1.0803,2.0,80);
  116.     cpkarate = CPS_AddCheckpoint(-2275.6963,-132.6817,35.3203,2.0,80);
  117.     cpgirl = CPS_AddCheckpoint(-1861.8011,-182.4312,18.3779,2.0,80);
  118.     #pragma unused cpchines, cpsoldado, cpcop, cppolicial, cpmedico, cppedreiro, cpmanobrista, cppiloto, cpsurfista, cpkarate, cpgirl
  119.     return 1;
  120. }
  121.  
  122. public OnGameModeExit()
  123. {
  124.     return 1;
  125. }
  126.  
  127. public OnPlayerRequestClass(playerid, classid)
  128. {
  129.     if(classid == 0)
  130.     {
  131.     Gang[playerid] = SOLDADO;
  132.     GameTextForPlayer(playerid,"~y~Soldado",6000,6);
  133.     SetPlayerInterior(playerid,3);
  134.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  135.     SetPlayerFacingAngle(playerid, 267.7684);
  136.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  137.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  138.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  139.     }
  140.     else if(classid == 1)
  141.     {
  142.     Gang[playerid] = COP;
  143.     GameTextForPlayer(playerid,"~y~Cop",6000,6);
  144.     SetPlayerInterior(playerid,3);
  145.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  146.     SetPlayerFacingAngle(playerid, 267.7684);
  147.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  148.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  149.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  150.     }
  151.     else if(classid == 2)
  152.     {
  153.     Gang[playerid] = POLICIAL;
  154.     GameTextForPlayer(playerid,"~y~Policial",6000,6);
  155.     SetPlayerInterior(playerid,3);
  156.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  157.     SetPlayerFacingAngle(playerid, 267.7684);
  158.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  159.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  160.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  161.     }
  162.     else if(classid == 3)
  163.     {
  164.     Gang[playerid] = CHINES;
  165.     GameTextForPlayer(playerid,"~y~Chines",6000,6);
  166.     SetPlayerInterior(playerid,3);
  167.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  168.     SetPlayerFacingAngle(playerid, 267.7684);
  169.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  170.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  171.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  172.     }
  173.     else if(classid == 4)
  174.     {
  175.     Gang[playerid] = MEDICO;
  176.     GameTextForPlayer(playerid,"~y~Medico",6000,6);
  177.     SetPlayerInterior(playerid,3);
  178.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  179.     SetPlayerFacingAngle(playerid, 267.7684);
  180.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  181.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  182.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  183.     }
  184.     else if(classid == 5)
  185.     {
  186.     Gang[playerid] = PEDREIRO;
  187.     GameTextForPlayer(playerid,"~y~Pedreiro",6000,6);
  188.     SetPlayerInterior(playerid,3);
  189.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  190.     SetPlayerFacingAngle(playerid, 267.7684);
  191.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  192.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  193.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  194.     }
  195.     else if(classid == 6)
  196.     {
  197.     Gang[playerid] = MANOBRISTA;
  198.     GameTextForPlayer(playerid,"~y~Manobrista",6000,6);
  199.     SetPlayerInterior(playerid,3);
  200.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  201.     SetPlayerFacingAngle(playerid, 267.7684);
  202.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  203.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  204.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  205.     }
  206.     else if(classid == 7)
  207.     {
  208.     Gang[playerid] = PILOTO;
  209.     GameTextForPlayer(playerid,"~y~Piloto",6000,6);
  210.     SetPlayerInterior(playerid,3);
  211.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  212.     SetPlayerFacingAngle(playerid, 267.7684);
  213.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  214.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  215.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  216.     }
  217.     else if(classid == 8)
  218.     {
  219.     Gang[playerid] = SURFISTA;
  220.     GameTextForPlayer(playerid,"~y~Surfista",6000,6);
  221.     SetPlayerInterior(playerid,3);
  222.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  223.     SetPlayerFacingAngle(playerid, 267.7684);
  224.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  225.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  226.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  227.     }
  228.     else if(classid == 9)
  229.     {
  230.     Gang[playerid] = KARATE;
  231.     GameTextForPlayer(playerid,"~y~Karate",6000,6);
  232.     SetPlayerInterior(playerid,3);
  233.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  234.     SetPlayerFacingAngle(playerid, 267.7684);
  235.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  236.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  237.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  238.     }
  239.     else if(classid == 10)
  240.     {
  241.     Gang[playerid] = GIRL;
  242.     GameTextForPlayer(playerid,"~y~Girl",6000,6);
  243.     SetPlayerInterior(playerid,3);
  244.     SetPlayerPos(playerid, -2669.8770,1410.3972,912.7240);
  245.     SetPlayerFacingAngle(playerid, 267.7684);
  246.     SetPlayerCameraPos(playerid, -2663.8770,1410.3972,912.7240);
  247.     SetPlayerCameraLookAt(playerid, -2669.8770,1410.3972,912.7240);
  248.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  249.     }
  250.     return 1;
  251. }
  252.  
  253. public OnPlayerRequestSpawn(playerid)
  254. {
  255.     if(Gang[playerid] == SOLDADO)
  256.     {
  257.     SetPlayerInterior(playerid,0);
  258.     SetPlayerColor(playerid, 0x33AA33AA); //Verde Claro
  259.     }
  260.     else if(Gang[playerid] == COP)
  261.     {
  262.     SetPlayerInterior(playerid,0);
  263.     SetPlayerColor(playerid, 0xFF9900AA); //Laranja
  264.     }
  265.     else if(Gang[playerid] == POLICIAL)
  266.     {
  267.     SetPlayerInterior(playerid,0);
  268.     SetPlayerColor(playerid, 0x00FFFFAA); //Azul Claro
  269.     }
  270.     else if(Gang[playerid] == CHINES)
  271.     {
  272.     SetPlayerInterior(playerid,0);
  273.     SetPlayerColor(playerid, 0xFF00FFAA); //Rosa
  274.     }
  275.     else if(Gang[playerid] == MEDICO)
  276.     {
  277.     SetPlayerInterior(playerid,0);
  278.     SetPlayerColor(playerid, 0xFFFFFFAA); //Branco
  279.     }
  280.     else if(Gang[playerid] == PEDREIRO)
  281.     {
  282.     SetPlayerInterior(playerid,0);
  283.     SetPlayerColor(playerid, 0x006400AA); //Azul Escuro
  284.     }
  285.     else if(Gang[playerid] == MANOBRISTA)
  286.     {
  287.     SetPlayerInterior(playerid,0);
  288.     SetPlayerColor(playerid, 0xFF0000AA); //Vermelho
  289.     }
  290.     else if(Gang[playerid] == PILOTO)
  291.     {
  292.     SetPlayerInterior(playerid,0);
  293.     SetPlayerColor(playerid, 0x9900FFAA); //Rox
  294.     }
  295.     else if(Gang[playerid] == SURFISTA)
  296.     {
  297.     SetPlayerInterior(playerid,0);
  298.     SetPlayerColor(playerid, 0xFFFF00AA); //Amarelo
  299.     }
  300.     else if(Gang[playerid] == KARATE)
  301.     {
  302.     SetPlayerInterior(playerid,0);
  303.     SetPlayerColor(playerid, 0x000000AA); //Preto
  304.     }
  305.     else if(Gang[playerid] == GIRL)
  306.     {
  307.     SetPlayerInterior(playerid,0);
  308.     SetPlayerColor(playerid, 0xACFE01AA); //Verde Limao
  309.     }
  310.     return 1;
  311. }
  312.  
  313. public OnPlayerConnect(playerid)
  314. {
  315.     UsePlayerPedAnims();//Jogadores correm rapido que nem o Cj
  316.     new pName[MAX_PLAYER_NAME];
  317.     new string[48];
  318.     GetPlayerName(playerid, pName, sizeof(pName));
  319.     format(string, sizeof(string), "%s entrou no server. ", pName);
  320.     SendClientMessageToAll(0xAAAAAAAA, string);
  321.     ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
  322.     return 1;
  323. }
  324.  
  325. public OnPlayerDisconnect(playerid, reason)
  326. {
  327.     return 1;
  328. }
  329.  
  330. public OnPlayerSpawn(playerid)
  331. {
  332.     GangZoneShowForPlayer(playerid, Soldado, gzcolor[0]);
  333.     GangZoneShowForPlayer(playerid, Cop, gzcolor[1]);
  334.     GangZoneShowForPlayer(playerid, Policial, gzcolor[2]);
  335.     GangZoneShowForPlayer(playerid, Chines, gzcolor[3]);
  336.     GangZoneShowForPlayer(playerid, Medico, gzcolor[4]);
  337.     GangZoneShowForPlayer(playerid, Pedreiro, gzcolor[5]);
  338.     GangZoneShowForPlayer(playerid, Manobrista, gzcolor[6]);
  339.     GangZoneShowForPlayer(playerid, Piloto, gzcolor[7]);
  340.     GangZoneShowForPlayer(playerid, Surfista, gzcolor[8]);
  341.     GangZoneShowForPlayer(playerid, Karate, gzcolor[9]);
  342.     GangZoneShowForPlayer(playerid, Girl, gzcolor[10]);
  343.     //se for adicionr mais GZs.. ja sabe que tem que acompanhar os numeros "gzcolor[numero]"...
  344.     return 1;
  345. }
  346.  
  347. public OnPlayerDeath(playerid, killerid, reason)
  348. {
  349.     Mortes[playerid]++;
  350.     if(killerid == INVALID_PLAYER_ID) {
  351.     SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
  352.     }
  353.     else if(Gang[playerid] == Gang[playerid])
  354.     {
  355.     SendClientMessage(killerid, 0xFF0000AA, "N�o mate pessoas da mesma gang que voc�! Voc� vai ficar preso at� morrer");
  356.     SetPlayerPos(killerid, 263.7945,77.4532,1001.0391);
  357.     SetPlayerScore(killerid,GetPlayerScore(killerid) -1);
  358.     GivePlayerMoney(killerid, -500);
  359.     TK[killerid]++;
  360.     Mortes[playerid]++;
  361.     }
  362.     else if(Gang[playerid] != Gang[playerid])
  363.     {
  364.     SetPlayerScore(killerid,GetPlayerScore(killerid) +1);
  365.     GivePlayerMoney(killerid, 500);
  366.     Kills[killerid]++;
  367.     Mortes[playerid]++;
  368.     }
  369.     return 1;
  370. }
  371.  
  372. public OnVehicleSpawn(vehicleid)
  373. {
  374.     return 1;
  375. }
  376.  
  377. public OnVehicleDeath(vehicleid, killerid)
  378. {
  379.     return 1;
  380. }
  381.  
  382. public OnPlayerText(playerid, text[])
  383. {
  384.     return 1;
  385. }
  386.  
  387. public OnPlayerPrivmsg(playerid, recieverid, text[])
  388. {
  389.     return 1;
  390. }
  391.  
  392. public OnPlayerCommandText(playerid, cmdtext[])
  393. {
  394.     if (strcmp("/status", cmdtext, true, 10) == 0)
  395.     {
  396.     new stringkills[256];
  397.     new stringmortes[256];
  398.     new stringtk[256];
  399.     SendClientMessage(playerid,COLOR_GREEN,"Seus status:");
  400.     format(stringkills,sizeof(stringkills),"Kills: %d", Kills[playerid]);
  401.     SendClientMessage(playerid,0xFF9933AA, stringkills);
  402.     format(stringmortes,sizeof(stringmortes),"Mortes: %d", Mortes[playerid]);
  403.     SendClientMessage(playerid, 0xFF9933AA, stringmortes);
  404.     format(stringtk,sizeof(stringtk),"Team Kills: %d", TK[playerid]);
  405.     SendClientMessage(playerid, 0xFF9933AA, stringtk);
  406.         return 1;
  407.     }
  408.     return 0;
  409. }
  410.  
  411. public OnPlayerInfoChange(playerid)
  412. {
  413.     return 1;
  414. }
  415.  
  416. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  417. {
  418.     return 1;
  419. }
  420.  
  421. public OnPlayerExitVehicle(playerid, vehicleid)
  422. {
  423.     return 1;
  424. }
  425.  
  426. public OnPlayerStateChange(playerid, newstate, oldstate)
  427. {
  428.     return 1;
  429. }
  430.  
  431. public OnPlayerEnterCheckpoint(playerid)
  432. {
  433.     lastcp[playerid] = CPS_GetPlayerCheckpoint(playerid);
  434.     return 1;
  435. }
  436.  
  437. public OnPlayerLeaveCheckpoint(playerid)
  438. {
  439.     new checkpointid = lastcp[playerid];
  440.     if(checkpointid > 0 && checkpointid <= 11) //s�o 11 checkpoints, ent�o mude se for colocar mais...
  441.     {
  442.         cpzone[playerid][checkpointid] = 0; //saiu do CP...
  443.         GangZoneStopFlashForAll(checkpointid-1);
  444.     }
  445.     return 1;
  446. }
  447.  
  448. public OnPlayerEnterRaceCheckpoint(playerid)
  449. {
  450.     return 1;
  451. }
  452.  
  453. public OnPlayerLeaveRaceCheckpoint(playerid)
  454. {
  455.     return 1;
  456. }
  457.  
  458. public OnRconCommand(cmd[])
  459. {
  460.     return 1;
  461. }
  462.  
  463. public OnObjectMoved(objectid)
  464. {
  465.     return 1;
  466. }
  467.  
  468. public OnPlayerObjectMoved(playerid, objectid)
  469. {
  470.     return 1;
  471. }
  472.  
  473. public OnPlayerPickUpPickup(playerid, pickupid)
  474. {
  475.     return 1;
  476. }
  477.  
  478. public OnPlayerSelectedMenuRow(playerid, row)
  479. {
  480.     return 1;
  481. }
  482.  
  483. public OnPlayerExitedMenu(playerid)
  484. {
  485.     return 1;
  486. }
  487.  
  488. public ZoneCheckpointChecker()
  489. {
  490.     for(new i; i < MAX_PLAYERS; i++)
  491.     {
  492.         if(!IsPlayerConnected(i))continue;
  493.         if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= 11 &&
  494.             //s�o 11 checkpoints, ent�o mude se for colocar mais...
  495.             gzcolor[CPS_GetPlayerCheckpoint(i)-1] != GetPlayerColor(i))
  496.         {
  497.             if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 30)
  498.             {
  499.                 cpzone[i][CPS_GetPlayerCheckpoint(i)]++;
  500.                 new tmp[10];
  501.                 format(tmp, sizeof tmp, "~w~%2d/30", cpzone[i][CPS_GetPlayerCheckpoint(i)]);
  502.                 GameTextForPlayer(i, tmp, 1001, 4);
  503.                 GangZoneFlashForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));
  504.             } else if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 30) //passou 30 segundos dentro do checkpoint
  505.             {
  506.                 GameTextForPlayer(i, "~w~Conquistado", 4000, 1);
  507.                 gzcolor[CPS_GetPlayerCheckpoint(i)-1] = GetPlayerColor(i);
  508.                 GangZoneStopFlashForAll(CPS_GetPlayerCheckpoint(i)-1);
  509.                 GangZoneHideForAll(CPS_GetPlayerCheckpoint(i)-1);
  510.                 GangZoneShowForAll(CPS_GetPlayerCheckpoint(i)-1, GetPlayerColor(i));
  511.             }
  512.         }
  513.     }
  514. }
Add Comment
Please, Sign In to add comment