Advertisement
Guest User

MWB2

a guest
Nov 2nd, 2012
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 150.93 KB | None | 0 0
  1. #include <a_samp>
  2. #include <YSI\y_ini>
  3. #include <zcmd>
  4. #include <streamer>
  5. #include <sscanf2>
  6.  
  7. #if defined FILTERSCRIPT
  8.  
  9. public OnFilterScriptInit()
  10. {
  11. print("\n--------------------------------------");
  12. print(" Nirzor's Admin System V1.6 ");
  13. print("--------------------------------------\n");
  14. SetTimer("SendRandomMsgToAll", 60 * 1000, 1);
  15. return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20. return 1;
  21. }
  22.  
  23. #else
  24.  
  25. main()
  26. {
  27. print("\n----------------------------------");
  28. print(" Modern War BattleLion V2.7");
  29. print("----------------------------------\n");
  30. }
  31. //==============================Admin System==================================//
  32. //Command Use
  33. #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  34.  
  35.  
  36. //Login Register System
  37. #define DIALOG_REGISTER 1
  38. #define DIALOG_LOGIN 2
  39. #define DIALOG_SUCCESS_1 3
  40. #define DIALOG_SUCCESS_2 4
  41.  
  42. //Save Path
  43. #define PATH "/NAdmin/Users/%s.ini"
  44. #define reportPATH "/NAdmin/Config/ReportLog.txt"
  45. #define BanLog "/NAdmin/Config/BanLog.txt"//directory for reports, in the folder "scriptfiles"
  46.  
  47. //Colors
  48. #define COL_WHITE "{FFFFFF}"
  49. #define COL_RED "{F81414}"
  50. #define COL_GREEN "{00FF22}"
  51. #define COL_LIGHTBLUE "{00CED1}"
  52.  
  53. //COLORS 2
  54. #define COLOR_GREEN 0x008000FF
  55. #define COLOR_BLUE 0x0000FFFF
  56. #define COLOR_BRIGHTRED 0xFF000AAA
  57. #define COLOR_AQUA 0x00FFFFAA
  58. #define COLOR_GREY 0xAFAFAFAA
  59. #define COLOR_BEIGE 0xFFF8DCAA
  60. #define COLOR_BLACK 0x000000AA
  61. #define COLOR_LIGHTERBLUE 0x00BFFFAA
  62. #define COLOR_BLUELIGHT 0x1E90FFAA
  63. #define COLOR_BLUEMEDIUM 0x0000CDAA
  64. #define COLOR_BLUEDARK 0x00008BAA
  65. #define COLOR_PINK 0xFF1493AA
  66. #define COLOR_PINKDARK 0xFF00FFAA
  67. #define COLOR_GREENLIGHT 0x00FF00AA
  68. #define COLOR_GREENDARK 0x006400AA
  69. #define COLOR_MAROON 0x800000AA
  70. #define COLOR_OKER 0x808000AA
  71. #define COLOR_ORANGE 0xFF4500AA
  72. #define COLOR_ORANGELIGHT 0xFF8C00AA
  73. #define COLOR_PURPLE 0x800080AA
  74. #define COLOR_VIOLETDARK 0x9400D3AA
  75. #define COLOR_INDIGO 0xAB0082AA
  76. #define COLOR_RED 0xFF0000AA
  77. #define COLOR_SAND 0xFFDEADAA
  78. #define COLOR_SILVER 0xC0C0C0AA
  79. #define COLOR_TEAL 0x008080AA
  80. #define COLOR_WHITE 0xFFFFFFAA
  81. #define COLOR_YELLOW 0xFFFF00AA
  82. #define COLOR_GOLD 0xFFD700AA
  83. #define COLOR_BROWN 0x8B4513AA
  84. #define COLOR_BROWNLIGHT 0xA0522DAA
  85. #define COLOR_GRAY 0xA9A9A9AA
  86. #define COLOR_GRAYDARK 0x696969AA
  87. #define COLOR_INVISIBLE 0xFFFFFF00
  88. #define COLOR_INDIA 0x80000096
  89. #define COLOR_PAKISTAN 0x40808096
  90. #define COLOR_NEPAL 0x8000FF96
  91. #define COLOR_BRAZIL 0xB7B70096
  92. #define COLOR_CHINA 0x80808096
  93. #define COLOR_GREECE 0x00000096
  94. #define COLOR_SINGAPORE 0x00FFFF96
  95. #define COLOR_IRAQ 0x8080C096
  96.  
  97. //Admin Command Variables
  98. #define MAX_WARNINGS 3
  99.  
  100. //============================================================================//
  101.  
  102. //COLORS
  103.  
  104. #define COLOR_GREEN 0x008000FF
  105. #define COLOR_BLUE 0x0000FFFF
  106. #define COLOR_BRIGHTRED 0xFF000AAA
  107. #define COLOR_AQUA 0x00FFFFAA
  108. #define COLOR_GREY 0xAFAFAFAA
  109. #define COLOR_BEIGE 0xFFF8DCAA
  110. #define COLOR_BLACK 0x000000AA
  111. #define COLOR_LIGHTERBLUE 0x00BFFFAA
  112. #define COLOR_BLUELIGHT 0x1E90FFAA
  113. #define COLOR_BLUEMEDIUM 0x0000CDAA
  114. #define COLOR_BLUEDARK 0x00008BAA
  115. #define COLOR_PINK 0xFF1493AA
  116. #define COLOR_PINKDARK 0xFF00FFAA
  117. #define COLOR_GREENLIGHT 0x00FF00AA
  118. #define COLOR_GREENDARK 0x006400AA
  119. #define COLOR_MAROON 0x800000AA
  120. #define COLOR_OKER 0x808000AA
  121. #define COLOR_ORANGE 0xFF4500AA
  122. #define COLOR_ORANGELIGHT 0xFF8C00AA
  123. #define COLOR_PURPLE 0x800080AA
  124. #define COLOR_VIOLETDARK 0x9400D3AA
  125. #define COLOR_INDIGO 0xAB0082AA
  126. #define COLOR_RED 0xFF0000AA
  127. #define COLOR_SAND 0xFFDEADAA
  128. #define COLOR_SILVER 0xC0C0C0AA
  129. #define COLOR_TEAL 0x008080AA
  130. #define COLOR_WHITE 0xFFFFFFAA
  131. #define COLOR_YELLOW 0xFFFF00AA
  132. #define COLOR_GOLD 0xFFD700AA
  133. #define COLOR_BROWN 0x8B4513AA
  134. #define COLOR_BROWNLIGHT 0xA0522DAA
  135. #define COLOR_GRAY 0xA9A9A9AA
  136. #define COLOR_GRAYDARK 0x696969AA
  137. #define COLOR_INVISIBLE 0xFFFFFF00
  138. #define COLOR_INDIA 0x80000096
  139. #define COLOR_PAKISTAN 0x40808096
  140. #define COLOR_NEPAL 0x8000FF96
  141. #define COLOR_BRAZIL 0xB7B70096
  142. #define COLOR_CHINA 0x80808096
  143. #define COLOR_GREECE 0x00000096
  144. #define COLOR_SINGAPORE 0x00FFFF96
  145. #define COLOR_IRAQ 0x8080C096
  146.  
  147. //Teams
  148. #define TEAM_AMERICA 0
  149. #define TEAM_UK 1
  150. #define TEAM_BANGLADESH 2
  151. #define TEAM_RUSSIA 3
  152. #define TEAM_INDIA 4
  153. #define TEAM_PAKISTAN 5
  154. #define TEAM_NEPAL 6
  155. #define TEAM_BRAZIL 7
  156. #define TEAM_CHINA 8
  157. #define TEAM_GREECE 9
  158. #define TEAM_SINGAPORE 10
  159. #define TEAM_IRAQ 11
  160.  
  161. //Team Defines
  162. #define AMERICASPAWN "1522.6503,-806.6635,72.1700"
  163. #define UKSPAWN "1279.3276,-778.4965,95.9663"
  164. #define BANGLADESHSPAWN "1279.3276,-778.4965,95.9663"
  165. #define RUSSIASPAWN "2163.7188,-1798.8535,13.3708"
  166. #define INDIASPAWN "237.5466,-170.9398,1.4297"
  167. #define PAKISTANSPAWN "1292.7701,268.1389,19.4111"
  168. #define NEPALSPAWN "2339.0981,28.5481,26.3359"
  169. #define BRAZILSPAWN "-2018.8489,156.2464,28.1653"
  170. #define CHINASPAWN "-1820.0067,612.9324,35.0156"
  171. #define GREECESPAWN "-2621.5823,1409.0161,7.1016"
  172. #define SINGAPORESPAWN "2307.1194,1056.3799,10.8203"
  173. #define IRAQSPAWN "2177.3914,1678.0061,10.8203"
  174. #define AMERICACOLOR "COLOR_BLUE"
  175. #define UKCOLOR "COLOR_RED"
  176. #define BANGLADESHCOLOR "COLOR_GREEN"
  177. #define RUSSIACOLOR "COLOR_ORANGE"
  178. #define INDIACOLOR "COLOR_INDIA"
  179. #define PAKISTANCOLOR "COLOR_PAKISTAN"
  180. #define NEPALCOLOR "COLOR_NEPAL"
  181. #define BRAZILCOLOR "COLOR_BRAZIL"
  182. #define CHINACOLOR "COLOR_CHINA"
  183. #define GREECECOLOR "COLOR_GREECE"
  184. #define SINGAPORECOLOR "COLOR_SINGAPORE"
  185. #define IRAQCOLOR "COLOR_IRAQ"
  186.  
  187. //Shop Defines
  188. #define SHOP_DIALOG 0//Change 0 to suit other dialog id's in your script/s.
  189.  
  190. //Contest System
  191. #define CONTESTTIME 4 //Amounts of minutes till a new contest is started, regardless of the current contest is won or not.
  192. #define MINIMUM_VALUE 2000000 //The minimum value that the contest number may be.
  193. #define MAXIMUM_VALUE 8000000 //The maximum value that the contest number may be.
  194. #define CONTEST_PRIZE 5000 // The prize in dollars that the player will win, if he types the answer first.
  195.  
  196. //Class System
  197. #define PRIVATE 1
  198. #define SNIPER 2
  199. #define ENGINEER 3
  200. #define MEDIC 4
  201. #define PILOT 5
  202. #define SPY 6
  203.  
  204.  
  205. #endif
  206. //GangZone Defines
  207. new America;
  208. new UK;
  209. new Bangladesh;
  210. new Russia;
  211. new India;
  212. new Pakistan;
  213. new Nepal;
  214. new Brazil;
  215. new China;
  216. new Greece;
  217. new Singapore;
  218. new Iraq;
  219. //Weapon Shop Defines
  220. new WS;
  221.  
  222. //Defines
  223. new gTeam[MAX_PLAYERS];
  224.  
  225. //Kill Streak
  226. new Streaks[MAX_PLAYERS];
  227.  
  228. //Death Cams
  229. forward EndDeathCam(playerid);
  230. new Died[MAX_PLAYERS], KilledBy[MAX_PLAYERS];
  231.  
  232. //Contest Arrays Or System
  233. forward NewContest(); //This'll be called when a new contest begins.
  234. forward OnPlayerWinContest(playerid); //This is for when a player wins the contest.
  235. new ContestAnswer = -1; //Minus 1 (-1). We're using this to show that there's no contest running.
  236.  
  237. //Score Timer
  238. new GiveScoreTimer[MAX_PLAYERS];
  239. forward GivePlayerScore(playerid);
  240.  
  241. //Classes
  242. new gPlayerClass[MAX_PLAYERS];// for defining classes
  243. new PickedClass[MAX_PLAYERS];// this variable can be used in many functions
  244.  
  245. //Health Armour Texdraws
  246. new Text:Health[MAX_PLAYERS];
  247. new Text:Armour[MAX_PLAYERS];
  248.  
  249.  
  250. //Capture zone definations
  251. #define UnityStation 0
  252. #define CluckinBell 1
  253. #define Gym 2
  254. #define HOTEL 3
  255.  
  256. //Country Thingy
  257. #define COLOR_JOIN 0x99FF9900
  258.  
  259. //News
  260. new Params[4][8];
  261. new FileData[7][128];
  262.  
  263.  
  264. new timer[MAX_PLAYERS][30];
  265. new iCP[MAX_PLAYERS];
  266. new tCP[30];
  267.  
  268. new CP[30];
  269. new Pick[30];
  270. new Zone[30];
  271. new UnderAttack[30];
  272.  
  273. //Fuel System
  274. new fuel[MAX_VEHICLES];
  275. forward timer_fuel_lower();
  276. forward timer_refuel(playerid);
  277. new isrefuelling[MAX_PLAYERS] = 0;
  278. new Text:td_fuel[MAX_PLAYERS];
  279.  
  280. //Speedo Meter System
  281. new Text:SPEEDOS[MAX_PLAYERS];
  282. forward Speedometer(playerid);
  283.  
  284. //Vehicle Healtho Meter
  285. new Text:HEALTH[MAX_PLAYERS];
  286.  
  287. //Derby System
  288. new InDerby[MAX_PLAYERS]; // at the top
  289. new Float:derbyspawns[][] = // at the top
  290. {
  291. {/*x, y, z, facingAnlge*/},
  292. {/*x, y, z, facingAnlge*/},
  293. {/*x, y, z, facingAnlge*/},
  294. {/*x, y, z, facingAnlge*/},
  295. {/*x, y, z, facingAnlge*/}
  296. };
  297.  
  298. //Random Weather System
  299. new Weather;
  300.  
  301. //================================Admin-System================================//
  302. //Server Messages
  303. forward SendRandomMsgToAll();
  304.  
  305. //Vip System
  306. new vip[MAX_PLAYERS];
  307.  
  308. //Admin System
  309. new AdminLevel[MAX_PLAYERS];
  310. new Warns[MAX_PLAYERS];
  311.  
  312. enum pInfo
  313. {
  314. pPass,
  315. pCash,
  316. pAdmin,
  317. pKills,
  318. pDeaths,
  319. pScore
  320.  
  321. }
  322. new PlayerInfo[MAX_PLAYERS][pInfo];
  323.  
  324. forward LoadUser_data(playerid,name[],value[]);
  325. public LoadUser_data(playerid,name[],value[])
  326. {
  327. INI_Int("Password",PlayerInfo[playerid][pPass]);
  328. INI_Int("Cash",PlayerInfo[playerid][pCash]);
  329. INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  330. INI_Int("Kills",PlayerInfo[playerid][pKills]);
  331. INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
  332. INI_Int("Donor",vip[playerid]);
  333. INI_Int("Score",PlayerInfo[playerid][pScore]);
  334.  
  335. return 1;
  336. }
  337.  
  338. stock UserPath(playerid)
  339. {
  340. new string[128],playername[MAX_PLAYER_NAME];
  341. GetPlayerName(playerid,playername,sizeof(playername));
  342. format(string,sizeof(string),PATH,playername);
  343. return string;
  344. }
  345.  
  346. stock udb_hash(buf[]) {
  347. new length=strlen(buf);
  348. new s1 = 1;
  349. new s2 = 0;
  350. new n;
  351. for (n=0; n<length; n++)
  352. {
  353. s1 = (s1 + buf[n]) % 65521;
  354. s2 = (s2 + s1) % 65521;
  355. }
  356. return (s2 << 16) + s1;
  357. }
  358. //Helmet System
  359. #define SLOT 10 //By default uses slot 1, change it if you need slot 1 for other thing.
  360. //============================================================================//
  361.  
  362. public OnGameModeInit()
  363. {
  364. //Misc
  365. SetGameModeText(" Modern War Battalation V2.3");
  366. UsePlayerPedAnims();
  367. DisableInteriorEnterExits();
  368. //Pickups===================================================================
  369. Pick[UnityStation] = CreatePickup(1314, 1, 1768.8698,-1951.0712,14.1096, -1);
  370. Pick[CluckinBell] = CreatePickup(1314, 1, 2402.4421,-1890.2247,13.3828, -1);
  371. Pick[Gym] = CreatePickup(1314, 1, 2233.3723,-1725.5320,13.5469, -1);
  372. Pick[HOTEL] = CreatePickup(1314, 1, 2173.5867,-1803.2716,13.3689, -1);
  373. //Checkpoints===============================================================
  374. CP[UnityStation] = CreateDynamicCP(1768.8698,-1951.0712,14.1096, 2, -1, -1, -1, 100.0);
  375. CP[CluckinBell] = CreateDynamicCP(2402.4421,-1890.2247,13.3828, 2, -1, -1, -1, 100.0);
  376. CP[Gym] = CreateDynamicCP(2233.3723,-1725.5320,13.5469, 2, -1, -1, -1, 100.0);
  377. CP[HOTEL] = CreateDynamicCP(2173.5867,-1803.2716,13.3689, 2, -1, -1, -1, 100.0);
  378. //================GANG ZONES OF CHECKPOINTS=================================
  379. Zone[UnityStation] = GangZoneCreate(1709.924682, -2004.422729, 1821.924682, -1900.422729);
  380. Zone[CluckinBell] = GangZoneCreate(2362.442138, -1938.224731, 2458.442138, -1842.224731);
  381. Zone[Gym] = GangZoneCreate(2169.372314, -1773.531982, 2281.372314, -1685.531982);
  382. Zone[HOTEL] = GangZoneCreate(2109.586669, -1859.271606, 2205.586669, -1787.271606);
  383. //=============================Classes========================================//
  384. // America
  385. AddPlayerClass(286,1522.6503,-806.6635,72.1700,97.8118,29,500,33,500,24,320);
  386. // United Kingdom
  387. AddPlayerClass(269,1279.3276,-778.4965,95.9663,83.8298,29,500,34,280,23,450);
  388. // Bangladesh
  389. AddPlayerClass(105,2496.2695,-1683.7316,13.3639,5.8997,28,500,31,530,27,230);
  390. // Russia
  391. AddPlayerClass(285,2163.7188,-1798.8535,13.3708,270.2612,32,500,30,530,25,300);
  392. // India
  393. AddPlayerClass(135,237.3730,-170.2988,1.4297,87.4982,30,530,24,230,25,300);
  394. // Pakistan
  395. AddPlayerClass(127,1293.0664,268.3823,19.4113,241.4769,24,230,29,530,32,500);
  396. // Nepal
  397. AddPlayerClass(128,2339.0981,28.5481,26.3359,269.3545,27,230,31,350,21,300);
  398. // Brazil
  399. AddPlayerClass(124,-2018.8489,156.2464,28.1653,266.3123,30,1030,29,530,27,230);
  400. // China
  401. AddPlayerClass(123,-1820.0067,612.9324,35.0156,181.2069,24,230,27,230,29,530);
  402. // Greece
  403. AddPlayerClass(122,-2621.5823,1409.0161,7.1016,197.0545,30,530,29,530,25,300);
  404. // Singapore
  405. AddPlayerClass(299,2307.1194,1056.3799,10.8203,269.5391,32,530,29,530,30,530);
  406. // Iraq
  407. AddPlayerClass(287,2177.3914,1678.0061,10.8203,88.6406,31,530,29,530,24,230);
  408. //============================================================================//
  409. //GangZones
  410. America = GangZoneCreate(1459.443, -900.2091, 1569.725, -785.7246);
  411. UK = GangZoneCreate(1231.272, -904.1568, 1356.766, -769.9336);
  412. Bangladesh = GangZoneCreate(2318.883, -1741.078, 2528.039, -1658.175);
  413. Russia = GangZoneCreate(2071.699, -1906.883, 2208.601, -1776.608);
  414. India = GangZoneCreate(93.423, -256.9133, 373.692, -35.03363);
  415. Pakistan = GangZoneCreate(1144.432, 128.4566, 1436.379, 373.692);
  416. Nepal = GangZoneCreate(2160.407, -93.423, 2557.455, 128.4566);
  417. Brazil = GangZoneCreate(-2143.608, 85.16138, -1992.963, 329.7492);
  418. China = GangZoneCreate(-1900.259, 629.5665, -1703.262, 755.8053);
  419. Greece = GangZoneCreate(-2680.521, 1331.77, -2510.563, 1481.679);
  420. Singapore = GangZoneCreate(2161.745, 993.614, 2329.653, 1183.149);
  421. Iraq = GangZoneCreate(2060.219, 1546.747, 2294.51, 1747.887);
  422. //Weapons-Shops
  423. WS = GangZoneCreate(2455.785, -1966.099, 2531.842, -1910.831);
  424. //Contest System
  425. SetTimer("NewContest",(1000*60*CONTESTTIME),1); // Sets the timer in minutes. Timers are in millseconds, and 1000 milliseconds is equal to a second. That multiplies with 60, making it one minute. That once again multiplies with the 'CONTESTTIME' you've defined, making it in the amount of minutes you want.
  426. //Fuel System
  427. for(new i=0;i<MAX_VEHICLES;i++)
  428. {
  429. fuel[i] = 100;
  430. }
  431. SetTimer("timer_fuel_lower",4200,true); //sets the timer to drop the fuel
  432. //Speedo Meter System
  433. SetTimer("Speedometer", 100, true);
  434. //Random Weather System
  435. SetTimer("RandomWeather",60000,true);//This sets the timer that will be repeated for 1 minute (1000 ms = 1 second) hence 1000 x 60 = 60000 (1 minute)
  436. //CARS
  437. AddStaticVehicle(599,1528.8624,-821.0977,70.6679,267.0792,0,1); // Country P.C
  438. AddStaticVehicle(598,1509.1919,-821.0330,69.4461,354.0035,0,1); // L.V P.C
  439. AddStaticVehicle(597,1507.7972,-799.9228,73.2553,2.2875,0,1); // SF P.C
  440. AddStaticVehicle(596,1529.4911,-795.9178,72.8769,270.2912,0,1); // LS P.C
  441. AddStaticVehicle(490,1521.2183,-787.4810,76.4304,15.3791,0,0); // FBI Rancher
  442. AddStaticVehicle(497,1544.2968,-801.2972,77.9650,87.4504,0,1); // FBI Heli
  443. AddStaticVehicle(488,1539.2729,-814.2987,77.1885,89.9949,2,29); // FBI Heli2
  444. AddStaticVehicle(487,1291.6603,-788.3265,96.6337,180.7966,26,57); // Killer Heli
  445. AddStaticVehicle(489,1247.7705,-782.0987,90.7541,4.5601,120,123); // Killer Rancher
  446. AddStaticVehicle(480,1230.9784,-766.2958,91.7082,249.5746,46,46); // killer speedo
  447. AddStaticVehicle(477,1265.2360,-743.2024,94.4696,205.6282,121,1); // Killer V.I.P Car
  448. AddStaticVehicle(469,1305.8496,-756.1826,93.2322,235.0564,1,3); // killer Sparrow
  449. AddStaticVehicle(405,970.2335,-1098.7864,23.7525,173.2869,91,1); // sentino
  450. AddStaticVehicle(445,1336.0602,-873.9500,39.3082,274.1470,39,39); // BluePrints
  451. AddStaticVehicle(429,1514.9767,-711.4958,89.8046,182.8026,14,14); // speedo
  452. AddStaticVehicle(451,1378.6559,-1029.1587,26.3195,356.8382,36,36); // Nighty
  453. AddStaticVehicle(421,1529.7847,-819.9590,70.7682,90.7298,30,1); // washington
  454. AddStaticVehicle(407,890.3480,-1133.4698,24.0577,93.6723,3,1); // firetruck
  455. AddStaticVehicle(409,734.8076,-1167.5024,20.7932,313.5387,1,1); // lamogin
  456. AddStaticVehicle(411,662.3279,-1205.4426,18.1015,307.8907,116,1); // dualcar
  457. AddStaticVehicle(415,761.5759,-1024.1169,23.7590,175.8848,40,1); // cheetah
  458. AddStaticVehicle(416,851.6962,-989.5425,33.5246,12.4435,1,3); // ambulance
  459. AddStaticVehicle(417,821.8243,-1065.3203,28.2951,112.8004,0,0); // chopper
  460. AddStaticVehicle(418,819.1041,-977.2542,36.6637,111.0176,119,119); // oldcar
  461. AddStaticVehicle(421,741.4971,-897.7982,43.5036,59.9498,25,1); // V.I.Pcar
  462. AddStaticVehicle(420,706.2866,-818.3467,40.6664,18.0807,6,1); // taxi
  463. AddStaticVehicle(422,666.8964,-712.5101,16.3754,37.9785,111,31); // bobcat
  464. AddStaticVehicle(423,766.8959,-1164.0530,22.6072,118.3297,1,5); // ice cream truck
  465. AddStaticVehicle(425,939.6213,-1071.7644,31.8177,174.1248,43,0); // hunter
  466. AddStaticVehicle(426,932.2893,-1112.6602,23.9004,0.3122,7,7); // dullcar
  467. AddStaticVehicle(427,1030.9536,-1123.1677,24.0182,354.3994,0,1); // SwatVan
  468. AddStaticVehicle(429,1067.7219,-1134.1156,23.5078,271.9777,1,2); // speedy
  469. AddStaticVehicle(431,1070.0547,-1173.8448,23.3543,13.0680,47,74); // Bus
  470. AddStaticVehicle(432,1207.1306,-1068.3936,29.2519,180.5274,43,0); // rhino
  471. AddStaticVehicle(433,1220.9745,-1068.6124,29.6594,177.6321,43,0); // ArmyVan
  472. AddStaticVehicle(445,1208.6891,-1171.0100,22.7234,179.2157,39,39); // MasterCar
  473. AddStaticVehicle(447,1261.7057,-1259.2803,13.1898,266.5711,75,2); // Sparrow
  474. AddStaticVehicle(451,1273.6678,-1340.5182,13.0568,94.5183,46,46); // RockCar
  475. AddStaticVehicle(458,1273.5133,-1337.7694,13.2263,91.6875,113,1); // tweety
  476. AddStaticVehicle(459,1266.8473,-1318.5082,13.5481,3.5726,57,57); // van
  477. AddStaticVehicle(461,1266.8015,-1326.9030,13.0841,99.4259,61,1); // NRG 500
  478. AddStaticVehicle(463,1266.8225,-1322.8099,13.0424,86.5982,19,19); // herohonda
  479. AddStaticVehicle(468,1267.0865,-1324.6133,13.1688,86.5616,3,3); // mountainbike
  480. AddStaticVehicle(599,2178.8323,-1715.2128,13.7068,356.5450,0,1); // Copcar
  481. AddStaticVehicle(599,2193.6631,-1681.2214,14.2307,348.9936,0,1); // Copcar2
  482. AddStaticVehicle(602,2276.7937,-1654.7990,15.0076,93.4971,18,1); // GroveCar
  483. AddStaticVehicle(602,2253.2866,-1664.4680,15.2743,78.4512,69,1); // GroveCar2
  484. AddStaticVehicle(405,2140.3613,-1619.6730,13.3457,66.4270,75,1); // Sentino
  485. AddStaticVehicle(407,2047.2688,-1619.5239,13.7821,82.5100,3,1); // firetruck
  486. AddStaticVehicle(409,2033.0614,-1573.4264,11.1318,354.6015,1,1); // lamogin2
  487. AddStaticVehicle(521,2483.8755,-1687.1543,13.0779,261.1510,25,118); // BikeFast
  488. AddStaticVehicle(521,2481.4216,-1686.9470,13.0708,264.7426,118,118); // BikeFast2
  489. AddStaticVehicle(492,2493.7644,-1681.1852,13.1199,1.9725,28,56); // Grove
  490. AddStaticVehicle(492,2490.4185,-1681.1168,13.1179,0.0601,28,56); // Grove2
  491. AddStaticVehicle(487,2505.0510,-1694.7588,18.1349,355.3961,26,3); // HeliGrove
  492. AddStaticVehicle(487,2491.8323,-1702.0133,22.9708,358.3286,12,39); // HeliGrove2
  493. AddStaticVehicle(477,2481.0339,-1654.8944,13.1452,90.6455,22,1); // Spirit
  494. AddStaticVehicle(477,2473.9197,-1654.8267,13.1517,88.7218,75,1); // Spirit2
  495. AddStaticVehicle(494,2477.0754,-1668.1478,13.2245,10.5209,36,13); // Racer
  496. AddStaticVehicle(497,2180.3210,-1809.2959,13.5566,269.5506,0,1); // P.Heli
  497. AddStaticVehicle(488,2175.4768,-1792.4857,13.5378,267.2351,2,26); // P.Heli2
  498. AddStaticVehicle(490,2158.4021,-1807.6359,13.5063,270.3770,0,0); // FBI
  499. AddStaticVehicle(523,2165.8101,-1789.9746,13.0909,270.5490,0,0); // P.Bike
  500. AddStaticVehicle(596,2158.3364,-1801.8176,13.0952,272.1483,0,1); // P.Car SAPD
  501. AddStaticVehicle(597,2158.1790,-1796.3328,13.1306,268.6962,0,1); // P.Car Sapd2
  502. AddStaticVehicle(598,2158.5903,-1791.9436,13.1827,270.4935,0,1); // LV.P.Car
  503. AddStaticVehicle(405,2370.4001,-1927.4319,13.2578,359.1312,24,1); // Sentinel
  504. AddStaticVehicle(405,2373.8362,-1927.5114,13.2578,358.5366,36,1); // Sentinel1
  505. AddStaticVehicle(405,2376.8213,-1927.7029,13.2578,359.5027,40,1); // Sentinel2
  506. AddStaticVehicle(405,2380.2839,-1927.6141,13.2578,359.5026,75,1); // Sentinel3
  507. AddStaticVehicle(405,2383.6296,-1927.6335,13.2578,359.2918,91,1); // Sentinel4
  508. AddStaticVehicle(405,2387.1689,-1927.2787,13.2578,0.1460,123,1); // Sentinel5
  509. AddStaticVehicle(400,2390.6025,-1927.0752,13.4752,357.1971,123,1); // LS
  510. AddStaticVehicle(400,2394.0081,-1927.1451,13.4751,359.4248,113,1); // LS2
  511. AddStaticVehicle(400,2397.3535,-1927.0126,13.4752,2.0455,101,1); // LS3
  512. AddStaticVehicle(400,2400.6892,-1926.7704,13.4752,359.1162,75,1); // LS4
  513. AddStaticVehicle(402,2419.9651,-1955.6052,13.3773,359.8566,13,13); // Buffalo
  514. AddStaticVehicle(402,2407.5186,-1957.0090,13.3841,360.0000,22,22); // Buffalo2
  515. AddStaticVehicle(402,2430.8071,-1937.9637,13.2784,271.2347,30,30); // Buffalo3
  516. AddStaticVehicle(402,2433.2817,-1927.6732,13.2713,274.1914,39,39); // Buffalo4
  517. AddStaticVehicle(404,2445.4968,-1928.1254,13.1542,269.2004,119,50); // Perrenial
  518. AddStaticVehicle(404,2464.3362,-1937.5818,13.1367,267.9217,123,92); // Perrenial2
  519. AddStaticVehicle(404,2504.4500,-1928.1725,13.1810,272.1997,109,100); // Perrenial3
  520. AddStaticVehicle(448,2517.6028,-2004.8918,12.8610,89.4118,3,6); // Pizzaboy
  521. AddStaticVehicle(448,2517.8638,-2007.0017,12.9845,86.7427,3,6); // Pizzaboy1
  522. AddStaticVehicle(448,2517.9661,-2008.9662,12.9913,84.1989,3,6); // Pizzaboy2
  523. AddStaticVehicle(448,2517.9976,-2010.4365,13.0051,83.3430,3,6); // Pizzaboy3
  524. AddStaticVehicle(448,2517.9939,-2012.0682,12.9975,83.6953,3,6); // Pizzaboy4
  525. AddStaticVehicle(448,2517.9741,-2013.9647,12.9933,85.5033,3,6); // Pizzaboy5
  526. AddStaticVehicle(509,2485.0137,-2000.0145,13.0593,88.2636,74,1); // Cycle
  527. AddStaticVehicle(522,2481.3342,-2004.2852,13.1099,84.5174,3,8); // NRG-500
  528. AddStaticVehicle(522,2481.9580,-2015.2667,13.1226,89.7322,6,25); // NRG-500 1
  529. AddStaticVehicle(522,2468.7644,-2014.7111,13.0792,94.0564,7,79); // NRG-500 2
  530. AddStaticVehicle(522,2470.1545,-2003.8513,13.1196,89.0034,8,82); // NRG-500 3
  531. AddStaticVehicle(522,2456.8511,-2014.7726,13.1199,90.7971,36,105); // NRG-500 4
  532. AddStaticVehicle(522,2457.8611,-2004.4446,13.1199,92.9314,39,106); // NRG-500 5
  533. AddStaticVehicle(522,2443.2114,-2004.1488,13.1197,89.9688,51,118); // NRG-500 6
  534. AddStaticVehicle(522,2443.7319,-2014.8362,13.1220,90.0031,3,3); // NRG-500 7
  535. AddStaticVehicle(422,2458.8357,-2105.1792,13.5420,0.0000,97,25); // BOBCAT1
  536. AddStaticVehicle(422,2465.3381,-2105.4600,13.5364,360.0000,101,25); // BOBCAT2
  537. AddStaticVehicle(422,2478.3684,-2104.7700,13.5379,1.0801,111,31); // BOBCAT3
  538. AddStaticVehicle(422,2484.3621,-2105.2646,13.5394,0.0040,113,36); // BOBCAT4
  539. AddStaticVehicle(422,2489.2056,-2104.8030,13.5337,0.0000,83,57); // BOBCAT5
  540. AddStaticVehicle(422,2506.0557,-2103.4038,13.5285,360.0000,67,59); // BOBCAT6
  541. AddStaticVehicle(422,2512.1121,-2103.8999,13.5358,360.0000,96,25); // BOBCAT7
  542. AddStaticVehicle(422,2517.6599,-2103.5920,13.5400,360.0000,97,25); // BOBCAT8
  543. AddStaticVehicle(444,2536.9224,-2093.5583,13.9182,89.3351,32,42); // MT1
  544. AddStaticVehicle(444,2536.4678,-2084.9697,13.9182,88.7809,32,53); // MT2
  545. AddStaticVehicle(406,2395.1260,-2105.0962,15.0721,270.0757,1,1); // Dumper1
  546. AddStaticVehicle(406,2394.1946,-2095.5815,15.0737,274.8132,1,1); // Dumper2
  547. AddStaticVehicle(406,2395.0500,-2115.4280,15.0757,268.9387,1,1); // Dumper3
  548. AddStaticVehicle(406,2392.6919,-2126.3411,15.0718,271.9615,1,1); // Dumper4
  549. AddStaticVehicle(406,2392.9185,-2136.6382,15.0718,270.5463,1,1); // Dumper5
  550. AddStaticVehicle(521,2509.2471,-1667.0632,12.9724,11.0754,92,3); // NRG-900
  551. AddStaticVehicle(521,2505.6589,-1660.8116,12.9802,41.4030,115,118); // NRG-900 1
  552. AddStaticVehicle(521,2498.1289,-1655.3743,12.9651,76.0863,25,118); // NRG-900 2
  553. AddStaticVehicle(521,2486.1775,-1654.3292,12.8948,92.3528,36,0); // NRG-900 3
  554. AddStaticVehicle(521,2475.3152,-1654.1266,12.8954,87.1759,118,118); // NRG-900 4
  555. AddStaticVehicle(521,2505.5935,-1678.5895,12.9527,316.0556,74,74); // NRG-900 5
  556. AddStaticVehicle(521,2496.3474,-1683.1573,12.9252,279.3728,75,13); // NRG-900 6
  557. AddStaticVehicle(521,2484.2302,-1683.6978,12.8961,265.6072,87,118); // NRG-900 7
  558. AddStaticVehicle(521,2474.4753,-1679.9934,12.9083,236.2824,92,3); // NRG-900 8
  559. AddStaticVehicle(521,2468.8037,-1669.0658,12.8691,184.2906,115,118); // NRG-900 9
  560. AddStaticVehicle(492,2461.6118,-1665.2599,13.1708,183.4386,77,26); // GW
  561. AddStaticVehicle(492,2461.5256,-1652.3140,13.1602,357.4301,81,27); // GW1
  562. AddStaticVehicle(421,2445.7036,-1664.5223,13.2654,90.8796,25,1); // WT
  563. AddStaticVehicle(421,2446.2683,-1653.6228,13.2060,90.9431,30,1); // WT1
  564. AddStaticVehicle(421,2429.0562,-1653.3406,13.3419,89.4645,36,1); // WT2
  565. AddStaticVehicle(421,2429.3357,-1664.0343,13.3380,88.4793,40,1); // WT3
  566. AddStaticVehicle(421,2414.0544,-1653.2745,13.3577,91.4085,75,1); // WT4
  567. AddStaticVehicle(421,2411.1958,-1663.6863,13.3417,88.6849,4,1); // WT5
  568. AddStaticVehicle(420,2372.2236,-1640.4269,13.2747,358.3339,6,1); // Taxi
  569. AddStaticVehicle(407,2444.8303,-1645.8955,25.6430,269.2437,3,1); // FireTruck
  570. AddStaticVehicle(407,2454.0178,-1647.4781,14.0133,43.9573,3,1); // FireTruck2
  571. AddStaticVehicle(447,2477.7483,-1763.7936,18.5774,274.0621,75,2); // SeaSparrow
  572. AddStaticVehicle(447,2465.5173,-1763.3555,18.5585,272.2142,75,2); // SeaSparrow2
  573. AddStaticVehicle(425,2492.3306,-1766.4137,20.5254,269.6210,43,0); // Hunter
  574. AddStaticVehicle(425,2512.2288,-1767.7311,20.5605,269.6121,43,0); // Hunter2
  575. AddStaticVehicle(425,2513.6492,-1752.4415,20.6226,0.0000,43,0); // Hunter3
  576. AddStaticVehicle(520,2426.5317,-1766.9298,18.9512,356.8943,0,0); // Hydra
  577. AddStaticVehicle(520,2437.4985,-1767.5750,19.4807,358.5970,0,0); // Hydra2
  578. AddStaticVehicle(424,2676.4814,-1672.0153,9.1768,176.9865,3,6); // BF
  579. AddStaticVehicle(424,2681.7852,-1672.7461,9.2069,176.8081,6,16); // BF2
  580. AddStaticVehicle(424,2686.5356,-1672.6938,9.2233,177.4976,15,30); // BF3
  581. AddStaticVehicle(424,2692.0281,-1672.9834,9.2473,178.1629,24,53); // BF4
  582. AddStaticVehicle(424,2696.7258,-1673.2333,9.2677,178.5054,35,61); // BF5
  583. AddStaticVehicle(401,2657.0762,-1711.8643,9.0931,269.9479,52,52); // Bravura
  584. AddStaticVehicle(413,2658.1755,-1706.9219,9.4093,267.8658,88,1); // Pony
  585. AddStaticVehicle(421,2657.7122,-1701.8419,9.2009,268.0281,95,1); // WT10
  586. AddStaticVehicle(445,2658.5186,-1697.1689,9.1951,271.8260,35,35); // Admiral
  587. AddStaticVehicle(445,2658.3105,-1692.3694,9.1940,271.1955,37,37); // Admiral2
  588. AddStaticVehicle(522,2692.3093,-1664.4069,11.4409,89.5328,7,79); // NRG-500 10
  589. AddStaticVehicle(522,2690.3562,-1652.1083,11.3583,88.0348,8,82); // NRG-500 11
  590. AddStaticVehicle(522,2678.6768,-1651.8588,10.7310,88.1463,36,105); // NRG-500 12
  591. AddStaticVehicle(522,2678.6804,-1662.9026,10.7342,84.5715,39,106); // NRG-500 13
  592. AddStaticVehicle(521,2660.4871,-1651.5186,10.4315,93.2513,118,118); // NRG 900
  593. AddStaticVehicle(521,2660.5427,-1663.0659,10.4599,89.0782,74,74); // NRG 900 1
  594. AddStaticVehicle(447,2485.5491,-1885.9351,25.5618,268.5951,42,71); // //S
  595. AddStaticVehicle(488,2494.3628,-1885.9160,25.7329,270.3375,66,53); // //C
  596. AddStaticVehicle(520,2485.8020,-1893.8844,26.4872,277.0552,57,58); // Hunter
  597. AddStaticVehicle(425,2483.0298,-1907.2203,26.0381,278.0718,1,107); // Hunter1
  598. AddStaticVehicle(520,2811.0222,-1677.8855,10.8551,86.0867,73,41); // Hydra2
  599. AddStaticVehicle(447,2794.7148,-1681.0612,9.8953,86.6106,9,42); // SeaSparrow1
  600. AddStaticVehicle(488,2794.5808,-1691.5535,10.0492,96.4928,56,103); // Chopper
  601. AddStaticVehicle(487,2801.3821,-1700.9493,10.0868,82.8507,36,45); // Maverick
  602. AddStaticVehicle(487,2494.0107,-1703.9204,23.5025,359.3053,36,45); // Maverick2
  603. AddStaticVehicle(447,757.2067,1862.3777,5.1951,48.5704,75,2); // SP
  604. AddStaticVehicle(447,756.4552,1871.6578,5.2923,64.4906,75,2); // SP2
  605. AddStaticVehicle(520,761.3859,1904.0696,6.2402,86.5126,0,0); // Hydra
  606. AddStaticVehicle(520,761.5409,1894.2866,5.9655,66.9976,0,0); // Hydra1
  607. AddStaticVehicle(487,793.0231,1889.1609,5.0738,179.5898,54,29); // Maverick-1
  608. AddStaticVehicle(488,793.6294,1874.9811,4.8725,176.6673,2,29); // NewsChopper
  609. AddStaticVehicle(402,759.7046,1882.5380,5.1319,87.7412,13,13); // Buffalo-1
  610. AddStaticVehicle(541,759.1927,1886.7064,4.9911,90.4208,58,8); // Bullet-1
  611. AddStaticVehicle(521,737.5945,1908.9637,5.0893,183.0786,75,13); // FCR-900
  612. AddStaticVehicle(521,742.0523,1908.9243,5.0870,180.2185,87,118); // FCR-500-1
  613. AddStaticVehicle(535,745.6403,1907.1202,5.2409,177.0702,28,1); // Slamvan
  614. AddStaticVehicle(425,721.7145,1859.7112,6.2813,357.5498,43,0); // Hunter
  615. AddStaticVehicle(425,723.1152,1901.1169,6.2206,177.0106,43,0); // Hunter2
  616. AddStaticVehicle(424,694.3813,1822.6816,5.0921,346.5910,2,2); // BF-1
  617. AddStaticVehicle(424,667.2339,1827.5709,4.9421,351.5940,3,2); // BF-2
  618. AddStaticVehicle(424,668.4466,1849.7996,4.9293,170.9620,3,6); // BF-3
  619. AddStaticVehicle(424,698.8973,1844.9548,5.4583,161.6242,6,16); // BF-4
  620. AddStaticVehicle(541,690.7847,1823.4761,4.9371,349.5574,60,1); // Bullet--1
  621. AddStaticVehicle(541,671.7170,1827.0016,4.8700,349.5899,68,8); // Bullet--2
  622. AddStaticVehicle(541,673.7540,1848.8488,4.9643,168.0274,2,1); // Bullet--3
  623. AddStaticVehicle(506,686.7601,1823.9786,5.0111,349.7748,6,6); // SuperGT-1
  624. AddStaticVehicle(506,675.1675,1826.8567,4.9555,350.5174,7,7); // SuperGT-2
  625. AddStaticVehicle(506,678.5184,1847.5010,5.1541,170.5924,52,52); // SuperGT-3
  626. AddStaticVehicle(463,749.7583,1906.2742,5.1302,168.5053,7,7); // Freeway-1
  627. AddStaticVehicle(463,761.1920,1877.8574,4.7169,89.2934,11,11); // Freeway-2
  628. AddStaticVehicle(476,706.2888,1881.8915,6.3079,191.5072,7,6); // Rustler-1
  629. AddStaticVehicle(476,689.9760,1888.5908,6.3046,197.9025,1,6); // Rustler-2
  630. AddStaticVehicle(445,681.3220,1947.8711,5.4140,179.9152,35,35); // Admiral-1
  631. AddStaticVehicle(445,726.7429,1947.7194,5.4140,178.3360,37,37); // Admiral-2
  632. AddStaticVehicle(424,686.6348,1947.2738,5.3191,179.6827,2,2); // BR---1
  633. AddStaticVehicle(424,721.6857,1946.9626,5.3206,179.9684,3,2); // BR---2
  634. AddStaticVehicle(429,716.6511,1946.8947,5.2187,179.8561,13,13); // Banshee
  635. AddStaticVehicle(429,691.5121,1946.9531,5.2198,178.8748,14,14); // Banshee-1
  636. AddStaticVehicle(426,696.2285,1946.4182,5.2837,179.1421,42,42); // Admiral-1
  637. AddStaticVehicle(426,711.6342,1946.7130,5.2826,183.2086,53,53); // Admiral-2
  638. AddStaticVehicle(409,701.6464,1946.4203,5.3391,181.1694,1,1); // Stretch
  639. AddStaticVehicle(409,706.3060,1946.4156,5.3390,179.3315,1,1); // Stretch1
  640.  
  641.  
  642. //=============================Health And Armour Texdraws=====================//
  643. for(new i = 0; i < MAX_PLAYERS; i++)
  644. {
  645. Health[i] = TextDrawCreate(566.000000, 67.000000, "100%");
  646. TextDrawBackgroundColor(Health[i], 255);
  647. TextDrawFont(Health[i], 1);
  648. TextDrawLetterSize(Health[i], 0.219999, 0.899999);
  649. TextDrawColor(Health[i], -1);
  650. TextDrawSetOutline(Health[i], 1);
  651. TextDrawSetProportional(Health[i], 1);
  652.  
  653. Armour[i] = TextDrawCreate(566.000000, 44.000000, "100%");
  654. TextDrawBackgroundColor(Armour[i], 255);
  655. TextDrawFont(Armour[i], 1);
  656. TextDrawLetterSize(Armour[i], 0.219999, 0.899999);
  657. TextDrawColor(Armour[i], -1);
  658. TextDrawSetOutline(Armour[i], 1);
  659. TextDrawSetProportional(Armour[i], 1);
  660. }
  661.  
  662.  
  663. return 1;
  664. }
  665. public OnGameModeExit()
  666. {
  667. return 1;
  668. }
  669.  
  670. public OnPlayerRequestClass(playerid, classid)
  671. {
  672. switch(classid)
  673. {
  674. case 0:
  675. {
  676. gTeam[playerid] = TEAM_AMERICA;
  677. GameTextForPlayer(playerid, "~b~America", 5000, 5);
  678. SetPlayerPos(playerid, 1522.6503,-806.6635,72.1700);
  679. SetPlayerFacingAngle(playerid, 4018);
  680. SetPlayerCameraPos(playerid, 1514.0861,-806.9355,72.0768);
  681. SetPlayerCameraLookAt(playerid, 1522.6503,-806.6635,72.1700);
  682.  
  683. }
  684.  
  685. case 1:
  686. {
  687.  
  688. gTeam[playerid] = TEAM_UK;
  689. GameTextForPlayer(playerid, "~g~UK", 5000, 5);
  690. SetPlayerPos(playerid, 1279.3276,-778.4965,95.9663);
  691. SetPlayerFacingAngle(playerid,8298);
  692. SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665);
  693. SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663);
  694.  
  695. }
  696. case 2:
  697. {
  698. gTeam[playerid] = TEAM_BANGLADESH;
  699. GameTextForPlayer(playerid, "~y~Bangladesh", 5000, 5);
  700. SetPlayerPos(playerid,1279.3276,-778.4965,95.9663);
  701. SetPlayerFacingAngle(playerid,8298);
  702. SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665);
  703. SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663);
  704.  
  705. }
  706. case 3:
  707. {
  708. gTeam[playerid] = TEAM_RUSSIA;
  709. GameTextForPlayer(playerid, "~w~RUSSIA", 5000, 5);
  710. SetPlayerPos(playerid,2163.7188,-1798.8535,13.3708);
  711. SetPlayerFacingAngle(playerid,2612);
  712. SetPlayerCameraPos(playerid,2175.6838,-1799.4097,13.3651);
  713. SetPlayerCameraLookAt(playerid,2163.7188,-1798.8535,13.3708);
  714.  
  715. }
  716. case 4:
  717. {
  718. gTeam[playerid] = TEAM_INDIA;
  719. GameTextForPlayer(playerid, "~w~INDIA", 5000, 5);
  720. SetPlayerPos(playerid,237.5466,-170.9398,1.4297);
  721. SetPlayerFacingAngle(playerid,5581);
  722. SetPlayerCameraPos(playerid,227.5716,-170.0129,1.5781);
  723. SetPlayerCameraLookAt(playerid,237.5466,-170.9398,1.4297);
  724.  
  725. }
  726. case 5:
  727. {
  728. gTeam[playerid] = TEAM_PAKISTAN;
  729. GameTextForPlayer(playerid, "~w~PAKISTAN", 5000, 5);
  730. SetPlayerPos(playerid,1292.7701,268.1389,19.4111);
  731. SetPlayerFacingAngle(playerid,4303);
  732. SetPlayerCameraPos(playerid,1301.0077,264.1090,19.4055);
  733. SetPlayerCameraLookAt(playerid,1292.7701,268.1389,19.4111);
  734.  
  735. }
  736. case 6:
  737. {
  738. gTeam[playerid] = TEAM_NEPAL;
  739. GameTextForPlayer(playerid, "~w~NEPAL", 5000, 5);
  740. SetPlayerPos(playerid,2339.0981,28.5481,26.3359);
  741. SetPlayerFacingAngle(playerid,3545);
  742. SetPlayerCameraPos(playerid,2348.6902,28.8436,26.3359);
  743. SetPlayerCameraLookAt(playerid,2339.0981,28.5481,26.3359);
  744.  
  745. }
  746. case 7:
  747. {
  748. gTeam[playerid] = TEAM_NEPAL;
  749. GameTextForPlayer(playerid, "~w~Brazil", 5000, 5);
  750. SetPlayerPos(playerid,-2018.8489,156.2464,28.1653);
  751. SetPlayerFacingAngle(playerid,3123);
  752. SetPlayerCameraPos(playerid,-2012.0396,156.3659,27.6875);
  753. SetPlayerCameraLookAt(playerid,-2018.8489,156.2464,28.1653);
  754.  
  755. }
  756. case 8:
  757. {
  758. gTeam[playerid] = TEAM_CHINA;
  759. GameTextForPlayer(playerid, "~w~China", 5000, 5);
  760. SetPlayerPos(playerid,-1820.0067,612.9324,35.0156);
  761. SetPlayerFacingAngle(playerid,2069);
  762. SetPlayerCameraPos(playerid,-1819.7141,605.0435,35.0156);
  763. SetPlayerCameraLookAt(playerid,-1820.0067,612.9324,35.0156);
  764.  
  765. }
  766. case 9:
  767. {
  768. gTeam[playerid] = TEAM_GREECE;
  769. GameTextForPlayer(playerid, "~w~Greece", 5000, 5);
  770. SetPlayerPos(playerid,-2621.5823,1409.0161,7.1016);
  771. SetPlayerFacingAngle(playerid,0545);
  772. SetPlayerCameraPos(playerid,-2618.0957,1398.3645,7.1016);
  773. SetPlayerCameraLookAt(playerid,-2621.5823,1409.0161,7.1016);
  774.  
  775. }
  776. case 10:
  777. {
  778. gTeam[playerid] = TEAM_SINGAPORE;
  779. GameTextForPlayer(playerid, "~w~Singapore", 5000, 5);
  780. SetPlayerPos(playerid,2307.1194,1056.3799,10.8203);
  781. SetPlayerFacingAngle(playerid,5391);
  782. SetPlayerCameraPos(playerid,2320.0010,1056.2606,10.8203);
  783. SetPlayerCameraLookAt(playerid,2307.1194,1056.3799,10.8203);
  784.  
  785. }
  786. case 11:
  787. {
  788. gTeam[playerid] = TEAM_IRAQ;
  789. GameTextForPlayer(playerid, "~w~Iraq", 5000, 5);
  790. SetPlayerPos(playerid,2177.3914,1678.0061,10.8203);
  791. SetPlayerFacingAngle(playerid,5391);
  792. SetPlayerCameraPos(playerid,2320.0010,1056.2606,10.8203);
  793. SetPlayerCameraLookAt(playerid,2307.1194,1056.3799,10.8203);
  794.  
  795. }
  796.  
  797.  
  798.  
  799. }
  800. {
  801. SetPlayerToTeamColour(playerid); // calls the custom function
  802.  
  803. }
  804. return 1;
  805. }
  806.  
  807.  
  808. SetPlayerToTeamColour(playerid)
  809. {
  810. if(gTeam[playerid] == TEAM_AMERICA)
  811. {
  812. SetPlayerColor(playerid,COLOR_BLUE);
  813. }
  814. else if(gTeam[playerid] == TEAM_UK)
  815. {
  816. SetPlayerColor(playerid,COLOR_RED);
  817. }
  818. else if(gTeam[playerid] == TEAM_BANGLADESH)
  819. {
  820. SetPlayerColor(playerid,COLOR_GREEN);
  821. }
  822. else if(gTeam[playerid] == TEAM_RUSSIA)
  823. {
  824. SetPlayerColor(playerid,COLOR_ORANGE);
  825. }
  826. else if(gTeam[playerid] == TEAM_INDIA)
  827. {
  828. SetPlayerColor(playerid,COLOR_INDIA);
  829. }
  830. else if(gTeam[playerid] == TEAM_PAKISTAN)
  831. {
  832. SetPlayerColor(playerid,COLOR_PAKISTAN);
  833. }
  834. else if(gTeam[playerid] == TEAM_NEPAL)
  835. {
  836. SetPlayerColor(playerid,COLOR_NEPAL);
  837. }
  838. else if(gTeam[playerid] == TEAM_BRAZIL)
  839. {
  840. SetPlayerColor(playerid,COLOR_BRAZIL);
  841. }
  842. else if(gTeam[playerid] == TEAM_CHINA)
  843. {
  844. SetPlayerColor(playerid,COLOR_CHINA);
  845. }
  846. else if(gTeam[playerid] == TEAM_GREECE)
  847. {
  848. SetPlayerColor(playerid,COLOR_GREECE);
  849. }
  850. else if(gTeam[playerid] == TEAM_SINGAPORE)
  851. {
  852. SetPlayerColor(playerid,COLOR_SINGAPORE);
  853. }
  854. else if(gTeam[playerid] == TEAM_IRAQ)
  855. {
  856. SetPlayerColor(playerid,COLOR_IRAQ);
  857. }
  858.  
  859. }
  860.  
  861.  
  862. public OnPlayerConnect(playerid)
  863. {
  864. //GangZones
  865. GangZoneShowForPlayer(playerid, Zone[UnityStation], 0xFFFFFF88);
  866. GangZoneShowForPlayer(playerid, Zone[HOTEL],0xFFFFFF88);
  867. GangZoneShowForPlayer(playerid, Zone[CluckinBell], 0xFFFFFF88);
  868. GangZoneShowForPlayer(playerid, Zone[Gym], 0xFFFFFF88);
  869. SendClientMessage(playerid, COLOR_GREEN,"If You Did Not Register Please Type /register [password] To Create Your Account And Log In");
  870. SendClientMessage(playerid, COLOR_RED,"Welcome To Modern War V2.3 Enjoy Your Stay And Play!");
  871. Streaks[playerid] = 0;
  872. SendClientMessage(playerid,COLOR_JOIN, "Loading Data Please Wait ...");
  873. new Country[256];
  874. GetPlayerCountry(playerid,Country);
  875. new mess[256],IP[256];
  876. GetPlayerIp(playerid,IP,sizeof(IP));
  877. format(mess,sizeof(mess),"|-| Server |-| Player {FFFFFF} %s {4165FF} Has Joined The Server {D64343} [ Country: %s | IP: %s | Ping: %i ]",GetPName(playerid),Country,IP,GetPlayerPing(playerid));
  878. printf(mess);
  879. SendClientMessageToAll(COLOR_JOIN,mess);
  880. //Death Cam
  881. Died[playerid] = -1;
  882. KilledBy[playerid] = -1;
  883. //Score Timer
  884. GiveScoreTimer[playerid] = SetTimerEx ("GivePlayerScore", 1000*60, true, "d", playerid);
  885. //Speedo Meter System
  886. SPEEDOS[playerid] = TextDrawCreate(10.0,200.0," ");
  887. TextDrawShowForPlayer(playerid,SPEEDOS[playerid]);
  888. //Vehicle Healtho Meter
  889. HEALTH[playerid] = TextDrawCreate(10.0,200.0," ");
  890. TextDrawShowForPlayer(playerid,HEALTH[playerid]);
  891. //==========================Admin System============================
  892. if(fexist(UserPath(playerid)))
  893. {
  894. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  895. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Please Type Your Desired Password To Log In.","Login","Quit");
  896. }
  897. else
  898. {
  899. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Please Type A Password To Register An Account.","Register","Quit");
  900. }
  901. //=================================================================
  902. return 1;
  903. }
  904.  
  905. public OnPlayerDisconnect(playerid, reason)
  906. {
  907. Streaks[playerid] = 0;
  908. SendClientMessage(playerid, COLOR_RED,"You Are Disconnect For Your Are Leaving Or Lost Connection Or Kicked/Banned");
  909. //Death Cam
  910. Died[playerid] = 0;
  911. KilledBy[playerid] = 0;
  912. //Score Timer
  913. KillTimer(GiveScoreTimer[playerid]);
  914. //===============================Admin System=================
  915. new INI:File = INI_Open(UserPath(playerid));
  916. INI_SetTag(File,"data");
  917. INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
  918. INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  919. INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
  920. INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
  921. INI_WriteInt(File,"Donor",vip[playerid]);
  922. INI_WriteInt(File,"Score",GetPlayerScore(playerid));
  923. INI_Close(File);
  924. //============================================================
  925. new Country[256];
  926. GetPlayerCountry(playerid,Country);
  927. new mess[256],IP[256];
  928. GetPlayerIp(playerid,IP,sizeof(IP));
  929. format(mess,sizeof(mess),"|-| Server |-| Player {FFFFFF} %s {4165FF} has exited from the server {D64343} [ Country: %s | IP: %s | Ping: %i ]",GetPName(playerid),Country,IP,GetPlayerPing(playerid));
  930. printf(mess);
  931. SendClientMessageToAll(COLOR_JOIN,mess);
  932. return 1;
  933. }
  934.  
  935. public OnPlayerSpawn(playerid)
  936. {
  937. SendClientMessage(playerid, COLOR_BLUE,"[READ CAREFULLY] All The Weapon Shops In The Map Are Shown In A Pink Color Zone");
  938. //GangZones
  939. GangZoneShowForPlayer(playerid, America, COLOR_BLUE);
  940. GangZoneShowForPlayer(playerid, UK, 0xFF000096);
  941. GangZoneShowForPlayer(playerid, Bangladesh, 0x00FF8096);
  942. GangZoneShowForPlayer(playerid, Russia, 0xFF800096);
  943. GangZoneShowForPlayer(playerid, India, 0x80000096);
  944. GangZoneShowForPlayer(playerid, Pakistan, 0x40808096);
  945. GangZoneShowForPlayer(playerid, Nepal, 0x8000FF96);
  946. GangZoneShowForPlayer(playerid, Brazil, 0xB7B70096);
  947. GangZoneShowForPlayer(playerid, China, 0x80808096);
  948. GangZoneShowForPlayer(playerid, Greece, 0x00000096);
  949. GangZoneShowForPlayer(playerid, Singapore, 0x00FFFF96);
  950. GangZoneShowForPlayer(playerid, Iraq, 0x8080C096);
  951. //Weapon-Shops
  952. GangZoneShowForPlayer(playerid, WS, 0xFF00FF96);
  953. //Fuel System
  954. td_fuel[playerid] = TextDrawCreate(45,324,"Fuel: 100"); //create the textdraw at position
  955. TextDrawBackgroundColor(td_fuel[playerid],COLOR_GREEN); //setting an nice backgroundcolor
  956. TextDrawFont(td_fuel[playerid],3); //font type of textdraw
  957. TextDrawLetterSize(td_fuel[playerid],0.699999,1.700000); //size...
  958. TextDrawColor(td_fuel[playerid],0x000000ff); //color
  959. TextDrawSetShadow(td_fuel[playerid],3); //dropping the shadow
  960. return 1;
  961. //Class System
  962. ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Private Class\nSniper Class\nEngineer Class\nMedic Class\nPilot Class\nSpy Class", "Choose","");
  963. if(gPlayerClass[playerid] == PRIVATE)//This is for the First soldier class.
  964. {
  965. TogglePlayerControllable(playerid, 1);
  966. ResetPlayerWeapons(playerid);
  967. GivePlayerWeapon(playerid, 31, 200);//m4
  968. GivePlayerWeapon(playerid, 25, 100);//mp5
  969. GivePlayerWeapon(playerid, 24, 70);//deagle
  970. }
  971. else if(gPlayerClass[playerid] == SNIPER)//This is for the Second Sniper class.
  972. {
  973. TogglePlayerControllable(playerid, 1);
  974. ResetPlayerWeapons(playerid);
  975. GivePlayerWeapon(playerid, 34, 250);//sniper
  976. GivePlayerWeapon(playerid, 29, 250);//mp5
  977. GivePlayerWeapon(playerid, 4, 1);//knife
  978. }
  979. else if(gPlayerClass[playerid] == ENGINEER)//This is for the Second Engineer class.
  980. {
  981. TogglePlayerControllable(playerid, 1);
  982. ResetPlayerWeapons(playerid);
  983. GivePlayerWeapon(playerid, 27, 200);//spas12
  984. GivePlayerWeapon(playerid, 23, 200);//silent pistol
  985. GivePlayerWeapon(playerid, 35, 2);//rpg
  986. GivePlayerWeapon(playerid, 16, 2);//grenade
  987. }
  988. else if(gPlayerClass[playerid] == MEDIC)//This is for the Second Jetrooper class.
  989. {
  990. TogglePlayerControllable(playerid, 1);
  991. ResetPlayerWeapons(playerid);
  992. GivePlayerWeapon(playerid, 32, 500);//tec-9
  993. GivePlayerWeapon(playerid, 22, 500);//colt
  994. GivePlayerWeapon(playerid, 4, 1);//knife
  995. }
  996. else if(gPlayerClass[playerid] == PILOT)//This is for the Second Pilot class.
  997. {
  998. TogglePlayerControllable(playerid, 1);
  999. ResetPlayerWeapons(playerid);
  1000. GivePlayerWeapon(playerid, 24, 200);//deagle
  1001. GivePlayerWeapon(playerid, 17, 4);//moltove
  1002. GivePlayerWeapon(playerid, 25, 100);//shotgun
  1003. }
  1004. else if(gPlayerClass[playerid] == SPY)//This is for the Second Spy class.
  1005. {
  1006. TogglePlayerControllable(playerid, 1);
  1007. ResetPlayerWeapons(playerid);
  1008. GivePlayerWeapon(playerid, 29, 200);//mp5
  1009. GivePlayerWeapon(playerid, 23, 200);//silent pistol
  1010. GivePlayerWeapon(playerid, 4, 1);//knife
  1011. GivePlayerWeapon(playerid, 18, 2);//moltove
  1012. }
  1013. return 1;
  1014. }
  1015.  
  1016. public OnPlayerDeath(playerid, killerid, reason)
  1017. {
  1018. //===============================Admin System===================
  1019. PlayerInfo[killerid][pKills]++;
  1020. PlayerInfo[playerid][pDeaths]++;
  1021. //==============================================================
  1022. KillTimer(timer[playerid][UnityStation]);
  1023. KillTimer(timer[playerid][CluckinBell]);
  1024. KillTimer(timer[playerid][Gym]);
  1025. KillTimer(timer[playerid][HOTEL]);
  1026. if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID ) { //check if the player is connected and it's a VALID KILL
  1027. if(GetPlayerWantedLevel(killerid) < 6) //if the player's wantedlevel is under 6
  1028. {
  1029. SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1); //increase it by 1
  1030. }
  1031. Streaks[killerid] ++; //the sign '++' means, increase the variable for the killerid by 1
  1032. GivePlayerMoney(killerid, 1000); //if you like, give the killer some money, else comment this line out
  1033. }
  1034. SetPlayerWantedLevel(playerid, 0); //the player who died will get his wanted level reset to 0
  1035. Streaks[playerid] = 0; //and his streak will end, while giving the value '0' to this variable
  1036. SetPlayerScore(killerid,GetPlayerScore(killerid)+1); //not really necessary, would increase the player's score by 1 point
  1037. switch(Streaks[killerid]) //IMPORTANT: with the function "switch", you're switching / toggling through the killstreaks of a player (Streals). you need the killerid here, because the playerid is the one which is GETTING killed
  1038. {
  1039. case 2: // we won't start with the first kill (case 1), because it wouldn't be countable as streak
  1040. {
  1041. GivePlayerWeapon(killerid, 29,50);
  1042. GivePlayerWeapon(killerid, 30,50);
  1043. SendClientMessageToAll(COLOR_GREEN,"%d has made a double kill");
  1044. SendClientMessage(killerid,COLOR_WHITE,"You have earned 50 MP5 ammo and 50 AK-47 ammo for double kill");
  1045. }
  1046. case 3:
  1047. {
  1048. GivePlayerWeapon(killerid, 29,100);
  1049. GivePlayerWeapon(killerid, 30,100);
  1050. SendClientMessageToAll(COLOR_GREEN,"%d has made a Triple Kill");
  1051. SendClientMessage(killerid,COLOR_WHITE,"You have earned 100 MP5 ammo and 100 AK-47 ammo for triple kill");
  1052. }
  1053. case 4:
  1054. {
  1055. SendClientMessageToAll(COLOR_GREEN,"%d has made a 4 Kills in a row");
  1056. }
  1057. case 5:
  1058. {
  1059. SendClientMessageToAll(COLOR_GREEN,"%d has made a 5 Kills in a row");
  1060. }
  1061. case 6:
  1062. {
  1063. GivePlayerWeapon(killerid, 29,150);
  1064. GivePlayerWeapon(killerid, 30,150);
  1065. SendClientMessageToAll(COLOR_GREEN,"%d has made a 6 Kills in a row");
  1066. SendClientMessage(killerid,COLOR_WHITE,"You have earned 150 MP5 ammo and 150 AK-47 ammo 6 kills in a row");
  1067.  
  1068. Died[playerid] = 1;
  1069. if(Died[playerid] == 1)
  1070. {
  1071. Died[playerid] = 0;
  1072. if(KilledBy[playerid] != INVALID_PLAYER_ID)
  1073. TogglePlayerSpectating(playerid, 1);
  1074. PlayerSpectatePlayer(playerid, killerid);
  1075. SendClientMessage(playerid, COLOR_RED, "You Have Been Killed By A Player So Your Watching And Spectating Him And Your Now Using Our Server's Death Cam.");
  1076. SetTimerEx("EndDeathCam", 10000, 1, "i", playerid);
  1077. }
  1078. else
  1079. {
  1080. TogglePlayerSpectating(playerid, 0);
  1081. }
  1082. }
  1083. }
  1084.  
  1085. return 1;
  1086. }
  1087. //CAPTURE ZONES---------------------------SOME CREDITS TO JARNU-----------------
  1088. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  1089. {
  1090. if(checkpointid == CP[UnityStation])
  1091. {
  1092. if(tCP[UnityStation] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
  1093. if(UnderAttack[UnityStation] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
  1094. UnderAttack[UnityStation] = 1;
  1095. timer[playerid][UnityStation] = SetTimerEx("SetZone",30000,false,"i", playerid);
  1096. SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
  1097. new string[128];
  1098. format(string, sizeof(string),"[ATTENTION]: Unity Station is Being taken Over!");
  1099. SendClientMessageToAll(COLOR_RED,string);
  1100. iCP[playerid] = UnityStation;
  1101. }
  1102. if(checkpointid == CP[CluckinBell])
  1103. {
  1104. if(tCP[CluckinBell] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
  1105. if(UnderAttack[CluckinBell] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
  1106. UnderAttack[CluckinBell] = 1;
  1107. timer[playerid][CluckinBell] = SetTimerEx("SetZone",30000, false, "i", playerid);
  1108. SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
  1109. new string[128];
  1110. format(string, sizeof(string),"[ATTENTION]: CluckinBell is Being taken Over!");
  1111. SendClientMessageToAll(COLOR_RED,string);
  1112. iCP[playerid] = CluckinBell;
  1113. }
  1114. if(checkpointid == CP[Gym])
  1115. {
  1116. if(tCP[Gym] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
  1117. if(UnderAttack[Gym] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
  1118. UnderAttack[Gym] = 1;
  1119. timer[playerid][Gym] = SetTimerEx("SetZone",30000, false, "i", playerid);
  1120. SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
  1121. new string[128];
  1122. format(string, sizeof(string),"[ATTENTION]: Gym is Being taken Over!");
  1123. SendClientMessageToAll(COLOR_RED,string);
  1124. iCP[playerid] = Gym;
  1125. }
  1126. if(checkpointid == CP[HOTEL])
  1127. {
  1128. if(tCP[HOTEL] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
  1129. if(UnderAttack[HOTEL] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
  1130. UnderAttack[HOTEL] = 1;
  1131. timer[playerid][HOTEL] = SetTimerEx("SetZone",30000, false, "i", playerid);
  1132. SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
  1133. new string[128];
  1134. format(string, sizeof(string),"[ATTENTION]: HOTEL is Being taken Over!");
  1135. SendClientMessageToAll(COLOR_RED,string);
  1136. iCP[playerid] = HOTEL;
  1137. }
  1138. return 1;
  1139. }
  1140. public OnPlayerLeaveDynamicCP(playerid, checkpointid)
  1141. {
  1142. if(checkpointid == CP[UnityStation])
  1143. {
  1144. GameTextForPlayer(playerid, "Left CP", 1000, 3);
  1145. KillTimer(timer[playerid][UnityStation]);
  1146. TogglePlayerDynamicCP(playerid, CP[UnityStation], 0);
  1147. UnderAttack[UnityStation] = 0;
  1148. iCP[playerid] = -1;
  1149. }
  1150. if(checkpointid == CP[CluckinBell])
  1151. {
  1152. GameTextForPlayer(playerid, "Left CP", 1000, 3);
  1153. KillTimer(timer[playerid][CluckinBell]);
  1154. TogglePlayerDynamicCP(playerid, CP[CluckinBell], 0);
  1155. UnderAttack[CluckinBell] = 0;
  1156. iCP[playerid] = -1;
  1157. }
  1158. if(checkpointid == CP[Gym])
  1159. {
  1160. GameTextForPlayer(playerid, "Left CP", 1000, 3);
  1161. KillTimer(timer[playerid][Gym]);
  1162. TogglePlayerDynamicCP(playerid, CP[Gym], 0);
  1163. UnderAttack[Gym] = 0;
  1164. iCP[playerid] = -1;
  1165. }
  1166. if(checkpointid == CP[HOTEL])
  1167. {
  1168. GameTextForPlayer(playerid, "Left CP", 1000, 3);
  1169. KillTimer(timer[playerid][HOTEL]);
  1170. TogglePlayerDynamicCP(playerid, CP[HOTEL], 0);
  1171. UnderAttack[HOTEL] = 0;
  1172. iCP[playerid] = -1;
  1173. }
  1174. return 1;
  1175. }
  1176. forward SetZone(playerid);
  1177. public SetZone(playerid)
  1178. {
  1179. SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
  1180. GivePlayerMoney(playerid,5000);
  1181. SendClientMessage(playerid,COLOR_RED,"Congratulation! You have Gained 5 Scores & 5000$ Money ");
  1182. UnderAttack[UnityStation] = 0;
  1183. UnderAttack[CluckinBell] = 0;
  1184. UnderAttack[Gym] = 0;
  1185. UnderAttack[HOTEL] = 0;
  1186. return 1;
  1187. }
  1188. forward SetGangZone(playerid);
  1189. public SetGangZone(playerid)
  1190. {
  1191.  
  1192. if(gTeam[playerid] == TEAM_AMERICA && iCP[playerid] == UnityStation)
  1193. {
  1194. GangZoneShowForAll(Zone[UnityStation],COLOR_BLUE);
  1195. new string[64], pName5[MAX_PLAYER_NAME];
  1196. GetPlayerName(playerid,pName5,sizeof(pName5));
  1197. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For America",pName5);
  1198. SendClientMessageToAll(0x008000AA,string);
  1199. tCP[UnityStation] = TEAM_AMERICA;
  1200. }
  1201.  
  1202. if(gTeam[playerid] == TEAM_UK && iCP[playerid] == UnityStation)
  1203. {
  1204. GangZoneShowForAll(Zone[UnityStation],COLOR_RED);
  1205. new string[64], pName4[MAX_PLAYER_NAME];
  1206. GetPlayerName(playerid,pName4,sizeof(pName4));
  1207. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For UK",pName4);
  1208. SendClientMessageToAll(0x008000AA,string);
  1209. tCP[UnityStation] = TEAM_UK;
  1210. }
  1211.  
  1212. if(gTeam[playerid] == TEAM_BANGLADESH && iCP[playerid] == UnityStation)
  1213. {
  1214. GangZoneShowForAll(Zone[UnityStation],COLOR_GREEN);
  1215. new string[64], pName3[MAX_PLAYER_NAME];
  1216. GetPlayerName(playerid,pName3,sizeof(pName3));
  1217. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For Bangladesh",pName3);
  1218. SendClientMessageToAll(0x008000AA,string);
  1219. tCP[UnityStation] = TEAM_BANGLADESH;
  1220. }
  1221.  
  1222. if(gTeam[playerid] == TEAM_RUSSIA && iCP[playerid] == UnityStation)
  1223. {
  1224. GangZoneShowForAll(Zone[UnityStation],COLOR_ORANGE);
  1225. new string[64], pName2[MAX_PLAYER_NAME];
  1226. GetPlayerName(playerid,pName2,sizeof(pName2));
  1227. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For Russisa",pName2);
  1228. SendClientMessageToAll(0x008000AA,string);
  1229. tCP[UnityStation] = TEAM_RUSSIA;
  1230. }
  1231.  
  1232. if(gTeam[playerid] == TEAM_INDIA && iCP[playerid] == UnityStation)
  1233. {
  1234. GangZoneShowForAll(Zone[UnityStation],COLOR_INDIA);
  1235. new string[64], pName1[MAX_PLAYER_NAME];
  1236. GetPlayerName(playerid,pName1,sizeof(pName1));
  1237. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For INDIA ",pName1);
  1238. SendClientMessageToAll(0x008000AA,string);
  1239. tCP[UnityStation] = TEAM_INDIA;
  1240. }
  1241. if(gTeam[playerid] == TEAM_PAKISTAN && iCP[playerid] == UnityStation)
  1242. {
  1243. GangZoneShowForAll(Zone[UnityStation],COLOR_PAKISTAN);
  1244. new string[64], pName1[MAX_PLAYER_NAME];
  1245. GetPlayerName(playerid,pName1,sizeof(pName1));
  1246. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For PAKISTAN ",pName1);
  1247. SendClientMessageToAll(0x008000AA,string);
  1248. tCP[UnityStation] = TEAM_PAKISTAN;
  1249. }
  1250. if(gTeam[playerid] == TEAM_NEPAL && iCP[playerid] == UnityStation)
  1251. {
  1252. GangZoneShowForAll(Zone[UnityStation],COLOR_NEPAL);
  1253. new string[64], pName1[MAX_PLAYER_NAME];
  1254. GetPlayerName(playerid,pName1,sizeof(pName1));
  1255. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For NEPAL ",pName1);
  1256. SendClientMessageToAll(0x008000AA,string);
  1257. tCP[UnityStation] = TEAM_NEPAL;
  1258. }
  1259. if(gTeam[playerid] == TEAM_BRAZIL && iCP[playerid] == UnityStation)
  1260. {
  1261. GangZoneShowForAll(Zone[UnityStation],COLOR_BRAZIL);
  1262. new string[64], pName1[MAX_PLAYER_NAME];
  1263. GetPlayerName(playerid,pName1,sizeof(pName1));
  1264. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For BRAZIL ",pName1);
  1265. SendClientMessageToAll(0x008000AA,string);
  1266. tCP[UnityStation] = TEAM_BRAZIL;
  1267. }
  1268. if(gTeam[playerid] == TEAM_CHINA && iCP[playerid] == UnityStation)
  1269. {
  1270. GangZoneShowForAll(Zone[UnityStation],COLOR_CHINA);
  1271. new string[64], pName1[MAX_PLAYER_NAME];
  1272. GetPlayerName(playerid,pName1,sizeof(pName1));
  1273. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For CHINA ",pName1);
  1274. SendClientMessageToAll(0x008000AA,string);
  1275. tCP[UnityStation] = TEAM_CHINA;
  1276. }
  1277. if(gTeam[playerid] == TEAM_GREECE && iCP[playerid] == UnityStation)
  1278. {
  1279. GangZoneShowForAll(Zone[UnityStation],COLOR_GREECE);
  1280. new string[64], pName1[MAX_PLAYER_NAME];
  1281. GetPlayerName(playerid,pName1,sizeof(pName1));
  1282. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For GREECE ",pName1);
  1283. SendClientMessageToAll(0x008000AA,string);
  1284. tCP[UnityStation] = TEAM_GREECE;
  1285. }
  1286. if(gTeam[playerid] == TEAM_SINGAPORE && iCP[playerid] == UnityStation)
  1287. {
  1288. GangZoneShowForAll(Zone[UnityStation],COLOR_SINGAPORE);
  1289. new string[64], pName1[MAX_PLAYER_NAME];
  1290. GetPlayerName(playerid,pName1,sizeof(pName1));
  1291. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For SINGAPORE ",pName1);
  1292. SendClientMessageToAll(0x008000AA,string);
  1293. tCP[UnityStation] = TEAM_SINGAPORE;
  1294. }
  1295. if(gTeam[playerid] == TEAM_IRAQ && iCP[playerid] == UnityStation)
  1296. {
  1297. GangZoneShowForAll(Zone[UnityStation],COLOR_IRAQ);
  1298. new string[64], pName1[MAX_PLAYER_NAME];
  1299. GetPlayerName(playerid,pName1,sizeof(pName1));
  1300. format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For IRAQ ",pName1);
  1301. SendClientMessageToAll(0x008000AA,string);
  1302. tCP[UnityStation] = TEAM_IRAQ;
  1303. }
  1304. if(gTeam[playerid] == TEAM_IRAQ && iCP[playerid] == CluckinBell)
  1305. {
  1306. GangZoneShowForAll(Zone[Gym],COLOR_IRAQ);
  1307. new string[64], pName5[MAX_PLAYER_NAME];
  1308. GetPlayerName(playerid,pName5,sizeof(pName5));
  1309. format(string,sizeof string,"Server News: %s has captured CluckinBell For Iraq",pName5);
  1310. SendClientMessageToAll(0x00FFFFFF,string);
  1311. tCP[UnityStation] = TEAM_IRAQ;
  1312. }
  1313. //=============================CluckinBell====================================//
  1314. if(gTeam[playerid] == TEAM_AMERICA && iCP[playerid] == CluckinBell)
  1315. {
  1316. GangZoneShowForAll(Zone[UnityStation],COLOR_BLUE);
  1317. new string[64], pName5[MAX_PLAYER_NAME];
  1318. GetPlayerName(playerid,pName5,sizeof(pName5));
  1319. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For America",pName5);
  1320. SendClientMessageToAll(0x008000AA,string);
  1321. tCP[CluckinBell] = TEAM_AMERICA;
  1322. }
  1323.  
  1324. if(gTeam[playerid] == TEAM_UK && iCP[playerid] == CluckinBell)
  1325. {
  1326. GangZoneShowForAll(Zone[UnityStation],COLOR_RED);
  1327. new string[64], pName4[MAX_PLAYER_NAME];
  1328. GetPlayerName(playerid,pName4,sizeof(pName4));
  1329. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For UK",pName4);
  1330. SendClientMessageToAll(0x008000AA,string);
  1331. tCP[CluckinBell] = TEAM_UK;
  1332. }
  1333.  
  1334. if(gTeam[playerid] == TEAM_BANGLADESH && iCP[playerid] == CluckinBell)
  1335. {
  1336. GangZoneShowForAll(Zone[UnityStation],COLOR_GREEN);
  1337. new string[64], pName3[MAX_PLAYER_NAME];
  1338. GetPlayerName(playerid,pName3,sizeof(pName3));
  1339. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For Bangladesh",pName3);
  1340. SendClientMessageToAll(0x008000AA,string);
  1341. tCP[CluckinBell] = TEAM_BANGLADESH;
  1342. }
  1343.  
  1344. if(gTeam[playerid] == TEAM_RUSSIA && iCP[playerid] == CluckinBell)
  1345. {
  1346. GangZoneShowForAll(Zone[UnityStation],COLOR_ORANGE);
  1347. new string[64], pName2[MAX_PLAYER_NAME];
  1348. GetPlayerName(playerid,pName2,sizeof(pName2));
  1349. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For Russisa",pName2);
  1350. SendClientMessageToAll(0x008000AA,string);
  1351. tCP[CluckinBell] = TEAM_RUSSIA;
  1352. }
  1353.  
  1354. if(gTeam[playerid] == TEAM_INDIA && iCP[playerid] == CluckinBell)
  1355. {
  1356. GangZoneShowForAll(Zone[UnityStation],COLOR_INDIA);
  1357. new string[64], pName1[MAX_PLAYER_NAME];
  1358. GetPlayerName(playerid,pName1,sizeof(pName1));
  1359. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For INDIA ",pName1);
  1360. SendClientMessageToAll(0x008000AA,string);
  1361. tCP[CluckinBell] = TEAM_INDIA;
  1362. }
  1363. if(gTeam[playerid] == TEAM_PAKISTAN && iCP[playerid] == CluckinBell)
  1364. {
  1365. GangZoneShowForAll(Zone[UnityStation],COLOR_PAKISTAN);
  1366. new string[64], pName1[MAX_PLAYER_NAME];
  1367. GetPlayerName(playerid,pName1,sizeof(pName1));
  1368. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For PAKISTAN ",pName1);
  1369. SendClientMessageToAll(0x008000AA,string);
  1370. tCP[CluckinBell] = TEAM_PAKISTAN;
  1371. }
  1372. if(gTeam[playerid] == TEAM_NEPAL && iCP[playerid] == CluckinBell)
  1373. {
  1374. GangZoneShowForAll(Zone[UnityStation],COLOR_NEPAL);
  1375. new string[64], pName1[MAX_PLAYER_NAME];
  1376. GetPlayerName(playerid,pName1,sizeof(pName1));
  1377. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For NEPAL ",pName1);
  1378. SendClientMessageToAll(0x008000AA,string);
  1379. tCP[CluckinBell] = TEAM_NEPAL;
  1380. }
  1381. if(gTeam[playerid] == TEAM_BRAZIL && iCP[playerid] == CluckinBell)
  1382. {
  1383. GangZoneShowForAll(Zone[UnityStation],COLOR_BRAZIL);
  1384. new string[64], pName1[MAX_PLAYER_NAME];
  1385. GetPlayerName(playerid,pName1,sizeof(pName1));
  1386. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For BRAZIL ",pName1);
  1387. SendClientMessageToAll(0x008000AA,string);
  1388. tCP[CluckinBell] = TEAM_BRAZIL;
  1389. }
  1390. if(gTeam[playerid] == TEAM_CHINA && iCP[playerid] == CluckinBell)
  1391. {
  1392. GangZoneShowForAll(Zone[UnityStation],COLOR_CHINA);
  1393. new string[64], pName1[MAX_PLAYER_NAME];
  1394. GetPlayerName(playerid,pName1,sizeof(pName1));
  1395. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For CHINA ",pName1);
  1396. SendClientMessageToAll(0x008000AA,string);
  1397. tCP[CluckinBell] = TEAM_CHINA;
  1398. }
  1399. if(gTeam[playerid] == TEAM_GREECE && iCP[playerid] == CluckinBell)
  1400. {
  1401. GangZoneShowForAll(Zone[UnityStation],COLOR_GREECE);
  1402. new string[64], pName1[MAX_PLAYER_NAME];
  1403. GetPlayerName(playerid,pName1,sizeof(pName1));
  1404. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For GREECE ",pName1);
  1405. SendClientMessageToAll(0x008000AA,string);
  1406. tCP[CluckinBell] = TEAM_GREECE;
  1407. }
  1408. if(gTeam[playerid] == TEAM_SINGAPORE && iCP[playerid] == CluckinBell)
  1409. {
  1410. GangZoneShowForAll(Zone[UnityStation],COLOR_SINGAPORE);
  1411. new string[64], pName1[MAX_PLAYER_NAME];
  1412. GetPlayerName(playerid,pName1,sizeof(pName1));
  1413. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For SINGAPORE ",pName1);
  1414. SendClientMessageToAll(0x008000AA,string);
  1415. tCP[CluckinBell] = TEAM_SINGAPORE;
  1416. }
  1417. if(gTeam[playerid] == TEAM_IRAQ && iCP[playerid] == CluckinBell)
  1418. {
  1419. GangZoneShowForAll(Zone[UnityStation],COLOR_IRAQ);
  1420. new string[64], pName1[MAX_PLAYER_NAME];
  1421. GetPlayerName(playerid,pName1,sizeof(pName1));
  1422. format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For IRAQ ",pName1);
  1423. SendClientMessageToAll(0x008000AA,string);
  1424. tCP[CluckinBell] = TEAM_IRAQ;
  1425. }
  1426. //============================================================================//
  1427. //====================================Gym=====================================//
  1428. if(gTeam[playerid] == TEAM_AMERICA && iCP[playerid] == Gym)
  1429. {
  1430. GangZoneShowForAll(Zone[UnityStation],COLOR_BLUE);
  1431. new string[64], pName5[MAX_PLAYER_NAME];
  1432. GetPlayerName(playerid,pName5,sizeof(pName5));
  1433. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For America",pName5);
  1434. SendClientMessageToAll(0x008000AA,string);
  1435. tCP[Gym] = TEAM_AMERICA;
  1436. }
  1437.  
  1438. if(gTeam[playerid] == TEAM_UK && iCP[playerid] == Gym)
  1439. {
  1440. GangZoneShowForAll(Zone[UnityStation],COLOR_RED);
  1441. new string[64], pName4[MAX_PLAYER_NAME];
  1442. GetPlayerName(playerid,pName4,sizeof(pName4));
  1443. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For UK",pName4);
  1444. SendClientMessageToAll(0x008000AA,string);
  1445. tCP[Gym] = TEAM_UK;
  1446. }
  1447.  
  1448. if(gTeam[playerid] == TEAM_BANGLADESH && iCP[playerid] == Gym)
  1449. {
  1450. GangZoneShowForAll(Zone[UnityStation],COLOR_GREEN);
  1451. new string[64], pName3[MAX_PLAYER_NAME];
  1452. GetPlayerName(playerid,pName3,sizeof(pName3));
  1453. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For Bangladesh",pName3);
  1454. SendClientMessageToAll(0x008000AA,string);
  1455. tCP[Gym] = TEAM_BANGLADESH;
  1456. }
  1457.  
  1458. if(gTeam[playerid] == TEAM_RUSSIA && iCP[playerid] == Gym)
  1459. {
  1460. GangZoneShowForAll(Zone[UnityStation],COLOR_ORANGE);
  1461. new string[64], pName2[MAX_PLAYER_NAME];
  1462. GetPlayerName(playerid,pName2,sizeof(pName2));
  1463. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For Russisa",pName2);
  1464. SendClientMessageToAll(0x008000AA,string);
  1465. tCP[Gym] = TEAM_RUSSIA;
  1466. }
  1467.  
  1468. if(gTeam[playerid] == TEAM_INDIA && iCP[playerid] == Gym)
  1469. {
  1470. GangZoneShowForAll(Zone[UnityStation],COLOR_INDIA);
  1471. new string[64], pName1[MAX_PLAYER_NAME];
  1472. GetPlayerName(playerid,pName1,sizeof(pName1));
  1473. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For INDIA ",pName1);
  1474. SendClientMessageToAll(0x008000AA,string);
  1475. tCP[Gym] = TEAM_INDIA;
  1476. }
  1477. if(gTeam[playerid] == TEAM_PAKISTAN && iCP[playerid] == Gym)
  1478. {
  1479. GangZoneShowForAll(Zone[UnityStation],COLOR_PAKISTAN);
  1480. new string[64], pName1[MAX_PLAYER_NAME];
  1481. GetPlayerName(playerid,pName1,sizeof(pName1));
  1482. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For PAKISTAN ",pName1);
  1483. SendClientMessageToAll(0x008000AA,string);
  1484. tCP[Gym] = TEAM_PAKISTAN;
  1485. }
  1486. if(gTeam[playerid] == TEAM_NEPAL && iCP[playerid] == Gym)
  1487. {
  1488. GangZoneShowForAll(Zone[UnityStation],COLOR_NEPAL);
  1489. new string[64], pName1[MAX_PLAYER_NAME];
  1490. GetPlayerName(playerid,pName1,sizeof(pName1));
  1491. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For NEPAL ",pName1);
  1492. SendClientMessageToAll(0x008000AA,string);
  1493. tCP[Gym] = TEAM_NEPAL;
  1494. }
  1495. if(gTeam[playerid] == TEAM_BRAZIL && iCP[playerid] == Gym)
  1496. {
  1497. GangZoneShowForAll(Zone[UnityStation],COLOR_BRAZIL);
  1498. new string[64], pName1[MAX_PLAYER_NAME];
  1499. GetPlayerName(playerid,pName1,sizeof(pName1));
  1500. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For BRAZIL ",pName1);
  1501. SendClientMessageToAll(0x008000AA,string);
  1502. tCP[Gym] = TEAM_BRAZIL;
  1503. }
  1504. if(gTeam[playerid] == TEAM_CHINA && iCP[playerid] == Gym)
  1505. {
  1506. GangZoneShowForAll(Zone[UnityStation],COLOR_CHINA);
  1507. new string[64], pName1[MAX_PLAYER_NAME];
  1508. GetPlayerName(playerid,pName1,sizeof(pName1));
  1509. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For CHINA ",pName1);
  1510. SendClientMessageToAll(0x008000AA,string);
  1511. tCP[Gym] = TEAM_CHINA;
  1512. }
  1513. if(gTeam[playerid] == TEAM_GREECE && iCP[playerid] == Gym)
  1514. {
  1515. GangZoneShowForAll(Zone[UnityStation],COLOR_GREECE);
  1516. new string[64], pName1[MAX_PLAYER_NAME];
  1517. GetPlayerName(playerid,pName1,sizeof(pName1));
  1518. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For GREECE ",pName1);
  1519. SendClientMessageToAll(0x008000AA,string);
  1520. tCP[Gym] = TEAM_GREECE;
  1521. }
  1522. if(gTeam[playerid] == TEAM_SINGAPORE && iCP[playerid] == Gym)
  1523. {
  1524. GangZoneShowForAll(Zone[UnityStation],COLOR_SINGAPORE);
  1525. new string[64], pName1[MAX_PLAYER_NAME];
  1526. GetPlayerName(playerid,pName1,sizeof(pName1));
  1527. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For SINGAPORE ",pName1);
  1528. SendClientMessageToAll(0x008000AA,string);
  1529. tCP[Gym] = TEAM_SINGAPORE;
  1530. }
  1531. if(gTeam[playerid] == TEAM_IRAQ && iCP[playerid] == Gym)
  1532. {
  1533. GangZoneShowForAll(Zone[UnityStation],COLOR_IRAQ);
  1534. new string[64], pName1[MAX_PLAYER_NAME];
  1535. GetPlayerName(playerid,pName1,sizeof(pName1));
  1536. format(string,sizeof string,"Server Dangerous News: %s has captured Gym For IRAQ ",pName1);
  1537. SendClientMessageToAll(0x008000AA,string);
  1538. tCP[Gym] = TEAM_IRAQ;
  1539. }
  1540. //============================================================================//
  1541. //====================================HOTEL===================================//
  1542. if(gTeam[playerid] == TEAM_AMERICA && iCP[playerid] == HOTEL)
  1543. {
  1544. GangZoneShowForAll(Zone[UnityStation],COLOR_BLUE);
  1545. new string[64], pName5[MAX_PLAYER_NAME];
  1546. GetPlayerName(playerid,pName5,sizeof(pName5));
  1547. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For America",pName5);
  1548. SendClientMessageToAll(0x008000AA,string);
  1549. tCP[HOTEL] = TEAM_AMERICA;
  1550. }
  1551.  
  1552. if(gTeam[playerid] == TEAM_UK && iCP[playerid] == HOTEL)
  1553. {
  1554. GangZoneShowForAll(Zone[UnityStation],COLOR_RED);
  1555. new string[64], pName4[MAX_PLAYER_NAME];
  1556. GetPlayerName(playerid,pName4,sizeof(pName4));
  1557. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For UK",pName4);
  1558. SendClientMessageToAll(0x008000AA,string);
  1559. tCP[HOTEL] = TEAM_UK;
  1560. }
  1561.  
  1562. if(gTeam[playerid] == TEAM_BANGLADESH && iCP[playerid] == HOTEL)
  1563. {
  1564. GangZoneShowForAll(Zone[UnityStation],COLOR_GREEN);
  1565. new string[64], pName3[MAX_PLAYER_NAME];
  1566. GetPlayerName(playerid,pName3,sizeof(pName3));
  1567. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For Bangladesh",pName3);
  1568. SendClientMessageToAll(0x008000AA,string);
  1569. tCP[HOTEL] = TEAM_BANGLADESH;
  1570. }
  1571.  
  1572. if(gTeam[playerid] == TEAM_RUSSIA && iCP[playerid] == HOTEL)
  1573. {
  1574. GangZoneShowForAll(Zone[UnityStation],COLOR_ORANGE);
  1575. new string[64], pName2[MAX_PLAYER_NAME];
  1576. GetPlayerName(playerid,pName2,sizeof(pName2));
  1577. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For Russisa",pName2);
  1578. SendClientMessageToAll(0x008000AA,string);
  1579. tCP[HOTEL] = TEAM_RUSSIA;
  1580. }
  1581.  
  1582. if(gTeam[playerid] == TEAM_INDIA && iCP[playerid] == HOTEL)
  1583. {
  1584. GangZoneShowForAll(Zone[UnityStation],COLOR_INDIA);
  1585. new string[64], pName1[MAX_PLAYER_NAME];
  1586. GetPlayerName(playerid,pName1,sizeof(pName1));
  1587. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For INDIA ",pName1);
  1588. SendClientMessageToAll(0x008000AA,string);
  1589. tCP[HOTEL] = TEAM_INDIA;
  1590. }
  1591. if(gTeam[playerid] == TEAM_PAKISTAN && iCP[playerid] == HOTEL)
  1592. {
  1593. GangZoneShowForAll(Zone[UnityStation],COLOR_PAKISTAN);
  1594. new string[64], pName1[MAX_PLAYER_NAME];
  1595. GetPlayerName(playerid,pName1,sizeof(pName1));
  1596. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For PAKISTAN ",pName1);
  1597. SendClientMessageToAll(0x008000AA,string);
  1598. tCP[HOTEL] = TEAM_PAKISTAN;
  1599. }
  1600. if(gTeam[playerid] == TEAM_NEPAL && iCP[playerid] == HOTEL)
  1601. {
  1602. GangZoneShowForAll(Zone[UnityStation],COLOR_NEPAL);
  1603. new string[64], pName1[MAX_PLAYER_NAME];
  1604. GetPlayerName(playerid,pName1,sizeof(pName1));
  1605. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For NEPAL ",pName1);
  1606. SendClientMessageToAll(0x008000AA,string);
  1607. tCP[HOTEL] = TEAM_NEPAL;
  1608. }
  1609. if(gTeam[playerid] == TEAM_BRAZIL && iCP[playerid] == HOTEL)
  1610. {
  1611. GangZoneShowForAll(Zone[UnityStation],COLOR_BRAZIL);
  1612. new string[64], pName1[MAX_PLAYER_NAME];
  1613. GetPlayerName(playerid,pName1,sizeof(pName1));
  1614. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For BRAZIL ",pName1);
  1615. SendClientMessageToAll(0x008000AA,string);
  1616. tCP[HOTEL] = TEAM_BRAZIL;
  1617. }
  1618. if(gTeam[playerid] == TEAM_CHINA && iCP[playerid] == HOTEL)
  1619. {
  1620. GangZoneShowForAll(Zone[UnityStation],COLOR_CHINA);
  1621. new string[64], pName1[MAX_PLAYER_NAME];
  1622. GetPlayerName(playerid,pName1,sizeof(pName1));
  1623. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For CHINA ",pName1);
  1624. SendClientMessageToAll(0x008000AA,string);
  1625. tCP[HOTEL] = TEAM_CHINA;
  1626. }
  1627. if(gTeam[playerid] == TEAM_GREECE && iCP[playerid] == HOTEL)
  1628. {
  1629. GangZoneShowForAll(Zone[UnityStation],COLOR_GREECE);
  1630. new string[64], pName1[MAX_PLAYER_NAME];
  1631. GetPlayerName(playerid,pName1,sizeof(pName1));
  1632. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For GREECE ",pName1);
  1633. SendClientMessageToAll(0x008000AA,string);
  1634. tCP[HOTEL] = TEAM_GREECE;
  1635. }
  1636. if(gTeam[playerid] == TEAM_SINGAPORE && iCP[playerid] == HOTEL)
  1637. {
  1638. GangZoneShowForAll(Zone[UnityStation],COLOR_SINGAPORE);
  1639. new string[64], pName1[MAX_PLAYER_NAME];
  1640. GetPlayerName(playerid,pName1,sizeof(pName1));
  1641. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For SINGAPORE ",pName1);
  1642. SendClientMessageToAll(0x008000AA,string);
  1643. tCP[HOTEL] = TEAM_SINGAPORE;
  1644. }
  1645. if(gTeam[playerid] == TEAM_IRAQ && iCP[playerid] == HOTEL)
  1646. {
  1647. GangZoneShowForAll(Zone[UnityStation],COLOR_IRAQ);
  1648. new string[64], pName1[MAX_PLAYER_NAME];
  1649. GetPlayerName(playerid,pName1,sizeof(pName1));
  1650. format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For IRAQ ",pName1);
  1651. SendClientMessageToAll(0x008000AA,string);
  1652. tCP[HOTEL] = TEAM_IRAQ;
  1653. }
  1654. return 1;
  1655. }
  1656. public OnVehicleSpawn(vehicleid)
  1657. {
  1658. return 1;
  1659. }
  1660.  
  1661. public OnVehicleDeath(vehicleid, killerid)
  1662. {
  1663. return 1;
  1664. }
  1665.  
  1666. public OnPlayerText(playerid,text[])
  1667. {
  1668. if(strval(text) == ContestAnswer && ContestAnswer != -1) // Checks if the text the player has typed is equal to the Contest Answer, but isn't -1.
  1669. {
  1670. OnPlayerWinContest(playerid); // This'll direct the script to the OnPlayerWinContest callback.
  1671. }
  1672. return 1;
  1673. }
  1674.  
  1675. public OnPlayerCommandText(playerid, cmdtext[])
  1676. {
  1677. if (strcmp("/kill", cmdtext, true, 10) == 0)
  1678. {
  1679. SetPlayerHealth(playerid, 0.0);
  1680. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)YOU HAVE COMMITED SUICIDE.!");
  1681. return 1;
  1682. }
  1683. if (strcmp("/help", cmdtext, true, 10) == 0)
  1684. {
  1685. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)Welcome To Los Santos Cops VS Terrorist.!");
  1686. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)Hope You Enjoy The Game It's All About Killing Try /cmds /rules.!");
  1687. return 1;
  1688. }
  1689. if (strcmp("/rules", cmdtext, true, 10) == 0)
  1690. {
  1691. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)1.Do not car park.!");
  1692. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)2.Do not kill with heli blade.!");
  1693. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)3.Do not kill players with armoured vehicle in spawn position.!");
  1694. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)4.Do not disrespect players.!");
  1695. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)5.Treat Everyone As Your Own Brother.!");
  1696.  
  1697. return 1;
  1698. }
  1699. if (strcmp("/banrules", cmdtext, true, 10) == 0)
  1700. {
  1701. SendClientMessage(playerid, COLOR_YELLOW, "(INFO)1.Do not disrespect player it could cause immediate ban.!");
  1702. SendClientMessage(playerid, COLOR_YELLOW, "(INFO)2.Do not cheat it will cause you ban without warnings.!");
  1703. SendClientMessage(playerid, COLOR_YELLOW, "(INFO)3.Massive spawn killing will result ban after 2 kicks.!");
  1704. SendClientMessage(playerid, COLOR_YELLOW, "(INFO)4.Do not raise your score in anyways very early that will also cause ban.!");
  1705.  
  1706.  
  1707. return 1;
  1708. }
  1709. if (strcmp("/cmds", cmdtext, true, 10) == 0)
  1710. {
  1711. SendClientMessage(playerid, COLOR_GREEN, "(INFO)/banrules,/help,/kill,/afk,/shop.!");
  1712.  
  1713.  
  1714. return 1;
  1715. }
  1716.  
  1717. return 0;
  1718. }
  1719. CMD:help(playerid, params[])
  1720. {
  1721. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)Welcome To Modern War Battalation.!");
  1722. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)Hope You Enjoy The Game It's All About Killing Try /cmds /rules.!");
  1723. return true;
  1724. }
  1725.  
  1726. CMD:kill(playerid, params[])
  1727. {
  1728. SetPlayerHealth(playerid, 0.0);
  1729. SendClientMessage(playerid, COLOR_ORANGE, "(INFO)YOU HAVE COMMITED SUICIDE.!");
  1730. return true;
  1731. }
  1732.  
  1733. CMD:rules(playerid, params[])
  1734. {
  1735. SendClientMessage(playerid, COLOR_YELLOW,"1.Do not car park.!");
  1736. SendClientMessage(playerid, COLOR_YELLOW,"2.Do not kill with heli blade.!");
  1737. SendClientMessage(playerid, COLOR_YELLOW,"3.Do not kill players with armoured vehicle in spawn position.!");
  1738. SendClientMessage(playerid, COLOR_YELLOW,"4.Do not disrespect players.!");
  1739. SendClientMessage(playerid, COLOR_YELLOW,"5.Treat Everyone As Your Own Brother.!");
  1740. return true;
  1741. }
  1742. CMD:cmds(playerid, params[])
  1743. {
  1744. SendClientMessage(playerid, COLOR_WHITE,"/help,/rules,/kill,/banrules,/shop,/jetpack");
  1745. SendClientMessage(playerid, COLOR_WHITE,"/healme,/armourme,/pm,/refuel,/buy,/derby,/leave");
  1746. SendClientMessage(playerid, COLOR_WHITE,"/helpme,/stats,/report");
  1747. return true;
  1748. }
  1749.  
  1750. CMD:banrules(playerid, params[])
  1751. {
  1752. SendClientMessage(playerid, COLOR_YELLOW, "(INFO)1.Do not disrespect player it could cause immediate ban.!");
  1753. SendClientMessage(playerid, COLOR_YELLOW, "(INFO)2.Do not cheat it will cause you ban without warnings.!");
  1754. SendClientMessage(playerid, COLOR_YELLOW, "(INFO)3.Massive spawn killing will result ban after 2 kicks.!");
  1755. SendClientMessage(playerid, COLOR_YELLOW, "(INFO)4.Do not raise your score in anyways very early that will also cause ban.!");
  1756.  
  1757.  
  1758. return true;
  1759. }
  1760. CMD:shop(playerid, params[])//If the player types /shop
  1761. {
  1762. if(IsPlayerInRangeOfPoint(playerid, 1.0, 0.0, 0.0, 0.0))//If there within the coordinates set for the Weapon Shop(For multiple shop locations do "0.0, 0.0, 0.0 || 0.0, 0.0, 0.0 || 0.0, 0.0, 0.0" etc.)
  1763. {
  1764. ShowPlayerDialog(playerid, SHOP_DIALOG, DIALOG_STYLE_LIST, "Weapon Shop", "Deagle: $500\nSawn-Off: $1000\nM4: $2000\nSniper: $3000", "Select", "Exit");//Show them the dialog.
  1765. return true;//Tell pawno to stop processing now.
  1766. }
  1767. else//Else there NOT within the coordinates set for the Weapon Shop.
  1768. {
  1769. SendClientMessage(playerid, -1, "Your not at a Weapon Shop.");//Tell them.
  1770. }
  1771. return true;
  1772. }
  1773. CMD:jetpack(playerid, params[])//If the player types /shop
  1774. {
  1775. if(gPlayerClass[playerid] == PILOT)//if the player is jettrooper
  1776. {
  1777. SetPlayerSpecialAction(playerid,2);//This is command for the jet trooper, he can spawn jetpack by /jp command
  1778. }
  1779. return true;
  1780. }
  1781. CMD:healme(playerid, params[])//If the player types /shop
  1782. {
  1783. if(gPlayerClass[playerid] == MEDIC)//if the player is jettrooper
  1784. {
  1785. SetPlayerHealth(playerid, 100.0);
  1786. SendClientMessage(playerid, COLOR_BLUE, "You Have Healed Yourself.");
  1787. new string[128];
  1788. new pName[MAX_PLAYER_NAME];
  1789. GetPlayerName(playerid, pName, sizeof(pName));
  1790. format(string, sizeof(string), "** %s Has Healed Himself.", pName);
  1791. SendClientMessageToAll(COLOR_YELLOW, string);
  1792. }
  1793. return true;
  1794. }
  1795. CMD:armourme(playerid, params[])//If the player types /shop
  1796. {
  1797. if(gPlayerClass[playerid] == MEDIC)//if the player is jettrooper
  1798. {
  1799. SetPlayerArmour(playerid, 100.0);
  1800. SendClientMessage(playerid, COLOR_BLUE, "You Have Armoured Yourself.");
  1801. new string[128];
  1802. new pName[MAX_PLAYER_NAME];
  1803. GetPlayerName(playerid, pName, sizeof(pName));
  1804. format(string, sizeof(string), "** %s Has Armoured Himself.", pName);
  1805. SendClientMessageToAll(COLOR_YELLOW, string);
  1806. }
  1807. return true;
  1808. }
  1809. CMD:pm(playerid, params[])
  1810. {
  1811. new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
  1812. if(sscanf(params, "us", id, str2))
  1813. {
  1814. SendClientMessage(playerid, 0xFF0000FF, "Usage: /pm <id> <message>");
  1815. return 1;
  1816. }
  1817. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
  1818. if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!");
  1819. {
  1820. GetPlayerName(playerid, Name1, sizeof(Name1));
  1821. GetPlayerName(id, Name2, sizeof(Name2));
  1822. format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
  1823. SendClientMessage(playerid, 0xFF0000FF, str);
  1824. format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
  1825. SendClientMessage(id, 0xFF0000FF, str);
  1826. }
  1827. return 1;
  1828. }
  1829. CMD:refuel(playerid, params[])
  1830. {
  1831. {
  1832. if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFC800FF,"You are not in an vehicle!");
  1833. if (isrefuelling[playerid]) return SendClientMessage(playerid,0xFFC800FF,"You are already refuelling!");
  1834. if (GetPlayerMoney(playerid) - 5000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
  1835. GivePlayerMoney(playerid,-5000);
  1836. SetCameraBehindPlayer(playerid);
  1837. TogglePlayerControllable(playerid,0);
  1838. isrefuelling[playerid] = 1;
  1839. TextDrawSetString(td_fuel[playerid],"Refuelling...");
  1840. SetTimerEx("timer_refuel",4500,false,"i",playerid);
  1841. return 1;
  1842. }
  1843. }
  1844. CMD:buy(playerid, params[])
  1845. {
  1846. ShowPlayerDialog(playerid,333,DIALOG_STYLE_MSGBOX,"Buying Dialog","Buy Health ($3000)\nBuy Armour ($5000)\nBuy MP5 ($7000)\nBuy AK-47 ($10000)\nBuy M4 ($15000)\nBuy Sniper ($20000)","Buy","Close");
  1847. return 1;
  1848. }
  1849. CMD:derby(playerid,params[])
  1850. {
  1851. if(InDerby[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You are already in derby. Type /leave to exit derby dm");
  1852. new rand = random(sizeof(derbyspawns));
  1853. new veh = CreateVehicle(451,derbyspawns[rand][0],derbyspawns[rand][1],derbyspawns[rand][2],derbyspawns[rand][3],-1,-1,-1);
  1854. PutPlayerInVehicle(playerid,veh,0);
  1855. InDerby[playerid] = 1;
  1856. return 1;
  1857. }
  1858. CMD:leave(playerid,params[])
  1859. {
  1860. if(InDerby[playerid] == 0) return SendClientMessage(playerid,COLOR_GREEN,"You are not in derby!");
  1861. InDerby[playerid] = 0;
  1862. SetPlayerHealth(playerid,0);
  1863. return 1;
  1864. }
  1865.  
  1866. //=================================Admin System===============================//
  1867. #if defined USE_STATS
  1868. CMD:stats(playerid,params[]) {
  1869. new string[256], pDeaths, player1, h, m, s,playername[MAX_PLAYER_NAME];
  1870. if(isnull(params)) player1 = playerid;
  1871. else player1 = strval(params);
  1872.  
  1873. if(IsPlayerConnected(player1)) {
  1874. TotalGameTime(player1, h, m, s);
  1875. GetPlayerName(player1, playername, sizeof(playername));
  1876. if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
  1877. format(string,sizeof(string),"{F9FF88}|-| %s's Stats |-|\n \nScores: %d\n \nKills %d\n \nDeaths %d\n \nRatio: %0.2f\n \nMoney: $%d\n \nAdmin Level: %d\n \nModerator: %d\n \nTime: %d hrs %d mins %d secs\n \nFor other information use /stats!",playername, GetPlayerScore(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1), PlayerInfo[player1][Level], PlayerInfo[player1][Helper], h, m, s);
  1878. return ShowPlayerDialog(playerid, 11111,DIALOG_STYLE_MSGBOX,"{FFFF00}Player Status",string,"Close","");
  1879. } else return SendClientMessage(playerid, red, "Player Not Connected!");
  1880. }
  1881. #endif
  1882. CMD:helpme(playerid, params[])
  1883. {
  1884. new str[128], Name1[MAX_PLAYER_NAME];
  1885. if(sscanf(params,"s", str))
  1886. {
  1887. SendClientMessage(playerid, COLOR_RED,"CORRECT USAGE: /helpme [text]");
  1888. return 1;
  1889. }
  1890. GetPlayerName(playerid, Name1, sizeof(Name1));
  1891. format(str, sizeof(str),"{00FFFF}[HELP MSG From %s]:{00FFF0} %s",Name1, str);
  1892. MessageToTwice(COLOR_RED, str);
  1893. SendClientMessage(playerid, COLOR_YELLOW,"Your Request has been sent to online Administrators.");
  1894. return 1;
  1895. }
  1896. CMD:heal(playerid, params[])
  1897. {
  1898. if(PlayerInfo[playerid][pAdmin] >= 3)
  1899. {
  1900. SetPlayerHealth(playerid, 100); //if he's allowed, restore his health
  1901. SendClientMessage(playerid, COLOR_GREEN, "Your Health Has Been Restored To 100"); // and send him the success-message
  1902. CMDMessageToAdmins(playerid,"HEAL");
  1903. }
  1904. else
  1905. {
  1906. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!"); // if not, send him only the following message
  1907. }
  1908. return 1;
  1909. }
  1910. CMD:kick(playerid, params[])
  1911. {
  1912. if(PlayerInfo[playerid][pAdmin] >= 1) {
  1913. new PID; //define the playerid we wanna kick
  1914. new reason[64]; //the reason, put into a string
  1915. new str[128]; //a new message string
  1916. new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
  1917. GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
  1918. GetPlayerName(PID, Playername, sizeof(Playername));
  1919. if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /kick [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
  1920.  
  1921. if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
  1922. return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
  1923.  
  1924. format(str, sizeof(str), "'%s' Has Been Kicked By Administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
  1925. SendClientMessageToAll(COLOR_RED, str); //send that message to all
  1926. CMDMessageToAdmins(playerid,"KICK");
  1927. Kick(PID); //kick the playerid we've defined
  1928.  
  1929. }
  1930. else //if he has not got the permissions
  1931. {
  1932. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!"); //return this message
  1933. }
  1934. return 1;
  1935. }
  1936. CMD:ban(playerid, params[])
  1937. {
  1938. if(PlayerInfo[playerid][pAdmin] >= 2)
  1939. {
  1940. new PID; //define the playerid we wanna ban
  1941. new reason[64]; //the reason, put into a string
  1942. new str[128]; //a new message string
  1943. new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
  1944. GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
  1945. GetPlayerName(PID, Playername, sizeof(Playername));
  1946. if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
  1947.  
  1948. if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
  1949. return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
  1950.  
  1951. format(str, sizeof(str), "'%s' Has Been Banned By Administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
  1952. SendClientMessageToAll(COLOR_RED, str); //send that message to all
  1953. CMDMessageToAdmins(playerid,"BAN");
  1954. Ban(PID);
  1955. //close the log, finished!//Ban the playerid we've defined
  1956.  
  1957. }
  1958. else //if he has not got the permissions
  1959. {
  1960. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!"); //return this message
  1961. }
  1962. return 1;
  1963. }
  1964. COMMAND:freeze(playerid,params[])
  1965. {
  1966. if(PlayerInfo[playerid][pAdmin] >= 3)
  1967. {
  1968. new Target; //defines the playerid we wanna freeze
  1969. if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /freeze [playerid]"); //tell sscanf again if the parameters/syntax is wrong to return a special message
  1970. if(!IsPlayerConnected(Target)) //if the ID doesn't exist, return an error-message
  1971. return SendClientMessage(playerid, COLOR_RED, "ERROR:Player Is Not Connected!");
  1972. if(!sscanf(params, "u", Target))
  1973. {
  1974. new tname[MAX_PLAYER_NAME]; //define the new target-name of the playerid
  1975. GetPlayerName(Target,tname,sizeof(tname)); //get the playername with this function
  1976. new pname[MAX_PLAYER_NAME]; //define the adminname
  1977. GetPlayerName(playerid,pname,sizeof(pname)); //get the adminname with this function
  1978. new tstring[128]; //define the string for the player (victim)
  1979. new pstring[128];// define the string for the admin which is performing
  1980. new astring[128];//define the string for all the players which are online
  1981. format(tstring,sizeof(tstring),"You have been frozen by administrator %s! You cant move!",pname); //this is formatting the player-string, while it's also getting the adminname
  1982. format(pstring,sizeof(pstring),"You have frozen player %s(%d)!",tname,Target); //this is formatting the adminname-string, while it's also getting the playername and his ID(target)
  1983. format(astring,sizeof(astring),"Administrator %s has frozen %s!",pname,tname); //this is formatting the all-string, while it's sending this message to everybody and is getting admin- and playername
  1984. SendClientMessage(Target,COLOR_GOLD,tstring);//sends the message to the victim
  1985. SendClientMessage(playerid,COLOR_GREEN,pstring);//sends the message to the admin
  1986. SendClientMessageToAll(COLOR_BLUE,astring);//sends the message to everybody
  1987. TogglePlayerControllable(Target,0); //with that function, the player won't be able to mov, while we're using the variable "Target" as the playerid
  1988. CMDMessageToAdmins(playerid,"FREEZE");
  1989. }
  1990.  
  1991. }
  1992.  
  1993. // if he doesn't have permissions, return that message!
  1994. else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
  1995. return 1;
  1996. }
  1997.  
  1998. COMMAND:car(playerid,params[])
  1999. {
  2000. if(PlayerInfo[playerid][pAdmin] >=2)
  2001. {
  2002. new car;
  2003. if(IsPlayerInAnyVehicle(playerid)) return 1;
  2004. if(sscanf(params, "i", car)) return SendClientMessage(playerid, COLOR_ORANGE, "USE: /v(ehicle) [id_vehicle]");
  2005. if(strval(params) >611 || strval(params) <400) return SendClientMessage(playerid, COLOR_GREY, "That id doesn't exist!");
  2006. new Float:x, Float:y, Float:z, Float:a;
  2007. GetPlayerPos(playerid, x,y,z);
  2008. GetPlayerFacingAngle(playerid, a);
  2009. car = CreateVehicle(strval(params), x, y, z,a, -1, -1, 60);
  2010. PutPlayerInVehicle(playerid, car, 0);
  2011. CMDMessageToAdmins(playerid,"CAR");
  2012. }
  2013. else
  2014. {
  2015. Error2(playerid);
  2016. }
  2017. return 1;
  2018. }
  2019.  
  2020. COMMAND:fix(playerid,params[])
  2021. {
  2022. if(PlayerInfo[playerid][pAdmin] >=1)
  2023. {
  2024. new pla;
  2025. if(sscanf(params,"u",pla)) return SendClientMessage(playerid, COLOR_ORANGE, "USE: /repair [ID]");
  2026. RepairVehicle(GetPlayerVehicleID(playerid));
  2027. SendClientMessage(playerid, COLOR_GREY, "Your car is fixed!");
  2028. CMDMessageToAdmins(playerid,"FIX");
  2029. }
  2030. else
  2031. {
  2032. Error1(playerid);
  2033. }
  2034. return 1;
  2035. }
  2036.  
  2037. COMMAND:admins(playerid,params[])
  2038. {
  2039. if(IsPlayerConnected(playerid))
  2040. {
  2041. SendClientMessage(playerid, COLOR_ORANGE, " ");
  2042. SendClientMessage(playerid, COLOR_ORANGE, "-| ADMINS |-");
  2043. for(new i = 0; i < MAX_PLAYERS; i++)
  2044. {
  2045. if(IsPlayerConnected(i))
  2046. {
  2047. if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1341)
  2048. {
  2049. new admtext[64];
  2050. new sendername[MAX_PLAYER_NAME];
  2051. new string[256];
  2052. if(PlayerInfo[i][pAdmin] == 1) { admtext = "Level-1 Trial Admin"; }
  2053. else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Level-2 Moderator"; }
  2054. else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Level-3 Lead Moderator"; }
  2055. else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Level-4 Senior Administrator"; }
  2056. else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Level-5 Master Administrator"; }
  2057. else if(PlayerInfo[i][pAdmin] == 6) { admtext = "Level-6 Global Administrator"; }
  2058. else if(PlayerInfo[i][pAdmin] == 7) { admtext = "Level-7 Co-Owner"; }
  2059. else if(PlayerInfo[i][pAdmin] == 8) { admtext = "level-8 Owner"; }
  2060. else { admtext = "Gamemoderator"; }
  2061. GetPlayerName(i, sendername, sizeof(sendername));
  2062. format(string, 256, "%s ( %s )", sendername, admtext);
  2063. SendClientMessage(playerid, COLOR_GREEN, string);
  2064. }
  2065. }
  2066. }
  2067. }
  2068. return 1;
  2069. }
  2070.  
  2071. COMMAND:unfreeze(playerid,params[])
  2072. {
  2073. if(PlayerInfo[playerid][pAdmin] >= 3)
  2074. {
  2075. new Target; //defines the playerid we wanna unfreeze
  2076. if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /unfreeze [playerid]"); //tell sscanf again if the parameters/syntax is wrong to return a special message
  2077. if(!IsPlayerConnected(Target)) //if the ID doesn't exist, return an error-message
  2078. return SendClientMessage(playerid, COLOR_GREY, "ERROR:Player is not connected!");
  2079. if(!sscanf(params, "u", Target))
  2080. {
  2081. new tname[MAX_PLAYER_NAME]; //define the new target-name of the playerid
  2082. GetPlayerName(Target,tname,sizeof(tname)); //get the playername with this function
  2083. new pname[MAX_PLAYER_NAME]; //define the adminname
  2084. GetPlayerName(playerid,pname,sizeof(pname)); //get the adminname with this function
  2085. new tstring[128]; //define the string for the player (victim)
  2086. new pstring[128];// define the string for the admin which is performing
  2087. new astring[128];//define the string for all the players which are online
  2088. format(tstring,sizeof(tstring),"You have been unfrozen by administrator %s! You cant move!",pname); //this is formatting the player-string, while it's also getting the adminname
  2089. format(pstring,sizeof(pstring),"You have unfrozen player %s(%d)!",tname,Target); //this is formatting the adminname-string, while it's also getting the playername and his ID(target)
  2090. format(astring,sizeof(astring),"Administrator %s has unfrozen %s!",pname,tname); //this is formatting the all-string, while it's sending this message to everybody and is getting admin- and playername
  2091. SendClientMessage(Target,COLOR_GOLD,tstring);//sends the message to the victim
  2092. SendClientMessage(playerid,COLOR_GREEN,pstring);//sends the message to the admin
  2093. SendClientMessageToAll(COLOR_BLUE,astring);//sends the message to everybody
  2094. TogglePlayerControllable(Target,1); //with that function, the player will be able to move again, while we're using the variable "Target" as playerid again
  2095. CMDMessageToAdmins(playerid,"UNFREEZE");
  2096. }
  2097. else
  2098. {
  2099. Error3(playerid);
  2100. }
  2101.  
  2102. }
  2103.  
  2104. // if he doesn't have permissions, return that message!
  2105.  
  2106. else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
  2107. return 1;
  2108. }
  2109. COMMAND:clearchat(playerid,params[])
  2110. {
  2111. if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
  2112. {
  2113. for( new i = 0; i <= 100; i ++ ) SendClientMessageToAll( COLOR_BLUE,"Main Chat Has Been Cleared" );
  2114. }
  2115. return 1;
  2116. }
  2117. COMMAND:report(playerid,params[])
  2118. {
  2119.  
  2120. new Target; //define the target's name
  2121. new Reason[128];//the report-reason
  2122. if(!sscanf(params, "us[32]",Target, Reason))
  2123. {
  2124. if(Target == playerid) return SendClientMessage(playerid, COLOR_RED, "SERVER: Cant perform this command on yourself!"); //comment this line if you want to try this cmd on yourself
  2125. if(!IsPlayerConnected(Target)) //if the ID is invalid
  2126. return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected!"); //send the player a message, that the ID doesn't exist
  2127.  
  2128. new tname[MAX_PLAYER_NAME]; //the name of player one (reporting)
  2129. new pname[MAX_PLAYER_NAME]; //the name of player two (the reported)
  2130. GetPlayerName(Target,tname,sizeof(tname)); //get (receive) the player's name for the first
  2131. GetPlayerName(playerid,pname,sizeof(pname)); //get (receive) the player's name for the second
  2132.  
  2133. new rstring[256]; //the report-string
  2134. format(rstring,sizeof(rstring),"* Player %s(%d) reported %s(%d)! (Reason: %s)", pname,playerid,tname,Target,Reason); //only admins will receive this message! a specific player with a reason got reported, here we'll use all variables created
  2135. SendMessageToAdmins(COLOR_WHITE,rstring); //we'll talk about that later
  2136.  
  2137. //NOW HERE, we'll open the reportpath and WRITE into it
  2138. new File:Log = fopen(reportPATH, io_append); //here you're opening the path defined
  2139. new logData[128]; //create the logdata we wanna write in
  2140. new name[MAX_PLAYER_NAME]; //define the name again
  2141. GetPlayerName(Target,name,sizeof(name)); //receive the name again
  2142. new fTime[6]; //create the specific time for the report
  2143. getdate(fTime[0], fTime[1], fTime[2]); //get the report's date
  2144. gettime(fTime[3], fTime[4], fTime[5]); //get the report's time
  2145. format(logData, sizeof logData, "[%02d/%02d/%04d || %02d:%02d:%02d]%s got reported by %s! (Reason: %s)\r\n", fTime[2], fTime[1], fTime[0], fTime[3], fTime[4], fTime[5], tname, pname, Reason); //this will write everything (name,reason,time,date etc.) into the logdata
  2146. fwrite(Log, logData); //write it into the path
  2147. fclose(Log); //close the log, finished!
  2148. }
  2149. else return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /report <playerid> <reason>"); //detects the wrong params from sscanf and send the client this message
  2150.  
  2151. return 1;
  2152. }
  2153. forward SendMessageToAdmins(color,const string[]);
  2154. public SendMessageToAdmins(color,const string[]) //create the callback, including color and string
  2155. {
  2156. for(new i = 0; i < MAX_PLAYERS; i++) //set a for-loop and loop through all the admins
  2157. {
  2158. if(IsPlayerConnected(i) == 1) //the admin gotta be connected
  2159. if(PlayerInfo[i][pAdmin] >= 1) //and his level gotta be at least 1 (or higher)
  2160. SendClientMessage(i, color, string); //send this message now to every admin online, with color + string!
  2161. }
  2162. return 1;
  2163. }
  2164. CMD:acar(playerid, params[])
  2165. {
  2166. if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
  2167. //here, you'll have to put in again the variables of your enum of the playerinfo, to check the required adminlevel
  2168.  
  2169. new Float:x, Float:y, Float:z, Float:angle; //create the position of the player, which can be anywhere
  2170. GetPlayerPos(playerid, x, y, z); //get the player's position, to know where the car should be put
  2171. GetPlayerFacingAngle(playerid, angle); //get the player's angle, to put the car in the right angle
  2172. new veh = CreateVehicle(429, x, y, z, angle, 0, 0, 60); //in the variable "veh", you're storing and creating a vehicle now!
  2173. //429 is the ID of the car, "0" is the color (black)! change it simply later, I'mma give you a link
  2174. PutPlayerInVehicle(playerid, veh, 0); //this function will put the player into the created vehicle
  2175. ChangeVehicleColor(429, 0, 1); //this will change the vehicle color to black (and white), surely!
  2176. CMDMessageToAdmins(playerid,"ACAR");
  2177. return 1;
  2178. }
  2179. CMD:fakechat(playerid,params[])
  2180. {
  2181. if(PlayerInfo[playerid][pAdmin] >= 5) //put your admin-variable from your on enum of the playerinfo here again!
  2182. {
  2183. new Target; //the player which'll get "blamed"
  2184. new Msg[128]; //the string for the message
  2185. if(sscanf(params, "us[50]", Target,Msg)) SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /fakechat [playerid] [message]"); //returns the right params if you've written it wrong
  2186. if(!IsPlayerConnected(Target)) //check if the ID is valid, if not
  2187. return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected!"); //send the player such a message
  2188.  
  2189. if(!sscanf(params, "us[50]", Target,Msg)) //if the params are written correctly, do the following! (target "u" and message "s" used here, with the size "50")
  2190. {
  2191. new PName[MAX_PLAYER_NAME]; //a new name for the player
  2192. GetPlayerName(Target,PName,sizeof PName); //receive the player's name
  2193. new textstring[400];//the string for the message
  2194.  
  2195. format(textstring, sizeof(textstring), "{FFFFFF}(%i): {FFFFFF}%s", Target, Msg); //format the message with the string we've created, Target for the player, Msg for the message
  2196. SendPlayerMessageToAll(Target, textstring); //of course everyone should see the message
  2197. format(textstring,sizeof(textstring),"You have sent a fakechat message for %s(%d)! (Message: %s)",PName,Target,Msg); //you don't have to, but you CAN add it! It sends you the success-message that you've sent the fakemessage
  2198. SendClientMessage(playerid,COLOR_GREEN,textstring); //this message should only appear to the one which is performing the command
  2199. CMDMessageToAdmins(playerid,"FAKECHAT");
  2200. }
  2201. }
  2202. else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-5 Administrator to use this command!");
  2203.  
  2204. return 1;
  2205. }
  2206. COMMAND:givescore(playerid,params[])
  2207. {
  2208. if(PlayerInfo[playerid][pAdmin] >= 2)
  2209. {
  2210. new Target;
  2211. new Ammount;
  2212. if(!sscanf(params, "ui", Target, Ammount))
  2213. {
  2214. if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Wrong player ID");
  2215. if(Ammount > 100000) return SendClientMessage(playerid,COLOR_RED,"ERROR: Score Amount Is From 0 To 100000");
  2216. SetPlayerScore(Target,GetPlayerScore(Target)+Ammount);
  2217. new tname[MAX_PLAYER_NAME];
  2218. GetPlayerName(Target,tname,sizeof(tname));
  2219. new pname[MAX_PLAYER_NAME];
  2220. GetPlayerName(playerid,pname,sizeof(pname));
  2221. new tstring[256];
  2222. new pstring[256];
  2223. format(tstring,sizeof(tstring),"You Have Been Given %d Score By Administrator %s",Ammount,pname);
  2224. format(pstring,sizeof(pstring),"You have given %d score to %s(%d)",Ammount,tname,Target);
  2225. SendClientMessage(Target,COLOR_BLUE,tstring);
  2226. SendClientMessage(playerid,COLOR_BLUE,pstring);
  2227. CMDMessageToAdmins(playerid,"GIVESCORE");
  2228. }
  2229. else SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /givescore <playerid> <ammount>");
  2230.  
  2231.  
  2232. }
  2233. else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
  2234. return 1;
  2235. }
  2236. COMMAND:force(playerid,params[])
  2237. {
  2238. if(PlayerInfo[playerid][pAdmin] >= 3)
  2239. {
  2240. new Target;
  2241. if(!sscanf(params, "u", Target))
  2242. {
  2243. if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Wrong player ID");
  2244. ForceClassSelection(Target);
  2245. new tname[MAX_PLAYER_NAME];
  2246. GetPlayerName(Target,tname,sizeof(tname));
  2247. new pname[MAX_PLAYER_NAME];
  2248. GetPlayerName(playerid,pname,sizeof(pname));
  2249. new tstring[256];
  2250. new pstring[256];
  2251. format(tstring,sizeof(tstring),"You Have Been Forced To Class Selection By %s",pname);
  2252. format(pstring,sizeof(pstring),"You Have Forced %s(%d) Into Class Selection",tname);
  2253. SendClientMessage(Target,COLOR_BLUE,tstring);
  2254. SendClientMessage(playerid,COLOR_BLUE,pstring);
  2255. CMDMessageToAdmins(playerid,"FORCE");
  2256. }
  2257. else SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /force <playerid>");
  2258.  
  2259.  
  2260. }
  2261. else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
  2262. return 1;
  2263. }
  2264. COMMAND:spawn(playerid,params[])
  2265. {
  2266. if(PlayerInfo[playerid][pAdmin] >= 3)
  2267. {
  2268. new Target;
  2269. if(!sscanf(params, "u", Target))
  2270. {
  2271. if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Wrong player ID");
  2272. if(PlayerInfo[Target][pAdmin] >= PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,COLOR_RED,"ERROR:You Can't Use This Command On This Admin!");
  2273. SpawnPlayer(Target);
  2274. new tname[MAX_PLAYER_NAME];
  2275. GetPlayerName(Target,tname,sizeof(tname));
  2276. new pname[MAX_PLAYER_NAME];
  2277. GetPlayerName(playerid,pname,sizeof(pname));
  2278. new tstring[256];
  2279. new pstring[256];
  2280. format(tstring,sizeof(tstring),"You Have Been Spawned %s",pname);
  2281. format(pstring,sizeof(pstring),"You Have Spawned %s(%d)",tname);
  2282. SendClientMessage(Target,COLOR_BLUE,tstring);
  2283. SendClientMessage(playerid,COLOR_BLUE,pstring);
  2284. CMDMessageToAdmins(playerid,"SPAWN");
  2285. }
  2286. else SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /spawn <playerid>");
  2287. }
  2288. else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
  2289. return 1;
  2290. }
  2291. COMMAND:mute(playerid,params[])
  2292. {
  2293. if(PlayerInfo[playerid][pAdmin] >= 1)
  2294. {
  2295.  
  2296. new Target;
  2297. if(!sscanf(params, "u", Target))
  2298. {
  2299. if(Target == playerid) return SendClientMessage(playerid, COLOR_RED, "SERVER: Cant perform this command on yourself!" );
  2300. if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Wrong player ID");
  2301. if(PlayerInfo[Target][pAdmin] >= PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,COLOR_RED,"ERROR: You Can't Use This Command On This Admin!");
  2302. new tname[MAX_PLAYER_NAME];
  2303. GetPlayerName(Target,tname,sizeof(tname));
  2304. new pname[MAX_PLAYER_NAME];
  2305. GetPlayerName(playerid,pname,sizeof(pname));
  2306. new tstring[256];
  2307. new pstring[256];
  2308. format(tstring,sizeof(tstring),"You Have Been Muted By %s! You Can't Talk!",pname);
  2309. format(pstring,sizeof(pstring),"You Have Muted %s(%d)",tname,Target);
  2310. SendClientMessage(Target,COLOR_RED,tstring);
  2311. SendClientMessage(playerid,COLOR_GREEN,pstring);
  2312. CMDMessageToAdmins(playerid,"MUTE");
  2313.  
  2314. }
  2315. else SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /mute <playerid>");
  2316. }
  2317. else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
  2318.  
  2319. return 1;
  2320.  
  2321. }
  2322. COMMAND:unmute(playerid,params[])
  2323. {
  2324. if(PlayerInfo[playerid][pAdmin] >= 1)
  2325. {
  2326.  
  2327. new Target;
  2328. if(!sscanf(params, "u", Target))
  2329. {
  2330. if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Wrong player ID");
  2331. if(PlayerInfo[Target][pAdmin] >= PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,COLOR_RED,"ERROR: You Can't Use This Command On This Admin!");
  2332. new tname[MAX_PLAYER_NAME];
  2333. GetPlayerName(Target,tname,sizeof(tname));
  2334. new pname[MAX_PLAYER_NAME];
  2335. GetPlayerName(playerid,pname,sizeof(pname));
  2336. new tstring[256];
  2337. new pstring[256];
  2338. format(tstring,sizeof(tstring),"You Have Been UnMuted By %s! You Can Talk Now!",pname);
  2339. format(pstring,sizeof(pstring),"You Have Muted Player %s(%d)",tname,Target);
  2340. SendClientMessage(Target,COLOR_RED,tstring);
  2341. SendClientMessage(playerid,COLOR_GREEN,pstring);
  2342. CMDMessageToAdmins(playerid,"UNMUTE");
  2343. }
  2344. else SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /unmute <playerid>");
  2345. }
  2346. else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
  2347. return 1;
  2348. }
  2349. COMMAND:givecash(playerid, params[])
  2350. {
  2351. if(PlayerInfo[playerid][pAdmin] >= 2)
  2352. {
  2353. new
  2354. toplayerid, // the player we want to give money to
  2355. amount;
  2356. // extracting player's ID and amount from params
  2357. if (!sscanf(params, "ii", toplayerid, amount))
  2358. {
  2359. if (toplayerid != INVALID_PLAYER_ID)
  2360. {
  2361. new
  2362. message[40];
  2363. GivePlayerMoney(toplayerid, amount);
  2364. format(message, sizeof(message), "You Got $%d From Administrator!", amount);
  2365. SendClientMessage(toplayerid, COLOR_RED, message);
  2366. CMDMessageToAdmins(playerid,"GIVECASH");
  2367. }
  2368. else SendClientMessage(playerid, COLOR_RED, "That player is not connected");
  2369. }
  2370. else SendClientMessage(playerid, COLOR_ORANGE, "Usage: /givemoney <playerid> <amount>");
  2371. }
  2372. else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
  2373. return 1;
  2374. }
  2375. COMMAND:god(playerid,params[])
  2376. {
  2377. if(PlayerInfo[playerid][pAdmin] >= 2)
  2378. {
  2379. SetPlayerHealth(playerid, 99999);
  2380. SendClientMessage(playerid, COLOR_GREEN,"You Are Now On God Mod");
  2381. CMDMessageToAdmins(playerid,"GOD");
  2382.  
  2383. }
  2384. else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
  2385. return 1;
  2386. }
  2387. COMMAND:offgod(playerid,params[])
  2388. {
  2389. if(PlayerInfo[playerid][pAdmin] >= 2)
  2390. {
  2391. SetPlayerHealth(playerid, 100);
  2392. SendClientMessage(playerid, COLOR_GREEN,"You Have Turned Off God Mode");
  2393. CMDMessageToAdmins(playerid,"OFFGOD");
  2394. }
  2395. else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
  2396. return 1;
  2397. }
  2398.  
  2399. COMMAND:jail(playerid, params[])
  2400. {
  2401. new id;
  2402. if(IsPlayerConnected(id))
  2403. {
  2404. if(PlayerInfo[playerid][pAdmin] >= 1)
  2405. {
  2406. if(!sscanf(params, "u", id))
  2407. {
  2408. new string[900];
  2409. new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
  2410. GetPlayerName(playerid, name, sizeof(name));
  2411. GetPlayerName(id, PlayerName, sizeof(PlayerName));
  2412. format(string, sizeof(string), "Administrator %s jailed you for %s", name,params);
  2413. SendClientMessage(id, COLOR_RED, string);
  2414. format(string, sizeof(string), "You jailed %s", PlayerName);
  2415. SendClientMessage(playerid, COLOR_WHITE, string);
  2416. format(string, sizeof(string), "Administrator %s jailed %s",name,PlayerName);
  2417. SendClientMessageToAll(COLOR_WHITE, string);
  2418. SetPlayerPos(id, 264.6288,77.5742,1001.0391);
  2419. SetPlayerInterior(id, 1);
  2420. CMDMessageToAdmins(playerid,"JAIL");
  2421. return 1;
  2422. }
  2423. else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /jail [PlayerId/PartOfName][Reason]");
  2424. }
  2425. else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
  2426. }
  2427. else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
  2428. }
  2429.  
  2430. COMMAND:unjail(playerid, params[])
  2431. {
  2432. new id;
  2433. if(IsPlayerConnected(id))
  2434. {
  2435. if(PlayerInfo[playerid][pAdmin] >=1)
  2436. {
  2437. if(!sscanf(params, "u", id))
  2438. {
  2439. new string[900];
  2440. new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
  2441. GetPlayerName(playerid, name, sizeof(name));
  2442. GetPlayerName(id, PlayerName, sizeof(PlayerName));
  2443. format(string, sizeof(string), "Administrator %s Has Unjailed You", name);
  2444. SendClientMessage(id, COLOR_RED, string);
  2445. format(string, sizeof(string), "You unjailed %s", PlayerName);
  2446. SendClientMessage(playerid, COLOR_WHITE, string);
  2447. format(string, sizeof(string), "Administrator %s Has Unjailed %s",name,PlayerName);
  2448. SetPlayerPos(id, 1555.097900, -1675.848754, 16.195312);
  2449. SetPlayerInterior(id, 0);
  2450. CMDMessageToAdmins(playerid,"UNJAIL");
  2451. return 1;
  2452. }
  2453. else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /unjail [PlayerId/PartOfName]");
  2454. }
  2455. else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
  2456. }
  2457. else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
  2458. }
  2459. COMMAND:setscore(playerid, params[])
  2460. {
  2461. new id;
  2462. new score;
  2463. if(IsPlayerConnected(id))
  2464. {
  2465. if(PlayerInfo[playerid][pAdmin] >= 4)
  2466. {
  2467. if(!sscanf(params, "ui", id, score))
  2468. {
  2469. if(score <= 999999999)
  2470. {
  2471. new string[64];
  2472. new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
  2473. GetPlayerName(playerid, name, sizeof(name));
  2474. GetPlayerName(id, PlayerName, sizeof(PlayerName));
  2475. format(string, sizeof(string), "Administrator %s Set Your Score To %d", name, score);
  2476. SendClientMessage(id, COLOR_RED, string);
  2477. format(string, sizeof(string), "You reseted %s's score to %d", PlayerName, score);
  2478. SendClientMessage(playerid, COLOR_WHITE, string);
  2479. SetPlayerScore(id, score);
  2480. CMDMessageToAdmins(playerid,"SETSCORE");
  2481.  
  2482. return 1;
  2483. }
  2484. else return SendClientMessage(playerid, COLOR_RED, "You can't set more than $999.999.999");
  2485. }
  2486. else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /setscore [PlayerId/PartOfName] [Score]");
  2487. }
  2488. else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-4 Administrator to use this command!");
  2489. }
  2490. else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
  2491. }
  2492. COMMAND:goto(playerid, params[])
  2493. {
  2494. new id;
  2495. if(IsPlayerConnected(id))
  2496. {
  2497. if(PlayerInfo[playerid][pAdmin] >= 2)
  2498. {
  2499. if(!sscanf(params, "ui", id))
  2500. {
  2501. new string[300];
  2502. new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
  2503. new Float:x, Float:y, Float:z; GetPlayerPos(id,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(id));
  2504. GetPlayerName(playerid, name, sizeof(name));
  2505. GetPlayerName(id, PlayerName, sizeof(PlayerName));
  2506. format(string, sizeof(string), "Administrator %s Has Been Teleported To Your Position", name);
  2507. SendClientMessage(id, COLOR_RED, string);
  2508. format(string, sizeof(string), "You Went To Player %s", PlayerName);
  2509. SendClientMessage(playerid, COLOR_BLUE, string);
  2510. SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  2511. SetPlayerPos(playerid,x+2,y,z);
  2512. CMDMessageToAdmins(playerid,"GOTO");
  2513. return 1;
  2514. }
  2515. else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /goto [PlayerId/PartOfName]");
  2516. }
  2517. else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
  2518. }
  2519. else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
  2520. }
  2521.  
  2522. COMMAND:get(playerid, params[])
  2523. {
  2524. new id;
  2525. if(IsPlayerConnected(id))
  2526. {
  2527. if(PlayerInfo[playerid][pAdmin] >= 3)
  2528. {
  2529. if(!sscanf(params, "ui", id))
  2530. {
  2531. new string[300];
  2532. new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
  2533. new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); SetPlayerInterior(id,GetPlayerInterior(playerid));
  2534. GetPlayerName(playerid, name, sizeof(name));
  2535. GetPlayerName(id, PlayerName, sizeof(PlayerName));
  2536. format(string, sizeof(string), "Administrator %s Teleported You To His Position", name);
  2537. SendClientMessage(id,COLOR_RED, string);
  2538. format(string, sizeof(string), "You Have Teleported %s To Your Position", PlayerName);
  2539. SendClientMessage(playerid,COLOR_BLUE, string);
  2540. SetPlayerVirtualWorld(id,GetPlayerVirtualWorld(playerid));
  2541. SetPlayerPos(id,x+2,y,z);
  2542. CMDMessageToAdmins(playerid,"GET");
  2543. return 1;
  2544. }
  2545. else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /gethere[PlayerId/PartOfName]");
  2546. }
  2547. else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
  2548. }
  2549. else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
  2550. }
  2551. COMMAND:akill(playerid, params[])
  2552. {
  2553. new id;
  2554. if(IsPlayerConnected(id))
  2555. {
  2556. if(PlayerInfo[playerid][pAdmin] >= 3)
  2557. {
  2558. if(!sscanf(params, "u", id))
  2559. {
  2560. new string[100];
  2561. new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
  2562. GetPlayerName(playerid, name, sizeof(name));
  2563. GetPlayerName(id, PlayerName, sizeof(PlayerName));
  2564. format(string, sizeof(string), "Administrator %s Has Killed You", name);
  2565. SendClientMessage(id, COLOR_RED, string);
  2566. format(string, sizeof(string), "You Have Killed %s", PlayerName);
  2567. SendClientMessage(playerid, COLOR_BLUE, string);
  2568. SetPlayerHealth(id, 0);
  2569. CMDMessageToAdmins(playerid,"AKILL");
  2570. return 1;
  2571. }
  2572. else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /akill [PlayerId/PartOfName]");
  2573. }
  2574. else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
  2575. }
  2576. else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
  2577. }
  2578.  
  2579. COMMAND:acmds(playerid,params[])
  2580. {
  2581. if(PlayerInfo[playerid][pAdmin] >= 1)
  2582. {
  2583. SendClientMessage(playerid, COLOR_GREEN,"==============================");
  2584. SendClientMessage(playerid, COLOR_GREEN,"========Admin-Commands========");
  2585. SendClientMessage(playerid, COLOR_GREEN,"/heal,/kick,/ban,/freeze,/unfreeze");
  2586. SendClientMessage(playerid, COLOR_GREEN,"/clearchat,/jail,/unjail,/acar");
  2587. SendClientMessage(playerid, COLOR_GREEN,"/fakechat,/givescore,/force");
  2588. SendClientMessage(playerid, COLOR_GREEN,"/spawn,/mute,/unmute,/fix,/car");
  2589. SendClientMessage(playerid, COLOR_GREEN,"/givecash,/god,/offgod,/setlevel");
  2590. SendClientMessage(playerid, COLOR_GREEN,"/setscore,/akill,/get,/goto");
  2591. SendClientMessage(playerid, COLOR_GREEN,"===============================");
  2592. CMDMessageToAdmins(playerid,"ACMDS");
  2593.  
  2594. }
  2595. else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
  2596. return 1;
  2597. }
  2598. CMD:warn(playerid,params[])
  2599. {
  2600. if(AdminLevel[playerid] >= 1)
  2601. {
  2602. new Target;
  2603. new Reason[50];
  2604. if(sscanf(params, "us[50]", Target, Reason)) return SendClientMessage(playerid,COLOR_RED,"Usage: /warn [playerid] [reason]");
  2605. if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Invaild ID");
  2606. Warns[Target]++;
  2607. new tname[MAX_PLAYER_NAME];
  2608. GetPlayerName(Target,tname,sizeof(tname));
  2609. new pname[MAX_PLAYER_NAME];
  2610. GetPlayerName(playerid,pname,sizeof(pname));
  2611. new String[256];
  2612. format(String,sizeof String, "Administrator %s warned %s [Reason: %s %d/%d]", pname, tname, Reason, Warns[Target], MAX_WARNINGS);
  2613. SendClientMessage(playerid, COLOR_RED, String);
  2614. if(Warns[Target] == MAX_WARNINGS)
  2615. {
  2616. new str[256];
  2617. new name[MAX_PLAYER_NAME];
  2618. GetPlayerName(Target,name,sizeof(name));
  2619. format(str,sizeof(str),"%s has been kicked by Server [Reason: Max Warnings]", name, Target);
  2620. SendClientMessageToAll(COLOR_RED, str);
  2621. Warns[Target] = 0;
  2622. Kick(Target);
  2623. }
  2624. }
  2625. else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be level 1 Administrator to use this command!");
  2626. return 1;
  2627. }
  2628. //============================================================================//
  2629.  
  2630. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  2631. {
  2632. return 1;
  2633. }
  2634.  
  2635. public OnPlayerExitVehicle(playerid, vehicleid)
  2636. {
  2637. return 1;
  2638. }
  2639.  
  2640. public OnPlayerStateChange(playerid, newstate, oldstate)
  2641. {
  2642. new vehicleid = GetPlayerVehicleID(playerid);//variable to get vehicle ids
  2643. if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == PRIVATE && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == MEDIC && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive
  2644. {
  2645. SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Hunter");//messages goes to the player that he can't drive the hunter
  2646. RemovePlayerFromVehicle(playerid);//get u off from the hunter
  2647. }
  2648.  
  2649. if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == PRIVATE && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == MEDIC && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive
  2650. {
  2651. SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Hydra");//messages goes to the player that he can't drive the hydra
  2652. RemovePlayerFromVehicle(playerid);//get u off from the hydra
  2653. }
  2654.  
  2655. if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == PRIVATE && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == MEDIC && gPlayerClass[playerid] == SPY)//if player is Soldier then he can drive
  2656. {
  2657. SendClientMessage(playerid, COLOR_RED, "You Need to be a Soldier to drive Tank");//messages goes to the player that he can't drive the tank or rhino
  2658. RemovePlayerFromVehicle(playerid);//get u off from the tank or rhino
  2659. }
  2660.  
  2661. if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == PRIVATE && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == MEDIC && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive
  2662. {
  2663. SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Sea Sparrow");//messages goes to the player that he can't drive the tank or sea sparrow
  2664. RemovePlayerFromVehicle(playerid);//get u off from the sea sparrow
  2665. }
  2666. //Fuel System
  2667. if (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
  2668. {
  2669. new vid = GetPlayerVehicleID(playerid);
  2670. new string[125];format(string,sizeof string,"Fuel:%i",fuel[vid]);
  2671. TextDrawSetString(td_fuel[playerid],string);
  2672. TextDrawShowForPlayer(playerid,td_fuel[playerid]);
  2673. }
  2674. else
  2675. {
  2676. TextDrawHideForPlayer(playerid,td_fuel[playerid]);
  2677. }
  2678. if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
  2679. {
  2680. if(IsABike(GetPlayerVehicleID(playerid)))
  2681. {
  2682. switch(GetPlayerSkin(playerid))
  2683. {
  2684. #define SPAO{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, SLOT, 18645, 2, (%0), (%1), (%2), (%3), (%4), (%5));
  2685. case 0, 65, 74, 149, 208, 273: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000}
  2686. case 1..6, 8, 14, 16, 22, 27, 29, 33, 41..49, 82..84, 86, 87, 119, 289: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 77.000000, 0.000000}
  2687. case 7, 10: SPAO{0.090000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  2688. case 9: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  2689. case 11..13: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
  2690. case 15: SPAO{0.059999, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
  2691. case 17..21: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  2692. case 23..26, 28, 30..32, 34..39, 57, 58, 98, 99, 104..118, 120..131: SPAO{0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  2693. case 40: SPAO{0.050000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  2694. case 50, 100..103, 148, 150..189, 222: SPAO{0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  2695. case 51..54: SPAO{0.100000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  2696. case 55, 56, 63, 64, 66..73, 75, 76, 78..81, 133..143, 147, 190..207, 209..219, 221, 247..272, 274..288, 290..293: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  2697. case 59..62: SPAO{0.079999, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
  2698. case 77: SPAO{0.059999, 0.019999, 0.000000, 87.000000, 82.000000, 0.000000}
  2699. case 85, 88, 89: SPAO{0.070000, 0.039999, 0.000000, 88.000000, 82.000000, 0.000000}
  2700. case 90..97: SPAO{0.050000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  2701. case 132: SPAO{0.000000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  2702. case 144..146: SPAO{0.090000, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
  2703. case 220: SPAO{0.029999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  2704. case 223, 246: SPAO{0.070000, 0.050000, 0.000000, 88.000000, 82.000000, 0.000000}
  2705. case 224..245: SPAO{0.070000, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
  2706. case 294: SPAO{0.070000, 0.019999, 0.000000, 91.000000, 84.000000, 0.000000}
  2707. case 295: SPAO{0.050000, 0.019998, 0.000000, 86.000000, 82.000000, 0.000000}
  2708. case 296..298: SPAO{0.064999, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
  2709. case 299: SPAO{0.064998, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
  2710. }
  2711. }
  2712. }
  2713. else
  2714. {
  2715. RemovePlayerAttachedObject(playerid, SLOT);
  2716. }
  2717. }
  2718.  
  2719. public OnPlayerEnterCheckpoint(playerid)
  2720. {
  2721. return 1;
  2722. }
  2723.  
  2724. public OnPlayerLeaveCheckpoint(playerid)
  2725. {
  2726. return 1;
  2727. }
  2728.  
  2729. public OnPlayerEnterRaceCheckpoint(playerid)
  2730. {
  2731. return 1;
  2732. }
  2733.  
  2734. public OnPlayerLeaveRaceCheckpoint(playerid)
  2735. {
  2736. return 1;
  2737. }
  2738.  
  2739. public OnRconCommand(cmd[])
  2740. {
  2741. return 1;
  2742. }
  2743.  
  2744. public OnPlayerRequestSpawn(playerid)
  2745. {
  2746. return 1;
  2747. }
  2748.  
  2749. public OnObjectMoved(objectid)
  2750. {
  2751. return 1;
  2752. }
  2753.  
  2754. public OnPlayerObjectMoved(playerid, objectid)
  2755. {
  2756. return 1;
  2757. }
  2758.  
  2759. public OnPlayerPickUpPickup(playerid, pickupid)
  2760. {
  2761. return 1;
  2762. }
  2763.  
  2764. public OnVehicleMod(playerid, vehicleid, componentid)
  2765. {
  2766. return 1;
  2767. }
  2768.  
  2769. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  2770. {
  2771. return 1;
  2772. }
  2773.  
  2774. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  2775. {
  2776. return 1;
  2777. }
  2778.  
  2779. public OnPlayerSelectedMenuRow(playerid, row)
  2780. {
  2781. return 1;
  2782. }
  2783.  
  2784. public OnPlayerExitedMenu(playerid)
  2785. {
  2786. return 1;
  2787. }
  2788.  
  2789. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  2790. {
  2791. return 1;
  2792. }
  2793.  
  2794. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  2795. {
  2796. return 1;
  2797. }
  2798.  
  2799. public OnRconLoginAttempt(ip[], password[], success)
  2800. {
  2801. return 1;
  2802. }
  2803.  
  2804. public OnPlayerUpdate(playerid)
  2805. {
  2806. return 1;
  2807. }
  2808.  
  2809. public OnPlayerStreamIn(playerid, forplayerid)
  2810. {
  2811. return 1;
  2812. }
  2813.  
  2814. public OnPlayerStreamOut(playerid, forplayerid)
  2815. {
  2816. return 1;
  2817. }
  2818.  
  2819. public OnVehicleStreamIn(vehicleid, forplayerid)
  2820. {
  2821. return 1;
  2822. }
  2823.  
  2824. public OnVehicleStreamOut(vehicleid, forplayerid)
  2825. {
  2826. return 1;
  2827. }
  2828.  
  2829. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2830. {
  2831. if(dialogid == DIALOG_REGISTER)
  2832. {
  2833. if (!response) return Kick(playerid);
  2834. if(response)
  2835. {
  2836. if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
  2837. new INI:File = INI_Open(UserPath(playerid));
  2838. INI_SetTag(File,"data");
  2839. INI_WriteInt(File,"Password",udb_hash(inputtext));
  2840. INI_WriteInt(File,"Cash",0);
  2841. INI_WriteInt(File,"Admin",0);
  2842. INI_WriteInt(File,"Kills",0);
  2843. INI_WriteInt(File,"Deaths",0);
  2844. INI_WriteInt(File,"Donor",0);
  2845. INI_WriteInt(File,"Score",0);
  2846. INI_WriteInt(File,"Helperator",0);
  2847. INI_Close(File);
  2848. SendClientMessage(playerid, COLOR_WHITE,"Your now registered!");
  2849. }
  2850. }
  2851.  
  2852. if(dialogid == DIALOG_LOGIN)
  2853. {
  2854. if ( !response ) return Kick ( playerid );
  2855. if( response )
  2856. {
  2857. if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  2858. {
  2859. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  2860. GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  2861. SetPlayerScore(playerid, GetPlayerScore(playerid));
  2862. ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Congratulations You Have Been Succesfully Logged In!","Ok","");
  2863. }
  2864. else
  2865. {
  2866. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You Have Entered An Incorrect Password And This Is Not The Password Of This Account.\n"COL_WHITE"Type your password below to login.","Login","Quit");
  2867. }
  2868. return 1;
  2869. }
  2870. }
  2871. if(dialogid == SHOP_DIALOG)//If the dialog responded to is our Weapon Shop dialog.
  2872. {
  2873. if(!response) return SendClientMessage(playerid, -1, "You have left the Weapon Shop.");//If they click "Exit" they have left the dialog(Shop).
  2874. switch(listitem)
  2875. {
  2876. case 0://Deagle
  2877. {
  2878. if(GetPlayerMoney(playerid) >= 3000)//If they have more or equal to the price.
  2879. {
  2880. GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 3000);//Take the cost.
  2881. GivePlayerWeapon(playerid, 24, 100);//Give them the weapon/ammo.
  2882. SendClientMessage(playerid, -1, "Deagle purchased.");//And let them know they just purchased a weapon.
  2883. return 1;//Tell pawno to stop processing now.
  2884. }
  2885. else//Else the dont have enough money to cover the purchase.
  2886. {
  2887. SendClientMessage(playerid, -1, "You Don't Have Enough Money To Purchase A Deagle.");//Tell them.
  2888. return 1;//Tell pawno to stop processing now.
  2889. }
  2890. }
  2891. case 1://Sawn-Off
  2892. {
  2893. if(GetPlayerMoney(playerid) >= 3500)//If they have more or equal to the price.
  2894. {
  2895. GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 3500);//Take the cost.
  2896. GivePlayerWeapon(playerid, 26, 100);//Give them the weapon/ammo.
  2897. SendClientMessage(playerid, -1, "You Have Successfully Purchased A Sawn-Off!.");//And let them know they just purchased a weapon.
  2898. return 1;//Tell pawno to stop processing now.
  2899. }
  2900. else//Else the dont have enough money to cover the purchase.
  2901. {
  2902. SendClientMessage(playerid, -1, "You Don't Have Enough Money To Purchase A Sawn-Off.");//Tell them.
  2903. return 1;//Tell pawno to stop processing now.
  2904. }
  2905. }
  2906. case 2://M4
  2907. {
  2908. if(GetPlayerMoney(playerid) >= 4500)//If they have more or equal to the price.
  2909. {
  2910. GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 4500);//Take the cost.
  2911. GivePlayerWeapon(playerid, 31, 100);//Give them the weapon/ammo.
  2912. SendClientMessage(playerid, -1, "You Have Successfully Purchased A M4!.");//And let them know they just purchased a weapon.
  2913. return 1;//Tell pawno to stop processing now.
  2914. }
  2915. else//Else the dont have enough money to cover the purchase.
  2916. {
  2917. SendClientMessage(playerid, -1, "You Don't Have Enough Money To Purchase A M4.");//Tell them.
  2918. return 1;//Tell pawno to stop processing now.
  2919. }
  2920. }
  2921. case 3://Sniper
  2922. {
  2923. if(GetPlayerMoney(playerid) >= 5000)//If they have more or equal to the price.
  2924. {
  2925. GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 5000);//Take the cost.
  2926. GivePlayerWeapon(playerid, 34, 100);//Give them the weapon/ammo.
  2927. SendClientMessage(playerid, -1, "You Have Successfully Purchased A Sniper!.");//And let them know they just purchased a weapon.
  2928. return 1;//Tell pawno to stop processing now.
  2929. }
  2930. else//Else the dont have enough money to cover the purchase.
  2931. {
  2932. SendClientMessage(playerid, -1, "You Don't Have Enough Money To Purchase A Sniper.");//Tell them.
  2933. return 1;//Tell pawno to stop processing now.
  2934. }
  2935. }
  2936. }
  2937. }
  2938. if(dialogid == 999)//dialog id response
  2939. {
  2940. if(response)
  2941. {
  2942. if(listitem == 0)//the listitem0, defines the number one option of the dialog
  2943. {
  2944. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  2945. {
  2946. SendClientMessage(playerid, COLOR_WHITE, "You chose the Private as your class.");
  2947. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Soldier Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}M4\n{FFFFFF}Shotgun\n{FFFFFF}Deagle", "Play","");
  2948. gPlayerClass[playerid] = PRIVATE;//setting the class to soldier
  2949. PickedClass[playerid] = 1;
  2950. SetPlayerVirtualWorld(playerid, 0);
  2951. TogglePlayerControllable(playerid, 1);
  2952. ResetPlayerWeapons(playerid);
  2953. GivePlayerWeapon(playerid, 31, 200);//m4
  2954. GivePlayerWeapon(playerid, 25, 100);//mp5
  2955. GivePlayerWeapon(playerid, 24, 70);//deagle
  2956. }
  2957. }
  2958.  
  2959. if(listitem == 1)//the listitem1, defines the number one option of the dialog
  2960. {
  2961. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  2962. {
  2963. SendClientMessage(playerid, COLOR_WHITE, "You chose the Sniper as your class.");
  2964. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife", "Play","");
  2965. gPlayerClass[playerid] = SNIPER;//setting the class to Sniper
  2966. PickedClass[playerid] = 1;
  2967. RemovePlayerMapIcon(playerid, 0);
  2968. SetPlayerVirtualWorld(playerid, 0);
  2969. TogglePlayerControllable(playerid, 1);
  2970. ResetPlayerWeapons(playerid);
  2971. GivePlayerWeapon(playerid, 34, 250);//sniper
  2972. GivePlayerWeapon(playerid, 29, 250);//mp5
  2973. GivePlayerWeapon(playerid, 4, 1);//knife
  2974. }
  2975. }
  2976.  
  2977. if(listitem == 2)//the listitem2, defines the number one option of the dialog
  2978. {
  2979. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  2980. {
  2981. SendClientMessage(playerid, COLOR_WHITE, "You chose the Engineer as your class.");
  2982. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Engineer Class:", "{F81414}Abilities:\n{FFFFFF}A Strong class, Good in both land and air\nCan drive tanks.\n\n{F81414}Weapons:\n\n{FFFFFF}Spas12\n{FFFFFF}Silent Pistol\n{FFFFFF}RPG\n{FFFFFF}Grenade", "Play","");
  2983. gPlayerClass[playerid] = ENGINEER;//setting the class to engineer
  2984. PickedClass[playerid] = 1;
  2985. SetPlayerVirtualWorld(playerid, 0);
  2986. TogglePlayerControllable(playerid, 1);
  2987. ResetPlayerWeapons(playerid);
  2988. GivePlayerWeapon(playerid, 27, 200);//spas12
  2989. GivePlayerWeapon(playerid, 23, 200);//silent pistol
  2990. GivePlayerWeapon(playerid, 35, 2);//rpg
  2991. GivePlayerWeapon(playerid, 16, 2);//grenade
  2992. }
  2993. }
  2994.  
  2995. if(listitem == 3)//the listitem3, defines the number one option of the dialog
  2996. {
  2997. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  2998. {
  2999. SendClientMessage(playerid, COLOR_WHITE, "You chose the MEDIC as your class.");
  3000. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Jetrooper Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, cna spawn jetpack by /jetpack.\n\n{F81414}Weapons:\n\n{FFFFFF}Tec-9\n{FFFFFF}Colt\n{FFFFFF}Knife", "Play","");
  3001. gPlayerClass[playerid] = MEDIC;//setting the class to jettrooper
  3002. PickedClass[playerid] = 1;
  3003. SetPlayerVirtualWorld(playerid, 0);
  3004. TogglePlayerControllable(playerid, 1);
  3005. ResetPlayerWeapons(playerid);
  3006. GivePlayerWeapon(playerid, 32, 500);//tec-9
  3007. GivePlayerWeapon(playerid, 22, 500);//colt
  3008. GivePlayerWeapon(playerid, 4, 1);//knife
  3009. }
  3010. }
  3011.  
  3012. if(listitem == 4)//the listitem4, defines the number one option of the dialog
  3013. {
  3014. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  3015. {
  3016. SendClientMessage(playerid, COLOR_WHITE, "You chose the Pilot as your class.");
  3017. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Pilot Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Can drive hunter, hydra & sea sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun", "Play","");
  3018. gPlayerClass[playerid] = PILOT;//setting the class to pilot
  3019. PickedClass[playerid] = 1;
  3020. SetPlayerVirtualWorld(playerid, 0);
  3021. TogglePlayerControllable(playerid, 1);
  3022. ResetPlayerWeapons(playerid);
  3023. GivePlayerWeapon(playerid, 24, 200);//deagle
  3024. GivePlayerWeapon(playerid, 17, 4);//moltove
  3025. GivePlayerWeapon(playerid, 25, 100);//shotgun
  3026. }
  3027. }
  3028.  
  3029. if(listitem == 5)//the listitem5, defines the number one option of the dialog
  3030. {
  3031. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  3032. {
  3033. SendClientMessage(playerid, COLOR_WHITE, "You chose the Spy as your class.");
  3034. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Spy Class:", "{F81414}Abilities:\n{FFFFFF}A Victim class, Can Disguise to enemy assaults by /dis\n\n{F81414}Weapons:\n\n{FFFFFF}Mp5\n{FFFFFF}Silent Pistol\n{FFFFFF}Knife\n{FFFFFF}Moltove", "Play","");
  3035. gPlayerClass[playerid] = SPY;//setting the class to Spy
  3036. PickedClass[playerid] = 1;
  3037. SetPlayerVirtualWorld(playerid, 0);
  3038. TogglePlayerControllable(playerid, 1);
  3039. ResetPlayerWeapons(playerid);
  3040. GivePlayerWeapon(playerid, 29, 200);//mp5
  3041. GivePlayerWeapon(playerid, 23, 200);//silent pistol
  3042. GivePlayerWeapon(playerid, 4, 1);//knife
  3043. GivePlayerWeapon(playerid, 18, 2);//moltove
  3044. }
  3045. }
  3046. return 1;
  3047. }
  3048. return 1;
  3049. }
  3050.  
  3051. if(dialogid == 333)
  3052. {
  3053. if(response)
  3054. {
  3055. if(listitem == 0)
  3056. {
  3057. if (GetPlayerMoney(playerid) - 3000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
  3058. GivePlayerMoney(playerid, -3000);
  3059. SetPlayerHealth(playerid, 100); //Health
  3060. GameTextForPlayer(playerid, "~r~Health ~w~Refilled!", 500, 0);
  3061. SendClientMessageToAll(COLOR_RED,"A Player Have Refilled His Health");
  3062. }
  3063. if(listitem == 1)
  3064. {
  3065. if (GetPlayerMoney(playerid) - 5000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
  3066. GivePlayerMoney(playerid, -5000);
  3067. SetPlayerArmour(playerid, 100);//Armour
  3068. GameTextForPlayer(playerid, "~w~Armour ~g~Refilled!", 500, 0);
  3069. SendClientMessageToAll(COLOR_RED,"A Player Have Refilled His Armour");
  3070. }
  3071. if(listitem == 2)
  3072. {
  3073. if (GetPlayerMoney(playerid) - 7000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
  3074. GivePlayerMoney(playerid, -7000);
  3075. GivePlayerWeapon(playerid, 29,150);//MP5
  3076. GameTextForPlayer(playerid, "~w~MP5 ~r~Bought!", 500, 0);
  3077. SendClientMessageToAll(COLOR_RED,"A Player Have Bought MP5 Be-Careful");
  3078. }
  3079. if(listitem == 3)
  3080. {
  3081. if (GetPlayerMoney(playerid) - 10000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
  3082. GivePlayerMoney(playerid, -10000);
  3083. GivePlayerWeapon(playerid, 30,150);//AK-47
  3084. GameTextForPlayer(playerid, "~y~AK-47 ~r~Bought!", 500, 0);
  3085. SendClientMessageToAll(COLOR_RED,"A Player Have Bought AK-47 Be-Careful");
  3086. }
  3087. if(listitem == 4)
  3088. {
  3089. if (GetPlayerMoney(playerid) - 15000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
  3090. GivePlayerMoney(playerid, -15000);
  3091. GivePlayerWeapon(playerid, 31,150);//M4
  3092. GameTextForPlayer(playerid, "~r~M4 ~g~Bought!", 500, 0);
  3093. SendClientMessageToAll(COLOR_RED,"A Player Have Bought M4 Be-Careful");
  3094. }
  3095. if(listitem == 5)
  3096. {
  3097. if (GetPlayerMoney(playerid) - 20000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
  3098. GivePlayerMoney(playerid, -20000);
  3099. GivePlayerWeapon(playerid, 34,150);//Sniper
  3100. GameTextForPlayer(playerid, "~r~Sniper ~y~Bought!", 500, 0);
  3101. SendClientMessageToAll(COLOR_RED,"A Player Have Bought Sniper Be-Careful");
  3102. }
  3103. return 1;
  3104. }
  3105. }
  3106. return 1;
  3107. }
  3108. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  3109. {
  3110. return 1;
  3111. }
  3112. public NewContest()
  3113. {
  3114. new string[128]; //We're creating a new string here to inform players of the new number.
  3115. ContestAnswer = MINIMUM_VALUE + random(MAXIMUM_VALUE-MINIMUM_VALUE);
  3116. /* Contest Answer: The number that a player must type to win the contest.
  3117. Minimum_value: The minimum amount, so the number won't be lower then that.
  3118. 'random' picks a random number, but to make sure it doesn't exceeds the maximum value, it substracts the minimum value from it.
  3119. Reason for the 'random': MAXIMUM_VALUE is defined as 8000000. MINIMUM_VALUE is defined as 2000000. The minimum number is already 2000000, and if the the 'random' function also puts out 8000000 (The max value), it'll be able to put out numbers above the MAXIMUM_VALUE. */
  3120. format(string,sizeof string,"A New Money Winning Quiz Has Started. Whoever types %d as first, wins $%d.",ContestAnswer,CONTEST_PRIZE); // This formats a string. More information about strings can be found in the link under this code.
  3121. SendClientMessageToAll(0x00FFFFFF,string); // Color '0x00FFFFFF' is lightblue. The 'string' has just been formatted by us, see the line above. This informs the players that whoever types the contest number first, wins a prize.
  3122. return 1;
  3123. }
  3124. public OnPlayerWinContest(playerid)
  3125. {
  3126. new pName[MAX_PLAYER_NAME],string[128]; // A pName variable for the player's name, and a string to output.
  3127. GetPlayerName(playerid,pName,sizeof pName); //Get's the player's name.
  3128. format(string,sizeof string,"Player %s has won the contest and has won %d!",pName,CONTEST_PRIZE);
  3129. SendClientMessageToAll(0x00FFFFFF,string); //Same color, and it outputs a string.
  3130. GivePlayerMoney(playerid,CONTEST_PRIZE);
  3131. ContestAnswer = -1;
  3132. return 1;
  3133. }
  3134. public EndDeathCam(playerid)
  3135. {
  3136. TogglePlayerSpectating(playerid, 0);
  3137. Died[playerid] = 0;
  3138. }
  3139. public GivePlayerScore(playerid)
  3140. {
  3141. SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
  3142. return 1;
  3143. }
  3144.  
  3145. forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
  3146. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  3147. {
  3148. new Float:HP;
  3149. GetPlayerHealth(playerid, HP);
  3150. if(weaponid == 24) SetPlayerHealth(playerid, HP-60);//DesertEagle
  3151. if(weaponid == 22) SetPlayerHealth(playerid, HP-35);//Colt45
  3152. if(weaponid == 32) SetPlayerHealth(playerid, HP-10);//Tec9
  3153. if(weaponid == 28) SetPlayerHealth(playerid, HP-10);//Uzi
  3154. if(weaponid == 23) SetPlayerHealth(playerid, HP-50);//SilencedColt
  3155. if(weaponid == 31) SetPlayerHealth(playerid, HP-35);//M4
  3156. if(weaponid == 30) SetPlayerHealth(playerid, HP-40);//AK
  3157. if(weaponid == 29) SetPlayerHealth(playerid, HP-18);//MP5
  3158. if(weaponid == 34) SetPlayerHealth(playerid, HP-300);//SniperRifle
  3159. if(weaponid == 33) SetPlayerHealth(playerid, HP-35);//CuntGun
  3160. if(weaponid == 25) SetPlayerHealth(playerid, HP-100);//PumpShotgun
  3161. if(weaponid == 27) SetPlayerHealth(playerid, HP-70);//Spaz12
  3162. return 1;
  3163. }
  3164. forward vitals(playerid);
  3165. public vitals(playerid)
  3166. {
  3167. new string[5];
  3168. new Float:pHealth, Float:pArmour;
  3169. GetPlayerHealth(playerid,pHealth);
  3170. GetPlayerArmour(playerid,pArmour);
  3171. format(string, sizeof(string), "%.0f%", pHealth);
  3172. TextDrawSetString(Health[playerid], string);
  3173. format(string, sizeof(string), "%.0f%", pArmour);
  3174. TextDrawSetString(Armour[playerid], string);
  3175. SetTimer("vitals",1000,1);
  3176. }
  3177. public timer_fuel_lower()
  3178. {
  3179. for(new i=0;i<MAX_PLAYERS;i++)
  3180. {
  3181. if (isrefuelling[i]) continue;
  3182. new vid = GetPlayerVehicleID(i);
  3183. if (GetPlayerVehicleSeat(i) == 0)
  3184. {
  3185. fuel[vid] = fuel[vid] -1;
  3186. if (fuel[vid]<1)
  3187. {
  3188. fuel[vid] = 0;
  3189. RemovePlayerFromVehicle(i);
  3190. GameTextForPlayer(i,"~r~You are out of ~w~fuel~r~!",5000,4);
  3191. }
  3192. }
  3193. new string[125];format(string,sizeof string,"Fuel:%i",fuel[vid]);
  3194. TextDrawSetString(td_fuel[i],string);
  3195. }
  3196. return 1;
  3197. }
  3198.  
  3199. public timer_refuel(playerid)
  3200. {
  3201. new vid = GetPlayerVehicleID(playerid);
  3202. fuel[vid] = fuel[vid] = 100;
  3203. isrefuelling[playerid] = 0;
  3204. TextDrawSetString(td_fuel[playerid],"Fuel:100");
  3205. TogglePlayerControllable(playerid,1);
  3206. }
  3207. public Speedometer(playerid)
  3208. {
  3209. new vehicleid,Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,speed_string[256],final_speed_int;
  3210. vehicleid = GetPlayerVehicleID(playerid);
  3211. new Float:vehicle_health,final_vehicle_health,health_string[256];
  3212. if(vehicleid != 0)
  3213. {
  3214. GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
  3215. final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*250.666667; // 250.666667 = kmph // 199,4166672= mph
  3216. final_speed_int = floatround(final_speed,floatround_round);
  3217. format(speed_string,256,"Speed: %i",final_speed_int);
  3218. TextDrawSetString(SPEEDOS[playerid], speed_string);
  3219. GetVehicleHealth(vehicleid,vehicle_health);
  3220. final_vehicle_health = floatround(floatround(vehicle_health - 250)/ 7.5); //This will make the health show at 100 when the vehicle is not damaged and at 0 when it is in fire.
  3221. format(health_string,256,"Health %i", final_vehicle_health);
  3222. TextDrawSetString(HEALTH[playerid], health_string);
  3223. }
  3224. else
  3225. {
  3226. TextDrawSetString(SPEEDOS[playerid], " ");
  3227. TextDrawSetString(HEALTH[playerid], " ");
  3228. }
  3229. return 1;
  3230. }
  3231. forward RandomWeather();
  3232. public RandomWeather()
  3233. {
  3234. Weather = random(20);//The variable that we created will hold the random weather.
  3235. SetWeather(Weather);//This will set the weather to a random number which is held in the variable "Weather"
  3236. }
  3237. //===================Admin System
  3238. public SendRandomMsgToAll()
  3239. {
  3240. switch(random(4))// "switch - case" is a sort of "if - else if - else" statement (operator?)
  3241. {
  3242. case 1: SendClientMessageToAll(COLOR_RED, "Please Type /help To Get Help From Server");
  3243. case 2: SendClientMessageToAll(COLOR_RED, "Please Type /cmds To Know Server Commands!");
  3244. case 3: SendClientMessageToAll(COLOR_RED, "Please Respect Everyone In Server.");
  3245. case 4: SendClientMessageToAll(COLOR_RED, "Welcome To Our Server And As You Are New These Are The Basics You Need To Know.");
  3246.  
  3247. }
  3248.  
  3249. }
  3250. forward Error1(playerid);
  3251. public Error1(playerid)
  3252. {
  3253. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
  3254. return 1;
  3255. }
  3256. forward Error2(playerid);
  3257. public Error2(playerid)
  3258. {
  3259. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
  3260. return 1;
  3261. }
  3262. forward Error3(playerid);
  3263. public Error3(playerid)
  3264. {
  3265. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
  3266. return 1;
  3267. }
  3268. forward Error4(playerid);
  3269. public Error4(playerid)
  3270. {
  3271. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-4 Administrator to use this command!");
  3272. return 1;
  3273. }
  3274. forward Error5(playerid);
  3275. public Error5(playerid)
  3276. {
  3277. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-5 Administrator to use this command!");
  3278. return 1;
  3279. }
  3280. forward Error6(playerid);
  3281. public Error6(playerid)
  3282. {
  3283. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-6 Administrator to use this command!");
  3284. return 1;
  3285. }
  3286. forward Error7(playerid);
  3287. public Error7(playerid)
  3288. {
  3289. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-7 Administrator to use this command!");
  3290. return 1;
  3291. }
  3292. forward Error8(playerid);
  3293. public Error8(playerid)
  3294. {
  3295. SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-8 Administrator to use this command!");
  3296. return 1;
  3297. }
  3298. forward MessageToTwice(color,const string[]);
  3299. public MessageToTwice(color,const string[])
  3300. {
  3301. for(new i = 0; i < MAX_PLAYERS; i++)
  3302. {
  3303. if(IsPlayerConnected(i) == 1) if (PlayerInfo[i][pAdmin] >= 1) SendClientMessage(i, color, string);
  3304. }
  3305. return 1;
  3306. }
  3307. stock CMDMessageToAdmins(playerid,command[])
  3308. {
  3309. new string[128]; GetPlayerName(playerid,string,sizeof(string));
  3310. format(string,sizeof(string),"[INFO]Administrator %s has used %s",string,command);
  3311. return MessageToTwice(COLOR_PINK,string);
  3312. }
  3313. //=============================
  3314. stock IsABike(vehicleid) //Made by me
  3315. {
  3316. new result;
  3317. new model = GetVehicleModel(vehicleid);
  3318. switch(model)
  3319. {
  3320. case 509, 481, 510, 462, 448, 581, 522, 461, 521, 523, 463, 586, 468, 471: result = model;
  3321. default: result = 0;
  3322. }
  3323. return result;
  3324. }
  3325. //Funtions
  3326. GetParams(Source[]){
  3327. new Destination[256];
  3328. new SLen=strlen(Source);
  3329. new at,pos=0,tp=0;
  3330. new tempo[256];
  3331.  
  3332. format(Params[0],sizeof(Params),"");
  3333. format(Params[1],sizeof(Params),"");
  3334. format(Params[2],sizeof(Params),"");
  3335. format(Params[3],sizeof(Params),"");
  3336.  
  3337.  
  3338. for(at=pos;at<=SLen;at++){
  3339. strmid(tempo,Source,at,at+1,sizeof(tempo));
  3340. if(!strcmp(tempo,".",true)){
  3341. if(tp<=10){
  3342. strmid(Destination,Source,pos,at,sizeof(Destination));
  3343. format(Params[tp][0],256,"%s",Destination);
  3344. tp=tp+1;
  3345. }
  3346. pos=at+1;
  3347. }
  3348. }
  3349. return 1;
  3350. }
  3351. GetFileData(Source[]){
  3352. new Destination[256];
  3353. new SLen=strlen(Source);
  3354. new at,pos=0,tp=0;
  3355. new tempo[256];
  3356.  
  3357. format(FileData[0],sizeof(FileData),"");
  3358. format(FileData[1],sizeof(FileData),"");
  3359. format(FileData[2],sizeof(FileData),"");
  3360. format(FileData[3],sizeof(FileData),"");
  3361. format(FileData[4],sizeof(FileData),"");
  3362. format(FileData[5],sizeof(FileData),"");
  3363. format(FileData[6],sizeof(FileData),"");
  3364.  
  3365. for(at=pos;at<=SLen;at++){
  3366. strmid(tempo,Source,at,at+1,sizeof(tempo));
  3367. if(!strcmp(tempo,",",true)){
  3368. if(tp<=10){
  3369. strmid(Destination,Source,pos,at,sizeof(Destination));
  3370. format(FileData[tp][0],256,"%s",Destination);
  3371. tp=tp+1;
  3372. }
  3373. pos=at+1;
  3374. }
  3375. }
  3376. return 1;
  3377. }
  3378.  
  3379. GetPlayerCountry(playerid,Country[256]){
  3380. new IPAddress[256];
  3381. new a,b,c,d,ipf;
  3382. new File:IPFile;
  3383. new Text[256],start,end;
  3384. GetPlayerIp(playerid,IPAddress,sizeof(IPAddress));
  3385. GetParams(IPAddress);
  3386. a=strval(Params[0]);
  3387. b=strval(Params[1]);
  3388. c=strval(Params[2]);
  3389. d=strval(Params[3]);
  3390. if(a==127 && b==0 && c==0 && d==1){
  3391. format(Country,sizeof(Country),"Localhost");
  3392. return 1;
  3393. }
  3394. ipf = (16777216*a) + (65536*b) + (256*c) + d;
  3395. if(!fexist("CountriesIPs/IPLIST.csv")) return SendClientMessage(playerid,0xFF0000FF,"Country file not found.");
  3396. IPFile=fopen("CountriesIPs/IPLIST.csv",io_read);
  3397. fread(IPFile,Text,sizeof(Text),false);
  3398. while(strlen(Text)>0){
  3399. GetFileData(Text);
  3400. start=strval(FileData[0]);
  3401. end=strval(FileData[1]);
  3402. if(ipf>=start && ipf<=end){
  3403. format(Country,sizeof(Country),"%s(%s)",FileData[6],FileData[5]);
  3404. fclose(IPFile);
  3405. return 1;
  3406. }
  3407. fread(IPFile,Text,sizeof(Text),false);
  3408. }
  3409. fclose(IPFile);
  3410. return 1;
  3411. }
  3412.  
  3413. GetPName(playerid){
  3414. new name[MAX_PLAYER_NAME];
  3415. GetPlayerName(playerid, name, sizeof(name));
  3416. return name;
  3417. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement