Advertisement
Guest User

ye

a guest
Mar 7th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 69.33 KB | None | 0 0
  1. /* I don't fuckin know what this is gonna be
  2. Started March 1st, 2018 4:13 PM CST
  3. you're mom gay*/
  4.  
  5. #include <a_samp>
  6. #include <zcmd>
  7. #include <YSI\y_ini>
  8. #include <streamer>
  9. #include <mGates>
  10. #include <sscanf2>
  11.  
  12. //Colors
  13. #define COLOR_WHITE 0xFFFFFFFF
  14. #define COLOR_BLACK 0x000000FF
  15. #define COLOR_RED 0xFF0000FF
  16. #define COLOR_BROWN 0x800000FF
  17. #define COLOR_LIME 0x00FF00FF
  18. #define COLOR_GREEN 0x008000FF
  19. #define COLOR_CYAN 0x00FFFFFF
  20. #define COLOR_YELLOW 0xFFFF00FF
  21. #define COLOR_BLUE 0x0000FFFF
  22. #define COLOR_ORANGE 0xFF8000FF
  23. #define COLOR_PINK 0xFF00FFFF
  24. #define COLOR_PURPLE 0x8000FFFF
  25.  
  26. //Gay shit
  27. #define PATH "/Users/%s.ini"
  28.  
  29. //Dialogs
  30. #define DIALOG_REGISTER 800
  31. #define DIALOG_LOGIN 801
  32. #define DIALOG_SUCCESS_1 802
  33. #define DIALOG_SUCCESS_2 803
  34.  
  35. #define DIALOG_TEAM_SELECTION 804
  36.  
  37. #define DIALOG_SELECT_WEAPONS_CATEGORY 805
  38. #define DIALOG_ADM_WEAPONS_MELEE 806
  39. #define DIALOG_ADM_WEAPONS_THROWN 807
  40. #define DIALOG_ADM_WEAPONS_PISTOLS 808
  41. #define DIALOG_ADM_WEAPONS_SHOTGUNS 809
  42. #define DIALOG_ADM_WEAPONS_SMGS 810
  43. #define DIALOG_ADM_WEAPONS_ASSAULT_RIFLES 811
  44. #define DIALOG_ADM_WEAPONS_RIFLES 812
  45. #define DIALOG_ADM_WEAPONS_HEAVY 813
  46.  
  47. //Teams
  48. #define TEAM_USA 5000
  49. #define TEAM_CANADA 5001
  50. #define TEAM_BRITAIN 5002
  51. #define TEAM_AUSTRALIA 5003
  52. #define TEAM_RUSSIA 5004
  53. #define TEAM_GERMANY 5005
  54. #define TEAM_ITALY 5006
  55. #define TEAM_FRANCE 5007
  56. #define TEAM_CHINA 5008
  57. #define TEAM_INDIA 5009
  58.  
  59. #define COLOR_USA 0x0000FFFF
  60. #define COLOR_CANADA 0x008000FF
  61. #define COLOR_BRITAIN 0xFF0000FF
  62. #define COLOR_AUSTRALIA 0x0080FFFF
  63. #define COLOR_RUSSIA 0x800000FF
  64. #define COLOR_GERMANY 0xFFFF00FF
  65. #define COLOR_ITALY 0x408080FF
  66. #define COLOR_FRANCE 0x80FF80FF
  67. #define COLOR_CHINA 0xFF8000FF
  68. #define COLOR_INDIA 0x0080C0FF
  69.  
  70. #define COLOR_USA_EMBED "{0000FF}"
  71. #define COLOR_CANADA_EMBED "{008000}"
  72. #define COLOR_BRITAIN_EMBED "{FF0000}"
  73. #define COLOR_AUSTRALIA_EMBED "{0080FF}"
  74. #define COLOR_RUSSIA_EMBED "{800000}"
  75. #define COLOR_GERMANY_EMBED "{408080}"
  76. #define COLOR_ITALY_EMBED "{80FF80}"
  77. #define COLOR_FRANCE_EMBED "{0080C0}"
  78. #define COLOR_CHINA_EMBED "{FFFF00}"
  79. #define COLOR_INDIA_EMBED "{FF8000}"
  80. //Player data
  81. enum pInfo
  82. {
  83. pPass,
  84. pCash,
  85. pAdmin,
  86. pKills,
  87. pDeaths,
  88. pVIP,
  89. pXP,
  90. pLevel,
  91. pLevelName[64],
  92. pTeam
  93. }
  94.  
  95. new PlayerInfo[MAX_PLAYERS][pInfo];
  96.  
  97. //Gates
  98. new GATE_ADMIN_HOUSE1;
  99. new GATE_ADMIN_HOUSE2;
  100.  
  101. new GATE_INDIA1;
  102. new GATE_INDIA2;
  103. new GATE_INDIA3;
  104.  
  105. //zone stuff
  106. #define MAX_ZONES 50
  107. new CP[30];
  108. new Zone[30];
  109. new tCheck[30];
  110. new zDefine[MAX_PLAYERS];
  111. new UnderAttack[30];
  112. new timer[MAX_PLAYERS][30];
  113. new zones[MAX_ZONES];
  114.  
  115. new Float:zones_points_0[] = {
  116. 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,
  117. -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
  118. };
  119. new Float:zones_points_1[] = {
  120. 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,
  121. 173.0,-278.0,172.0,-270.0,171.0,-222.0,17.0,-219.0
  122. };
  123. new Float:zones_points_2[] = {
  124. -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,
  125. -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,
  126. -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,
  127. 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,
  128. -135.0,-181.0,-210.0,-165.0,-258.0,-155.0,-303.0,-138.0
  129. };
  130. new Float:zones_points_3[] = {
  131. -623.0, -563.0, -467.0, -467.0
  132. };
  133. new Float:zones_points_4[] = {
  134. -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
  135. };
  136. new Float:zones_points_5[] = {
  137. -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,
  138. -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,
  139. -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,
  140. -1710.0,-592.0,-1732.0,-593.0
  141. };
  142. new Float:zones_points_6[] = {
  143. -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,
  144. -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,
  145. -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,
  146. -1185.0,179.0,-1227.0,224.0,-999.0,454.0,-1040.0,494.0
  147. };
  148. new Float:zones_points_7[] = {
  149. -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,
  150. -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,
  151. -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
  152. };
  153. new Float:zones_points_8[] = {
  154. 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,
  155. 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,
  156. 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
  157. };
  158. new Float:zones_points_9[] = {
  159. -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,
  160. -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,
  161. -2662.0,1506.0,-2699.0,1507.0
  162. };
  163. new Float:zones_points_10[] = {
  164. -2325.0, -2600.0, -1925.0, -2199.0
  165. };
  166. new Float:zones_points_11[] = {
  167. -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,
  168. -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,
  169. -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,
  170. -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,
  171. -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
  172. };
  173. new Float:zones_points_12[] = {
  174. -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,
  175. -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
  176. };
  177. new Float:zones_points_13[] = {
  178. -1683.0, -2291.0, -1583.0, -2191.0
  179. };
  180. new Float:zones_points_14[] = {
  181. -2163.0,-709.0,-2163.0,-1010.0,-1918.0,-1008.0,-1920.0,-731.0,-1923.0,-712.0,-2163.0,-709.0
  182. };
  183. new Float:zones_points_15[] = {
  184. 1430.0,-1592.0,1530.0,-1591.0,1530.0,-1733.0,1429.0,-1732.0,1430.0,-1592.0
  185. };
  186. new Float:zones_points_16[] = {
  187. 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
  188. };
  189. new Float:zones_points_17[] = {
  190. -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,
  191. -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,
  192. -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,
  193. -417.0,1609.0,-422.0,1603.0,-425.0,1580.0,-419.0,1560.0,-419.0,1540.0,-426.0,1513.0
  194. };
  195. new Float:zones_points_18[] = {
  196. -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,
  197. 38.0,1329.0,13.0,1325.0,-31.0,1331.0,-78.0,1338.0,-105.0,1335.0
  198. };
  199. new Float:zones_points_19[] = {
  200. 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,
  201. 288.0,1338.0,110.0,1335.0
  202. };
  203. new Float:zones_points_20[] = {
  204. 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,
  205. 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,
  206. 451.0,1621.0
  207. };
  208. new Float:zones_points_21[] = {
  209. -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
  210. };
  211. new Float:zones_points_22[] = {
  212. 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,
  213. 431.0,2433.0,443.0,2553.0
  214. };
  215. new Float:zones_points_23[] = {
  216. -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,
  217. -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,
  218. -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,
  219. -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,
  220. -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,
  221. -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,
  222. -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,
  223. -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,
  224. -781.0,1996.0,-823.0,1971.0,-797.0,1833.0,-798.0,1807.0,-816.0,1804.0
  225. };
  226. new zones_text[MAX_ZONES][64] = {
  227. "Blueberry Brewery Factory",
  228. "Blueberry Truck Depot",
  229. "Blueberry - Easterboard farm",
  230. "Fallen Tree Freight Depot",
  231. "Easter Bay Chemicals",
  232. "Southern Easter Bay Airport",
  233. "Northern Easter Bay Airport",
  234. "Southern Easter Bay Airport",
  235. "Quarry",
  236. "Gant Bridge",
  237. "Angel Pine",
  238. "Mt. Chilliad",
  239. "Angel Pine Junkyard",
  240. "Shady Cabin",
  241. "Foster Valley",
  242. "Pershing Square",
  243. "Glen Park",
  244. "Satellite Dish",
  245. "Lil' Probe'Inn",
  246. "Green Palms",
  247. "Octane Springs",
  248. "Snake Farm",
  249. "Abandoned Airport",
  250. "Sherman Dam"
  251. };
  252.  
  253.  
  254. #define ZONE_BREWERY_FACTORY 0
  255.  
  256.  
  257. main()
  258. {
  259. print("\n----------------------------------");
  260. print(" Maude Team Deathmatch");
  261. print("----------------------------------\n");
  262. }
  263. public OnGameModeInit()
  264. {
  265. SetGameModeText("MAUDE TDM 1.0");
  266. DisableInteriorEnterExits();
  267. //Zones
  268. CP[ZONE_BREWERY_FACTORY] = CreateDynamicCP(69.4977,-286.5929,1.5781, 5);
  269. Zone[ZONE_BREWERY_FACTORY] = CreateDynamicPolygon(zones_points_0);
  270.  
  271. //Gates
  272. 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);
  273. 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);
  274.  
  275. //Admin House
  276. AddStaticVehicleEx(520,1465.0996000,-688.0996100,95.7000000,270.0000000,-1,-1,15); //Hydra
  277. AddStaticVehicleEx(425,1523.3000000,-672.7000100,95.6000000,180.0000000,95,10,15); //Hunter
  278. AddStaticVehicleEx(520,1465.0000000,-675.7999900,95.7000000,270.0000000,-1,-1,15); //Hydra
  279. AddStaticVehicleEx(520,1465.1000000,-663.4000200,95.7000000,270.0000000,-1,-1,15); //Hydra
  280. AddStaticVehicleEx(445,1517.1000000,-697.0000000,94.7000000,90.0000000,100,100,15); //Admiral
  281. AddStaticVehicleEx(445,1517.1000000,-694.2000100,94.7000000,90.0000000,100,100,15); //Admiral
  282. AddStaticVehicleEx(445,1517.1000000,-691.2999900,94.7000000,90.0000000,100,100,15); //Admiral
  283. AddStaticVehicleEx(468,1502.7000000,-687.9000200,94.5000000,180.0000000,132,4,15); //Sanchez
  284. AddStaticVehicleEx(468,1504.0000000,-687.9000200,94.5000000,180.0000000,132,4,15); //Sanchez
  285. AddStaticVehicleEx(468,1505.4000000,-687.9000200,94.5000000,180.0000000,132,4,15); //Sanchez
  286. AddStaticVehicleEx(468,1506.9000000,-687.9000200,94.5000000,180.0000000,132,4,15); //Sanchez
  287. AddStaticVehicleEx(521,1491.7000000,-687.7999900,94.4000000,180.0000000,96,26,15); //FCR-900
  288. AddStaticVehicleEx(521,1490.5000000,-687.9000200,94.4000000,180.0000000,96,26,15); //FCR-900
  289. AddStaticVehicleEx(521,1489.0000000,-687.9000200,94.4000000,180.0000000,96,26,15); //FCR-900
  290. AddStaticVehicleEx(521,1487.6000000,-688.0000000,94.4000000,180.0000000,96,26,15); //FCR-900
  291. CreateObject(987,1469.5000000,-694.2000100,93.7000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (1)
  292. CreateObject(987,1457.6000000,-694.2000100,93.7000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (2)
  293. CreateObject(987,1456.7000000,-694.2000100,93.7000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (3)
  294. CreateObject(987,1456.6000000,-682.4000200,93.7000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (4)
  295. CreateObject(987,1456.6000000,-670.4000200,93.7000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (5)
  296. CreateObject(987,1456.6000000,-658.4000200,93.7000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (6)
  297. CreateObject(987,1456.6000000,-657.0000000,93.7000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (7)
  298. CreateObject(987,1468.3000000,-657.2000100,93.7000000,0.0000000,0.0000000,180.0000000); //object(elecfence_bar) (10)
  299. CreateObject(987,1480.3000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (11)
  300. CreateObject(987,1492.3000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (12)
  301. CreateObject(987,1504.2000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (13)
  302. CreateObject(987,1516.1000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (14)
  303. CreateObject(987,1528.0000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (15)
  304. CreateObject(987,1531.0000000,-657.2000100,93.7000000,0.0000000,0.0000000,179.9950000); //object(elecfence_bar) (16)
  305. CreateObject(987,1530.9000000,-669.0999800,93.7000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (18)
  306. CreateObject(987,1530.9000000,-681.0000000,93.7000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (19)
  307. CreateObject(987,1530.9000000,-692.9000200,93.7000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (20)
  308. CreateObject(987,1530.9000000,-699.7999900,93.7000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (21)
  309. CreateObject(987,1519.0000000,-699.7999900,93.7000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (22)
  310. CreateObject(987,1508.6000000,-699.7999900,93.7000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (23)
  311. CreateObject(987,1476.3000000,-694.2999900,93.7000000,0.0000000,0.0000000,330.0000000); //object(elecfence_bar) (25)
  312.  
  313. //India base
  314. AddStaticVehicleEx(432,2795.2998000,-2417.7998000,13.7000000,90.0000000,95,10,15); //Rhino
  315. AddStaticVehicleEx(433,2777.2998000,-2403.0000000,14.2000000,88.9950000,95,10,15); //Barracks
  316. AddStaticVehicleEx(433,2777.2998000,-2470.5996000,14.2000000,88.9950000,95,10,15); //Barracks
  317. AddStaticVehicleEx(470,2757.0000000,-2380.8994000,13.7000000,180.0000000,95,10,15); //Patriot
  318. AddStaticVehicleEx(520,2796.1001000,-2340.8000000,14.6000000,180.0000000,-1,-1,15); //Hydra
  319. AddStaticVehicleEx(520,2785.8999000,-2340.8000000,14.6000000,180.0000000,-1,-1,15); //Hydra
  320. AddStaticVehicleEx(520,2775.7000000,-2340.8000000,14.6000000,180.0000000,-1,-1,15); //Hydra
  321. AddStaticVehicleEx(520,2765.5000000,-2340.8000000,14.6000000,180.0000000,-1,-1,15); //Hydra
  322. AddStaticVehicleEx(425,2765.8000000,-2355.2000000,14.5000000,0.0000000,95,10,15); //Hunter
  323. AddStaticVehicleEx(425,2777.3000000,-2355.2000000,14.5000000,0.0000000,95,10,15); //Hunter
  324. AddStaticVehicleEx(425,2788.8000000,-2355.2000000,14.5000000,0.0000000,95,10,15); //Hunter
  325. AddStaticVehicleEx(433,2777.3000000,-2398.5000000,14.2000000,88.9950000,95,10,15); //Barracks
  326. AddStaticVehicleEx(470,2760.3000000,-2380.8999000,13.7000000,180.0000000,95,10,15); //Patriot
  327. AddStaticVehicleEx(432,2795.3000000,-2455.8000000,13.7000000,90.0000000,95,10,15); //Rhino
  328. AddStaticVehicleEx(432,2795.3000000,-2494.5000000,13.7000000,90.0000000,95,10,15); //Rhino
  329. AddStaticVehicleEx(430,2718.5000000,-2572.0996000,0.0000000,180.0000000,157,152,15); //Predator
  330. AddStaticVehicleEx(430,2728.3999000,-2583.8000000,0.0000000,90.0000000,157,152,15); //Predator
  331. AddStaticVehicleEx(473,2736.5000000,-2583.3000000,0.0000000,90.0000000,158,164,15); //Dinghy
  332. AddStaticVehicleEx(473,2742.0000000,-2583.3000000,0.0000000,90.0000000,158,164,15); //Dinghy
  333. AddStaticVehicleEx(473,2747.8000000,-2583.3000000,0.0000000,90.0000000,158,164,15); //Dinghy
  334. AddStaticVehicleEx(473,2753.3000000,-2583.3000000,0.0000000,90.0000000,158,164,15); //Dinghy
  335. AddStaticVehicleEx(493,2760.5000000,-2583.8000500,0.0000000,270.0000000,37,37,15); //Jetmax
  336. AddStaticVehicleEx(447,2777.8000000,-2578.0000000,0.6000000,178.0000000,32,32,15); //Seasparrow
  337. AddStaticVehicleEx(425,2794.8999000,-2553.2000000,14.5000000,0.0000000,95,10,15); //Hunter
  338. AddStaticVehicleEx(425,2782.3999000,-2553.2000000,14.5000000,0.0000000,95,10,15); //Hunter
  339. AddStaticVehicleEx(425,2789.2000000,-2534.2000000,14.5000000,0.0000000,95,10,15); //Hunter
  340. AddStaticVehicleEx(433,2777.3000000,-2479.3999000,14.2000000,89.2450000,95,10,15); //Barracks
  341. AddStaticVehicleEx(433,2777.3000000,-2508.8999000,14.2000000,89.2420000,95,10,15); //Barracks
  342. CreateObject(987,2719.7000000,-2379.6001000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (8)
  343. CreateObject(987,2719.5000000,-2389.3000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (9)
  344. CreateObject(987,2719.5000000,-2409.8999000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (24)
  345. CreateObject(987,2719.5000000,-2487.2000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (26)
  346. CreateObject(987,2719.5000000,-2487.8999000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (27)
  347. CreateObject(987,2719.5000000,-2508.3000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (28)
  348. CreateObject(987,2719.5000000,-2510.7000000,16.2000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (29)
  349. CreateObject(987,2719.5000000,-2341.7000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (30)
  350. CreateObject(987,2719.5000000,-2330.2000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (31)
  351. CreateObject(987,2719.5000000,-2544.7000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (32)
  352. CreateObject(987,2719.5000000,-2556.7000000,12.6000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (33)
  353. CreateObject(987,2719.8000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (34)
  354. CreateObject(987,2731.8000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (35)
  355. CreateObject(987,2742.2000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (36)
  356. CreateObject(987,2762.8999000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (37)
  357. CreateObject(987,2774.8000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (38)
  358. CreateObject(987,2786.7000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (39)
  359. CreateObject(987,2798.7000000,-2565.8000000,12.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (40)
  360. CreateObject(11095,2820.8999000,-2435.8999000,11.6000000,0.0000000,0.0000000,271.5000000); //object(stadbridge_sfs) (2)
  361. CreateObject(987,2810.7000000,-2565.8999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (41)
  362. CreateObject(987,2810.7000000,-2553.8999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (42)
  363. CreateObject(987,2810.7000000,-2541.8999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (43)
  364. CreateObject(987,2810.7000000,-2529.8999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (44)
  365. CreateObject(987,2810.7000000,-2518.1001000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (45)
  366. CreateObject(987,2810.7000000,-2506.1001000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (46)
  367. CreateObject(987,2810.7000000,-2494.2000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (47)
  368. CreateObject(987,2810.7000000,-2482.3000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (48)
  369. CreateObject(987,2810.7000000,-2470.3999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (49)
  370. CreateObject(987,2810.7000000,-2458.5000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (50)
  371. CreateObject(987,2810.7000000,-2451.1001000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (51)
  372. CreateObject(987,2810.7000000,-2432.7000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (52)
  373. CreateObject(987,2810.7000000,-2420.7000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (53)
  374. CreateObject(987,2810.7000000,-2408.8000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (54)
  375. CreateObject(987,2810.7000000,-2396.8999000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (55)
  376. CreateObject(987,2810.7000000,-2385.0000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (56)
  377. CreateObject(987,2810.7000000,-2373.1001000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (57)
  378. CreateObject(987,2810.7000000,-2361.2000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (58)
  379. CreateObject(987,2810.7000000,-2349.3000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (59)
  380. CreateObject(987,2810.7000000,-2341.7000000,12.6000000,0.0000000,0.0000000,90.0000000); //object(elecfence_bar) (61)
  381. CreateObject(987,2810.8999000,-2330.0000000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (68)
  382. CreateObject(987,2798.8999000,-2330.1001000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (69)
  383. CreateObject(987,2786.8999000,-2330.2000000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (70)
  384. CreateObject(987,2775.0000000,-2330.3000000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (71)
  385. CreateObject(987,2763.0000000,-2330.3999000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (72)
  386. CreateObject(987,2751.0000000,-2330.5000000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (73)
  387. CreateObject(987,2739.0000000,-2330.6001000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (74)
  388. CreateObject(987,2731.3000000,-2330.7000000,12.6000000,0.0000000,0.0000000,180.5000000); //object(elecfence_bar) (75)
  389.  
  390. 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);
  391. 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);
  392. 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);
  393.  
  394. /*
  395. Objects converted: 50
  396. Vehicles converted: 28
  397. Vehicle models found: 9
  398. ----------------------
  399. In the time this conversion took to finish light could have travelled around the world 0.07 times!
  400. */
  401.  
  402. return 1;
  403. }
  404.  
  405. public OnGameModeExit()
  406. {
  407. return 1;
  408. }
  409.  
  410. public OnPlayerRequestClass(playerid, classid)
  411. {
  412. TogglePlayerSpectating(playerid, 1);
  413. SpawnPlayerAtTeam(playerid);
  414. return 1;
  415. }
  416.  
  417. public OnPlayerConnect(playerid)
  418. {
  419. new name[MAX_PLAYER_NAME], string[23 + MAX_PLAYER_NAME];
  420. GetPlayerName(playerid, name, sizeof(name));
  421. format(string, sizeof(string), "-| %s has connected to the server |-", name);
  422. SendClientMessageToAll(COLOR_LIME, string);
  423. TogglePlayerSpectating(playerid, true);
  424.  
  425. if(fexist(UserPath(playerid)))
  426. {
  427. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  428. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","Type your password below to login.","Login","Quit");
  429. }
  430. else
  431. {
  432. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Registering...","Type your password below to register a new account.","Register","Quit");
  433. }
  434. return 1;
  435. }
  436.  
  437. public OnPlayerDisconnect(playerid, reason)
  438. {
  439. new name[MAX_PLAYER_NAME], string[23 + MAX_PLAYER_NAME];
  440. GetPlayerName(playerid, name, sizeof(name));
  441.  
  442. new DisconnectReason[3][] =
  443. {
  444. "Timeout/Crash",
  445. "Quit",
  446. "Kick/Ban"
  447. };
  448.  
  449. format(string, sizeof(string), "-| %s has left the server (%s) |-", name, DisconnectReason[reason]);
  450. SendClientMessageToAll(COLOR_YELLOW, string);
  451.  
  452. new INI:File = INI_Open(UserPath(playerid));
  453. INI_SetTag(File,"data");
  454. INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
  455. INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  456. INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
  457. INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
  458. INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVIP]);
  459. INI_WriteInt(File,"XP",PlayerInfo[playerid][pXP]);
  460. INI_WriteInt(File,"Score",PlayerInfo[playerid][pLevel]);
  461. INI_WriteInt(File,"Team",PlayerInfo[playerid][pTeam]);
  462. INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
  463. INI_Close(File);
  464. return 1;
  465. }
  466.  
  467. public OnPlayerSpawn(playerid)
  468. {
  469. TogglePlayerSpectating(playerid, false);
  470. SpawnPlayerAtTeam(playerid);
  471. return 1;
  472. }
  473.  
  474. public OnPlayerDeath(playerid, killerid, reason)
  475. {
  476. SendDeathMessage(killerid, playerid, reason);
  477. PlayerInfo[playerid][pDeaths]++;
  478.  
  479. if(killerid != INVALID_PLAYER_ID)
  480. {
  481. new string1[128];
  482. new string2[128];
  483. format(string1, sizeof(string1), "You have been killed by %u!", killerid);
  484. format(string2, sizeof(string2), "You have killed %u, and received $1000!", playerid);
  485. SendClientMessage(playerid, COLOR_RED, string1);
  486. SendClientMessage(killerid, COLOR_LIME, string2);
  487. PlayerInfo[killerid][pKills]++;
  488. GivePlayerXP(killerid, 100);
  489. GivePlayerMoney(killerid, 1000);
  490. }
  491. return 1;
  492. }
  493.  
  494. public OnVehicleSpawn(vehicleid)
  495. {
  496. return 1;
  497. }
  498.  
  499. public OnVehicleDeath(vehicleid, killerid)
  500. {
  501. return 1;
  502. }
  503.  
  504. public OnPlayerText(playerid, text[])
  505. {
  506. return 1;
  507. }
  508.  
  509. public OnPlayerCommandText(playerid, cmdtext[])
  510. {
  511. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  512. {
  513. // Do something here
  514. return 1;
  515. }
  516. return 0;
  517. }
  518.  
  519. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  520. {
  521. return 1;
  522. }
  523.  
  524. public OnPlayerExitVehicle(playerid, vehicleid)
  525. {
  526. return 1;
  527. }
  528.  
  529. public OnPlayerStateChange(playerid, newstate, oldstate)
  530. {
  531. return 1;
  532. }
  533.  
  534. public OnPlayerEnterCheckpoint(playerid)
  535. {
  536. return 1;
  537. }
  538.  
  539. public OnPlayerLeaveCheckpoint(playerid)
  540. {
  541. return 1;
  542. }
  543.  
  544. public OnPlayerEnterRaceCheckpoint(playerid)
  545. {
  546. return 1;
  547. }
  548.  
  549. public OnPlayerLeaveRaceCheckpoint(playerid)
  550. {
  551. return 1;
  552. }
  553.  
  554. public OnRconCommand(cmd[])
  555. {
  556. return 1;
  557. }
  558.  
  559. public OnPlayerRequestSpawn(playerid)
  560. {
  561. return 1;
  562. }
  563.  
  564. public OnObjectMoved(objectid)
  565. {
  566. return 1;
  567. }
  568.  
  569. public OnPlayerObjectMoved(playerid, objectid)
  570. {
  571. return 1;
  572. }
  573.  
  574. public OnPlayerPickUpPickup(playerid, pickupid)
  575. {
  576. return 1;
  577. }
  578.  
  579. public OnVehicleMod(playerid, vehicleid, componentid)
  580. {
  581. return 1;
  582. }
  583.  
  584. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  585. {
  586. return 1;
  587. }
  588.  
  589. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  590. {
  591. return 1;
  592. }
  593.  
  594. public OnPlayerSelectedMenuRow(playerid, row)
  595. {
  596. return 1;
  597. }
  598.  
  599. public OnPlayerExitedMenu(playerid)
  600. {
  601. return 1;
  602. }
  603.  
  604. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  605. {
  606. if(checkpointid == CP[ZONE_BREWERY_FACTORY])
  607. {
  608. new string[128];
  609. new teamname[128];
  610. teamname = GetPlayerTeamName(playerid);
  611. if(tCheck[Zone] == PlayerInfo[playerid][pTeam]) return SendClientMessage(playerid, COLOR_RED,"ERROR: This zone is already captured by your team");
  612. if(UnderAttack == 1) return SendClientMessage(playerid, COLOR_RED,"ERROR: This zone is already being taken over!");
  613. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"ERROR: You cannot capture while in vehicle!");
  614. UnderAttack[ZONE_BREWERY_FACTORY] = 1;
  615. timer[playerid][ZONE_BREWERY_FACTORY] = SetTimerEx("SetZone",60000,false,"i", playerid);
  616. GangZoneFlashForAll(Zone[ZONE_BREWERY_FACTORY],COLOR_RED);
  617. format(string, sizeof(string), "The Brewery Factory in Blueberry is being taken over by %s", teamname);
  618. SendClientMessageToAll(COLOR_RED, string);
  619. zDefine[playerid] = ZONE_BREWERY_FACTORY;
  620. }
  621. return 1;
  622. }
  623.  
  624. public OnPlayerLeaveDynamicCP(playerid, checkpointid)
  625. {
  626. if(checkpointid == CP[Zone])
  627. {
  628. UnderAttack[ZONE_BREWERY_FACTORY] = 0;
  629. GangZoneStopFlashForAll(Zone[ZONE_BREWERY_FACTORY]);
  630. KillTimer(timer[playerid][ZONE_BREWERY_FACTORY]);
  631.  
  632. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  633. {
  634. return 1;
  635. }
  636.  
  637. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  638. {
  639. return 1;
  640. }
  641.  
  642. public OnRconLoginAttempt(ip[], password[], success)
  643. {
  644. return 1;
  645. }
  646.  
  647. public OnPlayerUpdate(playerid)
  648. {
  649. return 1;
  650. }
  651.  
  652. public OnPlayerStreamIn(playerid, forplayerid)
  653. {
  654. return 1;
  655. }
  656.  
  657. public OnPlayerStreamOut(playerid, forplayerid)
  658. {
  659. return 1;
  660. }
  661.  
  662. public OnVehicleStreamIn(vehicleid, forplayerid)
  663. {
  664. return 1;
  665. }
  666.  
  667. public OnVehicleStreamOut(vehicleid, forplayerid)
  668. {
  669. return 1;
  670. }
  671.  
  672. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  673. {
  674. switch( dialogid )
  675. {
  676. case DIALOG_REGISTER:
  677. {
  678. if (!response) return Kick(playerid);
  679. if(response)
  680. {
  681. 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");
  682. new INI:File = INI_Open(UserPath(playerid));
  683. INI_SetTag(File,"data");
  684. INI_WriteInt(File,"Password",udb_hash(inputtext));
  685. INI_WriteInt(File,"Cash",0);
  686. INI_WriteInt(File,"Admin",0);
  687. INI_WriteInt(File,"Kills",0);
  688. INI_WriteInt(File,"Deaths",0);
  689. INI_WriteInt(File,"VIP",0);
  690. INI_WriteInt(File,"XP",0);
  691. INI_WriteInt(File,"Level",0);
  692. INI_Close(File);
  693.  
  694. SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
  695. SpawnPlayer(playerid);
  696. 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","");
  697. }
  698. }
  699.  
  700. case DIALOG_LOGIN:
  701. {
  702. if ( !response ) return Kick ( playerid );
  703. if( response )
  704. {
  705. if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  706. {
  707. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  708. GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  709. SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
  710. ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"Success!","You have successfully logged in!","Ok","");
  711. SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
  712. TogglePlayerSpectating(playerid, 0);
  713. SpawnPlayer(playerid);
  714. SpawnPlayerAtTeam(playerid);
  715. }
  716. else
  717. {
  718. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
  719. }
  720. return 1;
  721. }
  722. }
  723. }
  724.  
  725. if(dialogid == DIALOG_TEAM_SELECTION)
  726. {
  727. if(response)
  728. {
  729. switch(listitem)
  730. {
  731. case 0: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_USA);
  732. case 1: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_CANADA);
  733. case 2: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_BRITAIN);
  734. case 3: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_AUSTRALIA);
  735. case 4: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_RUSSIA);
  736. case 5: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_GERMANY);
  737. case 6: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_ITALY);
  738. case 7: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_FRANCE);
  739. case 8: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_CHINA);
  740. case 9: TogglePlayerSpectating(playerid, 0), AltSetPlayerTeam(playerid, TEAM_INDIA);
  741. }
  742. }
  743. return 1;
  744. }
  745.  
  746. if(dialogid == DIALOG_SELECT_WEAPONS_CATEGORY)
  747. {
  748. if(response)
  749. {
  750. switch(listitem)
  751. {
  752. 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");
  753. case 1: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_THROWN,DIALOG_STYLE_LIST,"Select Thrown Weapon","Grenade\nTear Gas\nMolotov Cocktail\nGo Back","Select","Cancel");
  754. case 2: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_PISTOLS,DIALOG_STYLE_LIST,"Select Pistol","9mm\nSilenced 9mm\nDesert Eagle\nGo Back","Select","Cancel");
  755. case 3: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_SHOTGUNS,DIALOG_STYLE_LIST,"Select Shotgun","Shotgun\nSawnoff Shotgun\nCombat Shotgun\nGo Back","Select","Cancel");
  756. case 4: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_SMGS,DIALOG_STYLE_LIST,"Select SMG","Micro SMG/Uzi\nMP5\nTec-9\nGo Back","Select","Cancel");
  757. case 5: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_ASSAULT_RIFLES,DIALOG_STYLE_LIST,"Select Assault Rifle","AK-47\nM4\nGo Back","Select","Cancel");
  758. case 6: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_RIFLES,DIALOG_STYLE_LIST,"Select Rifle","Country Rifle\nSniper Rifle\nGo Back","Select","Cancel");
  759. case 7: ShowPlayerDialog(playerid,DIALOG_ADM_WEAPONS_HEAVY,DIALOG_STYLE_LIST,"Select Heavy","RPG\nHS Rocket\nFlamethrower\nMinigun\nGo Back","Select","Cancel");
  760. }
  761. }
  762. return 1;
  763. }
  764.  
  765. if(dialogid == DIALOG_ADM_WEAPONS_MELEE)
  766. {
  767. if(response)
  768. {
  769. switch(listitem)
  770. {
  771. case 0: GivePlayerWeapon(playerid,1,9999999);
  772. case 1: GivePlayerWeapon(playerid,2,9999999);
  773. case 2: GivePlayerWeapon(playerid,3,9999999);
  774. case 3: GivePlayerWeapon(playerid,4,9999999);
  775. case 4: GivePlayerWeapon(playerid,5,9999999);
  776. case 5: GivePlayerWeapon(playerid,6,9999999);
  777. case 6: GivePlayerWeapon(playerid,7,9999999);
  778. case 7: GivePlayerWeapon(playerid,8,9999999);
  779. case 8: GivePlayerWeapon(playerid,8,9999999);
  780. case 9: GivePlayerWeapon(playerid,9,9999999);
  781. case 10: GivePlayerWeapon(playerid,10,9999999);
  782. case 11: GivePlayerWeapon(playerid,11,9999999);
  783. case 12: GivePlayerWeapon(playerid,12,9999999);
  784. case 13: GivePlayerWeapon(playerid,13,9999999);
  785. case 14: GivePlayerWeapon(playerid,14,9999999);
  786. case 15: GivePlayerWeapon(playerid,15,9999999);
  787. case 16: GivePlayerWeapon(playerid,41,9999999);
  788. case 17: GivePlayerWeapon(playerid,42,9999999);
  789. 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");
  790. }
  791. }
  792. return 1;
  793. }
  794.  
  795. if(dialogid == DIALOG_ADM_WEAPONS_THROWN)
  796. {
  797. if(response)
  798. {
  799. switch(listitem)
  800. {
  801. case 0: GivePlayerWeapon(playerid,16,9999999);
  802. case 1: GivePlayerWeapon(playerid,17,9999999);
  803. case 2: GivePlayerWeapon(playerid,18,9999999);
  804. 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");
  805. }
  806. }
  807. return 1;
  808. }
  809.  
  810. if(dialogid == DIALOG_ADM_WEAPONS_PISTOLS)
  811. {
  812. if(response)
  813. {
  814. switch(listitem)
  815. {
  816. case 0: GivePlayerWeapon(playerid,22,9999999);
  817. case 1: GivePlayerWeapon(playerid,23,9999999);
  818. case 2: GivePlayerWeapon(playerid,24,9999999);
  819. 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");
  820. }
  821. }
  822. return 1;
  823. }
  824.  
  825. if(dialogid == DIALOG_ADM_WEAPONS_SHOTGUNS)
  826. {
  827. if(response)
  828. {
  829. switch(listitem)
  830. {
  831. case 0: GivePlayerWeapon(playerid,25,9999999);
  832. case 1: GivePlayerWeapon(playerid,26,9999999);
  833. case 2: GivePlayerWeapon(playerid,27,9999999);
  834. 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");
  835. }
  836. }
  837. return 1;
  838. }
  839.  
  840. if(dialogid == DIALOG_ADM_WEAPONS_SMGS)
  841. {
  842. if(response)
  843. {
  844. switch(listitem)
  845. {
  846. case 0: GivePlayerWeapon(playerid,28,9999999);
  847. case 1: GivePlayerWeapon(playerid,29,9999999);
  848. case 2: GivePlayerWeapon(playerid,32,9999999);
  849. 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");
  850. }
  851. }
  852. return 1;
  853. }
  854.  
  855. if(dialogid == DIALOG_ADM_WEAPONS_ASSAULT_RIFLES)
  856. {
  857. if(response)
  858. {
  859. switch(listitem)
  860. {
  861. case 0: GivePlayerWeapon(playerid,30,9999999);
  862. case 1: GivePlayerWeapon(playerid,31,9999999);
  863. 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");
  864. }
  865. }
  866. return 1;
  867. }
  868.  
  869. if(dialogid == DIALOG_ADM_WEAPONS_RIFLES)
  870. {
  871. if(response)
  872. {
  873. switch(listitem)
  874. {
  875. case 0: GivePlayerWeapon(playerid,33,9999999);
  876. case 1: GivePlayerWeapon(playerid,34,9999999);
  877. 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");
  878. }
  879. }
  880. return 1;
  881. }
  882.  
  883. if(dialogid == DIALOG_ADM_WEAPONS_HEAVY)
  884. {
  885. if(response)
  886. {
  887. switch(listitem)
  888. {
  889. case 0: GivePlayerWeapon(playerid,35,9999999);
  890. case 1: GivePlayerWeapon(playerid,36,9999999);
  891. case 2: GivePlayerWeapon(playerid,37,9999999);
  892. case 3: GivePlayerWeapon(playerid,38,9999999);
  893. 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");
  894. }
  895. }
  896. return 1;
  897. }
  898. return 0;
  899. }
  900.  
  901. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  902. {
  903. return 1;
  904. }
  905.  
  906. public OnPlayerRequestGate(playerid, gateid)
  907. {
  908. //return 0 means cannot pass, return 1 means can
  909. if((gateid == GATE_ADMIN_HOUSE1) && (PlayerInfo[playerid][pAdmin] < 1)) return 0;
  910. if((gateid == GATE_ADMIN_HOUSE2) && (PlayerInfo[playerid][pAdmin] < 1)) return 0;
  911.  
  912. if((gateid == GATE_INDIA1) && (PlayerInfo[playerid][pTeam] != TEAM_INDIA)) return 0;
  913. if((gateid == GATE_INDIA2) && (PlayerInfo[playerid][pTeam] != TEAM_INDIA)) return 0;
  914. if((gateid == GATE_INDIA3) && (PlayerInfo[playerid][pTeam] != TEAM_INDIA)) return 0;
  915. return 1;
  916. }
  917.  
  918. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  919. {
  920. SetPlayerPosFindZ(playerid, fX, fY, fZ);
  921. return 1;
  922. }
  923.  
  924. /*////////////////////////////////////
  925. COMMANDS
  926. *//////////////////////////////////////
  927. CMD:changeteam(playerid, params[])
  928. {
  929. 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","");
  930. return 1;
  931. }
  932.  
  933. CMD:setadmin(playerid, params[])
  934. {
  935. if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 4)
  936. {
  937. new log[128];
  938. new id;
  939. new asetlevel;
  940. new name[24];
  941. GetPlayerName(playerid, name, sizeof(name));
  942. if(sscanf(params, "ud", id, asetlevel)) SendClientMessage(playerid, COLOR_RED, "USAGE: /setadmin [playerid] [level]");
  943. else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "ERROR: Player not found.");
  944. 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.");
  945. else if((playerid == id) && !IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "ERROR: You cannot use this command on yourself.");
  946. else
  947. {
  948. new name2[24];
  949. new string1[128];
  950. new string2[128];
  951. GetPlayerName(id, name2, sizeof(name2));
  952. PlayerInfo[id][pAdmin] = asetlevel;
  953. format(string1, sizeof(string1), "-| You have set %s's admin level to %d |-", name2, asetlevel);
  954. format(string2, sizeof(string2), "-| Your admin level has been set to %d by %s |-", asetlevel, name);
  955. SendClientMessage(playerid, COLOR_GREEN, string1);
  956. SendClientMessage(id, COLOR_GREEN, string2);
  957. format(log, sizeof(log), "[ADMIN LOG] %s(%i) used /setadmin on %s(%i), setting their admin level to %i", name, playerid, name2, id, asetlevel);
  958. SendAdminMessage(COLOR_GREEN, log);
  959. }
  960. }
  961. else
  962. {
  963. SendClientMessage(playerid, COLOR_RED, "ERROR: You must have admin level 4 or higher to use this command.");
  964. }
  965. return 1;
  966. }
  967.  
  968. CMD:adminhouse(playerid, params[])
  969. {
  970. new log[128];
  971. new name[24];
  972. GetPlayerName(playerid, name, sizeof(name));
  973. if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
  974. {
  975. SetPlayerPos(playerid, 1498.8534,-703.7729,94.7439);
  976. SetPlayerFacingAngle(playerid, 7.6887);
  977. SetCameraBehindPlayer(playerid);
  978. format(log, sizeof(log), "[ADMIN LOG] %s(%i) teleported to the admin house", name, playerid);
  979. SendAdminMessage(COLOR_GREEN, log);
  980. }
  981. else
  982. {
  983. SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an admin to use this command.");
  984. }
  985. return 1;
  986. }
  987. CMD:closeadmingate(playerid, params[])
  988. {
  989. if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
  990. {
  991. CloseGate(GATE_ADMIN_HOUSE1);
  992. CloseGate(GATE_ADMIN_HOUSE2);
  993. }
  994. else
  995. {
  996. SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an admin to use this command.");
  997. }
  998. return 1;
  999. }
  1000. CMD:openadmingate(playerid, params[])
  1001. {
  1002. if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
  1003. {
  1004. OpenGate(GATE_ADMIN_HOUSE1);
  1005. OpenGate(GATE_ADMIN_HOUSE2);
  1006. }
  1007. else
  1008. {
  1009. SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an admin to use this command.");
  1010. }
  1011. return 1;
  1012. }
  1013.  
  1014. CMD:stats(playerid, params[])
  1015. {
  1016. new name[24], string1[128], string2[128], string3[128], year, month, day;
  1017. GetPlayerName(playerid, name, sizeof(name));
  1018. getdate(year,month,day);
  1019. new team[24];
  1020. team = GetPlayerTeamName(playerid);
  1021. SendClientMessage(playerid, COLOR_YELLOW, "-| Stats |-");
  1022. format(string1, sizeof(string1), "Name: %s | Team: %s", name, team);
  1023. 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]);
  1024. format(string3, sizeof(string3), "VIP Level: %d | Admin Level: %d", PlayerInfo[playerid][pVIP], PlayerInfo[playerid][pAdmin]);
  1025. SendClientMessage(playerid, COLOR_YELLOW, string1);
  1026. SendClientMessage(playerid, COLOR_YELLOW, string2);
  1027. SendClientMessage(playerid, COLOR_YELLOW, string3);
  1028. return 1;
  1029. }
  1030.  
  1031. CMD:kill(playerid, params[])
  1032. {
  1033. SetPlayerHealth(playerid, 0);
  1034. SendClientMessage(playerid, COLOR_RED, "You have killed yourself!");
  1035. return 1;
  1036. }
  1037.  
  1038. CMD:setcash(playerid, params[])
  1039. {
  1040. if(PlayerInfo[playerid][pAdmin] >= 2)
  1041. {
  1042. new id;
  1043. new cash;
  1044. new name[24];
  1045. GetPlayerName(playerid, name, sizeof(name));
  1046. if(sscanf(params, "ud", id, cash)) SendClientMessage(playerid, COLOR_RED, "USAGE: /setcash [playerid] [amount]");
  1047. else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "ERROR: Player not found.");
  1048. else
  1049. {
  1050. new name2[24];
  1051. new string1[128];
  1052. new string2[128];
  1053. new log[128];
  1054. GetPlayerName(id, name2, sizeof(name2));
  1055. ResetPlayerMoney(id);
  1056. GivePlayerMoney(id, cash);
  1057. format(string1, sizeof(string1), "-| You have set %s's cash to $%d |-", name2, cash);
  1058. format(string2, sizeof(string2), "-| Your cash has been set to $%d by %s |-", cash, name);
  1059. SendClientMessage(playerid, COLOR_GREEN, string1);
  1060. SendClientMessage(id, COLOR_YELLOW, string2);
  1061. format(log, sizeof(log), "[ADMIN LOG] %s(%i) used /setcash on %s(%i), setting their cash to $%i", name, playerid, name2, id, cash);
  1062. SendAdminMessage(COLOR_GREEN, log);
  1063. }
  1064. }
  1065. else
  1066. {
  1067. SendClientMessage(playerid, COLOR_RED, "ERROR: You must have admin level 2 or higher to use this command.");
  1068. }
  1069. return 1;
  1070. }
  1071.  
  1072. CMD:givecash(playerid, params[])
  1073. {
  1074. if(PlayerInfo[playerid][pAdmin] >= 2)
  1075. {
  1076. new id;
  1077. new cash;
  1078. new name[24];
  1079. GetPlayerName(playerid, name, sizeof(name));
  1080. if(sscanf(params, "ud", id, cash)) SendClientMessage(playerid, COLOR_RED, "USAGE: /givecash [playerid] [amount]");
  1081. else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "ERROR: Player not found.");
  1082. else
  1083. {
  1084. new name2[24];
  1085. new string1[128];
  1086. new string2[128];
  1087. new log[64];
  1088. GetPlayerName(id, name2, sizeof(name2));
  1089. GivePlayerMoney(id, cash);
  1090. format(string1, sizeof(string1), "-| You have given %s $%d |-", name2, cash);
  1091. format(string2, sizeof(string2), "-| You have been given $%d by %s |-", cash, name);
  1092. SendClientMessage(playerid, COLOR_GREEN, string1);
  1093. SendClientMessage(id, COLOR_GREEN, string2);
  1094. format(log, sizeof(log), "[ADMIN LOG] %s(%i) used /givecash on %s(%i), giving them $%i", name, playerid, name2, id, cash);
  1095. SendAdminMessage(COLOR_GREEN, log);
  1096. }
  1097. }
  1098. else
  1099. {
  1100. SendClientMessage(playerid, COLOR_RED, "ERROR: You must be admin level 2 or higher to use this command.");
  1101. }
  1102. return 1;
  1103. }
  1104.  
  1105. CMD:pm(playerid, params[])
  1106. {
  1107. new id;
  1108. new message[256];
  1109. new name[24];
  1110. GetPlayerName(playerid, name, sizeof(name));
  1111. if(sscanf(params, "us", id, message)) SendClientMessage(playerid, COLOR_RED, "USAGE: /pm [playerid] [message]");
  1112. else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "ERROR: Player not found.");
  1113. else
  1114. {
  1115. new name2[24];
  1116. new string1[128];
  1117. new string2[128];
  1118. GetPlayerName(id, name2, sizeof(name2));
  1119. format(string1, sizeof(string1), "PM from %s: %s", name, message);
  1120. format(string2, sizeof(string2), "PM to %s: %s", name2, message);
  1121. SendClientMessage(playerid, COLOR_GREEN, string1);
  1122. SendClientMessage(id, COLOR_YELLOW, string2);
  1123. }
  1124. return 1;
  1125. }
  1126.  
  1127. CMD:a(playerid, params[])
  1128. {
  1129. if(PlayerInfo[playerid][pAdmin] >= 1)
  1130. {
  1131. new message[256];
  1132. new name[24];
  1133. GetPlayerName(playerid, name, sizeof(name));
  1134. if(sscanf(params, "s[256]", message)) SendClientMessage(playerid, COLOR_RED, "USAGE: /a [message]");
  1135. else
  1136. {
  1137. format(message, sizeof(message), "[ADMIN CHAT] %s(%i): %s", name, playerid, message);
  1138. SendAdminMessage(COLOR_GREEN, message);
  1139. }
  1140. }
  1141. else
  1142. {
  1143. SendClientMessage(playerid, COLOR_RED, "ERROR: You must be admin level 2 or higher to use this command.");
  1144. }
  1145. return 1;
  1146. }
  1147.  
  1148. CMD:t(playerid, params[])
  1149. {
  1150. new message[256];
  1151. new name[24];
  1152. new team;
  1153. GetPlayerName(playerid, name, sizeof(name));
  1154. team = GetPlayerTeam(playerid);
  1155. if(sscanf(params, "s[256]", message)) SendClientMessage(playerid, COLOR_RED, "USAGE: /t [message]");
  1156. else
  1157. {
  1158. format(message, sizeof(message), "[TEAM CHAT] %s(%i): %s", name, playerid, message);
  1159. SendTeamMessage(team, message);
  1160. }
  1161. return 1;
  1162. }
  1163.  
  1164. CMD:teleport(playerid, params[])
  1165. {
  1166. if(PlayerInfo[playerid][pAdmin] >= 1)
  1167. {
  1168. new id;
  1169. new name[24];
  1170. if(sscanf(params, "u", id)) SendClientMessage(playerid, COLOR_RED, "USAGE: /teleport [playerid]");
  1171. else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "ERROR: Player not found.");
  1172. else
  1173. {
  1174. new interior;
  1175. new Float:x, Float:y, Float:z, Float:angle;
  1176. GetPlayerName(id, name, sizeof(name));
  1177. GetPlayerPos(id, x, y, z);
  1178. GetPlayerFacingAngle(id, angle);
  1179. interior = GetPlayerInterior(id);
  1180. SetPlayerInterior(playerid, interior);
  1181. SetPlayerPos(playerid, x, y, z);
  1182. SetPlayerFacingAngle(playerid, angle);
  1183. SetCameraBehindPlayer(playerid);
  1184. new name2[24];
  1185. new string1[128];
  1186. new log[64];
  1187. GetPlayerName(id, name2, sizeof(name2));
  1188. format(string1, sizeof(string1), "-| You have teleported to %s |-", name2);
  1189. SendClientMessage(playerid, COLOR_GREEN, string1);
  1190. format(log, sizeof(log), "[ADMIN LOG] %s(%i) used /tp and teleported to %s(%i)", name, playerid, name2, id);
  1191. SendAdminMessage(COLOR_GREEN, log);
  1192. }
  1193. }
  1194. else
  1195. {
  1196. SendClientMessage(playerid, COLOR_RED, "ERROR: You must be admin to use this command.");
  1197. }
  1198. return 1;
  1199. }
  1200.  
  1201. CMD:tp(playerid, params[])
  1202. {
  1203. return cmd_teleport(playerid, params);
  1204. }
  1205.  
  1206. CMD:admingetweapon(playerid, params[])
  1207. {
  1208. if(PlayerInfo[playerid][pAdmin] >= 1)
  1209. {
  1210. new logname[24];
  1211. new string[128];
  1212. GetPlayerName(playerid, logname, sizeof(logname));
  1213. ShowPlayerDialog(playerid,DIALOG_SELECT_WEAPONS_CATEGORY,DIALOG_STYLE_LIST,"Select Weapon Category","Melee\nThrown\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nHeavy","Select","Cancel");
  1214. format(string, sizeof(string), "[ADMIN LOGS] %s(%i) used /admingetweapon", logname, playerid);
  1215. SendAdminMessage(COLOR_GREEN, string);
  1216. }
  1217. else SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an admin to use this command.");
  1218. return 1;
  1219. }
  1220. /*////////////////////////////////////////////////////
  1221. YEET DAB
  1222. *////////////////////////////////////////////////////
  1223. forward SetZone(playerid);
  1224. public SetZone(playerid)
  1225. {
  1226.  
  1227. GivePlayerMoney(playerid, 3000);
  1228. GivePlayerXP(playerid, 250);
  1229. SendClientMessage(playerid,COLOR_GREEN,"Congratulations! You have earned $3000 and 250 XP");
  1230. UnderAttack[ZONE_BREWERY_FACTORY] = 0;
  1231. KillTimer(timer[playerid][ZONE_BREWERY_FACTORY]);
  1232. SetGangZone(playerid);
  1233. return 1;
  1234. }
  1235.  
  1236. forward SetGangZone(playerid);
  1237. public SetGangZone(playerid)
  1238. {
  1239. if(zDefine[playerid] == ZONE_BREWERY_FACTORY)
  1240. {
  1241. GangZoneShowForAll(Zone[ZONE_BREWERY_FACTORY],GetPlayerColor(playerid));
  1242. new string[126], pName5[MAX_PLAYER_NAME], new teamname[24];
  1243. GetPlayerName(playerid,pName5,sizeof(pName5));
  1244. format(string,sizeof string,"%s has captured the Blueberry Factory in Brewery",teamname);
  1245. GangZoneStopFlashForAll(Zone[ZONE_BREWERY_FACTORY]);
  1246. SendClientMessageToAll(COLOR_GREEN, string);
  1247. tCheck[ZONE_BREWERY_FACTORY] = PlayerInfo[playerid][pTeam];
  1248. }
  1249. return 1;
  1250. }
  1251. forward LoadUser_data(playerid,name[],value[]);
  1252. public LoadUser_data(playerid,name[],value[])
  1253. {
  1254. INI_Int("Password",PlayerInfo[playerid][pPass]);
  1255. INI_Int("Cash",PlayerInfo[playerid][pCash]);
  1256. INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  1257. INI_Int("Kills",PlayerInfo[playerid][pKills]);
  1258. INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
  1259. INI_Int("VIP",PlayerInfo[playerid][pVIP]);
  1260. INI_Int("XP",PlayerInfo[playerid][pXP]);
  1261. INI_Int("Level",PlayerInfo[playerid][pLevel]);
  1262. INI_String("Level Name", PlayerInfo[playerid][pLevelName], 64);
  1263. INI_Int("Team",PlayerInfo[playerid][pTeam]);
  1264. return 1;
  1265. }
  1266.  
  1267. stock UserPath(playerid)
  1268. {
  1269. new string[128],playername[MAX_PLAYER_NAME];
  1270. GetPlayerName(playerid,playername,sizeof(playername));
  1271. format(string,sizeof(string),PATH,playername);
  1272. return string;
  1273. }
  1274.  
  1275. /*Credits to Dracoblue*/
  1276. stock udb_hash(buf[]) {
  1277. new length=strlen(buf);
  1278. new s1 = 1;
  1279. new s2 = 0;
  1280. new n;
  1281. for (n=0; n<length; n++)
  1282. {
  1283. s1 = (s1 + buf[n]) % 65521;
  1284. s2 = (s2 + s1) % 65521;
  1285. }
  1286. return (s2 << 16) + s1;
  1287. }
  1288.  
  1289. stock PlayerLevelUp(playerid)
  1290. {
  1291. PlayerInfo[playerid][pLevel]++;
  1292. }
  1293.  
  1294. stock GivePlayerXP(playerid, xpamount)
  1295. {
  1296. PlayerInfo[playerid][pXP] += xpamount;
  1297. LevelUpCheck(playerid);
  1298. }
  1299.  
  1300. /*//////////////////////////////////////////////////
  1301. LEVELS
  1302. *//////////////////////////////////////////////////
  1303.  
  1304. stock GetPlayerLevel(playerid)
  1305. {
  1306. if(PlayerInfo[playerid][pLevel] == 1) return 1;
  1307. if(PlayerInfo[playerid][pLevel] == 2) return 2;
  1308. if(PlayerInfo[playerid][pLevel] == 3) return 3;
  1309. if(PlayerInfo[playerid][pLevel] == 4) return 4;
  1310. if(PlayerInfo[playerid][pLevel] == 5) return 5;
  1311. if(PlayerInfo[playerid][pLevel] == 6) return 6;
  1312. if(PlayerInfo[playerid][pLevel] == 7) return 7;
  1313. if(PlayerInfo[playerid][pLevel] == 8) return 8;
  1314. if(PlayerInfo[playerid][pLevel] == 9) return 9;
  1315. if(PlayerInfo[playerid][pLevel] == 10) return 10;
  1316. if(PlayerInfo[playerid][pLevel] == 11) return 11;
  1317. if(PlayerInfo[playerid][pLevel] == 12) return 12;
  1318. if(PlayerInfo[playerid][pLevel] == 13) return 13;
  1319. if(PlayerInfo[playerid][pLevel] == 14) return 14;
  1320. if(PlayerInfo[playerid][pLevel] == 15) return 15;
  1321. if(PlayerInfo[playerid][pLevel] == 16) return 16;
  1322. if(PlayerInfo[playerid][pLevel] == 17) return 17;
  1323. if(PlayerInfo[playerid][pLevel] == 18) return 18;
  1324. if(PlayerInfo[playerid][pLevel] == 19) return 19;
  1325. if(PlayerInfo[playerid][pLevel] == 20) return 20;
  1326. if(PlayerInfo[playerid][pLevel] == 21) return 21;
  1327. if(PlayerInfo[playerid][pLevel] == 22) return 22;
  1328. if(PlayerInfo[playerid][pLevel] == 23) return 23;
  1329. if(PlayerInfo[playerid][pLevel] == 24) return 24;
  1330. if(PlayerInfo[playerid][pLevel] == 25) return 25;
  1331. if(PlayerInfo[playerid][pLevel] == 26) return 26;
  1332. if(PlayerInfo[playerid][pLevel] == 27) return 27;
  1333. if(PlayerInfo[playerid][pLevel] == 28) return 28;
  1334. if(PlayerInfo[playerid][pLevel] == 29) return 29;
  1335. if(PlayerInfo[playerid][pLevel] == 30) return 30;
  1336. }
  1337.  
  1338. stock LevelUpCheck(playerid)
  1339. {
  1340. if(PlayerInfo[playerid][pXP] == 100) PlayerLevelUp(playerid); //To level 2
  1341. if(PlayerInfo[playerid][pXP] == 250) PlayerLevelUp(playerid); //To level 3
  1342. if(PlayerInfo[playerid][pXP] == 500) PlayerLevelUp(playerid); //To level 4
  1343. if(PlayerInfo[playerid][pXP] == 750) PlayerLevelUp(playerid); //To level 5
  1344. if(PlayerInfo[playerid][pXP] == 1000) PlayerLevelUp(playerid); //To level 6
  1345. if(PlayerInfo[playerid][pXP] == 1250) PlayerLevelUp(playerid); //To level 7
  1346. if(PlayerInfo[playerid][pXP] == 1500) PlayerLevelUp(playerid); //To level 8
  1347. if(PlayerInfo[playerid][pXP] == 1750) PlayerLevelUp(playerid); //To level 9
  1348. if(PlayerInfo[playerid][pXP] == 2000) PlayerLevelUp(playerid); //To level 10
  1349. if(PlayerInfo[playerid][pXP] == 2500) PlayerLevelUp(playerid); //To level 11
  1350. if(PlayerInfo[playerid][pXP] == 3000) PlayerLevelUp(playerid); //To level 12
  1351. if(PlayerInfo[playerid][pXP] == 3500) PlayerLevelUp(playerid); //To level 13
  1352. if(PlayerInfo[playerid][pXP] == 4000) PlayerLevelUp(playerid); //To level 14
  1353. if(PlayerInfo[playerid][pXP] == 4500) PlayerLevelUp(playerid); //To level 15
  1354. if(PlayerInfo[playerid][pXP] == 5000) PlayerLevelUp(playerid); //To level 16
  1355. if(PlayerInfo[playerid][pXP] == 5500) PlayerLevelUp(playerid); //To level 17
  1356. if(PlayerInfo[playerid][pXP] == 6000) PlayerLevelUp(playerid); //To Level 18
  1357. if(PlayerInfo[playerid][pXP] == 6500) PlayerLevelUp(playerid); //To level 19
  1358. if(PlayerInfo[playerid][pXP] == 7000) PlayerLevelUp(playerid); //To Level 20
  1359. if(PlayerInfo[playerid][pXP] == 7500) PlayerLevelUp(playerid); //To Level 21
  1360. if(PlayerInfo[playerid][pXP] == 8000) PlayerLevelUp(playerid); //To Level 22
  1361. if(PlayerInfo[playerid][pXP] == 8500) PlayerLevelUp(playerid); //To Level 23
  1362. if(PlayerInfo[playerid][pXP] == 9000) PlayerLevelUp(playerid); //To level 24
  1363. if(PlayerInfo[playerid][pXP] == 10000) PlayerLevelUp(playerid); //To level 25
  1364. if(PlayerInfo[playerid][pXP] == 11000) PlayerLevelUp(playerid); //To level 26
  1365. if(PlayerInfo[playerid][pXP] == 12000) PlayerLevelUp(playerid); //To level 27
  1366. if(PlayerInfo[playerid][pXP] == 13000) PlayerLevelUp(playerid); //To level 28
  1367. if(PlayerInfo[playerid][pXP] == 14000) PlayerLevelUp(playerid); //To level 29
  1368. if(PlayerInfo[playerid][pXP] == 15000) PlayerLevelUp(playerid); //To level 30
  1369. }
  1370.  
  1371. SetPlayerLevelName(playerid)
  1372. {
  1373. strdel(PlayerInfo[playerid][pLevelName],0,128);
  1374. switch(PlayerInfo[playerid][pLevel])
  1375. {
  1376. case 1: strins(PlayerInfo[playerid][pLevelName],"Private I",0,128);
  1377. case 2: strins(PlayerInfo[playerid][pLevelName],"Private II",0,128);
  1378. case 3: strins(PlayerInfo[playerid][pLevelName],"Private III",0,128);
  1379. case 4: strins(PlayerInfo[playerid][pLevelName],"Private First Class",0,128);
  1380. case 5: strins(PlayerInfo[playerid][pLevelName],"Specialist",0,128);
  1381. case 6: strins(PlayerInfo[playerid][pLevelName],"Corporal",0,128);
  1382. case 7: strins(PlayerInfo[playerid][pLevelName],"Sergeant",0,128);
  1383. case 8: strins(PlayerInfo[playerid][pLevelName],"Staff Sergeant",0,128);
  1384. case 9: strins(PlayerInfo[playerid][pLevelName],"Sergeant First Class",0,128);
  1385. case 10: strins(PlayerInfo[playerid][pLevelName],"Master Sergeant",0,128);
  1386. case 11: strins(PlayerInfo[playerid][pLevelName],"First Sergeant",0,128);
  1387. case 12: strins(PlayerInfo[playerid][pLevelName],"Sergeant Major",0,128);
  1388. case 13: strins(PlayerInfo[playerid][pLevelName],"Command Sergeant Major",0,128);
  1389. case 14: strins(PlayerInfo[playerid][pLevelName],"Sergeant Major of the Army",0,128);
  1390. case 15: strins(PlayerInfo[playerid][pLevelName],"Warrant Officer",0,128);
  1391. case 16: strins(PlayerInfo[playerid][pLevelName],"Chief Warrant Officer II",0,128);
  1392. case 17: strins(PlayerInfo[playerid][pLevelName],"Chief Warrant Officer III",0,128);
  1393. case 18: strins(PlayerInfo[playerid][pLevelName],"Chief Warrant Officer IV",0,128);
  1394. case 19: strins(PlayerInfo[playerid][pLevelName],"Chief Warrant Officer V",0,128);
  1395. case 20: strins(PlayerInfo[playerid][pLevelName],"Second Lieutenant",0,128);
  1396. case 21: strins(PlayerInfo[playerid][pLevelName],"First Lieutenant",0,128);
  1397. case 22: strins(PlayerInfo[playerid][pLevelName],"Captain",0,128);
  1398. case 23: strins(PlayerInfo[playerid][pLevelName],"Major",0,128);
  1399. case 24: strins(PlayerInfo[playerid][pLevelName],"Lieutenant Colonel",0,128);
  1400. case 25: strins(PlayerInfo[playerid][pLevelName],"Colonel",0,128);
  1401. case 26: strins(PlayerInfo[playerid][pLevelName],"Brigadier General",0,128);
  1402. case 27: strins(PlayerInfo[playerid][pLevelName],"Major General",0,128);
  1403. case 28: strins(PlayerInfo[playerid][pLevelName],"Lieutenant General",0,128);
  1404. case 29: strins(PlayerInfo[playerid][pLevelName],"General",0,128);
  1405. case 30: strins(PlayerInfo[playerid][pLevelName],"General of the Army",0,128);
  1406. }
  1407. return 1;
  1408. }
  1409.  
  1410. stock GetPlayerLevelName(playerid)
  1411. {
  1412. SetPlayerLevelName(playerid);
  1413. return PlayerInfo[playerid][pLevelName];
  1414. }
  1415.  
  1416. /*/////////////////////////////////////////
  1417. TEAMS
  1418. *///////////////////////////////////////////
  1419. stock AltSetPlayerTeam(playerid, team)
  1420. {
  1421. SetPlayerTeam(playerid, team);
  1422. PlayerInfo[playerid][pTeam] = team;
  1423. SpawnPlayerAtTeam(playerid);
  1424. if(team == TEAM_USA) SetPlayerColor(playerid, COLOR_USA);
  1425. if(team == TEAM_CANADA) SetPlayerColor(playerid, COLOR_CANADA);
  1426. if(team == TEAM_BRITAIN) SetPlayerColor(playerid, COLOR_BRITAIN);
  1427. if(team == TEAM_AUSTRALIA) SetPlayerColor(playerid, COLOR_AUSTRALIA);
  1428. if(team == TEAM_RUSSIA) SetPlayerColor(playerid, COLOR_RUSSIA);
  1429. if(team == TEAM_GERMANY) SetPlayerColor(playerid, COLOR_GERMANY);
  1430. if(team == TEAM_ITALY) SetPlayerColor(playerid, COLOR_ITALY);
  1431. if(team == TEAM_FRANCE) SetPlayerColor(playerid, COLOR_FRANCE);
  1432. if(team == TEAM_CHINA) SetPlayerColor(playerid, COLOR_CHINA);
  1433. if(team == TEAM_INDIA) SetPlayerColor(playerid, COLOR_INDIA);
  1434. }
  1435.  
  1436. stock SpawnPlayerAtTeam(playerid)
  1437. {
  1438. new Float:USASpawns[3][4] =
  1439. {
  1440. {154.0558,1912.6029,18.8228,4.6064},
  1441. {213.6994,1874.9786,17.6406,3.0163},
  1442. {153.7363,1847.5313,17.6406,356.7496}
  1443. };
  1444. new Float:CanadaSpawns[3][4] =
  1445. {
  1446. {-472.4701,-194.1285,78.0881,20.1248},
  1447. {-541.7864,-151.8316,77.0442,359.2529},
  1448. {-536.2971,-98.5008,63.2969,273.6887}
  1449. };
  1450. new Float:BritainSpawns[3][4] =
  1451. {
  1452. {-1521.9277,481.4308,7.1875,180.5736},
  1453. {-1348.7789,500.1924,18.2344,348.6155},
  1454. {-1563.8306,316.6201,7.1875,131.1303}
  1455. };
  1456. new Float:AustraliaSpawns[3][4] =
  1457. {
  1458. {-688.0345,944.7898,13.6328,0.0469},
  1459. {-686.2051,979.6094,12.1262,87.5167},
  1460. {-687.8675,929.7429,13.6293,181.1319}
  1461. };
  1462. new Float:RussiaSpawns[3][4] =
  1463. {
  1464. {-2520.4351,-624.5309,132.7848,0.8743},
  1465. {-2487.4331,-621.0484,132.5872,87.1375},
  1466. {-2374.1062,-583.5718,132.1172,118.5435}
  1467. };
  1468. new Float:GermanySpawns[3][4] =
  1469. {
  1470. {1106.4036,-299.6010,74.5391,99.9817},
  1471. {1073.4133,-345.0207,73.9922,356.5807},
  1472. {1023.7352,-316.0926,73.9889,175.7202}
  1473. };
  1474. new Float:ItalySpawns[3][4] =
  1475. {
  1476. {-1070.8738,-1170.6907,129.6406,234.3037},
  1477. {-1060.0549,-1205.3832,129.2188,267.3490},
  1478. {-1067.8376,-1299.5409,129.2188,276.0990}
  1479. };
  1480. new Float:FranceSpawns[3][4] =
  1481. {
  1482. {-2237.7219,2353.6807,4.9803,132.8337},
  1483. {-2241.0059,2333.7966,4.9918,99.6200},
  1484. {-2281.6807,2288.4836,4.9704,271.9083}
  1485. };
  1486. new Float:ChinaSpawns[3][4] =
  1487. {
  1488. {2735.4065,-2452.2302,17.5938,359.3937},
  1489. {2721.3025,-2386.2537,17.3403,266.3329},
  1490. {2752.5508,-2513.4436,13.6402,19.0380}
  1491. };
  1492. new Float:IndiaSpawns[3][4] =
  1493. {
  1494. {2841.2942,1285.7273,11.3906,88.5804},
  1495. {2794.3298,1256.1736,11.0299,4.2696},
  1496. {2837.1394,1337.4557,11.0877,82.9403}
  1497. };
  1498.  
  1499. new rnd;
  1500. TogglePlayerSpectating(playerid, 0);
  1501. 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);
  1502. 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);
  1503. 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);
  1504. 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);
  1505. 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);
  1506. 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);
  1507. 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);
  1508. 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);
  1509. 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);
  1510. 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);
  1511. SetCameraBehindPlayer(playerid);
  1512. SetPlayerSkin(playerid, 287);
  1513. }
  1514.  
  1515. GetPlayerTeamName(playerid)
  1516. {
  1517. new szString[24];
  1518.  
  1519. switch(GetPlayerTeam(playerid))
  1520. {
  1521. case TEAM_USA: szString = "United States";
  1522. case TEAM_CANADA: szString = "Canada";
  1523. case TEAM_BRITAIN: szString = "Britain";
  1524. case TEAM_AUSTRALIA: szString = "Australia";
  1525. case TEAM_RUSSIA: szString = "Russia";
  1526. case TEAM_GERMANY: szString = "Germany";
  1527. case TEAM_ITALY: szString = "Italy";
  1528. case TEAM_FRANCE: szString = "France";
  1529. case TEAM_CHINA: szString = "China";
  1530. case TEAM_INDIA: szString = "India";
  1531. }
  1532. return szString;
  1533. }
  1534.  
  1535.  
  1536. ////////////////////////////////////////
  1537. ////////////////////////////////////////
  1538. /////////////////////////////////////
  1539. stock SendAdminMessage(color,string[])
  1540. {
  1541. for(new i = 0; i < MAX_PLAYERS; i++)
  1542. {
  1543. if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] >= 1)
  1544. {
  1545. SendClientMessage(i, color, string);
  1546. }
  1547. }
  1548. return 1;
  1549. }
  1550.  
  1551. stock SendTeamMessage(team,string[])
  1552. {
  1553. for(new i = 0; i < MAX_PLAYERS; i++)
  1554. {
  1555. if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pTeam] == team)
  1556. {
  1557. switch(GetPlayerTeam(i))
  1558. {
  1559. case TEAM_USA: SendClientMessage(i, COLOR_USA, string);
  1560. case TEAM_CANADA: SendClientMessage(i, COLOR_CANADA, string);
  1561. case TEAM_BRITAIN: SendClientMessage(i, COLOR_BRITAIN, string);
  1562. case TEAM_AUSTRALIA: SendClientMessage(i, COLOR_AUSTRALIA, string);
  1563. case TEAM_RUSSIA: SendClientMessage(i, COLOR_RUSSIA, string);
  1564. case TEAM_GERMANY: SendClientMessage(i, COLOR_GERMANY, string);
  1565. case TEAM_ITALY: SendClientMessage(i, COLOR_ITALY, string);
  1566. case TEAM_FRANCE: SendClientMessage(i, COLOR_FRANCE, string);
  1567. case TEAM_CHINA: SendClientMessage(i, COLOR_CHINA, string);
  1568. case TEAM_INDIA: SendClientMessage(i, COLOR_INDIA, string);
  1569. }
  1570. }
  1571. }
  1572. return 1;
  1573. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement