Advertisement
Guest User

MWB

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