SHARE
TWEET

[FS] KES - Kratty Event System

Chip7 Apr 30th, 2012 343 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3.                         //=========================\\
  4.                           ++ Kratty Event System ++
  5.                                  Criado por Kratty
  6.                    VISITE NOSSO SITE: http://www.sampknd.com/
  7.                      SAMP KND MELHOR BLOG DE SAMP DO BRASIL
  8.                         \\=========================//
  9.  
  10.                           NÃO RETIRE OS CRÉDITOS!!!
  11. */
  12.  
  13. // ================================ INCLUDES ================================
  14. #include <a_samp>
  15. #include <jcmd>
  16. #include <sscanf>
  17.  
  18. // ================================ DEFINES ================================
  19. #if !defined KES_MAX_PLAYERS
  20. #define KES_MAX_PLAYER (200) //Troque o 200 pelo numero máximo de slots do seu Servidor
  21. #endif
  22.  
  23. #if !defined KES_MAX_VEHICLES
  24. #define KES_MAX_VEHICLE (100) //Carros que ele vai fazer o Loop
  25. #endif
  26.  
  27. // ---------------- CORES ----------------
  28. #define COR_CINZA                       0xB5B5B5FF
  29. #define COR_GOLD                        0xFFD700FF
  30. #define COR_VERDE               0x00FF00FF
  31. #define COR_AZULC               0x66FFFFF6
  32. #define COR_BRANCO              0xFFFFFFFF
  33. #define COR_VERMELHO            0xFF0000FF
  34. #define COR_ADMIN           0xFF4500FF
  35.  
  36. // ---------------- DIALOG ----------------
  37. #define DIALOG_EVENTOS  950
  38.  
  39. // ================================ ENUM'S ================================
  40. enum Info
  41. {
  42.         Float:trazerx,
  43.         Float:trazery,
  44.         Float:trazerz,
  45.         pCriado,
  46.         xCriado,
  47.         tCriado,
  48.         Tempo,
  49. };
  50. enum pInfo
  51. {
  52.         PaintBall,
  53.         X1,
  54.         TrazerTodos,
  55.         Aceitou,
  56.         SkinPaintBall,
  57.         Morreu,
  58.         ProcuradoPaintBall,
  59. };
  60.  
  61. // ================================ NEW'S ================================
  62. new Str[128];
  63. new Tempox1 = 3;
  64. new PortaoX1;
  65. new id1,
  66.         id2;
  67. new iddele;
  68. new Evento[Info];
  69. new InfoPlayer[KES_MAX_PLAYER][pInfo];
  70. new Float:PBSpawns[11][3] =
  71.         {{2755.7183,-1809.2311,1007.0485},
  72.         {2788.0933,-1868.4094,980.5866},
  73.         {2736.8557,-1974.9166,989.3362},
  74.         {2608.4539,-1954.2640,969.8333},
  75.         {2601.2961,-1889.6897,971.1484},
  76.         {2596.9514,-1838.7516,971.1484},
  77.         {2591.0234,-1813.7662,982.5994},
  78.         {2604.4807,-1776.4862,971.1696},
  79.         {2662.6931,-1769.5616,971.1745},
  80.         {2706.2581,-1789.8120,973.0674},
  81.         {2690.5891,-1843.3859,976.1203}};
  82.  
  83. // ================================ FORWARD'S ================================
  84. forward FinalizarE();
  85. forward PX1();
  86. forward Descongelar();
  87.  
  88. // ================================ PUBLIC'S ================================
  89. public OnFilterScriptInit()
  90. {
  91.         print("\n--------------------------------------");
  92.         print("© KES-Eventos Carregado Com Sucesso! ©");
  93.         print("© By: Kratty ©");
  94.         print("--------------------------------------\n");
  95.         return 1;
  96. }
  97.  
  98. public OnFilterScriptExit()
  99.         return KillTimer(Evento[Tempo]);
  100.  
  101.  
  102. public OnGameModeInit()
  103. {   //PAINTBALL
  104.         CreateObject(16021,2619.10009766,-1784.69995117,969.50000000,0.00000000,1.99951172,1.99951172); //object(des_geyhotbase_) (1)
  105.         CreateObject(16231,2693.19921875,-1872.69921875,980.50000000,0.00000000,0.00000000,269.98901367); //object(se_bit_02) (1)
  106.         CreateObject(2096,2616.30004883,-1803.90002441,970.09997559,0.00000000,0.00000000,0.00000000); //object(cj_rockingchair) (1)
  107.         CreateObject(3578,2587.89990234,-1760.69995117,970.09997559,0.00000000,0.00000000,90.00000000); //object(dockbarr1_la) (2)
  108.         CreateObject(3578,2587.89990234,-1770.30004883,970.09997559,0.00000000,0.00000000,90.00000000); //object(dockbarr1_la) (4)
  109.         CreateObject(3578,2587.89990234,-1780.50000000,970.09997559,0.00000000,0.00000000,90.00000000); //object(dockbarr1_la) (6)
  110.         CreateObject(3578,2587.89990234,-1790.80004883,970.00000000,0.00000000,0.00000000,90.00000000); //object(dockbarr1_la) (8)
  111.         CreateObject(3578,2587.89941406,-1801.00000000,970.00000000,0.00000000,0.00000000,90.00000000); //object(dockbarr1_la) (9)
  112.         CreateObject(3578,2587.89990234,-1810.59997559,970.00000000,0.00000000,0.00000000,90.00000000); //object(dockbarr1_la) (10)
  113.         CreateObject(3578,2587.89941406,-1817.59960938,970.00000000,0.00000000,0.00000000,90.00000000); //object(dockbarr1_la) (11)
  114.         CreateObject(3502,2648.80004883,-1825.19995117,971.79998779,0.00000000,0.00000000,0.00000000); //object(vgsn_con_tube) (1)
  115.         CreateObject(3502,2645.10009766,-1825.19995117,971.79998779,0.00000000,0.00000000,0.00000000); //object(vgsn_con_tube) (2)
  116.         CreateObject(3502,2646.89990234,-1825.09997559,974.90002441,357.49511719,0.00000000,0.00000000); //object(vgsn_con_tube) (3)
  117.         CreateObject(935,2642.89990234,-1850.69995117,970.59997559,0.00000000,0.00000000,0.00000000); //object(cj_drum) (1)
  118.         CreateObject(935,2643.59960938,-1850.59960938,970.59997559,0.00000000,0.00000000,0.00000000); //object(cj_drum) (2)
  119.         CreateObject(935,2641.10009766,-1851.09997559,970.59997559,0.00000000,0.00000000,0.00000000); //object(cj_drum) (3)
  120.         CreateObject(2991,2615.80004883,-1904.59997559,970.70001221,0.00000000,0.00000000,0.00000000); //object(imy_bbox) (1)
  121.         CreateObject(3046,2622.60009766,-1857.69995117,970.50000000,0.00000000,0.00000000,0.00000000); //object(kb_barrel) (1)
  122.         CreateObject(3046,2623.50000000,-1857.69921875,970.50000000,0.00000000,0.00000000,0.00000000); //object(kb_barrel) (2)
  123.         CreateObject(3066,2664.50000000,-1766.80004883,970.79998779,0.00000000,0.00000000,270.00000000); //object(ammotrn_obj) (1)
  124.         CreateObject(944,2590.30004883,-1758.69995117,971.00000000,0.00000000,0.00000000,0.00000000); //object(packing_carates04) (1)
  125.         CreateObject(942,2633.89990234,-1769.50000000,972.50000000,0.00000000,0.00000000,0.00000000); //object(cj_df_unit_2) (1)
  126.         CreateObject(942,2633.80004883,-1759.80004883,972.50000000,0.00000000,0.00000000,0.00000000); //object(cj_df_unit_2) (2)
  127.         CreateObject(942,2643.39990234,-1760.00000000,972.50000000,0.00000000,0.00000000,0.00000000); //object(cj_df_unit_2) (3)
  128.         CreateObject(942,2643.80004883,-1769.19995117,972.50000000,0.00000000,0.00000000,0.00000000); //object(cj_df_unit_2) (4)
  129.         CreateObject(939,2632.00000000,-1786.80004883,972.50000000,0.00000000,0.00000000,0.00000000); //object(cj_df_unit) (1)
  130.         CreateObject(2972,2630.00000000,-1777.30004883,970.09997559,0.00000000,0.00000000,0.00000000); //object(k_cargo4) (1)
  131.         CreateObject(2934,2654.39990234,-1900.69995117,971.40002441,0.00000000,0.00000000,0.00000000); //object(kmb_container_red) (1)
  132.         CreateObject(18260,2648.50000000,-1888.50000000,971.59997559,0.00000000,0.00000000,0.00000000); //object(crates01) (1)
  133.         CreateObject(3574,2642.39990234,-1804.90002441,970.09997559,0.00000000,0.00000000,329.99633789); //object(lasdkrtgrp2) (1)
  134.         CreateObject(3577,2607.80004883,-1781.50000000,970.79998779,0.00000000,0.00000000,0.00000000); //object(dockcrates1_la) (1)
  135.         CreateObject(3630,2697.39990234,-1808.09997559,970.90002441,0.00000000,354.00000000,2.00000000); //object(crdboxes2_las) (1)
  136.         CreateObject(3633,2623.19995117,-1834.59997559,970.59997559,0.00000000,0.00000000,0.00000000); //object(imoildrum4_las) (1)
  137.         CreateObject(3796,2604.80004883,-1776.80004883,970.00000000,0.00000000,0.00000000,0.00000000); //object(acbox1_sfs) (1)
  138.         CreateObject(3798,2590.80004883,-1792.59997559,970.09997559,0.00000000,0.00000000,0.00000000); //object(acbox3_sfs) (1)
  139.         CreateObject(3798,2589.39990234,-1799.69995117,970.09997559,0.00000000,0.00000000,0.00000000); //object(acbox3_sfs) (2)
  140.         CreateObject(3798,2598.39990234,-1806.00000000,969.90002441,0.00000000,0.00000000,0.00000000); //object(acbox3_sfs) (3)
  141.         CreateObject(3799,2590.89941406,-1847.00000000,969.59997559,0.00000000,0.00000000,0.00000000); //object(acbox2_sfs) (1)
  142.         CreateObject(5132,2625.80004883,-1924.40002441,971.79998779,0.00000000,0.00000000,270.00000000); //object(las2dkwar107) (1)
  143.         CreateObject(5260,2598.39990234,-1874.90002441,971.70001221,0.00000000,0.00000000,0.00000000); //object(las2dkwar02) (1)
  144.         CreateObject(5262,2592.19995117,-1859.80004883,973.00000000,0.00000000,0.00000000,0.00000000); //object(las2dkwar04) (1)
  145.         CreateObject(5262,2703.00000000,-1904.50000000,973.09997559,0.00000000,0.00000000,0.00000000); //object(las2dkwar04) (2)
  146.         CreateObject(12927,2679.59960938,-1886.39941406,971.50000000,0.00000000,0.00000000,0.00000000); //object(sw_pipepile01) (1)
  147.         CreateObject(12930,2657.19995117,-1833.30004883,970.70001221,0.00000000,0.00000000,271.99951172); //object(sw_pipepile02) (1)
  148.         CreateObject(13489,2690.00000000,-1937.69995117,972.50000000,0.00000000,0.00000000,0.00000000); //object(sw_fueldrum04) (1)
  149.         CreateObject(16601,2666.89990234,-1955.09997559,973.70001221,0.00000000,0.00000000,0.00000000); //object(by_fuel07) (1)
  150.         CreateObject(16599,2641.80004883,-1956.30004883,972.59997559,0.00000000,0.00000000,0.00000000); //object(by_fuel06) (2)
  151.         CreateObject(3866,2602.39990234,-1823.19995117,977.29998779,0.00000000,0.00000000,0.00000000); //object(demolish1_sfxrf) (1)
  152.         CreateObject(3887,2694.89990234,-1849.19995117,976.29998779,0.00000000,0.00000000,357.99499512); //object(demolish4_sfxrf) (1)
  153.         CreateObject(935,2667.19995117,-1885.90002441,970.59997559,0.00000000,0.00000000,0.00000000); //object(cj_drum) (1)
  154.         CreateObject(935,2667.00000000,-1883.90002441,970.59997559,0.00000000,0.00000000,0.00000000); //object(cj_drum) (1)
  155.         CreateObject(3418,2659.19995117,-1798.59997559,971.90002441,0.00000000,0.00000000,91.99951172); //object(ce_oldhut02) (1)
  156.         CreateObject(12937,2598.39990234,-1897.69995117,972.59997559,357.99499512,359.24194336,181.96655273); //object(ce_catshack) (1)
  157.         CreateObject(9361,2604.00000000,-1841.90002441,972.59997559,0.00000000,0.00000000,45.99975586); //object(boatoffice_sfn) (1)
  158.         CreateObject(3066,2664.39990234,-1772.30004883,971.20001221,0.00000000,0.00000000,269.99450684); //object(ammotrn_obj) (1)
  159.         CreateObject(3066,2664.30004883,-1777.59997559,971.20001221,0.00000000,0.00000000,269.99450684); //object(ammotrn_obj) (1)
  160.         CreateObject(3576,2608.19995117,-1857.09997559,971.40002441,0.00000000,0.00000000,271.99951172); //object(dockcrates2_la) (2)
  161.         CreateObject(3576,2613.00000000,-1857.09960938,971.59997559,0.00000000,0.00000000,271.99951172); //object(dockcrates2_la) (2)
  162.         CreateObject(18260,2592.30004883,-1775.19995117,971.70001221,0.00000000,0.00000000,0.00000000); //object(crates01) (2)
  163.         CreateObject(2567,2646.89990234,-1870.69995117,972.00000000,0.00000000,0.00000000,0.00000000); //object(ab_warehouseshelf) (4)
  164.         CreateObject(2567,2646.69995117,-1862.59997559,972.00000000,0.00000000,0.00000000,0.00000000); //object(ab_warehouseshelf) (4)
  165.         CreateObject(2567,2647.00000000,-1855.00000000,972.09997559,0.00000000,0.00000000,0.00000000); //object(ab_warehouseshelf) (4)
  166.         CreateObject(3626,2705.69921875,-1790.39941406,973.20001221,358.01696777,351.99096680,359.71984863); //object(dckwrkhut) (2)
  167.         CreateObject(2669,2618.00000000,-1758.00000000,971.40002441,0.00000000,0.00000000,0.00000000); //object(cj_chris_crate) (1)
  168.         CreateObject(3575,2621.89990234,-1869.80004883,972.70001221,0.00000000,0.00000000,0.00000000); //object(lasdkrt05) (1)
  169.         CreateObject(925,2603.50000000,-1764.09997559,971.20001221,0.00000000,0.00000000,0.00000000); //object(rack2) (1)
  170.         CreateObject(925,2607.89990234,-1762.69995117,971.20001221,0.00000000,0.00000000,0.00000000); //object(rack2) (1)
  171.         CreateObject(925,2602.39990234,-1758.09997559,971.29998779,0.00000000,0.00000000,0.00000000); //object(rack2) (1)
  172.         CreateObject(1431,2636.39990234,-1829.50000000,970.70001221,0.00000000,0.00000000,0.00000000); //object(dyn_box_pile) (1)
  173.         CreateObject(1431,2640.89941406,-1830.00000000,970.70001221,0.00000000,0.00000000,0.00000000); //object(dyn_box_pile) (1)
  174.         CreateObject(7933,2714.50000000,-1943.80004883,977.00000000,27.92175293,4.52636719,223.86840820); //object(vegascrashbar06) (1)
  175.         CreateObject(3585,2625.19995117,-1846.30004883,971.70001221,0.00000000,0.00000000,0.00000000); //object(lastran1_la02) (2)
  176.         CreateObject(3585,2625.10009766,-1840.90002441,971.70001221,0.00000000,0.00000000,0.00000000); //object(lastran1_la02) (2)
  177.         CreateObject(3567,2614.39990234,-1823.30004883,971.00000000,1.49963379,0.00000000,0.00000000); //object(lasnfltrail) (1)
  178.         CreateObject(10985,2670.39990234,-1860.80004883,970.50000000,358.00048828,1.99951172,0.06591797); //object(rubbled02_sfs) (1)
  179.         CreateObject(1685,2664.19995117,-1816.09997559,970.70001221,0.00000000,0.00000000,0.00000000); //object(blockpallet) (1)
  180.         CreateObject(1685,2657.30004883,-1817.50000000,970.70001221,0.00000000,0.00000000,0.00000000); //object(blockpallet) (1)
  181.         CreateObject(3378,2678.69995117,-1844.80004883,971.00000000,0.00000000,0.00000000,0.00000000); //object(ce_beerpile01) (1)
  182.         CreateObject(12943,2740.30004883,-1776.30004883,991.90002441,0.00000000,0.00000000,0.00000000); //object(sw_shed07) (1)
  183.         CreateObject(9245,2745.60009766,-1946.59997559,995.79998779,0.00000000,0.00000000,0.00000000); //object(cstguard_sfn01) (1)
  184.         CreateObject(3256,2759.00000000,-1808.50000000,992.90002441,0.00000000,0.00000000,27.99865723); //object(refchimny01) (1)
  185.         CreateObject(922,2599.89990234,-1787.09997559,970.90002441,0.00000000,0.00000000,0.00000000); //object(packing_carates1) (2)
  186.         CreateObject(922,2604.30004883,-1797.19995117,970.90002441,0.00000000,0.00000000,0.00000000); //object(packing_carates1) (2)
  187.         CreateObject(3761,2605.30004883,-1793.19995117,972.09997559,0.00000000,0.00000000,0.00000000); //object(industshelves) (1)
  188.         CreateObject(18248,2668.80004883,-1911.50000000,978.00000000,0.00000000,0.00000000,0.00000000); //object(cuntwjunk01) (1)
  189.         CreateObject(18250,2610.60009766,-1956.90002441,974.29998779,0.00000000,356.00000000,93.99951172); //object(cuntwjunk06) (1)
  190.         CreateObject(7096,2595.89990234,-1820.19995117,975.20001221,0.00000000,0.00000000,180.99975586); //object(vrockstairs) (1)
  191.         CreateObject(3525,2620.19995117,-1867.19995117,973.50000000,0.00000000,0.00000000,0.00000000); //object(exbrtorch01) (1)
  192.         CreateObject(3525,2653.19995117,-1849.50000000,973.40002441,0.00000000,0.00000000,0.00000000); //object(exbrtorch01) (2)
  193.         CreateObject(3525,2706.89990234,-1863.00000000,971.09997559,0.00000000,0.00000000,0.00000000); //object(exbrtorch01) (3)
  194.         CreateObject(3525,2737.30004883,-1813.50000000,993.00000000,0.00000000,0.00000000,0.00000000); //object(exbrtorch01) (4)
  195.         CreateObject(3525,2731.69995117,-1786.90002441,994.70001221,0.00000000,0.00000000,0.00000000); //object(exbrtorch01) (5)
  196.         CreateObject(3525,2737.89990234,-1850.00000000,990.20001221,0.00000000,0.00000000,0.00000000); //object(exbrtorch01) (6)
  197.         CreateObject(3525,2734.19921875,-1902.19921875,986.29998779,0.00000000,0.00000000,0.00000000); //object(exbrtorch01) (7)
  198.         CreateObject(3525,2720.69921875,-1946.89941406,980.90002441,0.00000000,0.00000000,0.00000000); //object(exbrtorch01) (8)
  199.         CreateObject(3525,2686.79980469,-1931.69921875,970.90002441,0.00000000,0.00000000,0.00000000); //object(exbrtorch01) (9)
  200.         CreateObject(3525,2623.50000000,-1944.59997559,969.90002441,0.00000000,0.00000000,0.00000000); //object(exbrtorch01) (10)
  201.         CreateObject(3864,2676.09960938,-1873.00000000,976.00000000,0.00000000,0.00000000,0.00000000); //object(ws_floodlight) (1)
  202.         CreateObject(3864,2601.80004883,-1937.59997559,975.70001221,0.00000000,0.00000000,179.99450684); //object(ws_floodlight) (2)
  203.         CreateObject(3864,2667.50000000,-1974.40002441,975.29998779,0.00000000,0.00000000,265.98999023); //object(ws_floodlight) (3)
  204.         CreateObject(3864,2739.10009766,-1971.90002441,993.90002441,358.50000000,0.00000000,265.98999023); //object(ws_floodlight) (4)
  205.         CreateObject(3864,2597.19921875,-1884.09960938,976.20001221,0.49438477,0.00000000,179.98352051); //object(ws_floodlight) (5)
  206.         CreateObject(3864,2590.89941406,-1836.89941406,976.20001221,0.49438477,0.00000000,179.98352051); //object(ws_floodlight) (6)
  207.         CreateObject(3864,2590.29980469,-1787.50000000,976.29998779,0.49438477,0.00000000,179.98352051); //object(ws_floodlight) (7)
  208.         CreateObject(3864,2597.59960938,-1757.69921875,976.20001221,0.49438477,0.00000000,179.98352051); //object(ws_floodlight) (8)
  209.         CreateObject(3864,2669.69995117,-1759.09997559,976.20001221,0.49438477,0.00000000,91.98303223); //object(ws_floodlight) (9)
  210.         CreateObject(3877,2623.30004883,-1803.30004883,971.79998779,0.00000000,0.00000000,0.00000000); //object(sf_rooflite) (1)
  211.         CreateObject(3877,2623.00000000,-1838.19995117,971.70001221,0.00000000,0.00000000,0.00000000); //object(sf_rooflite) (2)
  212.         CreateObject(3877,2604.50000000,-1813.59997559,971.70001221,0.00000000,0.00000000,0.00000000); //object(sf_rooflite) (3)
  213.         CreateObject(3877,2697.60009766,-1808.50000000,973.90002441,0.00000000,0.00000000,0.00000000); //object(sf_rooflite) (4)
  214.         CreateObject(3280,2593.00000000,-1813.80004883,977.00000000,0.00000000,0.00000000,0.00000000); //object(a51_panel) (1)
  215.         CreateObject(3280,2594.50000000,-1813.80004883,977.00000000,0.00000000,0.00000000,0.00000000); //object(a51_panel) (2)
  216.         CreateObject(3280,2596.00000000,-1813.79980469,977.00000000,0.00000000,0.00000000,0.00000000); //object(a51_panel) (3)
  217.         CreateObject(3280,2597.10009766,-1813.80004883,977.09997559,0.00000000,342.00000000,0.00000000); //object(a51_panel) (4)
  218.         CreateObject(3280,2598.39990234,-1813.80004883,977.79998779,0.00000000,323.99780273,359.50000000); //object(a51_panel) (5)
  219.         CreateObject(3280,2599.60009766,-1813.80004883,978.70001221,0.00000000,319.99523926,0.00000000); //object(a51_panel) (6)
  220.         CreateObject(3280,2600.80004883,-1813.80004883,979.70001221,0.00000000,317.99523926,0.00000000); //object(a51_panel) (7)
  221.         CreateObject(3280,2601.89941406,-1813.79980469,980.79998779,0.00000000,311.99523926,0.00000000); //object(a51_panel) (8)
  222.         CreateObject(3280,2603.19995117,-1813.80004883,981.40002441,0.00000000,1.99523926,0.00000000); //object(a51_panel) (9)
  223.         CreateObject(3280,2604.60009766,-1813.80004883,981.40002441,0.00000000,357.49401855,0.00000000); //object(a51_panel) (10)
  224.         CreateObject(3280,2598.60009766,-1813.69995117,981.59997559,0.00000000,0.00000000,0.00000000); //object(a51_panel) (11)
  225.         CreateObject(3280,2597.10009766,-1813.69995117,981.59997559,0.00000000,0.25000000,358.99996948); //object(a51_panel) (12)
  226.         CreateObject(3280,2595.50000000,-1813.69995117,981.59997559,0.00000000,0.24719238,358.99475098); //object(a51_panel) (13)
  227.         CreateObject(3280,2594.10009766,-1813.69995117,981.59997559,0.00000000,0.24719238,358.99475098); //object(a51_panel) (14)
  228.         CreateObject(3280,2592.50000000,-1813.69995117,981.59997559,0.00000000,0.24719238,358.99475098); //object(a51_panel) (15)
  229.         CreateObject(3280,2590.89990234,-1813.69995117,981.59997559,0.00000000,0.24719238,358.99475098); //object(a51_panel) (16)
  230.         CreateObject(3280,2590.00000000,-1813.69995117,981.59997559,0.00000000,0.24719238,358.99475098); //object(a51_panel) (17)
  231.         CreateObject(3280,2590.00000000,-1815.29980469,981.59997559,0.00000000,0.24719238,358.99475098); //object(a51_panel) (18)
  232.         CreateObject(3576,2628.80004883,-1808.00000000,971.59997559,0.00000000,0.00000000,271.99951172); //object(dockcrates2_la) (2)
  233.         CreateObject(3594,2634.80004883,-1898.09997559,970.59997559,0.00000000,0.00000000,0.00000000); //object(la_fuckcar1) (1)
  234.         CreateObject(3594,2639.89990234,-1900.09997559,970.70001221,0.00000000,0.00000000,289.99511719); //object(la_fuckcar1) (2)
  235.         CreateObject(3593,2645.89990234,-1877.69995117,970.59997559,0.00000000,0.00000000,0.00000000); //object(la_fuckcar2) (1)
  236.         CreateObject(13591,2623.39990234,-1881.40002441,970.40002441,0.00000000,0.00000000,0.00000000); //object(kickcar28) (1)
  237.         CreateObject(12957,2748.19995117,-1908.90002441,984.79998779,0.00000000,0.00000000,73.99841309); //object(sw_pickupwreck01) (1)
  238.         CreateObject(12957,2663.89990234,-1872.69995117,970.90002441,0.00000000,0.00000000,73.99291992); //object(sw_pickupwreck01) (2)
  239.         CreateObject(12957,2639.69995117,-1919.30004883,970.79998779,0.00000000,0.00000000,73.99291992); //object(sw_pickupwreck01) (3)
  240.         CreateObject(12957,2624.69995117,-1825.90002441,970.70001221,0.00000000,0.00000000,73.99291992); //object(sw_pickupwreck01) (4)
  241.         CreateObject(2890,2713.80004883,-1964.59997559,979.20001221,352.17224121,347.88208008,358.32458496); //object(kmb_skip) (1)
  242.         CreateObject(2905,2756.79980469,-1890.89941406,984.20001221,0.00000000,0.00000000,0.00000000); //object(kmb_deadleg) (1)
  243.         CreateObject(2905,2757.89990234,-1889.90002441,984.09997559,6.04339600,173.96624756,22.71441650); //object(kmb_deadleg) (2)
  244.         CreateObject(2906,2758.89990234,-1891.80004883,983.90002441,0.00000000,0.00000000,0.00000000); //object(kmb_deadarm) (1)
  245.         CreateObject(2906,2756.60009766,-1892.09997559,984.20001221,0.00000000,160.00000000,0.00000000); //object(kmb_deadarm) (2)
  246.         CreateObject(2907,2757.69995117,-1892.09997559,984.20001221,354.13159180,12.06417847,343.25183105); //object(kmb_deadtorso) (1)
  247.         CreateObject(2908,2758.10009766,-1893.19995117,984.09997559,5.39959717,206.12463379,35.36740112); //object(kmb_deadhead) (1)
  248.         CreateObject(2926,2754.59960938,-1888.89941406,984.20001221,0.00000000,0.00000000,0.00000000); //object(dyno_box_a) (1)
  249.         CreateObject(3092,2758.29980469,-1883.29980469,984.20001221,85.99548340,0.00000000,283.99658203); //object(dead_tied_cop) (1)
  250.         CreateObject(3073,2743.00000000,-1884.00000000,987.50000000,0.00000000,0.00000000,0.00000000); //object(kmb_container_broke) (1)
  251.         CreateObject(3073,2769.79980469,-1899.19921875,982.40002441,344.03686523,4.15832520,279.14062500); //object(kmb_container_broke) (2)
  252.         CreateObject(3035,2752.19995117,-1908.19995117,984.70001221,0.00000000,0.00000000,0.00000000); //object(tmp_bin) (1)
  253.         CreateObject(3302,2740.69921875,-1900.50000000,985.00000000,0.00000000,0.00000000,0.00000000); //object(cxrf_corpanel) (1)
  254.         CreateObject(849,2736.89990234,-1922.90002441,984.59997559,0.00000000,0.00000000,0.00000000); //object(cj_urb_rub_3) (1)
  255.         CreateObject(849,2754.60009766,-1872.59997559,986.29998779,0.00000000,0.00000000,0.00000000); //object(cj_urb_rub_3) (2)
  256.         CreateObject(851,2741.60009766,-1860.50000000,989.09997559,0.00000000,0.00000000,0.00000000); //object(cj_urb_rub_2) (1)
  257.         CreateObject(850,2766.39990234,-1874.19995117,983.79998779,0.00000000,0.00000000,0.00000000); //object(cj_urb_rub_1) (1)
  258.         CreateObject(852,2750.19921875,-1922.89941406,983.90002441,0.00000000,0.00000000,0.00000000); //object(cj_urb_rub_4) (1)
  259.         CreateObject(853,2735.39990234,-1912.09997559,985.09997559,0.00000000,0.00000000,0.00000000); //object(cj_urb_rub_5) (1)
  260.         CreateObject(854,2752.50000000,-1848.30004883,989.59997559,0.00000000,0.00000000,0.00000000); //object(cj_urb_rub_3b) (1)
  261.         CreateObject(910,2745.09960938,-1850.69921875,990.79998779,0.00000000,0.00000000,0.00000000); //object(bust_cabinet_4) (1)
  262.         CreateObject(910,2747.10009766,-1850.80004883,990.00000000,287.83630371,64.10522461,328.98010254); //object(bust_cabinet_4) (2)
  263.         CreateObject(917,2751.00000000,-1851.29980469,989.40002441,0.00000000,0.00000000,0.00000000); //object(fruitcrate1) (1)
  264.         CreateObject(952,2757.89990234,-1822.00000000,993.09997559,5.98205566,4.02099609,359.57702637); //object(generator_big_d) (1)
  265.         CreateObject(960,2739.10009766,-1836.30004883,990.79998779,0.00000000,0.00000000,0.00000000); //object(cj_arm_crate) (1)
  266.         CreateObject(1571,2758.89990234,-1790.30004883,995.59997559,0.00000000,0.00000000,0.00000000); //object(cj_noodle_1) (1)
  267.         CreateObject(1231,2741.80004883,-1796.19995117,996.40002441,0.00000000,0.00000000,0.00000000); //object(streetlamp2) (1)
  268.         CreateObject(1231,2678.60009766,-1806.19995117,972.79998779,0.00000000,0.00000000,0.00000000); //object(streetlamp2) (2)
  269.         CreateObject(1231,2628.19995117,-1792.80004883,972.79998779,0.00000000,0.00000000,0.00000000); //object(streetlamp2) (3)
  270.         CreateObject(1231,2630.19995117,-1859.50000000,972.79998779,0.00000000,0.00000000,0.00000000); //object(streetlamp2) (4)
  271.         CreateObject(1231,2631.80004883,-1895.30004883,972.79998779,0.00000000,0.00000000,0.00000000); //object(streetlamp2) (5)
  272.         CreateObject(1231,2614.19995117,-1909.30004883,972.79998779,0.00000000,0.00000000,0.00000000); //object(streetlamp2) (6)
  273.         CreateObject(4520,2785.10009766,-1933.80004883,981.00000000,4.99877930,0.00000000,183.99902344); //object(ce_fredbar01ld) (1)
  274.         CreateObject(17033,2779.19995117,-1843.80004883,986.09997559,339.99938965,0.00000000,235.99731445); //object(cunt_rockgp2_15) (1)
  275.         CreateObject(749,2759.39990234,-1835.00000000,990.40002441,0.00000000,0.00000000,0.00000000); //object(sm_scrb_column3) (1)
  276.         CreateObject(750,2765.30004883,-1846.59997559,988.29998779,0.00000000,0.00000000,0.00000000); //object(sm_scrb_column2) (1)
  277.         CreateObject(751,2745.60009766,-1863.80004883,988.00000000,0.00000000,0.00000000,0.00000000); //object(sm_scrb_column1) (1)
  278.         CreateObject(748,2763.50000000,-1870.40002441,985.29998779,1.93908691,14.00756836,323.51440430); //object(sm_scrb_grp1) (1)
  279.         CreateObject(747,2739.00000000,-1873.19995117,987.40002441,0.00000000,5.99853516,351.99645996); //object(sm_scrub_rock3) (1)
  280.         CreateObject(744,2767.00000000,-1911.00000000,981.29998779,0.00000000,17.99560547,359.99450684); //object(sm_scrub_rock4) (1)
  281.         CreateObject(14402,2772.50000000,-1809.69921875,992.50000000,0.00000000,0.00000000,0.00000000); //object(flower-bush09) (1)
  282.         CreateObject(3450,2782.19921875,-1963.39941406,982.59997559,1.99401855,1.99951172,89.17602539); //object(vegashseplot1) (1)
  283.         CreateObject(702,2749.39990234,-1964.40002441,987.20001221,0.00000000,0.00000000,0.00000000); //object(sm_tumbleweed) (1)
  284.         CreateObject(701,2722.89990234,-1955.19995117,982.50000000,0.00000000,0.00000000,0.00000000); //object(sm_tumblewd48p) (1)
  285.         CreateObject(651,2689.10009766,-1972.30004883,973.79998779,0.00000000,0.00000000,0.00000000); //object(sjmcacti1) (1)
  286.         CreateObject(653,2695.79980469,-1968.00000000,975.20001221,0.00000000,0.00000000,0.00000000); //object(sjmcacti03) (1)
  287.         CreateObject(675,2703.80004883,-1963.00000000,976.70001221,0.00000000,0.00000000,0.00000000); //object(josh_ball) (1)
  288.         CreateObject(650,2692.19995117,-1960.40002441,972.90002441,0.00000000,0.00000000,0.00000000); //object(sjmcacti2) (1)
  289.         CreateObject(653,2679.19995117,-1959.69995117,970.40002441,0.00000000,0.00000000,0.00000000); //object(sjmcacti03) (2)
  290.         CreateObject(651,2686.19995117,-1943.30004883,969.70001221,0.00000000,0.00000000,0.00000000); //object(sjmcacti1) (2)
  291.         CreateObject(650,2720.89990234,-1962.40002441,981.59997559,0.00000000,0.00000000,0.00000000); //object(sjmcacti2) (2)
  292.         CreateObject(773,2725.50000000,-1945.69995117,982.29998779,0.00000000,0.00000000,0.00000000); //object(elmdead_hi) (1)
  293.         CreateObject(773,2740.69995117,-1819.69995117,991.00000000,0.00000000,0.00000000,201.99462891); //object(elmdead_hi) (2)
  294.         CreateObject(771,2670.00000000,-1803.09997559,970.00000000,0.00000000,0.00000000,0.00000000); //object(sprucetree_hi) (1)
  295.         CreateObject(732,2652.89990234,-1921.69995117,970.00000000,0.00000000,0.00000000,0.00000000); //object(tree_hipoly10) (1)
  296.         CreateObject(623,2731.79980469,-1801.89941406,992.79998779,0.00000000,0.00000000,99.99755859); //object(veg_palwee01) (1)
  297.         CreateObject(2803,2787.00000000,-1884.30004883,980.20001221,0.00000000,0.00000000,0.00000000); //object(cj_meat_bag_1) (1)
  298.         CreateObject(2803,2777.80004883,-1889.59997559,980.00000000,0.00000000,0.00000000,0.00000000); //object(cj_meat_bag_1) (2)
  299.         CreateObject(2804,2781.39990234,-1883.50000000,979.40002441,0.00000000,0.00000000,0.00000000); //object(cj_meat_1) (1)
  300.         CreateObject(2804,2788.10009766,-1878.19995117,979.70001221,0.00000000,0.00000000,0.00000000); //object(cj_meat_1) (2)
  301.         CreateObject(2805,2783.00000000,-1893.59997559,979.50000000,358.84533691,86.17004395,358.25323486); //object(cj_meat_bag_2) (1)
  302.         CreateObject(2806,2781.29980469,-1878.00000000,979.40002441,0.00000000,0.00000000,0.00000000); //object(cj_meat_2) (1)
  303.         CreateObject(9247,2610.89990234,-1924.40002441,976.70001221,0.00000000,0.00000000,268.24768066); //object(hrbrmstr_sfn01) (1)
  304.         CreateObject(935,2672.50000000,-1885.90002441,970.59997559,0.00000000,0.00000000,0.00000000); //object(cj_drum) (1)
  305.         CreateObject(935,2672.60009766,-1883.59997559,970.59997559,0.00000000,0.00000000,0.00000000); //object(cj_drum) (1)
  306.         CreateObject(1431,2732.80004883,-1777.69995117,993.20001221,0.00000000,0.00000000,269.75000000); //object(dyn_box_pile) (1)
  307.         CreateObject(1431,2732.80004883,-1775.30004883,993.09997559,0.00000000,0.00000000,269.74731445); //object(dyn_box_pile) (1)
  308.         CreateObject(3280,2591.39990234,-1813.69995117,977.00000000,0.00000000,0.00000000,0.00000000); //object(a51_panel) (1)
  309.         CreateObject(3280,2589.80004883,-1813.69995117,977.00000000,0.00000000,0.00000000,0.00000000); //object(a51_panel) (1)
  310.         CreateObject(3280,2591.39990234,-1815.30004883,977.00000000,0.00000000,0.00000000,0.00000000); //object(a51_panel) (1)
  311.         CreateObject(3280,2589.80004883,-1815.30004883,977.00000000,0.00000000,0.00000000,0.00000000); //object(a51_panel) (1)
  312.         CreateObject(3280,2589.80004883,-1816.90002441,977.00000000,0.00000000,0.00000000,0.00000000); //object(a51_panel) (1)
  313.         CreateObject(3280,2591.39990234,-1816.90002441,977.00000000,0.00000000,0.00000000,0.00000000); //object(a51_panel) (1)
  314.         CreateObject(2973,2704.39990234,-1768.19995117,974.29998779,0.00000000,0.00000000,0.00000000); //object(k_cargo2) (1)
  315.         CreateObject(8076,2699.30004883,-1777.00000000,974.29998779,0.00000000,0.00000000,0.00000000); //object(vgsfrates05) (1)
  316.         CreateObject(11295,2598.50000000,-1914.09997559,975.79998779,0.00000000,0.00000000,0.00000000); //object(facttanks_sfse09) (1)
  317.         CreateObject(2973,2702.50000000,-1776.00000000,973.59997559,0.00000000,0.00000000,0.00000000); //object(k_cargo2) (1)
  318.         CreateObject(8210,2639.89990234,-1755.30004883,972.79998779,0.00000000,0.00000000,0.00000000); //object(vgsselecfence12) (1)
  319.         CreateObject(8210,2685.80004883,-1755.19995117,975.09997559,0.00000000,352.00000000,0.00000000); //object(vgsselecfence12) (3)
  320.         CreateObject(8210,2754.39990234,-1754.80004883,992.29998779,0.00000000,0.00000000,359.00000000); //object(vgsselecfence12) (4)
  321.         CreateObject(8210,2710.39990234,-1755.09997559,976.40002441,0.00000000,314.00000000,2.49475098); //object(vgsselecfence12) (5)
  322.         CreateObject(8262,2587.69995117,-1832.09997559,972.79998779,0.00000000,0.00000000,0.00000000); //object(vgsselecfence13) (1)
  323.         CreateObject(8262,2799.69995117,-1904.19995117,983.29998779,0.00000000,352.00000000,180.00000000); //object(vgsselecfence13) (3)
  324.         CreateObject(8210,2805.10009766,-1755.40002441,980.90002441,0.00000000,26.00000000,358.99475098); //object(vgsselecfence12) (8)
  325.         CreateObject(8210,2800.19995117,-1820.00000000,983.20001221,0.00000000,0.00000000,269.49475098); //object(vgsselecfence12) (9)
  326.         CreateObject(8210,2800.69995117,-1783.19995117,983.09997559,0.00000000,0.00000000,269.49462891); //object(vgsselecfence12) (10)
  327.         CreateObject(8210,2746.00000000,-1980.69995117,988.59997559,0.00000000,358.00000000,180.24475098); //object(vgsselecfence12) (11)
  328.         CreateObject(8210,2624.89990234,-1980.80004883,969.00000000,0.00000000,1.99645996,178.98925781); //object(vgsselecfence12) (12)
  329.         CreateObject(8210,2679.89990234,-1981.80004883,973.70001221,0.00000000,7.99401855,178.98925781); //object(vgsselecfence12) (14)
  330.         CreateObject(8210,2697.69995117,-1981.50000000,980.50000000,0.00000000,25.99255371,181.73925781); //object(vgsselecfence12) (15)
  331.         CreateObject(8210,2771.19995117,-1980.59997559,986.59997559,0.00000000,353.99499512,180.24169922); //object(vgsselecfence12) (17)
  332.         CreateObject(8210,2595.19995117,-1952.50000000,970.59997559,0.00000000,355.99401855,93.48925781); //object(vgsselecfence12) (18)
  333.         CreateObject(8210,2588.89990234,-1897.90002441,971.50000000,0.00000000,2.73950195,99.73815918); //object(vgsselecfence12) (19)
  334.         //X1
  335.     CreateObject(972, -2317.9733886719, -1607.8778076172, 481.92987060547, 0, 0, 5.95263671875, 300.0);
  336.     CreateObject(972, -2333.5573730469, -1582.4885253906, 481.92987060547, 0, 0, 97.262329101563, 300.0);
  337.     CreateObject(972, -2342.1125488281, -1607.5842285156, 481.92987060547, 0, 0, 186.58666992188, 300.0);
  338.     CreateObject(972, -2322.4345703125, -1589.484375, 481.92987060547, 0, 0, 29.772521972656, 300.0);
  339.     CreateObject(972, -2315.3129882813, -1634.2191162109, 481.92987060547, 0, 0, 5.95263671875, 300.0);
  340.     CreateObject(972, -2339.2004394531, -1632.3326416016, 481.92987060547, 0, 0, 186.58703613281, 300.0);
  341.     CreateObject(8650, -2316.6611328125, -1618.7884521484, 474.04272460938, 90, 90, 7.93994140625, 300.0);
  342.     CreateObject(8650, -2328.5708007813, -1620.1850585938, 488.14788818359, 180, 180, 97.262329101563, 300.0);
  343.     CreateObject(8650, -2328.5256347656, -1620.2603759766, 486.49984741211, 179.9945, 179.9945, 97.2619, 300.0);
  344.     CreateObject(972, -2315.8947753906, -1624.5148925781, 481.92987060547, 0, 0, 5.9490966796875, 300.0);
  345.     CreateObject(8650, -2314.5227050781, -1618.5999755859, 474.04272460938, 90, 90, 7.9376220703125, 300.0);
  346.     CreateObject(8650, -2318.1958007813, -1618.8737792969, 474.04272460938, 90, 90, 5.9549560546875, 300.0);
  347.     CreateObject(972, -2344.6188964844, -1584.1512451172, 481.92987060547, 0, 0, 186.58630371094, 300.0);
  348.     CreateObject(972, -2330.990234375, -1642.7630615234, 481.92987060547, 0, 0, 275.91064453125, 300.0);
  349.     CreateObject(972, -2325.4072265625, -1642.2864990234, 481.92987060547, 0, 0, 275.90515136719, 300.0);
  350.     CreateObject(7657, -2333.6726074219, -1620.9918212891, 484.42767333984, 0, 0, 7.93994140625, 300.0);
  351.     PortaoX1 = CreateObject(7891, -2321.5114746094, -1619.4454345703, 484.98388671875, 90, 0, 274.64562988281);
  352.         return 1;
  353. }
  354.  
  355. public OnPlayerConnect(playerid)
  356. {
  357.         Evento[pCriado] = 0;
  358.         Evento[xCriado] = 0;
  359.         Evento[tCriado] = 0;
  360.         InfoPlayer[playerid][Aceitou] = 0;
  361.         InfoPlayer[playerid][PaintBall] = 0;
  362.         InfoPlayer[playerid][X1] = 0;
  363.         InfoPlayer[playerid][TrazerTodos] = 0;
  364.         InfoPlayer[playerid][Morreu] = 0;
  365.         return 1;
  366. }
  367.  
  368. public OnPlayerDisconnect(playerid, reason)
  369. {
  370.         InfoPlayer[playerid][Aceitou] = 0;
  371.         InfoPlayer[playerid][PaintBall] = 0;
  372.         InfoPlayer[playerid][X1] = 0;
  373.         InfoPlayer[playerid][TrazerTodos] = 0;
  374.         return 1;
  375. }
  376.  
  377. public OnPlayerDeath(playerid, killerid, reason)
  378. {
  379.         if(InfoPlayer[playerid][PaintBall] && killerid != INVALID_PLAYER_ID)
  380.         {
  381.             GivePlayerMoney(killerid, 800);
  382.             for(new i = 0; i < KES_MAX_PLAYER; i++)
  383.             {
  384.                         if(Evento[pCriado] == 1 && InfoPlayer[i][PaintBall] == 1)
  385.                         {
  386.                                 format(Str, sizeof(Str), "%s matou %s no evento de Paintball e ganhou 800 R$", PlayerName(killerid), PlayerName(playerid));
  387.                             SendClientMessage(i, COR_VERMELHO, Str);
  388.                         }
  389.                         InfoPlayer[playerid][Morreu] = 1;
  390.                 }
  391.         }
  392.         if(InfoPlayer[playerid][PaintBall]) InfoPlayer[playerid][Morreu] = 1;
  393.         if(InfoPlayer[playerid][TrazerTodos]) InfoPlayer[playerid][Morreu] = 1;
  394.         if(InfoPlayer[playerid][X1] && killerid != INVALID_PLAYER_ID)
  395.         {
  396.             if(Evento[xCriado] == 1)
  397.             {
  398.                         SetPlayerPos(killerid, -2326.8809,-1636.9822,483.7031);
  399.                         SetPlayerHealth(killerid, 100);
  400.                         ResetPlayerWeapons(killerid);
  401.                         GivePlayerMoney(killerid, 1000);
  402.                         SendClientMessage(killerid, COR_VERDE, "Você recebeu 1000R$ por ganhar o X1");
  403.                 if(id1 == killerid)
  404.                         {
  405.                         format(Str, sizeof(Str), "%s Ganhou o x1 contra o %s!", PlayerName(id1), PlayerName(id2));
  406.                         EventoMsg(COR_VERMELHO, Str);
  407.                             InfoPlayer[id2][Aceitou] = 4;
  408.                             InfoPlayer[id2][X1] = 0;
  409.                             InfoPlayer[id2][Morreu] = 1;
  410.                         }
  411.                         else if(id2 == killerid)
  412.                         {
  413.                                 format(Str, sizeof(Str), "%s Ganhou o x1 contra o %s!", PlayerName(id2), PlayerName(id1));
  414.                                 SendClientMessageToAll(COR_VERMELHO, Str);
  415.                                 InfoPlayer[id1][Aceitou] = 4;
  416.                                 InfoPlayer[id1][X1] = 0;
  417.                                 InfoPlayer[id1][Morreu] = 1;
  418.                         }
  419.                 }
  420.         }
  421.         return 1;
  422. }
  423.  
  424. public OnPlayerSpawn(playerid)
  425. {
  426.         if(InfoPlayer[playerid][Morreu] == 1 && InfoPlayer[playerid][PaintBall] == 1)
  427.         {
  428.                 new rand = random(sizeof(PBSpawns));
  429.                 SetPlayerPos(playerid, PBSpawns[rand][0], PBSpawns[rand][1], PBSpawns[rand][2]);
  430.                 GivePlayerWeapon(playerid, 25, 999999);
  431.                 GivePlayerWeapon(playerid, 29, 99999);
  432.                 GivePlayerWeapon(playerid, 31, 99999);
  433.                 SetPlayerSkin(playerid, 264);
  434.         }
  435.         if(InfoPlayer[playerid][Morreu] == 1 && InfoPlayer[playerid][X1] == 1)
  436.         {
  437.             ResetPlayerWeapons(playerid);
  438.                 SetPlayerHealth(playerid, 100);
  439.             SpawnPlayer(playerid);
  440.             InfoPlayer[playerid][X1] = 0;
  441.         }
  442.         if(InfoPlayer[playerid][TrazerTodos])
  443.         {
  444.             SpawnPlayer(playerid);
  445.                 ResetPlayerWeapons(playerid);
  446.                 SetPlayerHealth(playerid, 100);
  447.                 InfoPlayer[playerid][TrazerTodos] = 0;
  448.                 InfoPlayer[playerid][Aceitou] = 4;
  449.         }
  450.         return InfoPlayer[playerid][Morreu] = 0;
  451. }
  452.  
  453. public FinalizarE()
  454. {
  455.         if(Evento[pCriado] == 1 || Evento[xCriado] == 1 || Evento[tCriado] == 1)
  456.         {
  457.             Evento[pCriado] = 0;
  458.                 Evento[xCriado] = 0;
  459.                 Evento[tCriado] = 0;
  460.                 GameTextForAll("~g~Evento Finalizado!", 5000, 3);
  461.                 for(new i = 0; i < KES_MAX_PLAYER; i++)
  462.                 {
  463.                         if(IsPlayerConnected(i) && InfoPlayer[i][Aceitou] == 1)
  464.                     {
  465.                         SendClientMessage(i, COR_CINZA, "[AVISO] O Evento foi Encerrado!");
  466.                         InfoPlayer[i][Aceitou] = 0;
  467.                         SpawnPlayer(i);
  468.                                 if(InfoPlayer[i][PaintBall] == 1)
  469.                             {
  470.                         SetPlayerSkin(i, InfoPlayer[i][SkinPaintBall]);
  471.                         SetPlayerWantedLevel(i, InfoPlayer[i][ProcuradoPaintBall]);
  472.                         InfoPlayer[i][PaintBall] = 0;
  473.                                 }
  474.                                 else if(InfoPlayer[i][X1] == 1) InfoPlayer[i][X1] = 0;
  475.                                 else if(InfoPlayer[i][TrazerTodos] == 1) InfoPlayer[i][TrazerTodos] = 0;
  476.                         }
  477.                         if(IsPlayerConnected(i) && InfoPlayer[i][Aceitou] == 2 || InfoPlayer[i][Aceitou] == 3 || InfoPlayer[i][Aceitou] == 4) InfoPlayer[i][Aceitou] = 0;
  478.                 }
  479.         }
  480.         return 1;
  481. }
  482.  
  483. public Descongelar()
  484. {
  485.         if(Tempox1 == 0)
  486.     {
  487.         format(Str, sizeof(Str),"%d", Tempox1);
  488.         GameTextForAll("~g~Go Go Go!", 1000, 3);
  489.         Tempox1 = 3;
  490.             TogglePlayerControllable(id1, 1);
  491.                 TogglePlayerControllable(id2, 1);
  492.                 return 0;
  493.         }
  494.         format(Str, sizeof(Str),"%d", Tempox1);
  495.         GameTextForAll(Str, 1000, 3);
  496.         SetTimer("Descongelar", 1000, 0);
  497.         return Tempox1--;
  498. }
  499.  
  500. public PX1()
  501.         return MoveObject(PortaoX1, -2321.5114746094, -1619.4454345703, 484.98388671875, 2);
  502.  
  503. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  504. {
  505.         if(dialogid == DIALOG_EVENTOS)
  506.         {
  507.             if(response)
  508.             {
  509.                 if(listitem == 0) //PaintBall
  510.                 {
  511.                             if(!IsPlayerAdmin(playerid))
  512.                                         return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  513.                                 if(Evento[pCriado] == 1 || Evento[xCriado] == 1 || Evento[tCriado] == 1)
  514.                                         return SendClientMessage(playerid, COR_CINZA, "[ERRO] Já existe um evento em Andamento!");
  515.                                 Evento[Tempo] = SetTimer("FinalizarE", 900000, 0); // 15 min de Evento
  516.                                 SetPlayerPos(playerid, 2690.7173,-1828.2759,985.4875);
  517.                             Evento[pCriado] = 1;
  518.                                 SendClientMessageToAll(COR_AZULC, "[AVISO] O Evento de PaintBall Começou! Digite /sim ou /nao para ir ao Evento!");
  519.                                 GameTextForAll("~g~Evento ~r~PaintBall ~g~Iniciado!~w~ use: /sim ou /nao", 5000, 3);
  520.                         }
  521.                         if(listitem == 1)//X1
  522.                         {
  523.                             if(!IsPlayerAdmin(playerid))
  524.                                         return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  525.                                 if(Evento[pCriado] == 1 || Evento[xCriado] == 1 || Evento[tCriado] == 1)
  526.                                         return SendClientMessage(playerid, COR_CINZA, "[ERRO] Já existe um evento em Andamento!");
  527.                                 SetPlayerPos(playerid,-2326.8809,-1636.9822,483.7031);
  528.                             Evento[xCriado] = 1;
  529.                                 SendClientMessageToAll(COR_AZULC, "[AVISO] O Evento de x1 Começou! Digite /sim ou /nao para ir ao Evento!");
  530.                         GameTextForAll("~g~Evento ~r~X1 ~g~Iniciado!~w~ use: /sim ou /nao", 5000, 3);
  531.                         }
  532.                         if(listitem == 2)//Trazer Todos
  533.                         {
  534.                             if(!IsPlayerAdmin(playerid))
  535.                                         return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  536.                                 if(Evento[pCriado] == 1 || Evento[xCriado] == 1 || Evento[tCriado] == 1)
  537.                                         return SendClientMessage(playerid, COR_CINZA, "[ERRO] Já existe um evento em Andamento!");
  538.                                 GetPlayerPos(playerid, Evento[trazerx], Evento[trazery], Evento[trazerz]);
  539.                         Evento[tCriado] = 1;
  540.                         SendClientMessageToAll(COR_AZULC, "[AVISO] Admin está chamando todos para um Evento! Digite /sim ou nao.");
  541.                         GameTextForAll("~g~Evento Iniciado!~w~ use: /sim ou /nao", 5000, 3);
  542.                         }
  543.                         if(listitem == 3)//Finalizar Evento
  544.                                 return @finalizare(playerid);
  545.                         if(listitem == 4)//Info Eventos
  546.                             return @infoeventos(playerid);
  547.                         if(listitem == 5)//Créditos
  548.                 return @eventoscredito(playerid);
  549.                 }
  550.     }
  551.         return 1;
  552. }
  553.  
  554. // ================================ COMANDOS ================================
  555. // ---------------- ADMINS ----------------
  556. newCmd:evento(playerid) //Abre a Dialog
  557. {
  558.         if(!IsPlayerAdmin(playerid))
  559.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  560.         return ShowPlayerDialog(playerid, DIALOG_EVENTOS, DIALOG_STYLE_LIST,"Kratty Event System","PaintBall\nX1\nTrazer Todos\n{FF0000}Finalizar Evento\n{FFD700}Info\n{00FF00}Créditos","Ok","Fechar");
  561. }
  562.  
  563. newCmd:finalizare(playerid) //Finaliza o Evento
  564. {
  565.         if(!IsPlayerAdmin(playerid))
  566.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  567.         return FinalizarE();
  568. }
  569.  
  570. newCmd:x1(playerid, params[]) //Cria um x1 entre 2 jogadores no Evento X1
  571. {
  572.         if(!IsPlayerAdmin(playerid))
  573.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  574.         if(Evento[xCriado] == 0)
  575.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Nenhum Evento de x1 em Andamento para usar o Comando!");
  576.         if(Tempox1 != 3)
  577.                 return SendClientMessage(playerid, -1, "[ERRO] O X1 já começou espere acabar para começar outro!");
  578.         if(sscanf(params, "dd", id1, id2))
  579.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] USE: /x1 [ID player 1] [ID player 2]");
  580.         if(InfoPlayer[id1][X1] == 1 && InfoPlayer[id2][X1] == 1)
  581.         {
  582.             GivePlayerWeapon(id1, 24, 500);
  583.                 GivePlayerWeapon(id2, 24, 500);
  584.                 SetPlayerPos(id1, -2343.5957,-1584.8046,483.5305);
  585.                 SetPlayerPos(id2, -2318.4805,-1613.3154,483.7804);
  586.                 format(Str, sizeof(Str), "O Admin %s Iniciou o X1 com %s X %s. Que Vença o Melhor!", PlayerName(playerid), PlayerName(id1), PlayerName(id2));
  587.                 EventoMsg(COR_VERDE, Str);
  588.             TogglePlayerControllable(id1, 0);
  589.                 TogglePlayerControllable(id2, 0);
  590.                 Descongelar();
  591.         }
  592.         return 1;
  593. }
  594.  
  595. newCmd:retirar(playerid, params[]) //Retira o player do Evento
  596. {
  597.         if(!IsPlayerAdmin(playerid))
  598.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  599.         if(sscanf(params, "d", iddele))
  600.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] USE: /retirar [ID]");
  601.         if(Evento[pCriado] == 0 && Evento[xCriado] == 0 && Evento[tCriado] == 0)
  602.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Nenhum Evento em Andamento para usar o Comando!");
  603.         if(IsPlayerAdmin(iddele))
  604.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não pode retirar um Admin do Evento!");
  605.         if(!IsPlayerConnected(iddele))
  606.             return SendClientMessage(playerid, COR_CINZA, "[ERRO] O jogador não esta Online!");
  607.     if(InfoPlayer[iddele][Aceitou] != 1)
  608.         return SendClientMessage(playerid, COR_CINZA, "[ERRO] O jogador não esta no Evento!");
  609.         SpawnPlayer(iddele);
  610.         ResetPlayerWeapons(iddele);
  611.         SetPlayerHealth(iddele, 100);
  612.         InfoPlayer[iddele][X1] = 0;
  613.         InfoPlayer[iddele][TrazerTodos] = 0;
  614.         InfoPlayer[iddele][Aceitou] = 3;
  615.         format(Str, sizeof(Str), "[AVISO] %s [ID %d] retirou %s [ID %d] do Evento!", PlayerName(playerid), playerid, PlayerName(iddele), iddele);
  616.         MsgAdmin(COR_ADMIN, Str);
  617.         GameTextForPlayer(iddele, "~w~Voce foi retirado do evento !", 5000, 3);
  618.         if(InfoPlayer[iddele][PaintBall] == 1)
  619.         {
  620.                 SetPlayerSkin(iddele, InfoPlayer[iddele][SkinPaintBall]);
  621.                 SetPlayerWantedLevel(iddele, InfoPlayer[iddele][ProcuradoPaintBall]);
  622.                 InfoPlayer[iddele][PaintBall] = 0;
  623.         }
  624.         return 1;
  625. }
  626.  
  627. newCmd:eventoav(playerid, params[]) //Aviso do Evento
  628. {
  629.         new av[128];
  630.     if(!IsPlayerAdmin(playerid))
  631.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  632.         if(sscanf(params, "s", av))
  633.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] USE: /eventoav [Texto]");
  634.         if(Evento[pCriado] == 0 && Evento[xCriado] == 0 && Evento[tCriado] == 0)
  635.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Nenhum Evento em Andamento para usar o Comando!");
  636.     format(Str, sizeof(Str), "{FF0000}[AVISO] {FFD700}%s [ID %d]:{FFFFFF} %s", PlayerName(playerid), playerid, av);
  637.         EventoMsg(COR_VERDE, "[__________________Administração do Evento__________________]");
  638.         EventoMsg(COR_GOLD, Str);
  639.         EventoMsg(COR_VERDE, "[__________________Administração do Evento__________________]");
  640.         return 1;
  641. }
  642.  
  643. newCmd:ccar(playerid, params[]) //Para criar carros no Evento
  644. {
  645.         new ccar, cor1, cor2;
  646.         new Float:X,Float:Y,Float:Z;
  647.     if(!IsPlayerAdmin(playerid))
  648.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  649.     if(sscanf(params, "ddd", ccar, cor1, cor2))
  650.             return SendClientMessage(playerid, COR_CINZA, "[ERRO] USE: /ccar [ID do Carro] [ID cor 1] [ID cor 2]");
  651.         if(ccar < 411 || ccar > 600)
  652.             return SendClientMessage(playerid, COR_CINZA, "[ERRO] O id do carro não pode ser Menor que 411 e Maior que 600!");
  653.     if(cor1 < 0 || cor1 > 236 || cor2 < 0 || cor2 > 236)
  654.             return SendClientMessage(playerid, COR_CINZA, "[ERRO] O id da cor não pode ser Menor que 1 e Maior que 236!");
  655.     GetPlayerPos(playerid, X, Y, Z);
  656.     new carid = CreateVehicle(ccar, X+2, Y, Z, 0.0, cor1, cor2, 60000);
  657.         format(Str, sizeof(Str), "[AVISO] Veículo %d Criado por %s!", carid, PlayerName(playerid));
  658.         MsgAdmin(COR_CINZA, Str);
  659.         return 1;
  660. }
  661.  
  662. newCmd:dcar(playerid, params[]) //Destruir Carro (1 carro por vez)
  663. {
  664.         new dcar;
  665.     if(!IsPlayerAdmin(playerid))
  666.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  667.         if(sscanf(params, "d", dcar))
  668.             return SendClientMessage(playerid, COR_CINZA, "[ERRO] USE: /dcar [ID do carro]");
  669.         DestroyVehicle(dcar);
  670.         format(Str, sizeof(Str), "[AVISO] Veículo %d Destruido por %s!", dcar, PlayerName(playerid));
  671.         MsgAdmin(COR_CINZA, Str);
  672.         return 1;
  673. }
  674.  
  675. newCmd:dcarros(playerid) //Destruir todos os carros
  676. {
  677.         for(new x = 0; x < KES_MAX_VEHICLE; x++) DestroyVehicle(x);
  678.     format(Str, sizeof(Str), "[AVISO] Todos os Carros foram destruidos pelo %s", PlayerName(playerid));
  679.         SendClientMessageToAll(COR_VERDE, Str);
  680.         return 1;
  681. }
  682.  
  683. newCmd:infoeventos(playerid) //Info do Fs
  684. {
  685.         if(!IsPlayerAdmin(playerid))
  686.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  687.         SendClientMessage(playerid, COR_VERDE, "/evento {FFFFFF}- Abre uma Dialog com todos os Eventos disponíveis");
  688.         SendClientMessage(playerid, COR_VERDE, "/finalizare {FFFFFF}- Finaliza o Evento que estiver em Andamento");
  689.         SendClientMessage(playerid, COR_VERDE, "/x1 [Id 1] [Id 2] {FFFFFF}- Começa um X1 entre 2 jogadores no Evento");
  690.         SendClientMessage(playerid, COR_VERDE, "/retirar [ID] {FFFFFF}- Para retirar o jogador do Evento");
  691.         SendClientMessage(playerid, COR_VERDE, "/eventoav [Texto] {FFFFFF}- Manda aviso aos jogadores que estão no Evento");
  692.     SendClientMessage(playerid, COR_VERDE, "/ccar [ID do carro] [COR 1] [COR 2]{FFFFFF}- Para criar carros no Evento");
  693.     SendClientMessage(playerid, COR_VERDE, "/dcar [ID do carro]{FFFFFF}- Para deletar carros Criados");
  694.     SendClientMessage(playerid, COR_VERDE, "/dcarros {FFFFFF}- Para destruir todos os carros");
  695.         SendClientMessage(playerid, COR_VERDE, "/px1 - {FFFFFF}Portão do Evento X1");
  696.         SendClientMessage(playerid, COR_VERDE, "/eventoscredito {FFFFFF}- Crédito do FS");
  697.     return 1;
  698. }
  699.  
  700. newCmd:px1(playerid) //Portao do X1
  701. {
  702.     if(!IsPlayerAdmin(playerid))
  703.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Você não é um Admin logado na RCON!");
  704.         if(Evento[xCriado] == 1)
  705.         {
  706.         MoveObject(PortaoX1, -2321.5114746094, -1619.4454345703, 488.99388671875, 3);
  707.                 GameTextForPlayer(playerid, "~w~Portao X1 ~n~~b~Aberto!", 3000, 3);
  708.                 SetTimer("PX1", 3000, false);
  709.         }
  710.         return 1;
  711. }
  712. // ---------------- JOGADORES ----------------
  713. newCmd:sim(playerid) //Para ir ao Evento
  714. {
  715.         if(Evento[pCriado] == 0 && Evento[xCriado] == 0 && Evento[tCriado] == 0)
  716.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Nenhum Evento em Andamento!");
  717.         if(InfoPlayer[playerid][Aceitou] == 1)
  718.                 return SendClientMessage(playerid,COR_CINZA, "[ERRO] Você já está no Evento!");
  719.     if(InfoPlayer[playerid][Aceitou] == 2)
  720.                 return SendClientMessage(playerid,COR_CINZA, "[ERRO] Você Decidiu não participar do Evento!");
  721.         if(InfoPlayer[playerid][Aceitou] == 3)
  722.                 return SendClientMessage(playerid,COR_CINZA, "[ERRO] Você foi retirado do Evento, por isso não pode ir ao mesmo!");
  723.     if(InfoPlayer[playerid][Aceitou] == 4)
  724.         return SendClientMessage(playerid,COR_CINZA, "[ERRO] Você morreu no Evento, por isso não pode voltá-lo!");
  725.         if(IsPlayerConnected(playerid))
  726.         {
  727.         InfoPlayer[playerid][Aceitou] = 1;
  728.                 new tmpcar = GetPlayerVehicleID(playerid);
  729.                 RemovePlayerFromVehicle(tmpcar);
  730.                 SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  731.                 ResetPlayerWeapons(playerid);
  732.                 SetPlayerArmour(playerid, 0);
  733.                 SetPlayerHealth(playerid, 100);
  734.                 if(InfoPlayer[playerid][PaintBall] == 0 && Evento[pCriado] == 1)
  735.                 {
  736.             InfoPlayer[playerid][SkinPaintBall] = GetPlayerSkin(playerid);
  737.                     SetPlayerSkin(playerid, 264);
  738.                     InfoPlayer[playerid][ProcuradoPaintBall] = GetPlayerWantedLevel(playerid);
  739.                     SetPlayerWantedLevel(playerid, 0);
  740.                         GivePlayerWeapon(playerid, 25, 999999);
  741.                         GivePlayerWeapon(playerid, 29, 99999);
  742.                         GivePlayerWeapon(playerid, 31, 99999);
  743.                         new rand = random(sizeof(PBSpawns));
  744.                         SetPlayerPos(playerid, PBSpawns[rand][0], PBSpawns[rand][1], PBSpawns[rand][2]);
  745.                         GameTextForPlayer(playerid, "~w~O Evento de ~g~PaintBall ~w~Comecou, ~r~BOA SORTE !", 5000, 3);
  746.                         InfoPlayer[playerid][PaintBall] = 1;
  747.                 }
  748.                 if(InfoPlayer[playerid][X1] == 0 && Evento[xCriado] == 1)
  749.                 {
  750.                     SetPlayerPos(playerid, -2326.8809,-1636.9822,483.7031);
  751.             InfoPlayer[playerid][X1] = 1;
  752.                 }
  753.                 if(InfoPlayer[playerid][TrazerTodos] == 0 && Evento[tCriado] == 1)
  754.                 {
  755.                         InfoPlayer[playerid][TrazerTodos] = 1;
  756.                     SetPlayerPos(playerid, Evento[trazerx], Evento[trazery], Evento[trazerz]);
  757.                 }
  758.         }
  759.         return 1;
  760. }
  761.  
  762. newCmd:nao(playerid) //Para não ir ao Evento
  763. {
  764.     if(Evento[pCriado] == 0 && Evento[xCriado] == 0 && Evento[tCriado] == 0)
  765.                 return SendClientMessage(playerid, COR_CINZA, "[ERRO] Nenhum Evento em Andamento!");
  766.         if(IsPlayerConnected(playerid))
  767.                 if(Evento[pCriado] == 1 || Evento[xCriado] == 1 || Evento[tCriado] == 1)
  768.                 {
  769.                         InfoPlayer[playerid][Aceitou] = 2;
  770.                 SendClientMessage(playerid, COR_CINZA, "Você Optou por nao ir ao Evento!");
  771.                 }
  772.         return 1;
  773. }
  774.  
  775. newCmd:eventoscredito(playerid) //Créditos do FS
  776. {
  777.         if(IsPlayerConnected(playerid))
  778.         return ShowPlayerDialog(playerid, DIALOG_EVENTOS, DIALOG_STYLE_MSGBOX,"Créditos @ KES","\n\n{FFFFFF}Criado por: {00FF00}kratty\n\n{FFFFFF}Mapas feito por: {00FF00}Douglas\n\n","OK","Fechar");
  779.         return 1;
  780. }
  781.  
  782. // ================================ STOCK'S ================================
  783. stock PlayerName(playerid) //Para pegar o nome do jogador
  784. {
  785.         new Name[MAX_PLAYER_NAME];
  786.         GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
  787.         return Name;
  788. }
  789.  
  790. stock EventoMsg(color, string[]) //Enviar Msg para todos no Evento
  791. {
  792.         for(new i = 0; i < KES_MAX_PLAYER; i++)
  793.             if(IsPlayerConnected(i) && InfoPlayer[i][PaintBall] == 1 || InfoPlayer[i][X1] == 1 || InfoPlayer[i][TrazerTodos] == 1)
  794.                         return SendClientMessage(i, color, string);
  795.     return 1;
  796. }
  797.  
  798. stock MsgAdmin(color, string[]) //Enviar Msg para os Admins conectados
  799. {
  800.         for(new i = 0; i < KES_MAX_PLAYER; i++)
  801.                 if(IsPlayerConnected(i) && IsPlayerAdmin(i))
  802.                          return SendClientMessage(i, color, string);
  803.     return 1;
  804. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top