Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //includes:
- #include a_samp
- #include DOF2
- #include zcmd
- #include sscanf2
- //forwards:
- forward ComandoKillTempo(playerid);
- //defines:
- #define grove 1
- #define ballas 2
- #define vagos 3
- #define aztecas 4
- #define scm SendClientMessage
- #define scmt SendClientMessageToAll
- #define Error 0xFF0000FF
- #define Branco 0xFFFFFFFF
- #define Verde 0x006A00FF
- #define Azul 0x004080FF
- #define Rosa 0xFF0080FF
- #define Amarelo 0xFFFF00FF4
- #define Neutra 0x92A3AFFF
- #define PlayerClicado clickedplayerid
- //dialogs.
- #define DIALOG 3
- #define DialogInt 989
- #define DIALOG_MSG 85
- #define DIALOG_REGISTRO 1
- #define DIALOG_LOGAR 2
- //variaveis:
- new Gang[MAX_PLAYERS];
- new CarroA[5];
- new CarroG[5];
- new CarroV[5];
- new CarroB[5];
- new Text:TextDraw;
- new MinutosJogados[MAX_PLAYERS];
- new HorasJogadas[MAX_PLAYERS];
- new Timer;
- new PickupShop;
- new PickupDeposit;
- enum Informacoes
- {
- Senha,
- Matou,
- Morreu,
- Dinheiro
- }
- new Player[MAX_PLAYERS][Informacoes];
- new Erro[MAX_PLAYERS];
- new Jogador[MAX_PLAYERS];
- //=================
- main()
- {
- print("\n----------------------------------");
- print("Gang War versão 1.0. Créditos: Pedro Shogun!");
- print("Carregado. Não retire os créditos!");
- print("Agradecimentos: Fórum SAMP.");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- SetGameModeText("Gang War V.1");
- AddPlayerClassEx(grove,105,2478.2656,-1633.4364,13.4048,183.2906,0,0,0,0,0,0); //grove
- AddPlayerClassEx(grove,106,2478.2656,-1633.4364,13.4048,183.2906,0,0,0,0,0,0);//grove
- AddPlayerClassEx(grove,107,2478.2656,-1633.4364,13.4048,183.2906,0,0,0,0,0,0);//grove
- AddPlayerClassEx(ballas,102,1999.7797,-1131.8314,25.3345,157.7532,0,0,0,0,0,0);//ballas
- AddPlayerClassEx(ballas,103,1999.7797,-1131.8314,25.3345,157.7532,0,0,0,0,0,0);//ballas
- AddPlayerClassEx(ballas,104,1999.7797,-1131.8314,25.3345,157.7532,0,0,0,0,0,0);//ballas
- AddPlayerClassEx(vagos,108,2821.1477,-1182.1031,25.2305,263.3948,0,0,0,0,0,0); //vagos
- AddPlayerClassEx(vagos,109,2821.1477,-1182.1031,25.2305,263.3948,0,0,0,0,0,0); //vagos
- AddPlayerClassEx(vagos,110,2821.1477,-1182.1031,25.2305,263.3948,0,0,0,0,0,0); //vagos
- AddPlayerClassEx(aztecas,114,1829.5374,-2014.0790,13.5469,175.6421,0,0,0,0,0,0); //aztecas
- AddPlayerClassEx(aztecas,115,1829.5374,-2014.0790,13.5469,175.6421,0,0,0,0,0,0); //aztecas
- AddPlayerClassEx(aztecas,116,1829.5374,-2014.0790,13.5469,175.6421,0,0,0,0,0,0); //aztecas
- //====HQ AZTECAS======
- CarroA[0] = CreateVehicle(576,1826.6999500,-2025.4000200,13.1000000,0.0000000,7,7,-1); //Tornado
- CarroA[1] = CreateVehicle(575,1826.8000500,-2031.9000200,13.0000000,0.0000000,7,7,-1); //Broadway
- CarroA[2] = CreateVehicle(475,1823.1999500,-2025.8000500,13.1000000,0.0000000,7,7,-1); //Sabre
- CarroA[3] = CreateVehicle(439,1823.1999500,-2031.6999500,13.2000000,0.0000000,7,7,-1); //Stallion
- CarroA[4] = CreateVehicle(482,1830.5000000,-2003.4000200,13.6000000,179.7130000,7,7,-1); //Burrito
- //====================
- //====HQ GROVE=======
- CarroG[0] = CreateVehicle(482,2506.6001000,-1685.0000000,13.6000000,0.0000000,128,128,-1); //Burrito
- CarroG[1] = CreateVehicle(567,2499.3999000,-1682.6999500,13.3000000,284.0000000,128,128,-1); //Savanna
- CarroG[2] = CreateVehicle(536,2492.1001000,-1684.0000000,13.2000000,278.0000000,128,128,-1); //Blade
- CarroG[3] = CreateVehicle(492,2508.3000500,-1670.5000000,13.1000000,348.0000000,128,128,-1); //Greenwood
- CarroG[4] = CreateVehicle(467,2505.8999000,-1677.4000200,13.0000000,330.0000000,128,128,-1); //Oceanic
- //====================
- //====HQ VAGOS=======
- CarroV[0] = CreateVehicle(482,2822.6001000,-1188.3000500,25.3000000,268.2560000,6,6,-1); //Burrito
- CarroV[1] = CreateVehicle(474,2826.6001000,-1173.8000500,24.9000000,182.0790000,6,6,-1); //Hermes
- CarroV[2] = CreateVehicle(410,2822.3999000,-1178.5999800,24.9000000,270.9120000,6,6,-1); //Manana
- CarroV[3] = CreateVehicle(518,2815.6001000,-1178.8000500,25.0000000,272.1930000,6,6,-1); //Buccaneer
- CarroV[4] = CreateVehicle(566,2814.3000500,-1188.0000000,25.0000000,269.6440000,6,6,-1); //Tahoma
- //HQ BALLAS===========
- CarroB[0] = CreateVehicle(566,2000.5000000,-1139.4000200,25.2000000,90.2250000,5,5,-1); //Tahoma
- CarroB[1] = CreateVehicle(551,1994.1999500,-1139.6999500,25.3000000,90.2250000,5,5,-1); //Merit
- CarroB[2] = CreateVehicle(547,1999.5999800,-1132.0000000,25.2000000,90.2250000,5,5,-1); //Primo
- CarroB[3] = CreateVehicle(517,1991.3000500,-1131.9000200,25.5000000,90.2250000,5,5,-1); //Majestic
- CarroB[4] = CreateVehicle(482,1982.8000500,-1132.0999800,26.0000000,90.2250000,5,5,-1); //Burrito
- CreateObject(3865, 2431.477051, -1662.562378, 23.346226, 0.0000, 0.0000, 90.0000);
- CreateObject(3865, 2331.300537, -1732.902344, 10.866785, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 2822.697021, -1969.249634, 8.446474, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 2837.791260, -1968.909790, 8.421474, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1928.193970, -1751.836670, 10.716782, 0.0000, 0.0000, 180.0000);
- CreateObject(3865, 1613.119751, -1732.000244, 10.716789, 0.0000, 0.0000, 180.0000);
- CreateObject(3865, 1529.771484, -1720.911865, 10.841787, 0.0000, 0.0000, 90.0001);
- CreateObject(3865, 1520.375244, -1732.240356, 10.749582, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 1529.424561, -1603.775513, 10.766790, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1323.189087, -1731.666870, 10.741789, 0.0000, 0.0000, 180.0002);
- CreateObject(3865, 1160.055054, -1711.628662, 11.140226, 0.0000, 0.0000, 180.0002);
- CreateObject(3865, 369.826508, -1657.199341, 30.101086, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 369.718628, -1722.624146, 19.197357, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 369.665771, -1829.674561, 5.005795, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 551.933533, -1668.723267, 15.915226, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 369.869354, -1982.568359, 4.980794, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1261.886353, -1079.179199, 24.798252, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1323.420654, -1038.153931, 26.337036, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 1482.021362, -1057.819458, 21.238293, 0.0000, 0.0000, 90.0001);
- CreateObject(3865, 1589.030884, -1160.881226, 21.365175, 0.0000, 0.0000, 180.0001);
- CreateObject(3865, 2244.503418, -1139.947632, 23.579838, 0.0000, 0.0000, 168.7501);
- CreateObject(3865, 2370.846191, -1327.036133, 21.369862, 0.0000, 0.0000, 270.0001);
- CreateObject(3865, 2450.775635, -1518.902710, 35.425476, 0.0000, 0.0000, 270.0001);
- CreateObject(3865, 2430.737793, -1470.459473, 21.367035, 0.0000, 0.0000, 270.0001);
- CreateObject(3865, 2430.773682, -1662.756348, 23.073957, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 2463.247803, -1658.498779, 10.716391, 0.0000, 0.0000, 180.0000);
- CreateObject(3865, 2463.461182, -1659.396729, 10.744118, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 2331.122070, -1731.971313, 10.844513, 0.0000, 0.0000, 180.0001);
- CreateObject(3865, 1928.404663, -1752.843994, 10.756287, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 1613.330078, -1732.830933, 10.762777, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 1520.179810, -1731.617065, 10.791788, 0.0000, 0.0000, 180.0001);
- CreateObject(3865, 1529.126587, -1721.031372, 10.791788, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1530.076660, -1603.610840, 10.794518, 0.0000, 0.0000, 90.0000);
- CreateObject(3865, 1323.363281, -1732.769409, 10.716789, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 1160.283081, -1712.683594, 11.117954, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 370.659607, -1657.000244, 30.078672, 0.0000, 0.0000, 90.0000);
- CreateObject(3865, 370.500366, -1722.399292, 19.193628, 0.0000, 0.0000, 90.0000);
- CreateObject(3865, 370.023102, -1829.540161, 4.983466, 0.0000, 0.0000, 90.0000);
- CreateObject(3865, 370.045380, -1982.343506, 5.005794, 0.0000, 0.0000, 90.0000);
- CreateObject(3865, 1263.092773, -1078.985840, 24.775980, 0.0000, 0.0000, 90.0002);
- CreateObject(3865, 1323.274780, -1037.234497, 26.289764, 0.0000, 0.0000, 180.0000);
- CreateObject(3865, 1589.247559, -1161.398438, 21.328182, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 2471.438965, -1732.692017, 10.899067, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 2471.192627, -1731.901733, 10.896339, 0.0000, 0.0000, 180.0000);
- CreateObject(3865, 2185.634277, -1742.818848, 10.683977, 0.0000, 0.0000, 90.0001);
- CreateObject(3865, 2184.976563, -1743.038086, 10.661705, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 2081.134033, -1906.306152, 10.941786, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 2081.802246, -1906.137207, 10.994513, 0.0000, 0.0000, 90.0002);
- CreateObject(3865, 1941.795654, -1931.945435, 10.941786, 0.0000, 0.0000, 180.0000);
- CreateObject(3865, 1942.000244, -1932.614624, 10.969513, 0.0000, 0.0000, 0.0001);
- CreateObject(3865, 1701.721436, -1592.865723, 10.883875, 0.0000, 0.0000, 0.0001);
- CreateObject(3865, 1701.480591, -1592.149414, 10.911602, 0.0000, 0.0000, 180.0002);
- CreateObject(3865, 1158.438721, -931.988098, 40.877213, 0.0000, 0.0000, 270.0001);
- CreateObject(3865, 1159.107300, -931.840698, 41.000446, 0.0000, 0.0000, 90.0001);
- CreateObject(3865, 925.623047, -948.598267, 37.538677, 0.0000, 0.0000, 180.0003);
- CreateObject(3865, 925.835327, -950.811218, 37.566128, 0.0000, 0.0000, 0.0001);
- CreateObject(3865, 355.255707, -1773.039551, 2.743529, 0.0000, 0.0000, 360.0000);
- CreateObject(3865, 355.125214, -1772.422607, 2.846187, 0.0000, 0.0000, 179.9999);
- CreateObject(3865, 721.254333, -1586.136841, 11.725403, 0.0000, 0.0000, 179.9999);
- CreateObject(3865, 721.424805, -1586.838379, 11.703085, 0.0000, 0.0000, 359.9997);
- CreateObject(3865, 944.614075, -1572.733643, 10.791788, 0.0000, 0.0000, 359.9997);
- CreateObject(3865, 944.399841, -1571.812500, 10.794516, 0.0000, 0.0000, 179.9994);
- CreateObject(3865, 1296.987305, -1660.287354, 10.741789, 0.0000, 0.0000, 269.9996);
- CreateObject(3865, 1297.920410, -1660.110474, 10.719517, 0.0000, 0.0000, 89.9996);
- CreateObject(3865, 1312.898438, -1660.130859, 10.791788, 0.0000, 0.0000, 89.9996);
- CreateObject(3865, 1311.871582, -1660.327515, 10.816788, 0.0000, 0.0000, 269.9995);
- CreateObject(3865, 1357.469604, -1922.608154, 17.813128, 0.0000, 0.0000, 348.7497);
- CreateObject(3865, 1357.431763, -1921.695679, 17.840855, 0.0000, 0.0000, 168.7492);
- CreateObject(3865, 1289.793579, -2056.125000, 56.030380, 0.0000, 0.0000, 179.9992);
- CreateObject(3865, 1289.957642, -2057.000488, 56.057831, 0.0000, 0.0000, 359.9987);
- CreateObject(3865, 1389.576538, -1743.191528, 10.766788, 0.0000, 0.0000, 89.9989);
- CreateObject(3865, 1388.664185, -1743.370361, 10.719517, 0.0000, 0.0000, 269.9984);
- CreateObject(3865, 2823.456055, -1969.039063, 8.474201, 0.0000, 0.0000, 89.9988);
- CreateObject(3865, 2838.529785, -1968.712524, 8.394894, 0.0000, 0.0000, 89.9988);
- CreateObject(3865, 2287.913330, -2304.382568, 11.077242, 0.0000, 0.0000, 315.0000);
- CreateObject(3865, 2288.336670, -2303.660400, 11.086193, 0.0000, 0.0000, 135.0000);
- CreateObject(3865, 1962.146973, -2177.654297, 11.130848, 0.0000, 0.0000, 90.0000);
- CreateObject(3865, 1961.116943, -2177.814697, 11.208574, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1821.394165, -1876.714111, 10.897945, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1822.076172, -1876.460693, 10.809561, 0.0000, 0.0000, 90.0002);
- CreateObject(3865, 1649.388184, -1872.750488, 10.791788, 0.0000, 0.0000, 0.0003);
- CreateObject(3865, 1649.187500, -1871.835205, 10.744516, 0.0000, 0.0000, 180.0004);
- CreateObject(3865, 1320.845825, -1851.750488, 10.732838, 0.0000, 0.0000, 180.0004);
- CreateObject(3865, 1321.046021, -1852.676392, 10.716789, 0.0000, 0.0000, 0.0002);
- CreateObject(3865, 942.996826, -1230.425659, 14.144801, 0.0000, 0.0000, 90.0000);
- CreateObject(3865, 942.221802, -1230.550781, 14.153721, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1150.647583, -1227.181885, 14.675970, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1151.469360, -1227.008667, 14.703636, 0.0000, 0.0000, 90.0001);
- CreateObject(3865, 1343.078735, -1417.874634, 10.691790, 0.0000, 0.0000, 90.0001);
- CreateObject(3865, 1342.445068, -1418.044800, 10.694517, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1357.110107, -1418.191162, 10.822189, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 1358.108398, -1418.019897, 10.774204, 0.0000, 0.0000, 90.0002);
- CreateObject(3865, 2431.374756, -1662.555542, 23.097296, 0.0000, 0.0000, 90.0000);
- CreateObject(3865, 551.722961, -1667.656372, 15.954409, 0.0000, 0.0000, 180.0002);
- CreateObject(3865, 751.345642, -1643.067261, 3.024577, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 751.942383, -1642.891602, 3.052244, 0.0000, 0.0000, 90.0001);
- CreateObject(3865, 728.731018, -1674.371704, 7.991571, 0.0000, 0.0000, 0.0000);
- CreateObject(3865, 728.493958, -1673.562866, 8.062235, 0.0000, 0.0000, 180.0002);
- CreateObject(3865, 809.758667, -1702.931396, 10.741789, 0.0000, 0.0000, 270.0000);
- CreateObject(3865, 810.708984, -1702.733521, 10.766788, 0.0000, 0.0000, 90.0001);
- CreateObject(3865, 917.848938, -1762.018188, 10.790501, 0.0000, 0.0000, 90.0001);
- CreateObject(3865, 916.648743, -1762.241211, 10.790455, 0.0000, 0.0000, 270.0003);
- CreateObject(3865, 1034.107422, -1790.956055, 11.030943, 0.0000, 0.0000, 247.5003);
- CreateObject(3865, 1035.075073, -1791.027344, 11.093517, 0.0000, 0.0000, 67.5002);
- CreateObject(3865, 1048.655029, -1712.691650, 10.841787, 0.0000, 0.0000, 360.0000);
- CreateObject(3865, 1048.483276, -1711.638672, 10.894461, 0.0000, 0.0000, 179.9998);
- CreateObject(3865, 1132.968140, -1571.776489, 10.733335, 0.0000, 0.0000, 179.9998);
- CreateObject(3865, 1133.167114, -1572.739868, 10.761063, 0.0000, 0.0000, 359.9996);
- CreateObject(3865, 1443.931274, -1440.247070, 10.816746, 0.0000, 0.0000, 179.9995);
- CreateObject(3865, 1444.171875, -1441.324341, 10.841738, 0.0000, 0.0000, 359.9994);
- CreateObject(3865, 1454.179565, -1451.536621, 10.752022, 0.0000, 0.0000, 269.9992);
- CreateObject(3865, 1455.138306, -1451.353638, 10.777037, 0.0000, 0.0000, 89.9987);
- CreateObject(3865, 1645.433960, -1441.340942, 10.891787, 0.0000, 0.0000, 359.9984);
- CreateObject(3865, 1658.413818, -1451.878784, 10.866716, 0.0000, 0.0000, 89.9977);
- CreateObject(3865, 1645.255371, -1440.412842, 10.858278, 0.0000, 0.0000, 179.9980);
- CreateObject(3865, 1657.391968, -1452.048340, 10.819395, 0.0000, 0.0000, 269.9974);
- CreateObject(3865, 1862.536743, -1341.274048, 10.766762, 0.0000, 0.0000, 359.9977);
- CreateObject(3865, 1862.311523, -1340.149414, 10.816742, 0.0000, 0.0000, 179.9974);
- CreateObject(3865, 1835.640259, -1260.315918, 10.952724, 0.0000, 0.0000, 179.9974);
- CreateObject(3865, 1835.828735, -1261.352173, 10.993334, 0.0000, 0.0000, 359.9969);
- CreateObject(3865, 1520.460449, -1591.673462, 10.691755, 0.0000, 0.0000, 180.0002);
- CreateObject(3865, 1520.692627, -1592.662109, 10.719456, 0.0000, 0.0000, 0.0003);
- CreateObject(3865, 1429.895752, -1721.351318, 10.791788, 0.0000, 0.0000, 90.0002);
- CreateObject(3865, 1428.939697, -1721.552490, 10.827032, 0.0000, 0.0000, 270.0002);
- CreateObject(3865, 1429.192139, -1603.109619, 10.816790, 0.0000, 0.0000, 270.0002);
- CreateObject(3865, 1430.112427, -1602.950806, 10.791758, 0.0000, 0.0000, 90.0003);
- CreateObject(3865, 1455.152222, -1313.456665, 10.816761, 0.0000, 0.0000, 90.0003);
- CreateObject(3865, 1454.332642, -1313.624512, 10.869434, 0.0000, 0.0000, 270.0001);
- CreateObject(3865, 1609.789307, -1314.432373, 14.764170, 0.0000, 0.0000, 90.0005);
- CreateObject(3865, 1604.048584, -1314.554688, 14.820707, 0.0000, 0.0000, 270.0005);
- CreateObject(3865, 1714.301636, -1184.646484, 21.046417, 0.0000, 0.0000, 270.0005);
- CreateObject(3865, 1715.294067, -1184.392334, 21.099091, 0.0000, 0.0000, 90.0003);
- CreateObject(3865, 1442.673096, -1160.448242, 21.090176, 0.0000, 0.0000, 180.0006);
- CreateObject(3865, 1442.827393, -1161.364746, 21.117846, 0.0000, 0.0000, 0.0007);
- CreateObject(3865, 1228.913208, -1280.291504, 10.874914, 0.0000, 0.0000, 180.0006);
- CreateObject(3865, 1229.058960, -1281.279053, 10.952602, 0.0000, 0.0000, 0.0004);
- CreateObject(3865, 1062.941406, -1428.453979, 10.770216, 0.0000, 0.0000, 90.0006);
- CreateObject(3865, 1061.890381, -1428.657593, 10.795212, 0.0000, 0.0000, 270.0007);
- CreateObject(3865, 990.221741, -1490.114136, 10.791727, 0.0000, 0.0000, 0.0009);
- CreateObject(3865, 990.003357, -1489.201538, 10.816698, 0.0000, 0.0000, 180.0011);
- CreateObject(3865, 1036.928833, -1626.829834, 10.766735, 0.0000, 0.0000, 270.0007);
- CreateObject(3865, 1037.928345, -1626.630249, 10.716774, 0.0000, 0.0000, 90.0000);
- CreateObject(3865, 1095.737427, -1852.780029, 10.791739, 0.0000, 0.0000, 0.0010);
- CreateObject(3865, 1095.500244, -1851.807861, 10.819412, 0.0000, 0.0000, 180.0009);
- CreateObject(3865, 1492.031982, -1871.860596, 10.716759, 0.0000, 0.0000, 180.0009);
- CreateObject(3865, 1492.196777, -1872.732300, 10.769455, 0.0000, 0.0000, 0.0004);
- //===================
- DisableInteriorEnterExits();
- TextDraw = TextDrawCreate(1.0,433.456,"GameMode criado por: Pedro_Pawno.");
- TextDrawBackgroundColor(TextDraw,0x000000ff);
- TextDrawFont(TextDraw,2);
- TextDrawLetterSize(TextDraw,0.2999, 1.4);
- TextDrawBoxColor(TextDraw,0x00000050);
- TextDrawColor(TextDraw,0xffffffff);
- TextDrawSetOutline(TextDraw,1);
- TextDrawSetProportional(TextDraw,1);
- TextDrawSetShadow(TextDraw,1);
- PickupDeposit = CreatePickup(1274,23,1632.5125,-1169.8737,24.0781);
- PickupShop = CreatePickup(1279,23,2458.6389,-1895.1144,13.5469);
- SetTimer("HP",5000,true);
- return 1;
- }
- public OnGameModeExit()
- {
- TextDrawHideForAll(TextDraw);
- TextDrawDestroy(TextDraw);
- DOF2_Exit();
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- if(classid ==0)
- {
- Gang[playerid] = grove;
- }
- else if(classid ==1)
- {
- Gang[playerid] = grove;
- }
- else if(classid ==2)
- {
- Gang[playerid] = grove;
- }
- else if(classid ==3)
- {
- Gang[playerid] = ballas;
- }
- else if(classid ==4)
- {
- Gang[playerid] = ballas;
- }
- else if(classid ==5)
- {
- Gang[playerid] = ballas;
- }
- else if(classid ==6)
- {
- Gang[playerid] = vagos;
- }
- else if(classid ==7)
- {
- Gang[playerid] = vagos;
- }
- else if(classid ==8)
- {
- Gang[playerid] = vagos;
- }
- else if(classid ==9)
- {
- Gang[playerid] = aztecas;
- }
- else if(classid ==10)
- {
- Gang[playerid] = aztecas;
- }
- else if(classid ==11)
- {
- Gang[playerid] = aztecas;
- }
- SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
- SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
- SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
- SetPlayerFacingAngle(playerid,0.0);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Jogador[playerid] = INVALID_PLAYER_ID;
- Timer = SetTimerEx("TempoJogado", 1000*60, true, "i", playerid);
- new Nome[MAX_PLAYER_NAME],string[128];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- format(string,sizeof(string),"%s entrou no servidor!",Nome);
- scmt(Amarelo,string);
- 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");
- else ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Você ainda não é registrado digite uma senha para se registrar!", "Confirma", "Cancelar");
- TextDrawShowForPlayer(playerid,TextDraw);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new Nome[MAX_PLAYER_NAME],string[128];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- format(string,sizeof(string),"%s saiu do servidor!",Nome);
- scmt(Error,string);
- SalvarContas(playerid);
- TextDrawHideForPlayer(playerid,TextDraw);
- KillTimer(Timer);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(killerid != INVALID_PLAYER_ID)
- SendDeathMessage(playerid, killerid,reason);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(Gang[playerid] == ballas)
- {
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,24,250);
- GivePlayerWeapon(playerid,28,400);
- GivePlayerWeapon(playerid,30,350);
- GivePlayerWeapon(playerid,29,250);
- SetPlayerHealth(playerid,100);
- SetPlayerArmour(playerid,100);
- SetPlayerColor(playerid,Rosa);
- }
- else if(Gang[playerid] == grove)
- {
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,24,250);
- GivePlayerWeapon(playerid,28,400);
- GivePlayerWeapon(playerid,30,350);
- GivePlayerWeapon(playerid,29,250);
- SetPlayerHealth(playerid,100);
- SetPlayerArmour(playerid,100);
- SetPlayerColor(playerid,Verde);
- }
- else if(Gang[playerid] == vagos)
- {
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,24,250);
- GivePlayerWeapon(playerid,28,400);
- GivePlayerWeapon(playerid,30,350);
- GivePlayerWeapon(playerid,29,250);
- SetPlayerHealth(playerid,100);
- SetPlayerArmour(playerid,100);
- SetPlayerColor(playerid,Amarelo);
- }
- else if(Gang[playerid] == aztecas)
- {
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,24,250);
- GivePlayerWeapon(playerid,28,400);
- GivePlayerWeapon(playerid,30,350);
- GivePlayerWeapon(playerid,29,250);
- SetPlayerHealth(playerid,100);
- SetPlayerArmour(playerid,100);
- SetPlayerColor(playerid,Azul);
- }
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- static Name[24];
- GetPlayerName(playerid,Name,24);
- printf("[COMANDOS]: Player %s Digitou | Comando: %s",Name,cmdtext);
- if (!success)
- return scm(playerid,Error,"Comando executado não existe.");
- return true;
- }
- //================Comandos:=====================================================
- CMD:roubardeposito(playerid,params[])
- {
- if(!IsPlayerInRangeOfPoint(playerid,3.0,1632.5125,-1169.8737,24.0781)) return scm(playerid,Error,"Você não está no deposito de dinheiro! (/deposito)");
- {
- 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!");
- SetTimerEx("ComandoKillTempo",50000, false,"i",playerid);
- scm(playerid,Neutra,"Aguarde..");
- }
- return 1;
- }
- CMD:deposito(playerid,params[])
- {
- SetPlayerCheckpoint(playerid,1632.5125,-1169.8737,24.0781,10.0);
- scm(playerid,Neutra,"Vá até o ponto no mapa!");
- return 1;
- }
- CMD:ajudagangue(playerid, params[])
- {
- if(Gang[playerid]!= ballas && Gang[playerid]!= aztecas && Gang[playerid]!= grove && Gang[playerid]!= vagos) return scm(playerid, Error, "Você não é de nenhuma organização!");
- scm(playerid,Neutra,"Comandos:");
- scm(playerid,Neutra,"/shop /resetar /creditos /status /objetivo /radio /tempojogando");
- return 1;
- }
- CMD:radio(playerid,params[])
- {
- if(Gang[playerid]!= ballas && Gang[playerid]!= aztecas && Gang[playerid]!= grove && Gang[playerid]!= vagos) return scm(playerid,Error,"Você não é de nenhuma organização!");
- {
- new str_op[128];
- if(sscanf(params, "s[128]", str_op))
- return SendClientMessage(playerid,Error,"Use: /rádio [mensagem].");
- new player_name[MAX_PLAYER_NAME],
- str_msg[128];
- GetPlayerName(playerid,player_name,MAX_PLAYER_NAME);
- if(Gang[playerid] == ballas)
- {
- format(str_msg,sizeof str_msg,"Rádio ballas: %s %s",player_name,str_op);
- }
- else if(Gang[playerid] == aztecas)
- {
- format(str_msg,sizeof str_msg,"Rádio aztecas: %s %s",player_name,str_op);
- }
- else if(Gang[playerid] == grove)
- {
- format(str_msg,sizeof str_msg,"Rádio grove: %s %s",player_name,str_op);
- }
- else if(Gang[playerid] == vagos)
- {
- format(str_msg,sizeof str_msg,"Rádio vagos: %s %s",player_name,str_op);
- }
- for(new slots = GetMaxPlayers(),i;i<slots; i++)
- scm(i,Neutra,str_msg);
- }
- return 1;
- }
- CMD:objetivo(playerid,params[])
- {
- 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");
- return 1;
- }
- CMD:shop(playerid, params[])
- {
- 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)");
- {
- 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");
- }
- return 1;
- }
- CMD:am(playerid,params[])
- {
- SetPlayerCheckpoint(playerid,2458.6389,-1895.1144,13.5469,10.0);
- scm(playerid,Neutra,"Vá até o ponto no mapa!");
- return 1;
- }
- CMD:creditos(playerid, params[])
- {
- scm(playerid,Neutra,"Créditos: Pedro_Shogun!");
- scm(playerid,Amarelo,"Agradecimentos: Lós e FÓRUM-SAMP.");
- return 1;
- }
- CMD:kill(playerid,params[])
- {
- SetPlayerHealth(playerid,0);
- scm(playerid,Neutra,"Você se matou!");
- return 1;
- }
- CMD:tempojogando(playerid,params[])
- {
- new string[128];
- format(string, sizeof(string), "Você já jogou: %d horas e %d minutos no servidor (neste login).", HorasJogadas [playerid], MinutosJogados[playerid]);
- SendClientMessage(playerid,Amarelo, string);
- return 1;
- }
- CMD:dinheiro(playerid,params[])
- {
- new id,value;
- if(!IsPlayerAdmin(playerid)) return scm(playerid,Error,"Você não é administrador!");
- if(sscanf(params,"dd",id,value)) return scm(playerid,Neutra,"Uso correto: /dinheiro [id]");
- GivePlayerMoney(id,(id) +value);
- return 1;
- }
- CMD:darvida(playerid,params[])
- {
- new vida, colete, id;
- if(!IsPlayerAdmin(playerid)) return scm(playerid,Error,"Você não é administrador!");
- {
- scm(playerid,Neutra,"Você setou a vida de um player");
- }
- if(sscanf(params,"dd",vida,id)) return scm(playerid,Neutra,"Uso correto: /darvida [id] [vida] [colete]");
- SetPlayerHealth(vida,id);
- SetPlayerArmour(colete,id);
- scm(playerid,-1,"Sua vida foi setada!");
- return 1;
- }
- CMD:anuncio(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return scm(playerid,Error, "Você não é administrador!");
- if(isnull(params)) return scm(playerid,Neutra, "Use: /anuncio [mensagem]");
- new Nome[20], pStr[128];
- GetPlayerName(playerid, Nome, 20);
- format (pStr, 128, "Administrador %s: %s", Nome, params);
- SendClientMessageToAll(Error, pStr);
- return true;
- }
- CMD:comandosadm(playerid,params[])
- {
- if(!IsPlayerAdmin(playerid)) return scm(playerid,Error,"Você não é administrador!");
- scm(playerid,Neutra,"Comandos:");
- scm(playerid,Amarelo,"/darvida /anuncio /anuncio /dinheiro");
- return 1;
- }
- CMD:admins(playerid,params[])
- {
- new Jogado5[24];
- new count = 0;
- new msg[120];
- scm(playerid,Amarelo,"Administradores online:");
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && IsPlayerAdmin(i))
- {
- GetPlayerName(i,Jogador,24);
- scm(playerid,Amarelo,"Administradores:");
- format(msg,sizeof(msg),"%s", Jogado5);
- SendClientMessage(playerid, 0x000FFFAA, msg);
- count++;
- }
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if (dialogid == DIALOG)
- {
- if (response)
- {
- if (listitem == 0)
- {
- if (GetPlayerMoney(playerid) < 1500) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
- GivePlayerWeapon(playerid, 31, 250);
- GivePlayerMoney(playerid, -1500);
- }
- else if (listitem == 1)
- {
- if (GetPlayerMoney(playerid) < 800) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
- GivePlayerWeapon(playerid, 25, 350);
- GivePlayerMoney(playerid, -800);
- }
- else if (listitem == 2)
- {
- if (GetPlayerMoney(playerid) < 600) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
- GivePlayerWeapon(playerid, 22, 125);
- GivePlayerMoney(playerid, 600);
- }
- else if (listitem == 3)
- {
- if (GetPlayerMoney(playerid) < 2000) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
- GivePlayerWeapon(playerid, 27, 250);
- GivePlayerMoney(playerid, -2000);
- }
- else if (listitem == 4)
- {
- if (GetPlayerMoney(playerid) < 300) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
- SetPlayerArmour(playerid, 100);
- GivePlayerMoney(playerid, -300);
- }
- else if (listitem == 5)
- {
- if (GetPlayerMoney(playerid) < 1200) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
- GivePlayerWeapon(playerid, 16, 5);
- GivePlayerMoney(playerid, -1200);
- }
- else if (listitem == 6)
- {
- if (GetPlayerMoney(playerid) < 1150) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
- GivePlayerWeapon(playerid, 17, 15);
- GivePlayerMoney(playerid, -1150);
- }
- else if (listitem == 7)
- {
- if (GetPlayerMoney(playerid) < 1000) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
- GivePlayerWeapon(playerid, 18, 10);
- GivePlayerMoney(playerid, -1000);
- }
- else if (listitem == 8)
- {
- if (GetPlayerMoney(playerid) < 2800) return scm(playerid, Error, "Você não tem dinheiro suficiente para comprar o item!");
- GivePlayerWeapon(playerid, 34, 50);
- GivePlayerMoney(playerid, -2800);
- return 1;
- }
- }
- }
- if(dialogid == DIALOG_REGISTRO)
- {
- 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");
- if(!response) return Kick(playerid);
- else
- {
- Player[playerid][Senha] = strval(inputtext);
- SalvarContas(playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Você se cadastrou, agora é só logar com sua senha registrada!", "Confirma", "Cancelar");
- }
- }
- if(dialogid == DIALOG_LOGAR)
- {
- 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");
- if(!response) return Kick(playerid);
- else
- {
- Player[playerid][Senha] = DOF2_GetInt(Contas(playerid), "Senha");
- if(strval(inputtext) == Player[playerid][Senha])
- {
- Player[playerid][Matou] = DOF2_GetInt(Contas(playerid), "Matou");
- Player[playerid][Morreu] = DOF2_GetInt(Contas(playerid), "Morreu");
- Player[playerid][Dinheiro] = DOF2_GetInt(Contas(playerid), "Dinheiro");
- GivePlayerMoney(playerid, Player[playerid][Dinheiro]);
- }
- else
- {
- 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");
- Erro[playerid]++;
- if(Erro[playerid] == 5)
- {
- scm(playerid, Neutra, "Sua conta está banida por errar 5 vezes a sua senha.");
- Ban(playerid);
- }
- }
- }
- }
- if(dialogid == 9752 && response)
- {
- new string[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid,nome,sizeof(nome));
- format(string, sizeof(string), "» Mensagem Particular de %s: %s.",nome, inputtext);
- SendClientMessage(Jogador[playerid], Amarelo, string);
- SendClientMessage(playerid, Verde, "» Sua Mensagem foi enviada.");
- Jogador[playerid] = INVALID_PLAYER_ID;
- return 1;
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new carro = GetPlayerVehicleID(playerid);
- for (new i = 0; i < sizeof(CarroA); i++)
- if (carro == CarroA[i]) if (Gang[playerid] != aztecas) RemovePlayerFromVehicle(playerid);
- for (new i = 0; i < sizeof(CarroG); i++)
- if (carro == CarroG[i]) if (Gang[playerid] != grove) RemovePlayerFromVehicle(playerid);
- for (new i = 0; i < sizeof(CarroV); i++)
- if (carro == CarroV[i]) if (Gang[playerid] != vagos) RemovePlayerFromVehicle(playerid);
- for (new i = 0; i < sizeof(CarroB); i++)
- if (carro == CarroB[i]) if (Gang[playerid] != ballas) RemovePlayerFromVehicle(playerid);
- }
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == PickupShop)
- {
- scm(playerid,Amarelo,"Local tráfico.");
- }
- if(pickupid == PickupDeposit)
- {
- scm(playerid,Amarelo,"Deposito de armas.");
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- if(playerid == clickedplayerid) return SendClientMessage(playerid, Error, "Você não pode enviar mensagens para si mesmo!");
- ShowPlayerDialog(playerid, 9752, DIALOG_STYLE_INPUT, "Mensagem Pessoal","Escreva uma mensagem para o player.","Enviar","Fechar");
- Jogador[playerid] = PlayerClicado;
- return 1;
- }
- public ComandoKillTempo(playerid)
- {
- GivePlayerMoney(playerid, 2500);
- scm(playerid, Neutra, "Dinheiro roubado!");
- return 1;
- }
- stock Contas(playerid)
- {
- new arquivo[40], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, 32);
- format(arquivo, 40, "Contas/%s.ini", name);
- return arquivo;
- }
- stock SalvarContas(playerid)
- {
- if(!DOF2_FileExists(Contas(playerid))) DOF2_CreateFile(Contas(playerid));
- {
- Player[playerid][Dinheiro] = GetPlayerMoney(playerid);
- DOF2_SetInt(Contas(playerid), "Senha", Player[playerid][Senha]);
- DOF2_SetInt(Contas(playerid), "Matou", Player[playerid][Matou]);
- DOF2_SetInt(Contas(playerid), "Morreu", Player[playerid][Morreu]);
- DOF2_SetInt(Contas(playerid), "Dinheiro", Player[playerid][Dinheiro]);
- DOF2_SaveFile();
- }
- return 1;
- }
- forward TempoJogado(playerid);
- public TempoJogado(playerid)
- {
- MinutosJogados[playerid] ++;
- if(MinutosJogados[playerid] == 60)
- {
- HorasJogadas[playerid] ++;
- MinutosJogados[playerid] = 0;
- return 1;
- }
- return 1;
- }
- stock GetTempoJogado(playerid)
- {
- new string[16];
- format(string, sizeof(string), "%d:%d", HorasJogados[playerid], MinutosJogados[playerid]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement