Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* I don't fuckin know what this is gonna be
- Started March 1st, 2018 4:13 PM CST
- you're mom gay*/
- #include <a_samp>
- #include <zcmd>
- #include <YSI\y_ini>
- #include <streamer>
- #include <mGates>
- #include <sscanf2>
- //Colors
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_BLACK 0x000000FF
- #define COLOR_RED 0xFF0000FF
- #define COLOR_BROWN 0x800000FF
- #define COLOR_LIME 0x00FF00FF
- #define COLOR_GREEN 0x008000FF
- #define COLOR_CYAN 0x00FFFFFF
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_BLUE 0x0000FFFF
- #define COLOR_ORANGE 0xFF8000FF
- #define COLOR_PINK 0xFF00FFFF
- #define COLOR_PURPLE 0x8000FFFF
- //Gay shit
- #define PATH "/Users/%s.ini"
- //Dialogs
- #define DIALOG_REGISTER 800
- #define DIALOG_LOGIN 801
- #define DIALOG_SUCCESS_1 802
- #define DIALOG_SUCCESS_2 803
- #define DIALOG_TEAM_SELECTION 804
- #define DIALOG_SELECT_WEAPONS_CATEGORY 805
- #define DIALOG_ADM_WEAPONS_MELEE 806
- #define DIALOG_ADM_WEAPONS_THROWN 807
- #define DIALOG_ADM_WEAPONS_PISTOLS 808
- #define DIALOG_ADM_WEAPONS_SHOTGUNS 809
- #define DIALOG_ADM_WEAPONS_SMGS 810
- #define DIALOG_ADM_WEAPONS_ASSAULT_RIFLES 811
- #define DIALOG_ADM_WEAPONS_RIFLES 812
- #define DIALOG_ADM_WEAPONS_HEAVY 813
- //Teams
- #define TEAM_USA 5000
- #define TEAM_CANADA 5001
- #define TEAM_BRITAIN 5002
- #define TEAM_AUSTRALIA 5003
- #define TEAM_RUSSIA 5004
- #define TEAM_GERMANY 5005
- #define TEAM_ITALY 5006
- #define TEAM_FRANCE 5007
- #define TEAM_CHINA 5008
- #define TEAM_INDIA 5009
- #define COLOR_USA 0x0000FFFF
- #define COLOR_CANADA 0x008000FF
- #define COLOR_BRITAIN 0xFF0000FF
- #define COLOR_AUSTRALIA 0x0080FFFF
- #define COLOR_RUSSIA 0x800000FF
- #define COLOR_GERMANY 0xFFFF00FF
- #define COLOR_ITALY 0x408080FF
- #define COLOR_FRANCE 0x80FF80FF
- #define COLOR_CHINA 0xFF8000FF
- #define COLOR_INDIA 0x0080C0FF
- #define COLOR_USA_EMBED "{0000FF}"
- #define COLOR_CANADA_EMBED "{008000}"
- #define COLOR_BRITAIN_EMBED "{FF0000}"
- #define COLOR_AUSTRALIA_EMBED "{0080FF}"
- #define COLOR_RUSSIA_EMBED "{800000}"
- #define COLOR_GERMANY_EMBED "{408080}"
- #define COLOR_ITALY_EMBED "{80FF80}"
- #define COLOR_FRANCE_EMBED "{0080C0}"
- #define COLOR_CHINA_EMBED "{FFFF00}"
- #define COLOR_INDIA_EMBED "{FF8000}"
- //Player data
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- pDeaths,
- pVIP,
- pXP,
- pLevel,
- pLevelName[64],
- pTeam
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- //Gates
- new GATE_ADMIN_HOUSE1;
- new GATE_ADMIN_HOUSE2;
- new GATE_INDIA1;
- new GATE_INDIA2;
- new GATE_INDIA3;
- //zone stuff
- #define MAX_ZONES 50
- new CP[30];
- new Zone[30];
- new tCheck[30];
- new zDefine[MAX_PLAYERS];
- new UnderAttack[30];
- new timer[MAX_PLAYERS][30];
- new zones[MAX_ZONES];
- new Float:zones_points_0[] = {
- 15.0,-218.0,-29.0,-213.0,-9.0,-215.0,-61.0,-210.0,-91.0,-206.0,-125.0,-200.0,-186.0,-187.0,-236.0,-176.0,-251.0,-215.0,-250.0,-249.0,
- -226.0,-283.0,-188.0,-325.0,-150.0,-364.0,-116.0,-390.0,-82.0,-396.0,17.0,-396.0,16.0,-310.0,17.0,-254.0,17.0,-218.0,15.0,-218.0
- };
- new Float:zones_points_1[] = {
- 17.0,-219.0,17.0,-345.0,118.0,-345.0,204.0,-346.0,200.0,-336.0,198.0,-327.0,197.0,-315.0,197.0,-292.0,185.0,-291.0,178.0,-285.0,
- 173.0,-278.0,172.0,-270.0,171.0,-222.0,17.0,-219.0
- };
- new Float:zones_points_2[] = {
- -303.0,-138.0,-305.0,-119.0,-304.0,-104.0,-302.0,-86.0,-298.0,-83.0,-297.0,-63.0,-298.0,-53.0,-295.0,-35.0,-284.0,7.0,-272.0,48.0,
- -254.0,89.0,-244.0,123.0,-237.0,129.0,-231.0,146.0,-231.0,152.0,-210.0,196.0,-203.0,210.0,-204.0,217.0,-198.0,230.0,-160.0,222.0,
- -119.0,209.0,-94.0,201.0,-67.0,189.0,-36.0,173.0,-12.0,159.0,24.0,137.0,69.0,109.0,108.0,86.0,116.0,49.0,123.0,39.0,
- 123.0,26.0,124.0,10.0,120.0,-1.0,117.0,-54.0,115.0,-114.0,112.0,-148.0,80.0,-148.0,77.0,-202.0,-2.0,-197.0,-58.0,-190.0,
- -135.0,-181.0,-210.0,-165.0,-258.0,-155.0,-303.0,-138.0
- };
- new Float:zones_points_3[] = {
- -623.0, -563.0, -467.0, -467.0
- };
- new Float:zones_points_4[] = {
- -1126.0,-589.0,-1126.0,-758.0,-1001.0,-758.0,-973.0,-720.0,-972.0,-622.0,-1003.0,-589.0,-1126.0,-589.0
- };
- new Float:zones_points_5[] = {
- -1732.0,-593.0,-1733.0,-615.0,-1625.0,-695.0,-1227.0,-696.0,-1227.0,-552.0,-1193.0,-522.0,-1159.0,-484.0,-1137.0,-447.0,-1121.0,-402.0,-1116.0,-352.0,
- -1118.0,-325.0,-1119.0,-304.0,-1240.0,-318.0,-1331.0,-345.0,-1329.0,-368.0,-1379.0,-372.0,-1380.0,-386.0,-1385.0,-415.0,-1393.0,-436.0,-1402.0,-450.0,
- -1417.0,-466.0,-1432.0,-477.0,-1448.0,-487.0,-1484.0,-497.0,-1529.0,-509.0,-1599.0,-537.0,-1631.0,-548.0,-1661.0,-558.0,-1669.0,-568.0,-1689.0,-584.0,
- -1710.0,-592.0,-1732.0,-593.0
- };
- new Float:zones_points_6[] = {
- -1040.0,494.0,-1307.0,226.0,-1508.0,25.0,-1434.0,-124.0,-1406.0,-132.0,-1379.0,-144.0,-1388.0,-167.0,-1404.0,-205.0,-1416.0,-233.0,-1399.0,-244.0,
- -1384.0,-257.0,-1371.0,-268.0,-1358.0,-283.0,-1348.0,-300.0,-1261.0,-262.0,-1252.0,-281.0,-1245.0,-298.0,-1240.0,-317.0,-1119.0,-303.0,-1124.0,-276.0,
- -1133.0,-242.0,-1078.0,-219.0,-1092.0,-187.0,-1103.0,-161.0,-1128.0,-122.0,-1147.0,-97.0,-1175.0,-64.0,-1211.0,-28.0,-1153.0,30.0,-1243.0,121.0,
- -1185.0,179.0,-1227.0,224.0,-999.0,454.0,-1040.0,494.0
- };
- new Float:zones_points_7[] = {
- -1510.0,24.0,-1435.0,-126.0,-1461.0,-215.0,-1483.0,-212.0,-1488.0,-262.0,-1510.0,-264.0,-1529.0,-268.0,-1558.0,-281.0,-1582.0,-301.0,-1594.0,-318.0,
- -1605.0,-336.0,-1611.0,-366.0,-1617.0,-390.0,-1628.0,-420.0,-1637.0,-446.0,-1654.0,-484.0,-1663.0,-508.0,-1673.0,-545.0,-1689.0,-554.0,-1699.0,-560.0,
- -1713.0,-564.0,-1737.0,-565.0,-1736.0,-253.0,-1732.0,-227.0,-1721.0,-197.0,-1704.0,-172.0,-1686.0,-151.0,-1510.0,24.0
- };
- new Float:zones_points_8[] = {
- 385.0,797.0,429.0,783.0,454.0,771.0,479.0,761.0,507.0,744.0,526.0,731.0,527.0,724.0,537.0,715.0,562.0,715.0,576.0,714.0,
- 641.0,700.0,767.0,735.0,794.0,774.0,827.0,803.0,787.0,941.0,739.0,994.0,685.0,1021.0,530.0,1016.0,503.0,999.0,417.0,962.0,
- 391.0,922.0,351.0,936.0,312.0,955.0,286.0,934.0,297.0,880.0,313.0,844.0,349.0,817.0,385.0,797.0
- };
- new Float:zones_points_9[] = {
- -2699.0,1507.0,-2699.0,1581.0,-2711.0,1590.0,-2710.0,1601.0,-2701.0,1610.0,-2698.0,1920.0,-2708.0,1928.0,-2710.0,1938.0,-2701.0,1950.0,-2698.0,2065.0,
- -2700.0,2166.0,-2667.0,2168.0,-2664.0,1947.0,-2654.0,1941.0,-2656.0,1925.0,-2665.0,1920.0,-2665.0,1607.0,-2656.0,1603.0,-2654.0,1589.0,-2664.0,1583.0,
- -2662.0,1506.0,-2699.0,1507.0
- };
- new Float:zones_points_10[] = {
- -2325.0, -2600.0, -1925.0, -2199.0
- };
- new Float:zones_points_11[] = {
- -2678.0,-2013.0,-2692.0,-2041.0,-2681.0,-2094.0,-2648.0,-2171.0,-2635.0,-2192.0,-2611.0,-2191.0,-2514.0,-2137.0,-2264.0,-2133.0,-2153.0,-2037.0,-2153.0,-2037.0,
- -2127.0,-2003.0,-2085.0,-1917.0,-2082.0,-1870.0,-2057.0,-1817.0,-2027.0,-1796.0,-1995.0,-1716.0,-1984.0,-1712.0,-1960.0,-1638.0,-1939.0,-1623.0,-1917.0,-1588.0,
- -1916.0,-1561.0,-1942.0,-1525.0,-1954.0,-1450.0,-2061.0,-1349.0,-2112.0,-1267.0,-2151.0,-1223.0,-2193.0,-1220.0,-2272.0,-1139.0,-2280.0,-1097.0,-2333.0,-1036.0,
- -2419.0,-981.0,-2510.0,-970.0,-2580.0,-969.0,-2664.0,-1037.0,-2734.0,-1069.0,-2897.0,-1222.0,-2911.0,-1477.0,-2897.0,-1593.0,-2881.0,-1697.0,-2847.0,-1795.0,
- -2865.0,-1829.0,-2899.0,-1851.0,-2878.0,-1912.0,-2789.0,-1987.0,-2734.0,-1949.0,-2703.0,-1946.0,-2678.0,-2013.0
- };
- new Float:zones_points_12[] = {
- -1949.0,-1796.0,-1947.0,-1788.0,-1942.0,-1760.0,-1941.0,-1745.0,-1940.0,-1736.0,-1940.0,-1636.0,-1908.0,-1633.0,-1907.0,-1501.0,-1813.0,-1572.0,-1758.0,-1601.0,
- -1738.0,-1615.0,-1725.0,-1649.0,-1746.0,-1658.0,-1767.0,-1669.0,-1870.0,-1740.0,-1909.0,-1763.0,-1949.0,-1796.0
- };
- new Float:zones_points_13[] = {
- -1683.0, -2291.0, -1583.0, -2191.0
- };
- new Float:zones_points_14[] = {
- -2163.0,-709.0,-2163.0,-1010.0,-1918.0,-1008.0,-1920.0,-731.0,-1923.0,-712.0,-2163.0,-709.0
- };
- new Float:zones_points_15[] = {
- 1430.0,-1592.0,1530.0,-1591.0,1530.0,-1733.0,1429.0,-1732.0,1430.0,-1592.0
- };
- new Float:zones_points_16[] = {
- 1863.0,-1251.0,1861.0,-1192.0,1871.0,-1186.0,1876.0,-1171.0,1873.0,-1147.0,2056.0,-1148.0,2057.0,-1251.0,1863.0,-1251.0
- };
- new Float:zones_points_17[] = {
- -426.0,1513.0,-414.0,1497.0,-409.0,1451.0,-338.0,1312.0,-338.0,1293.0,-292.0,1292.0,-286.0,1327.0,-256.0,1370.0,-201.0,1373.0,-186.0,1383.0,
- -180.0,1398.0,-182.0,1421.0,-192.0,1438.0,-175.0,1465.0,-164.0,1491.0,-184.0,1524.0,-185.0,1553.0,-202.0,1577.0,-223.0,1593.0,-243.0,1600.0,
- -259.0,1617.0,-263.0,1636.0,-274.0,1639.0,-290.0,1648.0,-311.0,1642.0,-329.0,1649.0,-343.0,1662.0,-372.0,1660.0,-391.0,1647.0,-393.0,1633.0,
- -417.0,1609.0,-422.0,1603.0,-425.0,1580.0,-419.0,1560.0,-419.0,1540.0,-426.0,1513.0
- };
- new Float:zones_points_18[] = {
- -105.0,1335.0,-110.0,1382.0,-84.0,1387.0,-38.0,1404.0,-9.0,1411.0,9.0,1409.0,29.0,1397.0,44.0,1391.0,47.0,1379.0,46.0,1348.0,
- 38.0,1329.0,13.0,1325.0,-31.0,1331.0,-78.0,1338.0,-105.0,1335.0
- };
- new Float:zones_points_19[] = {
- 110.0,1335.0,111.0,1483.0,286.0,1485.0,287.0,1420.0,292.0,1417.0,346.0,1417.0,340.0,1401.0,336.0,1406.0,293.0,1405.0,288.0,1401.0,
- 288.0,1338.0,110.0,1335.0
- };
- new Float:zones_points_20[] = {
- 451.0,1621.0,726.0,1532.0,722.0,1456.0,711.0,1407.0,700.0,1380.0,675.0,1354.0,555.0,1278.0,501.0,1243.0,454.0,1226.0,392.0,1216.0,
- 340.0,1218.0,307.0,1224.0,284.0,1230.0,305.0,1251.0,322.0,1286.0,345.0,1370.0,368.0,1444.0,393.0,1534.0,410.0,1580.0,428.0,1599.0,
- 451.0,1621.0
- };
- new Float:zones_points_21[] = {
- -44.0,2359.0,-7.0,2359.0,-7.0,2326.0,-15.0,2321.0,-26.0,2319.0,-44.0,2319.0,-44.0,2359.0
- };
- new Float:zones_points_22[] = {
- 443.0,2553.0,395.0,2603.0,391.0,2617.0,305.0,2666.0,172.0,2663.0,93.0,2588.0,-79.0,2526.0,-77.0,2479.0,84.0,2390.0,349.0,2384.0,
- 431.0,2433.0,443.0,2553.0
- };
- new Float:zones_points_23[] = {
- -816.0,1804.0,-824.0,1816.0,-827.0,1833.0,-830.0,1870.0,-849.0,1871.0,-851.0,1879.0,-842.0,1883.0,-835.0,1899.0,-836.0,1917.0,-851.0,1927.0,
- -894.0,1946.0,-907.0,1981.0,-944.0,2028.0,-926.0,2043.0,-884.0,2023.0,-857.0,2043.0,-832.0,2061.0,-806.0,2074.0,-777.0,2084.0,-779.0,2089.0,
- -785.0,2089.0,-792.0,2095.0,-791.0,2102.0,-786.0,2106.0,-786.0,2131.0,-790.0,2134.0,-792.0,2139.0,-790.0,2148.0,-782.0,2150.0,-776.0,2148.0,
- -772.0,2142.0,-775.0,2133.0,-779.0,2131.0,-779.0,2106.0,-773.0,2100.0,-774.0,2091.0,-769.0,2086.0,-750.0,2091.0,-719.0,2094.0,-696.0,2095.0,
- -665.0,2092.0,-660.0,2099.0,-661.0,2107.0,-655.0,2112.0,-655.0,2136.0,-661.0,2139.0,-661.0,2149.0,-654.0,2156.0,-646.0,2154.0,-642.0,2150.0,
- -642.0,2141.0,-648.0,2136.0,-649.0,2112.0,-642.0,2106.0,-641.0,2100.0,-649.0,2094.0,-656.0,2094.0,-658.0,2091.0,-632.0,2084.0,-604.0,2074.0,
- -577.0,2061.0,-551.0,2045.0,-529.0,2028.0,-551.0,1988.0,-566.0,1981.0,-579.0,1954.0,-584.0,1926.0,-586.0,1912.0,-594.0,1889.0,-601.0,1865.0,
- -602.0,1839.0,-605.0,1827.0,-610.0,1811.0,-635.0,1817.0,-635.0,1837.0,-633.0,1847.0,-601.0,1980.0,-629.0,1996.0,-674.0,2012.0,-725.0,2012.0,
- -781.0,1996.0,-823.0,1971.0,-797.0,1833.0,-798.0,1807.0,-816.0,1804.0
- };
- new zones_text[MAX_ZONES][64] = {
- "Blueberry Brewery Factory",
- "Blueberry Truck Depot",
- "Blueberry - Easterboard farm",
- "Fallen Tree Freight Depot",
- "Easter Bay Chemicals",
- "Southern Easter Bay Airport",
- "Northern Easter Bay Airport",
- "Southern Easter Bay Airport",
- "Quarry",
- "Gant Bridge",
- "Angel Pine",
- "Mt. Chilliad",
- "Angel Pine Junkyard",
- "Shady Cabin",
- "Foster Valley",
- "Pershing Square",
- "Glen Park",
- "Satellite Dish",
- "Lil' Probe'Inn",
- "Green Palms",
- "Octane Springs",
- "Snake Farm",
- "Abandoned Airport",
- "Sherman Dam"
- };
- #define ZONE_BREWERY_FACTORY 0
- main()
- {
- print("\n----------------------------------");
- print(" Maude Team Deathmatch");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- SetGameModeText("MAUDE TDM 1.0");
- DisableInteriorEnterExits();
- //Zones
- CP[ZONE_BREWERY_FACTORY] = CreateDynamicCP(69.4977,-286.5929,1.5781, 5);
- Zone[ZONE_BREWERY_FACTORY] = CreateDynamicPolygon(zones_points_0);
- //Gates
- GATE_ADMIN_HOUSE1 = CreateAutomaticGate(980, 1491.3000000,-699.9000200,96.5000000, 0.0000000,0.0000000,180.0000000, 1480.8000488281,-699.9000200,96.5000000, 0.000000, 0.0000000, 180.000000, 1497.3116,-701.8853,94.7500, 5.0, 3, 1);
- GATE_ADMIN_HOUSE2 = CreateAutomaticGate(980, 1502.8000000,-699.9000200,96.5000000, 0.000000, 0.0000000, 0.0000000, 1514.3000488281,-699.9000200,96.5000000, 0.000000, 0.000000, 0.000000, 1497.3116,-701.8853,94.7500, 5.0, 3, 1);
- //Admin House
- AddStaticVehicleEx(520,1465.0996000,-688.0996100,95.7000000,270.0000000,-1,-1,15); //Hydra
- AddStaticVehicleEx(425,1523.3000000,-672.7000100,95.6000000,180.0000000,95,10,15); //Hunter
- AddStaticVehicleEx(520,1465.0000000,-675.7999900,95.7000000,270.0000000,-1,-1,15); //Hydra
- AddStaticVehicleEx(520,1465.1000000,-663.4000200,95.7000000,270.0000000,-1,-1,15); //Hydra
- AddStaticVehicleEx(445,1517.1000000,-697.0000000,94.7000000,90.0000000,100,100,15); //Admiral
- AddStaticVehicleEx(445,1517.1000000,-694.2000100,94.7000000,90.0000000,100,100,15); //Admiral
- AddStaticVehicleEx(445,1517.1000000,-691.2999900,94.7000000,90.0000000,100,100,15); //Admiral
- AddStaticVehicleEx(468,1502.7000000,-687.9000200,94.5000000,180.0000000,132,4,15); //Sanchez
- AddStaticVehicleEx(468,1504.0000000,-687.9000200,94.5000000,180.0000000,132,4,15); //Sanchez
- AddStaticVehicleEx(468,1505.4000000,-687.9000200,94.5000000,180.0000000,132,4,15); //Sanchez
- AddStaticVehicleEx(468,1506.9000000,-687.9000200,94.5000000,180.0000000,132,4,15); //Sanchez
- AddStaticVehicleEx(521,1491.7000000,-687.7999900,94.4000000,180.0000000,96,26,15); //FCR-900
- AddStaticVehicleEx(521,1490.5000000,-687.9000200,94.4000000,180.0000000,96,26,15); //FCR-900
- AddStaticVehicleEx(521,1489.0000000,-687.9000200,94.4000000,180.0000000,96,26,15); //FCR-900
- AddStaticVehicleEx(521,1487.6000000,-688.0000000,94.4000000,180.0000000,96,26,15); //FCR-900
- CreateObject(987,1469.5000000,-694.2000100,93.7000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (1)
- CreateObject(987,1457.6000000,-694.2000100,93.7000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (2)
- CreateObject(987,1456.7000000,-694.2000100,93.7000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (3)
- CreateObject(987,1456.6000000,-682.4000200,93.7000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (4)
- CreateObject(987,1456.6000000,-670.4000200,93.7000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (5)
- CreateObject(987,1456.6000000,-658.4000200,93.7000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (6)
- CreateObject(987,1456.6000000,-657.0000000,93.7000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (7)
- CreateObject(987,1468.3000000,-657.2000100,93.7000000,0.0000000,0.0000000,180.0000000); //object(elecfence_bar) (10)
- CreateObject(987,1480.3000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (11)
- CreateObject(987,1492.3000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (12)
- CreateObject(987,1504.2000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (13)
- CreateObject(987,1516.1000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (14)
- CreateObject(987,1528.0000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (15)
- CreateObject(987,1531.0000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (16)
- CreateObject(987,1530.9000000,-669.0999800,93.7000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (18)
- CreateObject(987,1530.9000000,-681.0000000,93.7000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (19)
- CreateObject(987,1530.9000000,-692.9000200,93.7000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (20)
- CreateObject(987,1530.9000000,-699.7999900,93.7000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (21)
- CreateObject(987,1519.0000000,-699.7999900,93.7000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (22)
- CreateObject(987,1508.6000000,-699.7999900,93.7000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (23)
- CreateObject(987,1476.3000000,-694.2999900,93.7000000,0.0000000,0.0000000,330.0000000); //object(elecfence_bar) (25)
- //India base
- AddStaticVehicleEx(432,2795.2998000,-2417.7998000,13.7000000,90.0000000,95,10,15); //Rhino
- AddStaticVehicleEx(433,2777.2998000,-2403.0000000,14.2000000,88.9950000,95,10,15); //Barracks
- AddStaticVehicleEx(433,2777.2998000,-2470.5996000,14.2000000,88.9950000,95,10,15); //Barracks
- AddStaticVehicleEx(470,2757.0000000,-2380.8994000,13.7000000,180.0000000,95,10,15); //Patriot
- AddStaticVehicleEx(520,2796.1001000,-2340.8000000,14.6000000,180.0000000,-1,-1,15); //Hydra
- AddStaticVehicleEx(520,2785.8999000,-2340.8000000,14.6000000,180.0000000,-1,-1,15); //Hydra
- AddStaticVehicleEx(520,2775.7000000,-2340.8000000,14.6000000,180.0000000,-1,-1,15); //Hydra
- AddStaticVehicleEx(520,2765.5000000,-2340.8000000,14.6000000,180.0000000,-1,-1,15); //Hydra
- AddStaticVehicleEx(425,2765.8000000,-2355.2000000,14.5000000,0.0000000,95,10,15); //Hunter
- AddStaticVehicleEx(425,2777.3000000,-2355.2000000,14.5000000,0.0000000,95,10,15); //Hunter
- AddStaticVehicleEx(425,2788.8000000,-2355.2000000,14.5000000,0.0000000,95,10,15); //Hunter
- AddStaticVehicleEx(433,2777.3000000,-2398.5000000,14.2000000,88.9950000,95,10,15); //Barracks
- AddStaticVehicleEx(470,2760.3000000,-2380.8999000,13.7000000,180.0000000,95,10,15); //Patriot
- AddStaticVehicleEx(432,2795.3000000,-2455.8000000,13.7000000,90.0000000,95,10,15); //Rhino
- AddStaticVehicleEx(432,2795.3000000,-2494.5000000,13.7000000,90.0000000,95,10,15); //Rhino
- AddStaticVehicleEx(430,2718.5000000,-2572.0996000,0.0000000,180.0000000,157,152,15); //Predator
- AddStaticVehicleEx(430,2728.3999000,-2583.8000000,0.0000000,90.0000000,157,152,15); //Predator
- AddStaticVehicleEx(473,2736.5000000,-2583.3000000,0.0000000,90.0000000,158,164,15); //Dinghy
- AddStaticVehicleEx(473,2742.0000000,-2583.3000000,0.0000000,90.0000000,158,164,15); //Dinghy
- AddStaticVehicleEx(473,2747.8000000,-2583.3000000,0.0000000,90.0000000,158,164,15); //Dinghy
- AddStaticVehicleEx(473,2753.3000000,-2583.3000000,0.0000000,90.0000000,158,164,15); //Dinghy
- AddStaticVehicleEx(493,2760.5000000,-2583.8000500,0.0000000,270.0000000,37,37,15); //Jetmax
- AddStaticVehicleEx(447,2777.8000000,-2578.0000000,0.6000000,178.0000000,32,32,15); //Seasparrow
- AddStaticVehicleEx(425,2794.8999000,-2553.2000000,14.5000000,0.0000000,95,10,15); //Hunter
- AddStaticVehicleEx(425,2782.3999000,-2553.2000000,14.5000000,0.0000000,95,10,15); //Hunter
- AddStaticVehicleEx(425,2789.2000000,-2534.2000000,14.5000000,0.0000000,95,10,15); //Hunter
- AddStaticVehicleEx(433,2777.3000000,-2479.3999000,14.2000000,89.2450000,95,10,15); //Barracks
- AddStaticVehicleEx(433,2777.3000000,-2508.8999000,14.2000000,89.2420000,95,10,15); //Barracks
- CreateObject(987,2719.7000000,-2379.6001000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (8)
- CreateObject(987,2719.5000000,-2389.3000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (9)
- CreateObject(987,2719.5000000,-2409.8999000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (24)
- CreateObject(987,2719.5000000,-2487.2000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (26)
- CreateObject(987,2719.5000000,-2487.8999000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (27)
- CreateObject(987,2719.5000000,-2508.3000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (28)
- CreateObject(987,2719.5000000,-2510.7000000,16.2000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (29)
- CreateObject(987,2719.5000000,-2341.7000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (30)
- CreateObject(987,2719.5000000,-2330.2000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (31)
- CreateObject(987,2719.5000000,-2544.7000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (32)
- CreateObject(987,2719.5000000,-2556.7000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (33)
- CreateObject(987,2719.8000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (34)
- CreateObject(987,2731.8000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (35)
- CreateObject(987,2742.2000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (36)
- CreateObject(987,2762.8999000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (37)
- CreateObject(987,2774.8000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (38)
- CreateObject(987,2786.7000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (39)
- CreateObject(987,2798.7000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (40)
- CreateObject(11095,2820.8999000,-2435.8999000,11.6000000,0.0000000,0.0000000,271.5000000); //object(stadbridge_sfs) (2)
- CreateObject(987,2810.7000000,-2565.8999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (41)
- CreateObject(987,2810.7000000,-2553.8999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (42)
- CreateObject(987,2810.7000000,-2541.8999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (43)
- CreateObject(987,2810.7000000,-2529.8999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (44)
- CreateObject(987,2810.7000000,-2518.1001000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (45)
- CreateObject(987,2810.7000000,-2506.1001000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (46)
- CreateObject(987,2810.7000000,-2494.2000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (47)
- CreateObject(987,2810.7000000,-2482.3000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (48)
- CreateObject(987,2810.7000000,-2470.3999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (49)
- CreateObject(987,2810.7000000,-2458.5000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (50)
- CreateObject(987,2810.7000000,-2451.1001000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (51)
- CreateObject(987,2810.7000000,-2432.7000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (52)
- CreateObject(987,2810.7000000,-2420.7000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (53)
- CreateObject(987,2810.7000000,-2408.8000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (54)
- CreateObject(987,2810.7000000,-2396.8999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (55)
- CreateObject(987,2810.7000000,-2385.0000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (56)
- CreateObject(987,2810.7000000,-2373.1001000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (57)
- CreateObject(987,2810.7000000,-2361.2000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (58)
- CreateObject(987,2810.7000000,-2349.3000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (59)
- CreateObject(987,2810.7000000,-2341.7000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (61)
- CreateObject(987,2810.8999000,-2330.0000000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (68)
- CreateObject(987,2798.8999000,-2330.1001000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (69)
- CreateObject(987,2786.8999000,-2330.2000000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (70)
- CreateObject(987,2775.0000000,-2330.3000000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (71)
- CreateObject(987,2763.0000000,-2330.3999000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (72)
- CreateObject(987,2751.0000000,-2330.5000000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (73)
- CreateObject(987,2739.0000000,-2330.6001000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (74)
- CreateObject(987,2731.3000000,-2330.7000000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (75)
- GATE_INDIA1 = CreateAutomaticGate(971, 2720.1001000,-2405.3999000,16.1000000,0.0000000,0.0000000,270.0000000, 2720.1001000,-2413.8999023438,16.1000000, 0.000000, 0.0000000, 270.000000, 2719.5498,-2405.3574,13.4668, 20.0, 3, 1);
- GATE_INDIA2 = CreateAutomaticGate(971, 2720.1001000,-2503.8999000,16.1000000,0.0000000,0.0000000,270.0000000, 2720.1001000,-2512.6000976563,16.1000000, 0.000000, 0.000000, 270.000000, 2720.6343,-2503.9419,13.4869, 20.0, 3, 1);
- GATE_INDIA3 = CreateAutomaticGate(971, 2758.3999000,-2565.8000000,15.9000000,0.0000000,0.0000000,0.0000000, 2767.1999511719,-2565.8000000,15.9000000, 0.000000, 0.0000000, 0.000000, 2758.7979,-2565.1077,13.6328, 20.0, 3, 1);
- /*
- Objects converted: 50
- Vehicles converted: 28
- Vehicle models found: 9
- ----------------------
- In the time this conversion took to finish light could have travelled around the world 0.07 times!
- */
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- TogglePlayerSpectating(playerid, 1);
- SpawnPlayerAtTeam(playerid);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new name[MAX_PLAYER_NAME], string[23 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "-| %s has connected to the server |-", name);
- SendClientMessageToAll(COLOR_LIME, string);
- TogglePlayerSpectating(playerid, true);
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","Type your password below to login.","Login","Quit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Registering...","Type your password below to register a new account.","Register","Quit");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new name[MAX_PLAYER_NAME], string[23 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new DisconnectReason[3][] =
- {
- "Timeout/Crash",
- "Quit",
- "Kick/Ban"
- };
- format(string, sizeof(string), "-| %s has left the server (%s) |-", name, DisconnectReason[reason]);
- SendClientMessageToAll(COLOR_YELLOW, string);
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVIP]);
- INI_WriteInt(File,"XP",PlayerInfo[playerid][pXP]);
- INI_WriteInt(File,"Score",PlayerInfo[playerid][pLevel]);
- INI_WriteInt(File,"Team",PlayerInfo[playerid][pTeam]);
- INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
- INI_Close(File);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TogglePlayerSpectating(playerid, false);
- SpawnPlayerAtTeam(playerid);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendDeathMessage(killerid, playerid, reason);
- PlayerInfo[playerid][pDeaths]++;
- if(killerid != INVALID_PLAYER_ID)
- {
- new string1[128];
- new string2[128];
- format(string1, sizeof(string1), "You have been killed by %u!", killerid);
- format(string2, sizeof(string2), "You have killed %u, and received $1000!", playerid);
- SendClientMessage(playerid, COLOR_RED, string1);
- SendClientMessage(killerid, COLOR_LIME, string2);
- PlayerInfo[killerid][pKills]++;
- GivePlayerXP(killerid, 100);
- GivePlayerMoney(killerid, 1000);
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == CP[ZONE_BREWERY_FACTORY])
- {
- new string[128];
- new teamname[128];
- teamname = GetPlayerTeamName(playerid);
- if(tCheck[Zone] == PlayerInfo[playerid][pTeam]) return SendClientMessage(playerid, COLOR_RED,"ERROR: This zone is already captured by your team");
- if(UnderAttack == 1) return SendClientMessage(playerid, COLOR_RED,"ERROR: This zone is already being taken over!");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"ERROR: You cannot capture while in vehicle!");
- UnderAttack[ZONE_BREWERY_FACTORY] = 1;
- timer[playerid][ZONE_BREWERY_FACTORY] = SetTimerEx("SetZone",60000,false,"i", playerid);
- GangZoneFlashForAll(Zone[ZONE_BREWERY_FACTORY],COLOR_RED);
- format(string, sizeof(string), "The Brewery Factory in Blueberry is being taken over by %s", teamname);
- SendClientMessageToAll(COLOR_RED, string);
- zDefine[playerid] = ZONE_BREWERY_FACTORY;
- }
- return 1;
- }
- public OnPlayerLeaveDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == CP[Zone])
- {
- UnderAttack[ZONE_BREWERY_FACTORY] = 0;
- GangZoneStopFlashForAll(Zone[ZONE_BREWERY_FACTORY]);
- KillTimer(timer[playerid][ZONE_BREWERY_FACTORY]);
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch( dialogid )
- {
- case DIALOG_REGISTER:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Cash",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteInt(File,"VIP",0);
- INI_WriteInt(File,"XP",0);
- INI_WriteInt(File,"Level",0);
- INI_Close(File);
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"You have registered, please select your team.",""COLOR_USA_EMBED"United States\n"COLOR_CANADA_EMBED"Canada\n"COLOR_BRITAIN_EMBED"Britain\n"COLOR_AUSTRALIA_EMBED"Australia\n"COLOR_RUSSIA_EMBED"Russia\n"COLOR_CHINA_EMBED"China\n"COLOR_GERMANY_EMBED"Germany\n"COLOR_ITALY_EMBED"Italy\n"COLOR_INDIA_EMBED"India\n"COLOR_FRANCE_EMBED"France","Select","");
- }
- }
- case DIALOG_LOGIN:
- {
- if ( !response ) return Kick ( playerid );
- if( response )
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
- SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"Success!","You have successfully logged in!","Ok","");
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
- TogglePlayerSpectating(playerid, 0);
- SpawnPlayer(playerid);
- SpawnPlayerAtTeam(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
- }
- return 1;
- }
- }
- }
- if(dialogid == DIALOG_TEAM_SELECTION)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_USA);
- case 1: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_CANADA);
- case 2: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_BRITAIN);
- case 3: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_AUSTRALIA);
- case 4: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_RUSSIA);
- case 5: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_GERMANY);
- case 6: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_ITALY);
- case 7: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_FRANCE);
- case 8: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_CHINA);
- case 9: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_INDIA);
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_SELECT_WEAPONS_CATEGORY)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_MELEE,DIALOG_STYLE_LIST,"Select Melee Weapon","Brass Knuckles\nGolf Club\nNightstick\nKnife\nBat\nShovel\nPoolstick\nKatana\nChainsaw\nDildo\nDildo 2\nVibrator\nVibrator 2\nFlowers\nCane\nSpray Can\nFire Extinguisher\nGo Back","Select","Cancel");
- case 1: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_THROWN,DIALOG_STYLE_LIST,"Select Thrown Weapon","Grenade\nTear Gas\nMolotov Cocktail\nGo Back","Select","Cancel");
- case 2: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_PISTOLS,DIALOG_STYLE_LIST,"Select Pistol","9mm\nSilenced 9mm\nDesert Eagle\nGo Back","Select","Cancel");
- case 3: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_SHOTGUNS,DIALOG_STYLE_LIST,"Select Shotgun","Shotgun\nSawnoff Shotgun\nCombat Shotgun\nGo Back","Select","Cancel");
- case 4: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_SMGS,DIALOG_STYLE_LIST,"Select SMG","Micro SMG/Uzi\nMP5\nTec-9\nGo Back","Select","Cancel");
- case 5: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_ASSAULT_RIFLES,DIALOG_STYLE_LIST,"Select Assault Rifle","AK-47\nM4\nGo Back","Select","Cancel");
- case 6: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_RIFLES,DIALOG_STYLE_LIST,"Select Rifle","Country Rifle\nSniper Rifle\nGo Back","Select","Cancel");
- case 7: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_HEAVY,DIALOG_STYLE_LIST,"Select Heavy","RPG\nHS Rocket\nFlamethrower\nMinigun\nGo Back","Select","Cancel");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_ADM_WEAPONS_MELEE)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid,1,9999999);
- case 1: GivePlayerWeapon(playerid,2,9999999);
- case 2: GivePlayerWeapon(playerid,3,9999999);
- case 3: GivePlayerWeapon(playerid,4,9999999);
- case 4: GivePlayerWeapon(playerid,5,9999999);
- case 5: GivePlayerWeapon(playerid,6,9999999);
- case 6: GivePlayerWeapon(playerid,7,9999999);
- case 7: GivePlayerWeapon(playerid,8,9999999);
- case 8: GivePlayerWeapon(playerid,8,9999999);
- case 9: GivePlayerWeapon(playerid,9,9999999);
- case 10: GivePlayerWeapon(playerid,10,9999999);
- case 11: GivePlayerWeapon(playerid,11,9999999);
- case 12: GivePlayerWeapon(playerid,12,9999999);
- case 13: GivePlayerWeapon(playerid,13,9999999);
- case 14: GivePlayerWeapon(playerid,14,9999999);
- case 15: GivePlayerWeapon(playerid,15,9999999);
- case 16: GivePlayerWeapon(playerid,41,9999999);
- case 17: GivePlayerWeapon(playerid,42,9999999);
- case 18: ShowPlayerDialog(playerid,DIALOG_SELECT_WEAPONS_CATEGORY,DIALOG_STYLE_LIST,"Select Weapon Category","Melee\nThrown\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nHeavy","Select","Cancel");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_ADM_WEAPONS_THROWN)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid,16,9999999);
- case 1: GivePlayerWeapon(playerid,17,9999999);
- case 2: GivePlayerWeapon(playerid,18,9999999);
- case 3: ShowPlayerDialog(playerid,DIALOG_SELECT_WEAPONS_CATEGORY,DIALOG_STYLE_LIST,"Select Weapon Category","Melee\nThrown\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nHeavy","Select","Cancel");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_ADM_WEAPONS_PISTOLS)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid,22,9999999);
- case 1: GivePlayerWeapon(playerid,23,9999999);
- case 2: GivePlayerWeapon(playerid,24,9999999);
- case 3: ShowPlayerDialog(playerid,DIALOG_SELECT_WEAPONS_CATEGORY,DIALOG_STYLE_LIST,"Select Weapon Category","Melee\nThrown\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nHeavy","Select","Cancel");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_ADM_WEAPONS_SHOTGUNS)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid,25,9999999);
- case 1: GivePlayerWeapon(playerid,26,9999999);
- case 2: GivePlayerWeapon(playerid,27,9999999);
- case 3: ShowPlayerDialog(playerid,DIALOG_SELECT_WEAPONS_CATEGORY,DIALOG_STYLE_LIST,"Select Weapon Category","Melee\nThrown\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nHeavy","Select","Cancel");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_ADM_WEAPONS_SMGS)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid,28,9999999);
- case 1: GivePlayerWeapon(playerid,29,9999999);
- case 2: GivePlayerWeapon(playerid,32,9999999);
- case 3: ShowPlayerDialog(playerid,DIALOG_SELECT_WEAPONS_CATEGORY,DIALOG_STYLE_LIST,"Select Weapon Category","Melee\nThrown\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nHeavy","Select","Cancel");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_ADM_WEAPONS_ASSAULT_RIFLES)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid,30,9999999);
- case 1: GivePlayerWeapon(playerid,31,9999999);
- case 2: ShowPlayerDialog(playerid,DIALOG_SELECT_WEAPONS_CATEGORY,DIALOG_STYLE_LIST,"Select Weapon Category","Melee\nThrown\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nHeavy","Select","Cancel");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_ADM_WEAPONS_RIFLES)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid,33,9999999);
- case 1: GivePlayerWeapon(playerid,34,9999999);
- case 2: ShowPlayerDialog(playerid,DIALOG_SELECT_WEAPONS_CATEGORY,DIALOG_STYLE_LIST,"Select Weapon Category","Melee\nThrown\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nHeavy","Select","Cancel");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_ADM_WEAPONS_HEAVY)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid,35,9999999);
- case 1: GivePlayerWeapon(playerid,36,9999999);
- case 2: GivePlayerWeapon(playerid,37,9999999);
- case 3: GivePlayerWeapon(playerid,38,9999999);
- case 4: ShowPlayerDialog(playerid,DIALOG_SELECT_WEAPONS_CATEGORY,DIALOG_STYLE_LIST,"Select Weapon Category","Melee\nThrown\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nHeavy","Select","Cancel");
- }
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public OnPlayerRequestGate(playerid, gateid)
- {
- //return 0 means cannot pass, return 1 means can
- if((gateid == GATE_ADMIN_HOUSE1) && (PlayerInfo[playerid][pAdmin] < 1)) return 0;
- if((gateid == GATE_ADMIN_HOUSE2) && (PlayerInfo[playerid][pAdmin] < 1)) return 0;
- if((gateid == GATE_INDIA1) && (PlayerInfo[playerid][pTeam] != TEAM_INDIA)) return 0;
- if((gateid == GATE_INDIA2) && (PlayerInfo[playerid][pTeam] != TEAM_INDIA)) return 0;
- if((gateid == GATE_INDIA3) && (PlayerInfo[playerid][pTeam] != TEAM_INDIA)) return 0;
- return 1;
- }
- public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
- {
- SetPlayerPosFindZ(playerid, fX, fY, fZ);
- return 1;
- }
- /*////////////////////////////////////
- COMMANDS
- *//////////////////////////////////////
- CMD:changeteam(playerid, params[])
- {
- ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"You have registered, please select your team.",""COLOR_USA_EMBED"United States\n"COLOR_CANADA_EMBED"Canada\n"COLOR_BRITAIN_EMBED"Britain\n"COLOR_AUSTRALIA_EMBED"Australia\n"COLOR_RUSSIA_EMBED"Russia\n"COLOR_CHINA_EMBED"China\n"COLOR_GERMANY_EMBED"Germany\n"COLOR_ITALY_EMBED"Italy\n"COLOR_INDIA_EMBED"India\n"COLOR_FRANCE_EMBED"France","Select","");
- return 1;
- }
- CMD:setadmin(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 4)
- {
- new log[128];
- new id;
- new asetlevel;
- new name[24];
- GetPlayerName(playerid, name, sizeof(name));
- if(sscanf(params, "ud", id, asetlevel)) SendClientMessage(playerid, COLOR_RED, "USAGE: /setadmin [playerid] [level]");
- else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "ERROR: Player not found.");
- else if((PlayerInfo[id][pAdmin] >= PlayerInfo[playerid][pAdmin]) && !IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "ERROR: You cannot use this command on admins that are of equal or higher rank than you.");
- else if((playerid == id) && !IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "ERROR: You cannot use this command on yourself.");
- else
- {
- new name2[24];
- new string1[128];
- new string2[128];
- GetPlayerName(id, name2, sizeof(name2));
- PlayerInfo[id][pAdmin] = asetlevel;
- format(string1, sizeof(string1), "-| You have set %s's admin level to %d |-", name2, asetlevel);
- format(string2, sizeof(string2), "-| Your admin level has been set to %d by %s |-", asetlevel, name);
- SendClientMessage(playerid, COLOR_GREEN, string1);
- SendClientMessage(id, COLOR_GREEN, string2);
- format(log, sizeof(log), "[ADMIN LOG] %s(%i) used /setadmin on %s(%i), setting their admin level to %i", name, playerid, name2, id, asetlevel);
- SendAdminMessage(COLOR_GREEN, log);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must have admin level 4 or higher to use this command.");
- }
- return 1;
- }
- CMD:adminhouse(playerid, params[])
- {
- new log[128];
- new name[24];
- GetPlayerName(playerid, name, sizeof(name));
- if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
- {
- SetPlayerPos(playerid, 1498.8534,-703.7729,94.7439);
- SetPlayerFacingAngle(playerid, 7.6887);
- SetCameraBehindPlayer(playerid);
- format(log, sizeof(log), "[ADMIN LOG] %s(%i) teleported to the admin house", name, playerid);
- SendAdminMessage(COLOR_GREEN, log);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an admin to use this command.");
- }
- return 1;
- }
- CMD:closeadmingate(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
- {
- CloseGate(GATE_ADMIN_HOUSE1);
- CloseGate(GATE_ADMIN_HOUSE2);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an admin to use this command.");
- }
- return 1;
- }
- CMD:openadmingate(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
- {
- OpenGate(GATE_ADMIN_HOUSE1);
- OpenGate(GATE_ADMIN_HOUSE2);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an admin to use this command.");
- }
- return 1;
- }
- CMD:stats(playerid, params[])
- {
- new name[24], string1[128], string2[128], string3[128], year, month, day;
- GetPlayerName(playerid, name, sizeof(name));
- getdate(year,month,day);
- new team[24];
- team = GetPlayerTeamName(playerid);
- SendClientMessage(playerid, COLOR_YELLOW, "-| Stats |-");
- format(string1, sizeof(string1), "Name: %s | Team: %s", name, team);
- format(string2, sizeof(string2), "Level: %d (%s) | XP: %d | Cash: $%i | Kills: %d | Deaths: %d", PlayerInfo[playerid][pLevel], GetPlayerLevelName(playerid), PlayerInfo[playerid][pXP], GetPlayerMoney(playerid), PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
- format(string3, sizeof(string3), "VIP Level: %d | Admin Level: %d", PlayerInfo[playerid][pVIP], PlayerInfo[playerid][pAdmin]);
- SendClientMessage(playerid, COLOR_YELLOW, string1);
- SendClientMessage(playerid, COLOR_YELLOW, string2);
- SendClientMessage(playerid, COLOR_YELLOW, string3);
- return 1;
- }
- CMD:kill(playerid, params[])
- {
- SetPlayerHealth(playerid, 0);
- SendClientMessage(playerid, COLOR_RED, "You have killed yourself!");
- return 1;
- }
- CMD:setcash(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new id;
- new cash;
- new name[24];
- GetPlayerName(playerid, name, sizeof(name));
- if(sscanf(params, "ud", id, cash)) SendClientMessage(playerid, COLOR_RED, "USAGE: /setcash [playerid] [amount]");
- else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "ERROR: Player not found.");
- else
- {
- new name2[24];
- new string1[128];
- new string2[128];
- new log[128];
- GetPlayerName(id, name2, sizeof(name2));
- ResetPlayerMoney(id);
- GivePlayerMoney(id, cash);
- format(string1, sizeof(string1), "-| You have set %s's cash to $%d |-", name2, cash);
- format(string2, sizeof(string2), "-| Your cash has been set to $%d by %s |-", cash, name);
- SendClientMessage(playerid, COLOR_GREEN, string1);
- SendClientMessage(id, COLOR_YELLOW, string2);
- format(log, sizeof(log), "[ADMIN LOG] %s(%i) used /setcash on %s(%i), setting their cash to $%i", name, playerid, name2, id, cash);
- SendAdminMessage(COLOR_GREEN, log);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must have admin level 2 or higher to use this command.");
- }
- return 1;
- }
- CMD:givecash(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new id;
- new cash;
- new name[24];
- GetPlayerName(playerid, name, sizeof(name));
- if(sscanf(params, "ud", id, cash)) SendClientMessage(playerid, COLOR_RED, "USAGE: /givecash [playerid] [amount]");
- else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "ERROR: Player not found.");
- else
- {
- new name2[24];
- new string1[128];
- new string2[128];
- new log[64];
- GetPlayerName(id, name2, sizeof(name2));
- GivePlayerMoney(id, cash);
- format(string1, sizeof(string1), "-| You have given %s $%d |-", name2, cash);
- format(string2, sizeof(string2), "-| You have been given $%d by %s |-", cash, name);
- SendClientMessage(playerid, COLOR_GREEN, string1);
- SendClientMessage(id, COLOR_GREEN, string2);
- format(log, sizeof(log), "[ADMIN LOG] %s(%i) used /givecash on %s(%i), giving them $%i", name, playerid, name2, id, cash);
- SendAdminMessage(COLOR_GREEN, log);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must be admin level 2 or higher to use this command.");
- }
- return 1;
- }
- CMD:pm(playerid, params[])
- {
- new id;
- new message[256];
- new name[24];
- GetPlayerName(playerid, name, sizeof(name));
- if(sscanf(params, "us", id, message)) SendClientMessage(playerid, COLOR_RED, "USAGE: /pm [playerid] [message]");
- else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "ERROR: Player not found.");
- else
- {
- new name2[24];
- new string1[128];
- new string2[128];
- GetPlayerName(id, name2, sizeof(name2));
- format(string1, sizeof(string1), "PM from %s: %s", name, message);
- format(string2, sizeof(string2), "PM to %s: %s", name2, message);
- SendClientMessage(playerid, COLOR_GREEN, string1);
- SendClientMessage(id, COLOR_YELLOW, string2);
- }
- return 1;
- }
- CMD:a(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new message[256];
- new name[24];
- GetPlayerName(playerid, name, sizeof(name));
- if(sscanf(params, "s[256]", message)) SendClientMessage(playerid, COLOR_RED, "USAGE: /a [message]");
- else
- {
- format(message, sizeof(message), "[ADMIN CHAT] %s(%i): %s", name, playerid, message);
- SendAdminMessage(COLOR_GREEN, message);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must be admin level 2 or higher to use this command.");
- }
- return 1;
- }
- CMD:t(playerid, params[])
- {
- new message[256];
- new name[24];
- new team;
- GetPlayerName(playerid, name, sizeof(name));
- team = GetPlayerTeam(playerid);
- if(sscanf(params, "s[256]", message)) SendClientMessage(playerid, COLOR_RED, "USAGE: /t [message]");
- else
- {
- format(message, sizeof(message), "[TEAM CHAT] %s(%i): %s", name, playerid, message);
- SendTeamMessage(team, message);
- }
- return 1;
- }
- CMD:teleport(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new id;
- new name[24];
- if(sscanf(params, "u", id)) SendClientMessage(playerid, COLOR_RED, "USAGE: /teleport [playerid]");
- else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "ERROR: Player not found.");
- else
- {
- new interior;
- new Float:x, Float:y, Float:z, Float:angle;
- GetPlayerName(id, name, sizeof(name));
- GetPlayerPos(id, x, y, z);
- GetPlayerFacingAngle(id, angle);
- interior = GetPlayerInterior(id);
- SetPlayerInterior(playerid, interior);
- SetPlayerPos(playerid, x, y, z);
- SetPlayerFacingAngle(playerid, angle);
- SetCameraBehindPlayer(playerid);
- new name2[24];
- new string1[128];
- new log[64];
- GetPlayerName(id, name2, sizeof(name2));
- format(string1, sizeof(string1), "-| You have teleported to %s |-", name2);
- SendClientMessage(playerid, COLOR_GREEN, string1);
- format(log, sizeof(log), "[ADMIN LOG] %s(%i) used /tp and teleported to %s(%i)", name, playerid, name2, id);
- SendAdminMessage(COLOR_GREEN, log);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must be admin to use this command.");
- }
- return 1;
- }
- CMD:tp(playerid, params[])
- {
- return cmd_teleport(playerid, params);
- }
- CMD:admingetweapon(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new logname[24];
- new string[128];
- GetPlayerName(playerid, logname, sizeof(logname));
- ShowPlayerDialog(playerid,DIALOG_SELECT_WEAPONS_CATEGORY,DIALOG_STYLE_LIST,"Select Weapon Category","Melee\nThrown\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nHeavy","Select","Cancel");
- format(string, sizeof(string), "[ADMIN LOGS] %s(%i) used /admingetweapon", logname, playerid);
- SendAdminMessage(COLOR_GREEN, string);
- }
- else SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an admin to use this command.");
- return 1;
- }
- /*////////////////////////////////////////////////////
- YEET DAB
- *////////////////////////////////////////////////////
- forward SetZone(playerid);
- public SetZone(playerid)
- {
- GivePlayerMoney(playerid, 3000);
- GivePlayerXP(playerid, 250);
- SendClientMessage(playerid,COLOR_GREEN,"Congratulations! You have earned $3000 and 250 XP");
- UnderAttack[ZONE_BREWERY_FACTORY] = 0;
- KillTimer(timer[playerid][ZONE_BREWERY_FACTORY]);
- SetGangZone(playerid);
- return 1;
- }
- forward SetGangZone(playerid);
- public SetGangZone(playerid)
- {
- if(zDefine[playerid] == ZONE_BREWERY_FACTORY)
- {
- GangZoneShowForAll(Zone[ZONE_BREWERY_FACTORY],GetPlayerColor(playerid));
- new string[126], pName5[MAX_PLAYER_NAME], new teamname[24];
- GetPlayerName(playerid,pName5,sizeof(pName5));
- format(string,sizeof string,"%s has captured the Blueberry Factory in Brewery",teamname);
- GangZoneStopFlashForAll(Zone[ZONE_BREWERY_FACTORY]);
- SendClientMessageToAll(COLOR_GREEN, string);
- tCheck[ZONE_BREWERY_FACTORY] = PlayerInfo[playerid][pTeam];
- }
- return 1;
- }
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInfo[playerid][pPass]);
- INI_Int("Cash",PlayerInfo[playerid][pCash]);
- INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
- INI_Int("Kills",PlayerInfo[playerid][pKills]);
- INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
- INI_Int("VIP",PlayerInfo[playerid][pVIP]);
- INI_Int("XP",PlayerInfo[playerid][pXP]);
- INI_Int("Level",PlayerInfo[playerid][pLevel]);
- INI_String("Level Name", PlayerInfo[playerid][pLevelName], 64);
- INI_Int("Team",PlayerInfo[playerid][pTeam]);
- return 1;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- /*Credits to Dracoblue*/
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- stock PlayerLevelUp(playerid)
- {
- PlayerInfo[playerid][pLevel]++;
- }
- stock GivePlayerXP(playerid, xpamount)
- {
- PlayerInfo[playerid][pXP] += xpamount;
- LevelUpCheck(playerid);
- }
- /*//////////////////////////////////////////////////
- LEVELS
- *//////////////////////////////////////////////////
- stock GetPlayerLevel(playerid)
- {
- if(PlayerInfo[playerid][pLevel] == 1) return 1;
- if(PlayerInfo[playerid][pLevel] == 2) return 2;
- if(PlayerInfo[playerid][pLevel] == 3) return 3;
- if(PlayerInfo[playerid][pLevel] == 4) return 4;
- if(PlayerInfo[playerid][pLevel] == 5) return 5;
- if(PlayerInfo[playerid][pLevel] == 6) return 6;
- if(PlayerInfo[playerid][pLevel] == 7) return 7;
- if(PlayerInfo[playerid][pLevel] == 8) return 8;
- if(PlayerInfo[playerid][pLevel] == 9) return 9;
- if(PlayerInfo[playerid][pLevel] == 10) return 10;
- if(PlayerInfo[playerid][pLevel] == 11) return 11;
- if(PlayerInfo[playerid][pLevel] == 12) return 12;
- if(PlayerInfo[playerid][pLevel] == 13) return 13;
- if(PlayerInfo[playerid][pLevel] == 14) return 14;
- if(PlayerInfo[playerid][pLevel] == 15) return 15;
- if(PlayerInfo[playerid][pLevel] == 16) return 16;
- if(PlayerInfo[playerid][pLevel] == 17) return 17;
- if(PlayerInfo[playerid][pLevel] == 18) return 18;
- if(PlayerInfo[playerid][pLevel] == 19) return 19;
- if(PlayerInfo[playerid][pLevel] == 20) return 20;
- if(PlayerInfo[playerid][pLevel] == 21) return 21;
- if(PlayerInfo[playerid][pLevel] == 22) return 22;
- if(PlayerInfo[playerid][pLevel] == 23) return 23;
- if(PlayerInfo[playerid][pLevel] == 24) return 24;
- if(PlayerInfo[playerid][pLevel] == 25) return 25;
- if(PlayerInfo[playerid][pLevel] == 26) return 26;
- if(PlayerInfo[playerid][pLevel] == 27) return 27;
- if(PlayerInfo[playerid][pLevel] == 28) return 28;
- if(PlayerInfo[playerid][pLevel] == 29) return 29;
- if(PlayerInfo[playerid][pLevel] == 30) return 30;
- }
- stock LevelUpCheck(playerid)
- {
- if(PlayerInfo[playerid][pXP] == 100) PlayerLevelUp(playerid); //To level 2
- if(PlayerInfo[playerid][pXP] == 250) PlayerLevelUp(playerid); //To level 3
- if(PlayerInfo[playerid][pXP] == 500) PlayerLevelUp(playerid); //To level 4
- if(PlayerInfo[playerid][pXP] == 750) PlayerLevelUp(playerid); //To level 5
- if(PlayerInfo[playerid][pXP] == 1000) PlayerLevelUp(playerid); //To level 6
- if(PlayerInfo[playerid][pXP] == 1250) PlayerLevelUp(playerid); //To level 7
- if(PlayerInfo[playerid][pXP] == 1500) PlayerLevelUp(playerid); //To level 8
- if(PlayerInfo[playerid][pXP] == 1750) PlayerLevelUp(playerid); //To level 9
- if(PlayerInfo[playerid][pXP] == 2000) PlayerLevelUp(playerid); //To level 10
- if(PlayerInfo[playerid][pXP] == 2500) PlayerLevelUp(playerid); //To level 11
- if(PlayerInfo[playerid][pXP] == 3000) PlayerLevelUp(playerid); //To level 12
- if(PlayerInfo[playerid][pXP] == 3500) PlayerLevelUp(playerid); //To level 13
- if(PlayerInfo[playerid][pXP] == 4000) PlayerLevelUp(playerid); //To level 14
- if(PlayerInfo[playerid][pXP] == 4500) PlayerLevelUp(playerid); //To level 15
- if(PlayerInfo[playerid][pXP] == 5000) PlayerLevelUp(playerid); //To level 16
- if(PlayerInfo[playerid][pXP] == 5500) PlayerLevelUp(playerid); //To level 17
- if(PlayerInfo[playerid][pXP] == 6000) PlayerLevelUp(playerid); //To Level 18
- if(PlayerInfo[playerid][pXP] == 6500) PlayerLevelUp(playerid); //To level 19
- if(PlayerInfo[playerid][pXP] == 7000) PlayerLevelUp(playerid); //To Level 20
- if(PlayerInfo[playerid][pXP] == 7500) PlayerLevelUp(playerid); //To Level 21
- if(PlayerInfo[playerid][pXP] == 8000) PlayerLevelUp(playerid); //To Level 22
- if(PlayerInfo[playerid][pXP] == 8500) PlayerLevelUp(playerid); //To Level 23
- if(PlayerInfo[playerid][pXP] == 9000) PlayerLevelUp(playerid); //To level 24
- if(PlayerInfo[playerid][pXP] == 10000) PlayerLevelUp(playerid); //To level 25
- if(PlayerInfo[playerid][pXP] == 11000) PlayerLevelUp(playerid); //To level 26
- if(PlayerInfo[playerid][pXP] == 12000) PlayerLevelUp(playerid); //To level 27
- if(PlayerInfo[playerid][pXP] == 13000) PlayerLevelUp(playerid); //To level 28
- if(PlayerInfo[playerid][pXP] == 14000) PlayerLevelUp(playerid); //To level 29
- if(PlayerInfo[playerid][pXP] == 15000) PlayerLevelUp(playerid); //To level 30
- }
- SetPlayerLevelName(playerid)
- {
- strdel(PlayerInfo[playerid][pLevelName],0,128);
- switch(PlayerInfo[playerid][pLevel])
- {
- case 1: strins(PlayerInfo[playerid][pLevelName],"Private I",0,128);
- case 2: strins(PlayerInfo[playerid][pLevelName],"Private II",0,128);
- case 3: strins(PlayerInfo[playerid][pLevelName],"Private III",0,128);
- case 4: strins(PlayerInfo[playerid][pLevelName],"Private First Class",0,128);
- case 5: strins(PlayerInfo[playerid][pLevelName],"Specialist",0,128);
- case 6: strins(PlayerInfo[playerid][pLevelName],"Corporal",0,128);
- case 7: strins(PlayerInfo[playerid][pLevelName],"Sergeant",0,128);
- case 8: strins(PlayerInfo[playerid][pLevelName],"Staff Sergeant",0,128);
- case 9: strins(PlayerInfo[playerid][pLevelName],"Sergeant First Class",0,128);
- case 10: strins(PlayerInfo[playerid][pLevelName],"Master Sergeant",0,128);
- case 11: strins(PlayerInfo[playerid][pLevelName],"First Sergeant",0,128);
- case 12: strins(PlayerInfo[playerid][pLevelName],"Sergeant Major",0,128);
- case 13: strins(PlayerInfo[playerid][pLevelName],"Command Sergeant Major",0,128);
- case 14: strins(PlayerInfo[playerid][pLevelName],"Sergeant Major of the Army",0,128);
- case 15: strins(PlayerInfo[playerid][pLevelName],"Warrant Officer",0,128);
- case 16: strins(PlayerInfo[playerid][pLevelName],"Chief Warrant Officer II",0,128);
- case 17: strins(PlayerInfo[playerid][pLevelName],"Chief Warrant Officer III",0,128);
- case 18: strins(PlayerInfo[playerid][pLevelName],"Chief Warrant Officer IV",0,128);
- case 19: strins(PlayerInfo[playerid][pLevelName],"Chief Warrant Officer V",0,128);
- case 20: strins(PlayerInfo[playerid][pLevelName],"Second Lieutenant",0,128);
- case 21: strins(PlayerInfo[playerid][pLevelName],"First Lieutenant",0,128);
- case 22: strins(PlayerInfo[playerid][pLevelName],"Captain",0,128);
- case 23: strins(PlayerInfo[playerid][pLevelName],"Major",0,128);
- case 24: strins(PlayerInfo[playerid][pLevelName],"Lieutenant Colonel",0,128);
- case 25: strins(PlayerInfo[playerid][pLevelName],"Colonel",0,128);
- case 26: strins(PlayerInfo[playerid][pLevelName],"Brigadier General",0,128);
- case 27: strins(PlayerInfo[playerid][pLevelName],"Major General",0,128);
- case 28: strins(PlayerInfo[playerid][pLevelName],"Lieutenant General",0,128);
- case 29: strins(PlayerInfo[playerid][pLevelName],"General",0,128);
- case 30: strins(PlayerInfo[playerid][pLevelName],"General of the Army",0,128);
- }
- return 1;
- }
- stock GetPlayerLevelName(playerid)
- {
- SetPlayerLevelName(playerid);
- return PlayerInfo[playerid][pLevelName];
- }
- /*/////////////////////////////////////////
- TEAMS
- *///////////////////////////////////////////
- stock AltSetPlayerTeam(playerid, team)
- {
- SetPlayerTeam(playerid, team);
- PlayerInfo[playerid][pTeam] = team;
- SpawnPlayerAtTeam(playerid);
- if(team == TEAM_USA) SetPlayerColor(playerid, COLOR_USA);
- if(team == TEAM_CANADA) SetPlayerColor(playerid, COLOR_CANADA);
- if(team == TEAM_BRITAIN) SetPlayerColor(playerid, COLOR_BRITAIN);
- if(team == TEAM_AUSTRALIA) SetPlayerColor(playerid, COLOR_AUSTRALIA);
- if(team == TEAM_RUSSIA) SetPlayerColor(playerid, COLOR_RUSSIA);
- if(team == TEAM_GERMANY) SetPlayerColor(playerid, COLOR_GERMANY);
- if(team == TEAM_ITALY) SetPlayerColor(playerid, COLOR_ITALY);
- if(team == TEAM_FRANCE) SetPlayerColor(playerid, COLOR_FRANCE);
- if(team == TEAM_CHINA) SetPlayerColor(playerid, COLOR_CHINA);
- if(team == TEAM_INDIA) SetPlayerColor(playerid, COLOR_INDIA);
- }
- stock SpawnPlayerAtTeam(playerid)
- {
- new Float:USASpawns[3][4] =
- {
- {154.0558,1912.6029,18.8228,4.6064},
- {213.6994,1874.9786,17.6406,3.0163},
- {153.7363,1847.5313,17.6406,356.7496}
- };
- new Float:CanadaSpawns[3][4] =
- {
- {-472.4701,-194.1285,78.0881,20.1248},
- {-541.7864,-151.8316,77.0442,359.2529},
- {-536.2971,-98.5008,63.2969,273.6887}
- };
- new Float:BritainSpawns[3][4] =
- {
- {-1521.9277,481.4308,7.1875,180.5736},
- {-1348.7789,500.1924,18.2344,348.6155},
- {-1563.8306,316.6201,7.1875,131.1303}
- };
- new Float:AustraliaSpawns[3][4] =
- {
- {-688.0345,944.7898,13.6328,0.0469},
- {-686.2051,979.6094,12.1262,87.5167},
- {-687.8675,929.7429,13.6293,181.1319}
- };
- new Float:RussiaSpawns[3][4] =
- {
- {-2520.4351,-624.5309,132.7848,0.8743},
- {-2487.4331,-621.0484,132.5872,87.1375},
- {-2374.1062,-583.5718,132.1172,118.5435}
- };
- new Float:GermanySpawns[3][4] =
- {
- {1106.4036,-299.6010,74.5391,99.9817},
- {1073.4133,-345.0207,73.9922,356.5807},
- {1023.7352,-316.0926,73.9889,175.7202}
- };
- new Float:ItalySpawns[3][4] =
- {
- {-1070.8738,-1170.6907,129.6406,234.3037},
- {-1060.0549,-1205.3832,129.2188,267.3490},
- {-1067.8376,-1299.5409,129.2188,276.0990}
- };
- new Float:FranceSpawns[3][4] =
- {
- {-2237.7219,2353.6807,4.9803,132.8337},
- {-2241.0059,2333.7966,4.9918,99.6200},
- {-2281.6807,2288.4836,4.9704,271.9083}
- };
- new Float:ChinaSpawns[3][4] =
- {
- {2735.4065,-2452.2302,17.5938,359.3937},
- {2721.3025,-2386.2537,17.3403,266.3329},
- {2752.5508,-2513.4436,13.6402,19.0380}
- };
- new Float:IndiaSpawns[3][4] =
- {
- {2841.2942,1285.7273,11.3906,88.5804},
- {2794.3298,1256.1736,11.0299,4.2696},
- {2837.1394,1337.4557,11.0877,82.9403}
- };
- new rnd;
- TogglePlayerSpectating(playerid, 0);
- if(PlayerInfo[playerid][pTeam] == TEAM_USA) rnd = random(sizeof(USASpawns)), SetPlayerPos(playerid,USASpawns[rnd][0],USASpawns[rnd][1],USASpawns[rnd][2]), SetPlayerFacingAngle(playerid, USASpawns[rnd][3]), SetPlayerColor(playerid, COLOR_USA);
- if(PlayerInfo[playerid][pTeam] == TEAM_CANADA) rnd = random(sizeof(CanadaSpawns)), SetPlayerPos(playerid,CanadaSpawns[rnd][0],CanadaSpawns[rnd][1],CanadaSpawns[rnd][2]), SetPlayerFacingAngle(playerid, CanadaSpawns[rnd][3]), SetPlayerColor(playerid, COLOR_CANADA);
- if(PlayerInfo[playerid][pTeam] == TEAM_BRITAIN) rnd = random(sizeof(BritainSpawns)), SetPlayerPos(playerid,BritainSpawns[rnd][0],BritainSpawns[rnd][1],BritainSpawns[rnd][2]), SetPlayerFacingAngle(playerid, BritainSpawns[rnd][3]), SetPlayerColor(playerid, COLOR_BRITAIN);
- if(PlayerInfo[playerid][pTeam] == TEAM_AUSTRALIA) rnd = random(sizeof(AustraliaSpawns)), SetPlayerPos(playerid,AustraliaSpawns[rnd][0],AustraliaSpawns[rnd][1],AustraliaSpawns[rnd][2]), SetPlayerFacingAngle(playerid, AustraliaSpawns[rnd][3]), SetPlayerColor(playerid, COLOR_AUSTRALIA);
- if(PlayerInfo[playerid][pTeam] == TEAM_RUSSIA) rnd = random(sizeof(RussiaSpawns)), SetPlayerPos(playerid,RussiaSpawns[rnd][0],RussiaSpawns[rnd][1],RussiaSpawns[rnd][2]), SetPlayerFacingAngle(playerid,RussiaSpawns[rnd][3]), SetPlayerColor(playerid, COLOR_RUSSIA);
- if(PlayerInfo[playerid][pTeam] == TEAM_GERMANY) rnd = random(sizeof(GermanySpawns)), SetPlayerPos(playerid,GermanySpawns[rnd][0],GermanySpawns[rnd][1],GermanySpawns[rnd][2]), SetPlayerFacingAngle(playerid, GermanySpawns[rnd][3]), SetPlayerColor(playerid, COLOR_GERMANY);
- if(PlayerInfo[playerid][pTeam] == TEAM_ITALY) rnd = random(sizeof(ItalySpawns)), SetPlayerPos(playerid,ItalySpawns[rnd][0],ItalySpawns[rnd][1],ItalySpawns[rnd][2]), SetPlayerFacingAngle(playerid, ItalySpawns[rnd][3]), SetPlayerColor(playerid, COLOR_ITALY);
- if(PlayerInfo[playerid][pTeam] == TEAM_FRANCE) rnd = random(sizeof(FranceSpawns)), SetPlayerPos(playerid,FranceSpawns[rnd][0],FranceSpawns[rnd][1],FranceSpawns[rnd][2]), SetPlayerFacingAngle(playerid, FranceSpawns[rnd][3]), SetPlayerColor(playerid, COLOR_FRANCE);
- if(PlayerInfo[playerid][pTeam] == TEAM_CHINA) rnd = random(sizeof(ChinaSpawns)), SetPlayerPos(playerid,ChinaSpawns[rnd][0],ChinaSpawns[rnd][1],ChinaSpawns[rnd][2]), SetPlayerFacingAngle(playerid, ChinaSpawns[rnd][3]), SetPlayerColor(playerid, COLOR_CHINA);
- if(PlayerInfo[playerid][pTeam] == TEAM_INDIA) rnd = random(sizeof(IndiaSpawns)), SetPlayerPos(playerid,IndiaSpawns[rnd][0],IndiaSpawns[rnd][1],IndiaSpawns[rnd][2]), SetPlayerFacingAngle(playerid, IndiaSpawns[rnd][3]), SetPlayerColor(playerid, COLOR_INDIA);
- SetCameraBehindPlayer(playerid);
- SetPlayerSkin(playerid, 287);
- }
- GetPlayerTeamName(playerid)
- {
- new szString[24];
- switch(GetPlayerTeam(playerid))
- {
- case TEAM_USA: szString = "United States";
- case TEAM_CANADA: szString = "Canada";
- case TEAM_BRITAIN: szString = "Britain";
- case TEAM_AUSTRALIA: szString = "Australia";
- case TEAM_RUSSIA: szString = "Russia";
- case TEAM_GERMANY: szString = "Germany";
- case TEAM_ITALY: szString = "Italy";
- case TEAM_FRANCE: szString = "France";
- case TEAM_CHINA: szString = "China";
- case TEAM_INDIA: szString = "India";
- }
- return szString;
- }
- ////////////////////////////////////////
- ////////////////////////////////////////
- /////////////////////////////////////
- stock SendAdminMessage(color,string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] >= 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- return 1;
- }
- stock SendTeamMessage(team,string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pTeam] == team)
- {
- switch(GetPlayerTeam(i))
- {
- case TEAM_USA: SendClientMessage(i, COLOR_USA, string);
- case TEAM_CANADA: SendClientMessage(i, COLOR_CANADA, string);
- case TEAM_BRITAIN: SendClientMessage(i, COLOR_BRITAIN, string);
- case TEAM_AUSTRALIA: SendClientMessage(i, COLOR_AUSTRALIA, string);
- case TEAM_RUSSIA: SendClientMessage(i, COLOR_RUSSIA, string);
- case TEAM_GERMANY: SendClientMessage(i, COLOR_GERMANY, string);
- case TEAM_ITALY: SendClientMessage(i, COLOR_ITALY, string);
- case TEAM_FRANCE: SendClientMessage(i, COLOR_FRANCE, string);
- case TEAM_CHINA: SendClientMessage(i, COLOR_CHINA, string);
- case TEAM_INDIA: SendClientMessage(i, COLOR_INDIA, string);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement