Advertisement
Guest User

MWB

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