Advertisement
Guest User

MWB V2.8

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