Advertisement
Guest User

Death Math Pedro Pawno.

a guest
Mar 29th, 2013
1,246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 34.09 KB | None | 0 0
  1. //includes:
  2. #include a_samp
  3. #include DOF2
  4. #include zcmd
  5. #include sscanf2
  6.  
  7. //forwards:
  8. forward ComandoKillTempo(playerid);
  9.  
  10. //defines:
  11. #define grove 1
  12. #define ballas 2
  13. #define vagos 3
  14. #define aztecas 4
  15. #define scm SendClientMessage
  16. #define scmt SendClientMessageToAll
  17. #define Error 0xFF0000FF
  18. #define Branco 0xFFFFFFFF
  19. #define Verde 0x006A00FF
  20. #define Azul 0x004080FF
  21. #define Rosa 0xFF0080FF
  22. #define Amarelo 0xFFFF00FF4
  23. #define Neutra 0x92A3AFFF
  24. #define PlayerClicado clickedplayerid
  25.  
  26. //dialogs.
  27. #define DIALOG 3
  28. #define DialogInt 989
  29. #define DIALOG_MSG 85
  30. #define DIALOG_REGISTRO 1
  31. #define DIALOG_LOGAR 2
  32.  
  33.  
  34. //variaveis:
  35. new Gang[MAX_PLAYERS];
  36. new CarroA[5];
  37. new CarroG[5];
  38. new CarroV[5];
  39. new CarroB[5];
  40. new Text:TextDraw;
  41. new MinutosJogados[MAX_PLAYERS];
  42. new HorasJogadas[MAX_PLAYERS];
  43. new Timer;
  44. new PickupShop;
  45. new PickupDeposit;
  46.  
  47. enum Informacoes
  48. {
  49.     Senha,
  50.     Matou,
  51.     Morreu,
  52.     Dinheiro
  53. }
  54.  
  55. new Player[MAX_PLAYERS][Informacoes];
  56. new Erro[MAX_PLAYERS];
  57. new Jogador[MAX_PLAYERS];
  58.  
  59. //=================
  60. main()
  61. {
  62.     print("\n----------------------------------");
  63.     print("Gang War versão 1.0. Créditos: Pedro Shogun!");
  64.     print("Carregado. Não retire os créditos!");
  65.     print("Agradecimentos: Fórum SAMP.");
  66.     print("----------------------------------\n");
  67. }
  68.  
  69. public OnGameModeInit()
  70. {
  71.     SetGameModeText("Gang War V.1");
  72.     AddPlayerClassEx(grove,105,2478.2656,-1633.4364,13.4048,183.2906,0,0,0,0,0,0); //grove
  73.     AddPlayerClassEx(grove,106,2478.2656,-1633.4364,13.4048,183.2906,0,0,0,0,0,0);//grove
  74.     AddPlayerClassEx(grove,107,2478.2656,-1633.4364,13.4048,183.2906,0,0,0,0,0,0);//grove
  75.     AddPlayerClassEx(ballas,102,1999.7797,-1131.8314,25.3345,157.7532,0,0,0,0,0,0);//ballas
  76.     AddPlayerClassEx(ballas,103,1999.7797,-1131.8314,25.3345,157.7532,0,0,0,0,0,0);//ballas
  77.     AddPlayerClassEx(ballas,104,1999.7797,-1131.8314,25.3345,157.7532,0,0,0,0,0,0);//ballas
  78.     AddPlayerClassEx(vagos,108,2821.1477,-1182.1031,25.2305,263.3948,0,0,0,0,0,0); //vagos
  79.     AddPlayerClassEx(vagos,109,2821.1477,-1182.1031,25.2305,263.3948,0,0,0,0,0,0); //vagos
  80.     AddPlayerClassEx(vagos,110,2821.1477,-1182.1031,25.2305,263.3948,0,0,0,0,0,0); //vagos
  81.     AddPlayerClassEx(aztecas,114,1829.5374,-2014.0790,13.5469,175.6421,0,0,0,0,0,0); //aztecas
  82.     AddPlayerClassEx(aztecas,115,1829.5374,-2014.0790,13.5469,175.6421,0,0,0,0,0,0); //aztecas
  83.     AddPlayerClassEx(aztecas,116,1829.5374,-2014.0790,13.5469,175.6421,0,0,0,0,0,0); //aztecas
  84.     //====HQ AZTECAS======
  85.     CarroA[0] = CreateVehicle(576,1826.6999500,-2025.4000200,13.1000000,0.0000000,7,7,-1); //Tornado
  86.     CarroA[1] = CreateVehicle(575,1826.8000500,-2031.9000200,13.0000000,0.0000000,7,7,-1); //Broadway
  87.     CarroA[2] = CreateVehicle(475,1823.1999500,-2025.8000500,13.1000000,0.0000000,7,7,-1); //Sabre
  88.     CarroA[3] = CreateVehicle(439,1823.1999500,-2031.6999500,13.2000000,0.0000000,7,7,-1); //Stallion
  89.     CarroA[4] = CreateVehicle(482,1830.5000000,-2003.4000200,13.6000000,179.7130000,7,7,-1); //Burrito
  90.     //====================
  91.     //====HQ GROVE=======
  92.     CarroG[0] = CreateVehicle(482,2506.6001000,-1685.0000000,13.6000000,0.0000000,128,128,-1); //Burrito
  93.     CarroG[1] = CreateVehicle(567,2499.3999000,-1682.6999500,13.3000000,284.0000000,128,128,-1); //Savanna
  94.     CarroG[2] = CreateVehicle(536,2492.1001000,-1684.0000000,13.2000000,278.0000000,128,128,-1); //Blade
  95.     CarroG[3] = CreateVehicle(492,2508.3000500,-1670.5000000,13.1000000,348.0000000,128,128,-1); //Greenwood
  96.     CarroG[4] = CreateVehicle(467,2505.8999000,-1677.4000200,13.0000000,330.0000000,128,128,-1); //Oceanic
  97.     //====================
  98.     //====HQ VAGOS=======
  99.     CarroV[0] = CreateVehicle(482,2822.6001000,-1188.3000500,25.3000000,268.2560000,6,6,-1); //Burrito
  100.     CarroV[1] = CreateVehicle(474,2826.6001000,-1173.8000500,24.9000000,182.0790000,6,6,-1); //Hermes
  101.     CarroV[2] = CreateVehicle(410,2822.3999000,-1178.5999800,24.9000000,270.9120000,6,6,-1); //Manana
  102.     CarroV[3] = CreateVehicle(518,2815.6001000,-1178.8000500,25.0000000,272.1930000,6,6,-1); //Buccaneer
  103.     CarroV[4] = CreateVehicle(566,2814.3000500,-1188.0000000,25.0000000,269.6440000,6,6,-1); //Tahoma
  104.     //HQ BALLAS===========
  105.     CarroB[0] = CreateVehicle(566,2000.5000000,-1139.4000200,25.2000000,90.2250000,5,5,-1); //Tahoma
  106.     CarroB[1] = CreateVehicle(551,1994.1999500,-1139.6999500,25.3000000,90.2250000,5,5,-1); //Merit
  107.     CarroB[2] = CreateVehicle(547,1999.5999800,-1132.0000000,25.2000000,90.2250000,5,5,-1); //Primo
  108.     CarroB[3] = CreateVehicle(517,1991.3000500,-1131.9000200,25.5000000,90.2250000,5,5,-1); //Majestic
  109.     CarroB[4] = CreateVehicle(482,1982.8000500,-1132.0999800,26.0000000,90.2250000,5,5,-1); //Burrito
  110.    
  111.     CreateObject(3865, 2431.477051, -1662.562378, 23.346226, 0.0000, 0.0000, 90.0000);
  112.     CreateObject(3865, 2331.300537, -1732.902344, 10.866785, 0.0000, 0.0000, 0.0000);
  113.     CreateObject(3865, 2822.697021, -1969.249634, 8.446474, 0.0000, 0.0000, 270.0000);
  114.     CreateObject(3865, 2837.791260, -1968.909790, 8.421474, 0.0000, 0.0000, 270.0000);
  115.     CreateObject(3865, 1928.193970, -1751.836670, 10.716782, 0.0000, 0.0000, 180.0000);
  116.     CreateObject(3865, 1613.119751, -1732.000244, 10.716789, 0.0000, 0.0000, 180.0000);
  117.     CreateObject(3865, 1529.771484, -1720.911865, 10.841787, 0.0000, 0.0000, 90.0001);
  118.     CreateObject(3865, 1520.375244, -1732.240356, 10.749582, 0.0000, 0.0000, 0.0000);
  119.     CreateObject(3865, 1529.424561, -1603.775513, 10.766790, 0.0000, 0.0000, 270.0000);
  120.     CreateObject(3865, 1323.189087, -1731.666870, 10.741789, 0.0000, 0.0000, 180.0002);
  121.     CreateObject(3865, 1160.055054, -1711.628662, 11.140226, 0.0000, 0.0000, 180.0002);
  122.     CreateObject(3865, 369.826508, -1657.199341, 30.101086, 0.0000, 0.0000, 270.0000);
  123.     CreateObject(3865, 369.718628, -1722.624146, 19.197357, 0.0000, 0.0000, 270.0000);
  124.     CreateObject(3865, 369.665771, -1829.674561, 5.005795, 0.0000, 0.0000, 270.0000);
  125.     CreateObject(3865, 551.933533, -1668.723267, 15.915226, 0.0000, 0.0000, 0.0000);
  126.     CreateObject(3865, 369.869354, -1982.568359, 4.980794, 0.0000, 0.0000, 270.0000);
  127.     CreateObject(3865, 1261.886353, -1079.179199, 24.798252, 0.0000, 0.0000, 270.0000);
  128.     CreateObject(3865, 1323.420654, -1038.153931, 26.337036, 0.0000, 0.0000, 0.0000);
  129.     CreateObject(3865, 1482.021362, -1057.819458, 21.238293, 0.0000, 0.0000, 90.0001);
  130.     CreateObject(3865, 1589.030884, -1160.881226, 21.365175, 0.0000, 0.0000, 180.0001);
  131.     CreateObject(3865, 2244.503418, -1139.947632, 23.579838, 0.0000, 0.0000, 168.7501);
  132.     CreateObject(3865, 2370.846191, -1327.036133, 21.369862, 0.0000, 0.0000, 270.0001);
  133.     CreateObject(3865, 2450.775635, -1518.902710, 35.425476, 0.0000, 0.0000, 270.0001);
  134.     CreateObject(3865, 2430.737793, -1470.459473, 21.367035, 0.0000, 0.0000, 270.0001);
  135.     CreateObject(3865, 2430.773682, -1662.756348, 23.073957, 0.0000, 0.0000, 270.0000);
  136.     CreateObject(3865, 2463.247803, -1658.498779, 10.716391, 0.0000, 0.0000, 180.0000);
  137.     CreateObject(3865, 2463.461182, -1659.396729, 10.744118, 0.0000, 0.0000, 0.0000);
  138.     CreateObject(3865, 2331.122070, -1731.971313, 10.844513, 0.0000, 0.0000, 180.0001);
  139.     CreateObject(3865, 1928.404663, -1752.843994, 10.756287, 0.0000, 0.0000, 0.0000);
  140.     CreateObject(3865, 1613.330078, -1732.830933, 10.762777, 0.0000, 0.0000, 0.0000);
  141.     CreateObject(3865, 1520.179810, -1731.617065, 10.791788, 0.0000, 0.0000, 180.0001);
  142.     CreateObject(3865, 1529.126587, -1721.031372, 10.791788, 0.0000, 0.0000, 270.0000);
  143.     CreateObject(3865, 1530.076660, -1603.610840, 10.794518, 0.0000, 0.0000, 90.0000);
  144.     CreateObject(3865, 1323.363281, -1732.769409, 10.716789, 0.0000, 0.0000, 0.0000);
  145.     CreateObject(3865, 1160.283081, -1712.683594, 11.117954, 0.0000, 0.0000, 0.0000);
  146.     CreateObject(3865, 370.659607, -1657.000244, 30.078672, 0.0000, 0.0000, 90.0000);
  147.     CreateObject(3865, 370.500366, -1722.399292, 19.193628, 0.0000, 0.0000, 90.0000);
  148.     CreateObject(3865, 370.023102, -1829.540161, 4.983466, 0.0000, 0.0000, 90.0000);
  149.     CreateObject(3865, 370.045380, -1982.343506, 5.005794, 0.0000, 0.0000, 90.0000);
  150.     CreateObject(3865, 1263.092773, -1078.985840, 24.775980, 0.0000, 0.0000, 90.0002);
  151.     CreateObject(3865, 1323.274780, -1037.234497, 26.289764, 0.0000, 0.0000, 180.0000);
  152.     CreateObject(3865, 1589.247559, -1161.398438, 21.328182, 0.0000, 0.0000, 0.0000);
  153.     CreateObject(3865, 2471.438965, -1732.692017, 10.899067, 0.0000, 0.0000, 0.0000);
  154.     CreateObject(3865, 2471.192627, -1731.901733, 10.896339, 0.0000, 0.0000, 180.0000);
  155.     CreateObject(3865, 2185.634277, -1742.818848, 10.683977, 0.0000, 0.0000, 90.0001);
  156.     CreateObject(3865, 2184.976563, -1743.038086, 10.661705, 0.0000, 0.0000, 270.0000);
  157.     CreateObject(3865, 2081.134033, -1906.306152, 10.941786, 0.0000, 0.0000, 270.0000);
  158.     CreateObject(3865, 2081.802246, -1906.137207, 10.994513, 0.0000, 0.0000, 90.0002);
  159.     CreateObject(3865, 1941.795654, -1931.945435, 10.941786, 0.0000, 0.0000, 180.0000);
  160.     CreateObject(3865, 1942.000244, -1932.614624, 10.969513, 0.0000, 0.0000, 0.0001);
  161.     CreateObject(3865, 1701.721436, -1592.865723, 10.883875, 0.0000, 0.0000, 0.0001);
  162.     CreateObject(3865, 1701.480591, -1592.149414, 10.911602, 0.0000, 0.0000, 180.0002);
  163.     CreateObject(3865, 1158.438721, -931.988098, 40.877213, 0.0000, 0.0000, 270.0001);
  164.     CreateObject(3865, 1159.107300, -931.840698, 41.000446, 0.0000, 0.0000, 90.0001);
  165.     CreateObject(3865, 925.623047, -948.598267, 37.538677, 0.0000, 0.0000, 180.0003);
  166.     CreateObject(3865, 925.835327, -950.811218, 37.566128, 0.0000, 0.0000, 0.0001);
  167.     CreateObject(3865, 355.255707, -1773.039551, 2.743529, 0.0000, 0.0000, 360.0000);
  168.     CreateObject(3865, 355.125214, -1772.422607, 2.846187, 0.0000, 0.0000, 179.9999);
  169.     CreateObject(3865, 721.254333, -1586.136841, 11.725403, 0.0000, 0.0000, 179.9999);
  170.     CreateObject(3865, 721.424805, -1586.838379, 11.703085, 0.0000, 0.0000, 359.9997);
  171.     CreateObject(3865, 944.614075, -1572.733643, 10.791788, 0.0000, 0.0000, 359.9997);
  172.     CreateObject(3865, 944.399841, -1571.812500, 10.794516, 0.0000, 0.0000, 179.9994);
  173.     CreateObject(3865, 1296.987305, -1660.287354, 10.741789, 0.0000, 0.0000, 269.9996);
  174.     CreateObject(3865, 1297.920410, -1660.110474, 10.719517, 0.0000, 0.0000, 89.9996);
  175.     CreateObject(3865, 1312.898438, -1660.130859, 10.791788, 0.0000, 0.0000, 89.9996);
  176.     CreateObject(3865, 1311.871582, -1660.327515, 10.816788, 0.0000, 0.0000, 269.9995);
  177.     CreateObject(3865, 1357.469604, -1922.608154, 17.813128, 0.0000, 0.0000, 348.7497);
  178.     CreateObject(3865, 1357.431763, -1921.695679, 17.840855, 0.0000, 0.0000, 168.7492);
  179.     CreateObject(3865, 1289.793579, -2056.125000, 56.030380, 0.0000, 0.0000, 179.9992);
  180.     CreateObject(3865, 1289.957642, -2057.000488, 56.057831, 0.0000, 0.0000, 359.9987);
  181.     CreateObject(3865, 1389.576538, -1743.191528, 10.766788, 0.0000, 0.0000, 89.9989);
  182.     CreateObject(3865, 1388.664185, -1743.370361, 10.719517, 0.0000, 0.0000, 269.9984);
  183.     CreateObject(3865, 2823.456055, -1969.039063, 8.474201, 0.0000, 0.0000, 89.9988);
  184.     CreateObject(3865, 2838.529785, -1968.712524, 8.394894, 0.0000, 0.0000, 89.9988);
  185.     CreateObject(3865, 2287.913330, -2304.382568, 11.077242, 0.0000, 0.0000, 315.0000);
  186.     CreateObject(3865, 2288.336670, -2303.660400, 11.086193, 0.0000, 0.0000, 135.0000);
  187.     CreateObject(3865, 1962.146973, -2177.654297, 11.130848, 0.0000, 0.0000, 90.0000);
  188.     CreateObject(3865, 1961.116943, -2177.814697, 11.208574, 0.0000, 0.0000, 270.0000);
  189.     CreateObject(3865, 1821.394165, -1876.714111, 10.897945, 0.0000, 0.0000, 270.0000);
  190.     CreateObject(3865, 1822.076172, -1876.460693, 10.809561, 0.0000, 0.0000, 90.0002);
  191.     CreateObject(3865, 1649.388184, -1872.750488, 10.791788, 0.0000, 0.0000, 0.0003);
  192.     CreateObject(3865, 1649.187500, -1871.835205, 10.744516, 0.0000, 0.0000, 180.0004);
  193.     CreateObject(3865, 1320.845825, -1851.750488, 10.732838, 0.0000, 0.0000, 180.0004);
  194.     CreateObject(3865, 1321.046021, -1852.676392, 10.716789, 0.0000, 0.0000, 0.0002);
  195.     CreateObject(3865, 942.996826, -1230.425659, 14.144801, 0.0000, 0.0000, 90.0000);
  196.     CreateObject(3865, 942.221802, -1230.550781, 14.153721, 0.0000, 0.0000, 270.0000);
  197.     CreateObject(3865, 1150.647583, -1227.181885, 14.675970, 0.0000, 0.0000, 270.0000);
  198.     CreateObject(3865, 1151.469360, -1227.008667, 14.703636, 0.0000, 0.0000, 90.0001);
  199.     CreateObject(3865, 1343.078735, -1417.874634, 10.691790, 0.0000, 0.0000, 90.0001);
  200.     CreateObject(3865, 1342.445068, -1418.044800, 10.694517, 0.0000, 0.0000, 270.0000);
  201.     CreateObject(3865, 1357.110107, -1418.191162, 10.822189, 0.0000, 0.0000, 270.0000);
  202.     CreateObject(3865, 1358.108398, -1418.019897, 10.774204, 0.0000, 0.0000, 90.0002);
  203.     CreateObject(3865, 2431.374756, -1662.555542, 23.097296, 0.0000, 0.0000, 90.0000);
  204.     CreateObject(3865, 551.722961, -1667.656372, 15.954409, 0.0000, 0.0000, 180.0002);
  205.     CreateObject(3865, 751.345642, -1643.067261, 3.024577, 0.0000, 0.0000, 270.0000);
  206.     CreateObject(3865, 751.942383, -1642.891602, 3.052244, 0.0000, 0.0000, 90.0001);
  207.     CreateObject(3865, 728.731018, -1674.371704, 7.991571, 0.0000, 0.0000, 0.0000);
  208.     CreateObject(3865, 728.493958, -1673.562866, 8.062235, 0.0000, 0.0000, 180.0002);
  209.     CreateObject(3865, 809.758667, -1702.931396, 10.741789, 0.0000, 0.0000, 270.0000);
  210.     CreateObject(3865, 810.708984, -1702.733521, 10.766788, 0.0000, 0.0000, 90.0001);
  211.     CreateObject(3865, 917.848938, -1762.018188, 10.790501, 0.0000, 0.0000, 90.0001);
  212.     CreateObject(3865, 916.648743, -1762.241211, 10.790455, 0.0000, 0.0000, 270.0003);
  213.     CreateObject(3865, 1034.107422, -1790.956055, 11.030943, 0.0000, 0.0000, 247.5003);
  214.     CreateObject(3865, 1035.075073, -1791.027344, 11.093517, 0.0000, 0.0000, 67.5002);
  215.     CreateObject(3865, 1048.655029, -1712.691650, 10.841787, 0.0000, 0.0000, 360.0000);
  216.     CreateObject(3865, 1048.483276, -1711.638672, 10.894461, 0.0000, 0.0000, 179.9998);
  217.     CreateObject(3865, 1132.968140, -1571.776489, 10.733335, 0.0000, 0.0000, 179.9998);
  218.     CreateObject(3865, 1133.167114, -1572.739868, 10.761063, 0.0000, 0.0000, 359.9996);
  219.     CreateObject(3865, 1443.931274, -1440.247070, 10.816746, 0.0000, 0.0000, 179.9995);
  220.     CreateObject(3865, 1444.171875, -1441.324341, 10.841738, 0.0000, 0.0000, 359.9994);
  221.     CreateObject(3865, 1454.179565, -1451.536621, 10.752022, 0.0000, 0.0000, 269.9992);
  222.     CreateObject(3865, 1455.138306, -1451.353638, 10.777037, 0.0000, 0.0000, 89.9987);
  223.     CreateObject(3865, 1645.433960, -1441.340942, 10.891787, 0.0000, 0.0000, 359.9984);
  224.     CreateObject(3865, 1658.413818, -1451.878784, 10.866716, 0.0000, 0.0000, 89.9977);
  225.     CreateObject(3865, 1645.255371, -1440.412842, 10.858278, 0.0000, 0.0000, 179.9980);
  226.     CreateObject(3865, 1657.391968, -1452.048340, 10.819395, 0.0000, 0.0000, 269.9974);
  227.     CreateObject(3865, 1862.536743, -1341.274048, 10.766762, 0.0000, 0.0000, 359.9977);
  228.     CreateObject(3865, 1862.311523, -1340.149414, 10.816742, 0.0000, 0.0000, 179.9974);
  229.     CreateObject(3865, 1835.640259, -1260.315918, 10.952724, 0.0000, 0.0000, 179.9974);
  230.     CreateObject(3865, 1835.828735, -1261.352173, 10.993334, 0.0000, 0.0000, 359.9969);
  231.     CreateObject(3865, 1520.460449, -1591.673462, 10.691755, 0.0000, 0.0000, 180.0002);
  232.     CreateObject(3865, 1520.692627, -1592.662109, 10.719456, 0.0000, 0.0000, 0.0003);
  233.     CreateObject(3865, 1429.895752, -1721.351318, 10.791788, 0.0000, 0.0000, 90.0002);
  234.     CreateObject(3865, 1428.939697, -1721.552490, 10.827032, 0.0000, 0.0000, 270.0002);
  235.     CreateObject(3865, 1429.192139, -1603.109619, 10.816790, 0.0000, 0.0000, 270.0002);
  236.     CreateObject(3865, 1430.112427, -1602.950806, 10.791758, 0.0000, 0.0000, 90.0003);
  237.     CreateObject(3865, 1455.152222, -1313.456665, 10.816761, 0.0000, 0.0000, 90.0003);
  238.     CreateObject(3865, 1454.332642, -1313.624512, 10.869434, 0.0000, 0.0000, 270.0001);
  239.     CreateObject(3865, 1609.789307, -1314.432373, 14.764170, 0.0000, 0.0000, 90.0005);
  240.     CreateObject(3865, 1604.048584, -1314.554688, 14.820707, 0.0000, 0.0000, 270.0005);
  241.     CreateObject(3865, 1714.301636, -1184.646484, 21.046417, 0.0000, 0.0000, 270.0005);
  242.     CreateObject(3865, 1715.294067, -1184.392334, 21.099091, 0.0000, 0.0000, 90.0003);
  243.     CreateObject(3865, 1442.673096, -1160.448242, 21.090176, 0.0000, 0.0000, 180.0006);
  244.     CreateObject(3865, 1442.827393, -1161.364746, 21.117846, 0.0000, 0.0000, 0.0007);
  245.     CreateObject(3865, 1228.913208, -1280.291504, 10.874914, 0.0000, 0.0000, 180.0006);
  246.     CreateObject(3865, 1229.058960, -1281.279053, 10.952602, 0.0000, 0.0000, 0.0004);
  247.     CreateObject(3865, 1062.941406, -1428.453979, 10.770216, 0.0000, 0.0000, 90.0006);
  248.     CreateObject(3865, 1061.890381, -1428.657593, 10.795212, 0.0000, 0.0000, 270.0007);
  249.     CreateObject(3865, 990.221741, -1490.114136, 10.791727, 0.0000, 0.0000, 0.0009);
  250.     CreateObject(3865, 990.003357, -1489.201538, 10.816698, 0.0000, 0.0000, 180.0011);
  251.     CreateObject(3865, 1036.928833, -1626.829834, 10.766735, 0.0000, 0.0000, 270.0007);
  252.     CreateObject(3865, 1037.928345, -1626.630249, 10.716774, 0.0000, 0.0000, 90.0000);
  253.     CreateObject(3865, 1095.737427, -1852.780029, 10.791739, 0.0000, 0.0000, 0.0010);
  254.     CreateObject(3865, 1095.500244, -1851.807861, 10.819412, 0.0000, 0.0000, 180.0009);
  255.     CreateObject(3865, 1492.031982, -1871.860596, 10.716759, 0.0000, 0.0000, 180.0009);
  256.     CreateObject(3865, 1492.196777, -1872.732300, 10.769455, 0.0000, 0.0000, 0.0004);
  257.     //===================
  258.     DisableInteriorEnterExits();
  259.     TextDraw = TextDrawCreate(1.0,433.456,"GameMode criado por: Pedro_Pawno.");
  260.     TextDrawBackgroundColor(TextDraw,0x000000ff);
  261.     TextDrawFont(TextDraw,2);
  262.     TextDrawLetterSize(TextDraw,0.2999, 1.4);
  263.     TextDrawBoxColor(TextDraw,0x00000050);
  264.     TextDrawColor(TextDraw,0xffffffff);
  265.     TextDrawSetOutline(TextDraw,1);
  266.     TextDrawSetProportional(TextDraw,1);
  267.     TextDrawSetShadow(TextDraw,1);
  268.     PickupDeposit = CreatePickup(1274,23,1632.5125,-1169.8737,24.0781);
  269.     PickupShop = CreatePickup(1279,23,2458.6389,-1895.1144,13.5469);
  270.     SetTimer("HP",5000,true);
  271.     return 1;
  272. }
  273.  
  274. public OnGameModeExit()
  275. {
  276.     TextDrawHideForAll(TextDraw);
  277.     TextDrawDestroy(TextDraw);
  278.     DOF2_Exit();
  279.     return 1;
  280. }
  281.  
  282. public OnPlayerRequestClass(playerid, classid)
  283. {
  284.     if(classid ==0)
  285.     {
  286.         Gang[playerid] = grove;
  287.     }
  288.    
  289.     else if(classid ==1)
  290.     {
  291.         Gang[playerid] = grove;
  292.     }
  293.    
  294.     else if(classid ==2)
  295.     {
  296.         Gang[playerid] = grove;
  297.     }
  298.    
  299.     else if(classid ==3)
  300.     {
  301.         Gang[playerid] = ballas;
  302.     }
  303.    
  304.     else if(classid ==4)
  305.     {
  306.         Gang[playerid] = ballas;
  307.     }
  308.    
  309.     else if(classid ==5)
  310.     {
  311.         Gang[playerid] = ballas;
  312.     }
  313.    
  314.     else if(classid ==6)
  315.     {
  316.         Gang[playerid] = vagos;
  317.     }
  318.    
  319.     else if(classid ==7)
  320.     {
  321.         Gang[playerid] = vagos;
  322.     }
  323.    
  324.     else if(classid ==8)
  325.     {
  326.         Gang[playerid] = vagos;
  327.     }
  328.    
  329.     else if(classid ==9)
  330.     {
  331.         Gang[playerid] = aztecas;
  332.     }
  333.    
  334.     else if(classid ==10)
  335.     {
  336.         Gang[playerid] = aztecas;
  337.     }
  338.     else if(classid ==11)
  339.     {
  340.         Gang[playerid] = aztecas;
  341.     }
  342.     SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
  343.     SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
  344.     SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
  345.     SetPlayerFacingAngle(playerid,0.0);
  346.     return 1;
  347. }
  348.      
  349. public OnPlayerConnect(playerid)
  350. {
  351.     Jogador[playerid] = INVALID_PLAYER_ID;
  352.     Timer = SetTimerEx("TempoJogado", 1000*60, true, "i", playerid);
  353.     new Nome[MAX_PLAYER_NAME],string[128];
  354.     GetPlayerName(playerid, Nome, sizeof(Nome));
  355.     format(string,sizeof(string),"%s entrou no servidor!",Nome);
  356.     scmt(Amarelo,string);
  357.     if(DOF2_FileExists(Contas(playerid))) ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Você é registrado digite sua senha para logar!\nSe errar 5 vezes sua conta será banida!", "Confirma", "Cancelar");
  358.     else ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Você ainda não é registrado digite uma senha para se registrar!", "Confirma", "Cancelar");
  359.     TextDrawShowForPlayer(playerid,TextDraw);
  360.     return 1;
  361. }
  362.  
  363. public OnPlayerDisconnect(playerid, reason)
  364. {
  365.     new Nome[MAX_PLAYER_NAME],string[128];
  366.     GetPlayerName(playerid, Nome, sizeof(Nome));
  367.     format(string,sizeof(string),"%s saiu do servidor!",Nome);
  368.     scmt(Error,string);
  369.     SalvarContas(playerid);
  370.     TextDrawHideForPlayer(playerid,TextDraw);
  371.     KillTimer(Timer);
  372.     return 1;
  373. }
  374.  
  375. public OnPlayerDeath(playerid, killerid, reason)
  376. {
  377.     if(killerid != INVALID_PLAYER_ID)
  378.     SendDeathMessage(playerid, killerid,reason);
  379.     return 1;
  380. }
  381.  
  382. public OnPlayerSpawn(playerid)
  383. {
  384.     if(Gang[playerid] == ballas)
  385.     {
  386.         ResetPlayerWeapons(playerid);
  387.         GivePlayerWeapon(playerid,24,250);
  388.         GivePlayerWeapon(playerid,28,400);
  389.         GivePlayerWeapon(playerid,30,350);
  390.         GivePlayerWeapon(playerid,29,250);
  391.         SetPlayerHealth(playerid,100);
  392.         SetPlayerArmour(playerid,100);
  393.         SetPlayerColor(playerid,Rosa);
  394.     }
  395.     else if(Gang[playerid] == grove)
  396.     {
  397.         ResetPlayerWeapons(playerid);
  398.         GivePlayerWeapon(playerid,24,250);
  399.         GivePlayerWeapon(playerid,28,400);
  400.         GivePlayerWeapon(playerid,30,350);
  401.         GivePlayerWeapon(playerid,29,250);
  402.         SetPlayerHealth(playerid,100);
  403.         SetPlayerArmour(playerid,100);
  404.         SetPlayerColor(playerid,Verde);
  405.     }
  406.     else if(Gang[playerid] == vagos)
  407.     {
  408.         ResetPlayerWeapons(playerid);
  409.         GivePlayerWeapon(playerid,24,250);
  410.         GivePlayerWeapon(playerid,28,400);
  411.         GivePlayerWeapon(playerid,30,350);
  412.         GivePlayerWeapon(playerid,29,250);
  413.         SetPlayerHealth(playerid,100);
  414.         SetPlayerArmour(playerid,100);
  415.         SetPlayerColor(playerid,Amarelo);
  416.     }
  417.     else if(Gang[playerid] == aztecas)
  418.     {
  419.         ResetPlayerWeapons(playerid);
  420.         GivePlayerWeapon(playerid,24,250);
  421.         GivePlayerWeapon(playerid,28,400);
  422.         GivePlayerWeapon(playerid,30,350);
  423.         GivePlayerWeapon(playerid,29,250);
  424.         SetPlayerHealth(playerid,100);
  425.         SetPlayerArmour(playerid,100);
  426.         SetPlayerColor(playerid,Azul);
  427.     }
  428.     return 1;
  429. }
  430.  
  431. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  432. {
  433.     static Name[24];
  434.     GetPlayerName(playerid,Name,24);
  435.     printf("[COMANDOS]: Player %s Digitou | Comando: %s",Name,cmdtext);
  436.     if (!success)
  437.     return scm(playerid,Error,"Comando executado não existe.");
  438.     return true;
  439. }
  440.  
  441. //================Comandos:=====================================================
  442.  
  443.     CMD:roubardeposito(playerid,params[])
  444.     {
  445.         if(!IsPlayerInRangeOfPoint(playerid,3.0,1632.5125,-1169.8737,24.0781)) return scm(playerid,Error,"Você não está no deposito de dinheiro! (/deposito)");
  446.         {
  447.         if(Gang[playerid] == ballas && Gang[playerid] == aztecas && Gang[playerid] == grove && Gang[playerid] == vagos) return scm(playerid, -1, "Você não faz parte de nenhuma organização!");
  448.         SetTimerEx("ComandoKillTempo",50000, false,"i",playerid);
  449.         scm(playerid,Neutra,"Aguarde..");
  450.     }
  451.         return 1;
  452.     }
  453.  
  454.     CMD:deposito(playerid,params[])
  455.     {
  456.         SetPlayerCheckpoint(playerid,1632.5125,-1169.8737,24.0781,10.0);
  457.         scm(playerid,Neutra,"Vá até o ponto no mapa!");
  458.         return 1;
  459.     }
  460.  
  461.     CMD:ajudagangue(playerid, params[])
  462.     {
  463.         if(Gang[playerid]!= ballas && Gang[playerid]!= aztecas && Gang[playerid]!= grove && Gang[playerid]!= vagos) return scm(playerid, Error, "Você não é de nenhuma organização!");
  464.         scm(playerid,Neutra,"Comandos:");
  465.         scm(playerid,Neutra,"/shop /resetar /creditos /status /objetivo /radio /tempojogando");
  466.         return 1;
  467.     }
  468.  
  469.     CMD:radio(playerid,params[])
  470.     {
  471.         if(Gang[playerid]!= ballas && Gang[playerid]!= aztecas && Gang[playerid]!= grove && Gang[playerid]!= vagos) return scm(playerid,Error,"Você não é de nenhuma organização!");
  472.         {
  473.             new str_op[128];
  474.             if(sscanf(params, "s[128]", str_op))
  475.             return SendClientMessage(playerid,Error,"Use: /rádio [mensagem].");
  476.             new player_name[MAX_PLAYER_NAME],
  477.             str_msg[128];
  478.             GetPlayerName(playerid,player_name,MAX_PLAYER_NAME);
  479.            
  480.             if(Gang[playerid] == ballas)
  481.             {
  482.                 format(str_msg,sizeof str_msg,"Rádio ballas: %s %s",player_name,str_op);
  483.             }
  484.             else if(Gang[playerid] == aztecas)
  485.             {
  486.                 format(str_msg,sizeof str_msg,"Rádio aztecas: %s %s",player_name,str_op);
  487.             }
  488.             else if(Gang[playerid] == grove)
  489.             {
  490.                 format(str_msg,sizeof str_msg,"Rádio grove: %s %s",player_name,str_op);
  491.             }
  492.             else if(Gang[playerid] == vagos)
  493.             {
  494.                 format(str_msg,sizeof str_msg,"Rádio vagos: %s %s",player_name,str_op);
  495.             }
  496.             for(new slots = GetMaxPlayers(),i;i<slots; i++)
  497.             scm(i,Neutra,str_msg);
  498.         }
  499.         return 1;
  500.     }
  501.  
  502.     CMD:objetivo(playerid,params[])
  503.     {
  504.         ShowPlayerDialog(playerid,DIALOG_MSG, DIALOG_STYLE_MSGBOX, "Objetivo", "O objetivo do servidor é matar as gangues inimigas. Você pode também roubar dinheiro para conseguir novas armas!", "Ok", "Cancelar");
  505.         return 1;
  506.     }
  507.  
  508.     CMD:shop(playerid, params[])
  509.     {
  510.         if(!IsPlayerInRangeOfPoint(playerid,3.0,2458.6389,-1895.1144,13.5469)) return scm(playerid,Error,"Você não está no local de tráfico! (/am)");
  511.         {
  512.         ShowPlayerDialog(playerid,DIALOG,DIALOG_STYLE_LIST,"Lista de armas","M4 1500$\nShotgun 800$\nPistola 600$\nSpaz 12 2000$\nColete 300$\nGranada 1200$\nBomba de Gás 1150$\nMolotov 1000$ \nSniper 2800$", "Comprar", "Sair");
  513.     }
  514.         return 1;
  515.     }
  516.    
  517.     CMD:am(playerid,params[])
  518.     {
  519.         SetPlayerCheckpoint(playerid,2458.6389,-1895.1144,13.5469,10.0);
  520.         scm(playerid,Neutra,"Vá até o ponto no mapa!");
  521.         return 1;
  522.     }
  523.    
  524.     CMD:creditos(playerid, params[])
  525.     {
  526.         scm(playerid,Neutra,"Créditos: Pedro_Shogun!");
  527.         scm(playerid,Amarelo,"Agradecimentos: Lós e FÓRUM-SAMP.");
  528.         return 1;
  529.     }
  530.    
  531.     CMD:kill(playerid,params[])
  532.     {
  533.         SetPlayerHealth(playerid,0);
  534.         scm(playerid,Neutra,"Você se matou!");
  535.         return 1;
  536.     }
  537.  
  538.     CMD:tempojogando(playerid,params[])
  539.     {
  540.         new string[128];
  541.         format(string, sizeof(string), "Você já jogou: %d horas e %d minutos no servidor (neste login).", HorasJogadas [playerid], MinutosJogados[playerid]);
  542.         SendClientMessage(playerid,Amarelo, string);
  543.         return 1;
  544.     }
  545.    
  546.     CMD:dinheiro(playerid,params[])
  547.     {
  548.         new id,value;
  549.         if(!IsPlayerAdmin(playerid)) return scm(playerid,Error,"Você não é administrador!");
  550.         if(sscanf(params,"dd",id,value)) return scm(playerid,Neutra,"Uso correto: /dinheiro [id]");
  551.         GivePlayerMoney(id,(id) +value);
  552.         return 1;
  553.     }
  554.    
  555.     CMD:darvida(playerid,params[])
  556.     {
  557.         new vida, colete, id;
  558.         if(!IsPlayerAdmin(playerid)) return scm(playerid,Error,"Você não é administrador!");
  559.         {
  560.             scm(playerid,Neutra,"Você setou a vida de um player");
  561.         }
  562.         if(sscanf(params,"dd",vida,id)) return scm(playerid,Neutra,"Uso correto: /darvida [id] [vida] [colete]");
  563.         SetPlayerHealth(vida,id);
  564.         SetPlayerArmour(colete,id);
  565.         scm(playerid,-1,"Sua vida foi setada!");
  566.         return 1;
  567.     }
  568.    
  569.     CMD:anuncio(playerid, params[])
  570.     {
  571.         if(!IsPlayerAdmin(playerid)) return scm(playerid,Error, "Você não é administrador!");
  572.         if(isnull(params)) return scm(playerid,Neutra, "Use: /anuncio [mensagem]");
  573.         new Nome[20], pStr[128];
  574.         GetPlayerName(playerid, Nome, 20);
  575.         format (pStr, 128, "Administrador %s: %s", Nome, params);
  576.         SendClientMessageToAll(Error, pStr);
  577.         return true;
  578.     }
  579.  
  580.     CMD:comandosadm(playerid,params[])
  581.     {
  582.         if(!IsPlayerAdmin(playerid)) return scm(playerid,Error,"Você não é administrador!");
  583.         scm(playerid,Neutra,"Comandos:");
  584.         scm(playerid,Amarelo,"/darvida /anuncio /anuncio /dinheiro");
  585.         return 1;
  586.     }
  587.    
  588.     CMD:admins(playerid,params[])
  589.     {
  590.         new Jogado5[24];
  591.         new count = 0;
  592.         new msg[120];
  593.         scm(playerid,Amarelo,"Administradores online:");
  594.         for(new i=0; i<MAX_PLAYERS; i++)
  595.         {
  596.             if(IsPlayerConnected(i) && IsPlayerAdmin(i))
  597.         {
  598.         GetPlayerName(i,Jogador,24);
  599.         scm(playerid,Amarelo,"Administradores:");
  600.         format(msg,sizeof(msg),"%s", Jogado5);
  601.         SendClientMessage(playerid, 0x000FFFAA, msg);
  602.         count++;
  603.         }
  604.     }
  605.         return 1;
  606.     }
  607.  
  608.    
  609. public OnPlayerEnterCheckpoint(playerid)
  610. {
  611.     DisablePlayerCheckpoint(playerid);
  612.     return 1;
  613. }
  614.  
  615. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  616. {
  617.     if (dialogid == DIALOG)
  618.     {
  619.         if (response)
  620.         {
  621.             if (listitem == 0)
  622.             {
  623.                 if (GetPlayerMoney(playerid) < 1500) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
  624.                 GivePlayerWeapon(playerid, 31, 250);
  625.                 GivePlayerMoney(playerid, -1500);
  626.             }
  627.             else if (listitem == 1)
  628.             {
  629.                 if (GetPlayerMoney(playerid) < 800) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
  630.                 GivePlayerWeapon(playerid, 25, 350);
  631.                 GivePlayerMoney(playerid, -800);
  632.  
  633.             }
  634.             else if (listitem == 2)
  635.             {
  636.                 if (GetPlayerMoney(playerid) < 600) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
  637.                 GivePlayerWeapon(playerid, 22, 125);
  638.                 GivePlayerMoney(playerid, 600);
  639.  
  640.             }
  641.             else if (listitem == 3)
  642.             {
  643.                 if (GetPlayerMoney(playerid) < 2000) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
  644.                 GivePlayerWeapon(playerid, 27, 250);
  645.                 GivePlayerMoney(playerid, -2000);
  646.  
  647.             }
  648.             else if (listitem == 4)
  649.             {
  650.                 if (GetPlayerMoney(playerid) < 300) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
  651.                 SetPlayerArmour(playerid, 100);
  652.                 GivePlayerMoney(playerid, -300);
  653.             }
  654.             else if (listitem == 5)
  655.             {
  656.                 if (GetPlayerMoney(playerid) < 1200) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
  657.                 GivePlayerWeapon(playerid, 16, 5);
  658.                 GivePlayerMoney(playerid, -1200);
  659.             }
  660.             else if (listitem == 6)
  661.             {
  662.                 if (GetPlayerMoney(playerid) < 1150) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
  663.                 GivePlayerWeapon(playerid, 17, 15);
  664.                 GivePlayerMoney(playerid, -1150);
  665.             }
  666.             else if (listitem == 7)
  667.             {
  668.                 if (GetPlayerMoney(playerid) < 1000) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
  669.                 GivePlayerWeapon(playerid, 18, 10);
  670.                 GivePlayerMoney(playerid, -1000);
  671.             }
  672.             else if (listitem == 8)
  673.             {
  674.                 if (GetPlayerMoney(playerid) < 2800) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
  675.                 GivePlayerWeapon(playerid, 34, 50);
  676.                 GivePlayerMoney(playerid, -2800);
  677.                 return 1;
  678.             }
  679.         }
  680.     }
  681.    
  682.     if(dialogid == DIALOG_REGISTRO)
  683.     {
  684.         if(!strval(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Digite apenas números!\nDigite sua senha novamente para se registrar!", "Confirma", "Cancelar");
  685.         if(!response) return Kick(playerid);
  686.         else
  687.         {
  688.  
  689.             Player[playerid][Senha] = strval(inputtext);
  690.             SalvarContas(playerid);
  691.             ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Você se cadastrou, agora é só logar com sua senha registrada!", "Confirma", "Cancelar");
  692.         }
  693.     }
  694.     if(dialogid == DIALOG_LOGAR)
  695.     {
  696.  
  697.         if(!strval(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Digite apenas números!\nDigite sua senha cadastrada para logar!\nSe errar 5 vezes sua conta será banida!", "Confirma", "Cancelar");
  698.         if(!response) return Kick(playerid);
  699.         else
  700.         {
  701.             Player[playerid][Senha] = DOF2_GetInt(Contas(playerid), "Senha");
  702.             if(strval(inputtext) == Player[playerid][Senha])
  703.             {
  704.                 Player[playerid][Matou] = DOF2_GetInt(Contas(playerid), "Matou");
  705.                 Player[playerid][Morreu] = DOF2_GetInt(Contas(playerid), "Morreu");
  706.                 Player[playerid][Dinheiro] = DOF2_GetInt(Contas(playerid), "Dinheiro");
  707.                 GivePlayerMoney(playerid, Player[playerid][Dinheiro]);
  708.             }
  709.             else
  710.             {
  711.                 ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Você digitou sua senha errado, digite-a novamente para logar!\nSe errar 5 vezes sua conta será banida!", "Confirma", "Cancelar");
  712.                 Erro[playerid]++;
  713.                 if(Erro[playerid] == 5)
  714.                 {
  715.                     scm(playerid, Neutra, "Sua conta está banida por errar 5 vezes a sua senha.");
  716.                     Ban(playerid);
  717.                 }
  718.             }
  719.         }
  720.     }
  721.     if(dialogid == 9752 && response)
  722.     {
  723.         new string[128];
  724.         new nome[MAX_PLAYER_NAME];
  725.         GetPlayerName(playerid,nome,sizeof(nome));
  726.         format(string, sizeof(string), "» Mensagem Particular de %s: %s.",nome, inputtext);
  727.         SendClientMessage(Jogador[playerid], Amarelo, string);
  728.         SendClientMessage(playerid, Verde, "» Sua Mensagem foi enviada.");
  729.         Jogador[playerid] = INVALID_PLAYER_ID;
  730.         return 1;
  731.     }
  732.     return 1;
  733. }
  734.  
  735. public OnPlayerStateChange(playerid, newstate, oldstate)
  736. {
  737.     if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  738.     {
  739.         new carro = GetPlayerVehicleID(playerid);
  740.         for (new i = 0; i < sizeof(CarroA); i++)
  741.         if (carro == CarroA[i]) if (Gang[playerid] != aztecas) RemovePlayerFromVehicle(playerid);
  742.  
  743.         for (new i = 0; i < sizeof(CarroG); i++)
  744.         if (carro == CarroG[i]) if (Gang[playerid] != grove) RemovePlayerFromVehicle(playerid);
  745.  
  746.         for (new i = 0; i < sizeof(CarroV); i++)
  747.         if (carro == CarroV[i]) if (Gang[playerid] != vagos) RemovePlayerFromVehicle(playerid);
  748.  
  749.         for (new i = 0; i < sizeof(CarroB); i++)
  750.         if (carro == CarroB[i]) if (Gang[playerid] != ballas) RemovePlayerFromVehicle(playerid);
  751.  
  752.     }
  753. }
  754.  
  755. public OnPlayerPickUpPickup(playerid, pickupid)
  756. {
  757.     if(pickupid == PickupShop)
  758.     {
  759.         scm(playerid,Amarelo,"Local tráfico.");
  760.     }
  761.     if(pickupid == PickupDeposit)
  762.     {
  763.         scm(playerid,Amarelo,"Deposito de armas.");
  764.     }
  765.     return 1;
  766. }
  767.  
  768. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  769. {
  770.     if(playerid == clickedplayerid) return SendClientMessage(playerid, Error, "Você não pode enviar mensagens para si mesmo!");
  771.     ShowPlayerDialog(playerid, 9752, DIALOG_STYLE_INPUT, "Mensagem Pessoal","Escreva uma mensagem para o player.","Enviar","Fechar");
  772.     Jogador[playerid] = PlayerClicado;
  773.     return 1;
  774. }
  775.  
  776. public ComandoKillTempo(playerid)
  777. {
  778.     GivePlayerMoney(playerid, 2500);
  779.     scm(playerid, Neutra, "Dinheiro roubado!");
  780.     return 1;
  781. }
  782.  
  783. stock Contas(playerid)
  784. {
  785.     new arquivo[40], name[MAX_PLAYER_NAME];
  786.     GetPlayerName(playerid, name, 32);
  787.     format(arquivo, 40, "Contas/%s.ini", name);
  788.     return arquivo;
  789. }
  790.  
  791. stock SalvarContas(playerid)
  792. {
  793.     if(!DOF2_FileExists(Contas(playerid))) DOF2_CreateFile(Contas(playerid));
  794.     {
  795.         Player[playerid][Dinheiro] = GetPlayerMoney(playerid);
  796.         DOF2_SetInt(Contas(playerid), "Senha", Player[playerid][Senha]);
  797.         DOF2_SetInt(Contas(playerid), "Matou", Player[playerid][Matou]);
  798.         DOF2_SetInt(Contas(playerid), "Morreu", Player[playerid][Morreu]);
  799.         DOF2_SetInt(Contas(playerid), "Dinheiro", Player[playerid][Dinheiro]);
  800.         DOF2_SaveFile();
  801.     }
  802.     return 1;
  803. }
  804.  
  805. forward TempoJogado(playerid);
  806. public TempoJogado(playerid)
  807. {
  808.     MinutosJogados[playerid] ++;
  809.     if(MinutosJogados[playerid] == 60)
  810.     {
  811.         HorasJogadas[playerid] ++;
  812.         MinutosJogados[playerid] = 0;
  813.         return 1;
  814.     }
  815.     return 1;
  816. }
  817.  
  818. stock GetTempoJogado(playerid)
  819. {
  820.     new string[16];
  821.     format(string, sizeof(string), "%d:%d", HorasJogados[playerid], MinutosJogados[playerid]);
  822.     return 1;
  823. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement