SHARE
TWEET

JoFi

a guest Sep 23rd, 2009 734 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. //------------------------------------------------------------------------------
  3.  
  4. #include <a_samp>
  5. #include <dudb>
  6. #include <dutils>
  7.  
  8. //Global stuff and defines for our gamemode
  9.  
  10. #pragma tabsize 0
  11.  
  12. static gTeam[MAX_PLAYERS]; // Tracks the team assignment for each player
  13.  
  14. #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  15.  
  16. #define GetName(%1,%2) new %2[MAX_PLAYER_NAME]; GetPlayerName(%1,%2,MAX_PLAYER_NAME)
  17.  
  18. //Color Defines
  19. #define COLOR_GREY 0x70707096
  20. #define COLOR_DARKGREY 0x545454FF
  21. #define COLOR_GREEN 0x00620096
  22. #define COLOR_RED 0xAA3333AA
  23. #define COLOR_YELLOW 0xFFFF00AA
  24. #define COLOR_DARKRED 0xC50000FF
  25. #define COLOR_DARKYELLOW 0xE5E52BFF
  26. #define COLOR_PINK 0xFF66FFAA
  27. #define COLOR_BLUE 0x0000BBAA
  28. #define COLOR_LIGHTBLUE 0x33CCFFAA
  29. #define COLOR_ORANGE 0xFF9900AA
  30. #define COLOR_BEGE 0xFFA97FFF
  31. #define COLOR_BROWN 0x804000FF
  32. #define COLOR_DARKGREEN 0x007500FF
  33. #define COLOR_LRED 0xFF1111FF
  34. #define COLOR_PURPLE 0xFF80FF00
  35.  
  36. //Team Defines
  37.  
  38. #define MAX_TEAMS 14
  39.  
  40. #define TEAM_WORKER 0
  41. #define TEAM_PIMP 1
  42. #define TEAM_GOLFER 2
  43. #define TEAM_TRIAD 3
  44. #define TEAM_MECHANIC 4
  45. #define TEAM_BIKER 5
  46. #define TEAM_MEDIC 6
  47. #define TEAM_SWAT 7
  48. #define TEAM_HICK 8
  49. #define TEAM_PILOT 9
  50. #define TEAM_TORENO 10
  51. #define TEAM_NANG 11
  52. #define TEAM_CHICKEN 12
  53. #define TEAM_ARMY 13
  54.  
  55. #define COLOR_SYSTEM 0xFF0000AA
  56. #define COLOR_ADMINISTRATOR 0xFF0000AA
  57. #define KICKPORTAL "KickedNames.txt"
  58. #define ADMIN_SPEC_TYPE_NONE 0
  59. #define ADMIN_SPEC_TYPE_PLAYER 1
  60. #define ADMIN_SPEC_TYPE_VEHICLE 2
  61.  
  62. #define YOUR_START_HOUR 12 // change the ingame starting hour here
  63. #define YOUR_START_MINUTE 0 // change the ingame starting minute here
  64.  
  65. //MAX PICKUPS PER WEAPON... 6 is ok
  66. new DropLimit = 4;
  67. //DELETE PICKUPS IN ... SECONDS
  68. new DeleteTime = 10;
  69.  
  70. new gPlayerClass[MAX_PLAYERS];
  71. new Killed[MAX_PLAYERS];
  72.  
  73. enum PlayerInfo
  74. {
  75.         pAdmin,
  76.         pDeaths,
  77.         pKills
  78. }
  79.  
  80. new pInfo[MAX_PLAYERS][PlayerInfo];
  81.  
  82. new LoggedIn[MAX_PLAYERS];
  83. new Registered[MAX_PLAYERS];
  84. new IsPlayerMuted[MAX_PLAYERS];
  85. new Bounty[MAX_PLAYERS];
  86. new BountyKills[MAX_PLAYERS];
  87.  
  88. new tmp2[MAX_STRING];
  89. new giveplayerid;
  90. new bool:IsServerLocked;
  91. new gSpectateID[MAX_PLAYERS];
  92. new gSpectateType[MAX_PLAYERS];
  93. new InfoMessage;
  94.  
  95. new infotimer;
  96. //new savetimer;
  97. new zonetimer;
  98. new teamtimer;
  99.  
  100. new CLOCK_timer;
  101. new CLOCK_hour;
  102. new CLOCK_minute;
  103. new Text:Clock;
  104.  
  105. //spawninfo defines
  106. new Text:worker0;
  107. new Text:worker1;
  108. new Text:triad0;
  109. new Text:triad1;
  110. new Text:hick0;
  111. new Text:hick1;
  112. new Text:swat0;
  113. new Text:swat1;
  114. new Text:army0;
  115. new Text:army1;
  116. new Text:medic0;
  117. new Text:medic1;
  118. new Text:chicken0;
  119. new Text:chicken1;
  120. new Text:pimp0;
  121. new Text:pimp1;
  122. new Text:mechanic0;
  123. new Text:mechanic1;
  124. new Text:rich0;
  125. new Text:rich1;
  126. new Text:pilot0;
  127. new Text:pilot1;
  128. new Text:biker0;
  129. new Text:biker1;
  130. new Text:nang0;
  131. new Text:nang1;
  132. new Text:golfer0;
  133. new Text:golfer1;
  134. //rules
  135. new Text:rules0;
  136. new Text:rules1;
  137. new Text:rules2;
  138. new Text:Textdraw0;
  139.  
  140. enum Z_Info
  141. {
  142.         Float:z_minx,
  143.         Float:z_miny,
  144.         Float:z_maxx,
  145.         Float:z_maxy,
  146.         z_team,
  147.         z_id
  148. }
  149.  
  150. #define MAX_ZONES 67
  151.  
  152. new ZoneTakeOverTeam[MAX_ZONES];
  153. new ZoneTakeOverTime[MAX_ZONES];
  154.  
  155. new ZoneInfo[MAX_ZONES][Z_Info] = {
  156.         {-2155.1960, -108.1418, -1992.9630, 124.6110, TEAM_WORKER},
  157.         {-2155.1960, 124.6110, -1992.9630, 353.4189, TEAM_WORKER},
  158.         {-1992.9630, -108.1418, -1799.8289, 353.4189, TEAM_WORKER},
  159.         {-2247.9008, 120.6660, -2155.1960, 353.4189, TEAM_WORKER},
  160.         {-2587.8168, 160.1157, -2406.2709, 353.4189, TEAM_WORKER},
  161.         {-2807.9899, 353.4189, -2518.2890, 590.1168, TEAM_MEDIC},
  162.         {-2807.9899, 590.1168, -2518.2890, 740.0255, TEAM_MEDIC},
  163.         {-2518.2890, 353.4189, -2267.2141, 594.0618, TEAM_MEDIC},
  164.         {-2518.2890, 594.0618, -2267.2141, 743.9703, TEAM_MEDIC},
  165.         {-2510.5629, 743.9703, -2267.2141, 842.5944, TEAM_MEDIC},
  166.         {-1989.1009, 353.4189, -1726.4379, 463.8779, TEAM_SWAT},
  167.         {-1992.9630, 463.8779, -1726.4379, 617.7316, TEAM_SWAT},
  168.         {-1726.4379, 455.9880, -1529.4410, 661.1262, TEAM_SWAT},
  169.         {-2000.6889, 617.7316, -1714.8499, 759.7503, TEAM_SWAT},
  170.         {-1714.8499, 661.1262, -1529.4410, 755.8052, TEAM_SWAT},
  171.         {-1695.5369, 755.8052, -1417.4229, 854.4293, TEAM_SWAT},
  172.         {-1830.7309, 759.7503, -1695.5369, 1047.7330, TEAM_SWAT},
  173.         {-2251.7629, 1154.2469, -1826.8680, 1296.2650, TEAM_ARMY},
  174.         {-1726.4379, 274.5197, -1208.8380, 455.9880, TEAM_ARMY},
  175.         {-1529.4410, 455.9880, -1212.7010, 546.7222, TEAM_ARMY},
  176.         {-1734.1639, -680.1616, -1191.1429, -432.0813, TEAM_PILOT},
  177.         {-1726.4379, -432.0813, -1386.5219, 57.5466, TEAM_PILOT},
  178.         {-1726.4379, 57.5466, -1123.8590, 274.5197, TEAM_PILOT},
  179.         {-1386.5219, -432.0813, -1123.8590, 57.5466, TEAM_PILOT},
  180.         {-1803.6920, -108.1418, -1726.4379, 353.4189, TEAM_PILOT},
  181.         {-2641.8950, -368.5094, -2259.4890, -194.9311, TEAM_GOLFER},
  182.         {-2807.9899, -431.6289, -2641.8950, -194.9311, TEAM_GOLFER},
  183.         {-2807.9899, -194.9311, -2406.2709, -52.9123, TEAM_GOLFER},
  184.         {-2406.2709, -194.9311, -2155.1960, 120.6660, TEAM_GOLFER},
  185.         {-2742.3239, 1359.3850, -2247.9008, 1505.3489, TEAM_PIMP},
  186.         {-2502.8378, 1158.1920, -2247.9008, 1359.3850, TEAM_PIMP},
  187.         {-2742.3239, 1047.7330, -2502.8378, 1359.3850, TEAM_PIMP},
  188.         {-2831.1660, 1118.7419, -2742.3239, 1367.2750, TEAM_PIMP},
  189.         {-2247.9008, 1296.2650, -1842.3189, 1505.3489, TEAM_NANG},
  190.         {-1842.3189, 1296.2650, -1629.8709, 1576.3580, TEAM_NANG},
  191.         {-1502.4019, 1449.6789, -1332.4439, 1568.4680, TEAM_NANG},
  192.         {-1626.0080, 1047.7330, -1452.1879, 1288.3750, TEAM_NANG},
  193.         {-1695.5369, 850.4843, -1409.6979, 1047.7330, TEAM_NANG},
  194.         {-1830.7309, 1047.7330, -1626.0080, 1296.2650, TEAM_NANG},
  195.         {-2807.9899, 740.0255, -2510.5629, 949.1085, TEAM_TORENO},
  196.         {-2510.5629, 842.5944, -2267.2141, 1043.7879, TEAM_TORENO},
  197.         {-2742.3239, 949.1085, -2506.6999, 1047.7330, TEAM_TORENO},
  198.         {-2807.9899, 949.1085, -2742.3239, 1118.7419, TEAM_TORENO},
  199.         {-2502.8378, 1043.7879, -2267.2141, 1158.1920, TEAM_TORENO},
  200.         {-2267.2141, 968.8333, -1989.1009, 1158.1920, TEAM_TORENO},
  201.         {-2267.2141, 767.6401, -1989.1009, 968.8333, TEAM_TRIAD},
  202.         {-1989.1009, 759.7503, -1830.7309, 1158.1920, TEAM_TRIAD},
  203.         {-2124.2949, 617.7316, -1989.1009, 767.6401, TEAM_TRIAD},
  204.         {-2267.2141, 586.1718, -2124.2949, 767.6401, TEAM_TRIAD},
  205.         {-2267.2141, 353.4189, -2124.2949, 586.1718, TEAM_TRIAD},
  206.         {-2807.9899, -52.9123, -2595.5419, 160.1157, TEAM_CHICKEN},
  207.         {-2595.5419, -52.9123, -2406.2709, 160.1157, TEAM_CHICKEN},
  208.         {-2807.9899, 160.1157, -2684.3840, 353.4189, TEAM_CHICKEN},
  209.         {-2684.3840, 160.1157, -2587.8168, 353.4189, TEAM_CHICKEN},
  210.         {-2406.2709, 120.6660, -2247.9008, 353.4189, TEAM_CHICKEN},
  211.         {-2124.2949, 353.4189, -1989.1009, 617.7316, TEAM_CHICKEN},
  212.         {-618.9274, -595.5717, -443.7593, -443.7593, TEAM_MECHANIC},
  213.         {-618.9274, -782.4177, -385.3699, -595.5717, TEAM_MECHANIC},
  214.         {-934.2299, -992.6193, -618.9274, -560.5380, TEAM_MECHANIC},
  215.         {-1191.1429, -759.0618, -934.2299, -432.0813, TEAM_MECHANIC},
  216.         {-595.5717, -256.9132, -408.7255, -46.7114, TEAM_HICK},
  217.         {-887.5186, -256.9132, -595.5717, -46.7114, TEAM_HICK},
  218.         {-887.5186, -46.7114, -408.7255, 128.4566, TEAM_HICK},
  219.         {-1237.8549, -1354.6340, -980.9415, -887.5186, TEAM_HICK},
  220.         {-618.9274, -1027.6529, -362.0140, -852.4849, TEAM_BIKER},
  221.         {-618.9274, -1191.1429, -467.1149, -1027.6529, TEAM_BIKER},
  222.         {-782.4177, -1191.1429, -618.9274, -992.6193, TEAM_BIKER}
  223. };
  224.  
  225. forward StopSpeccing(playerid);
  226. forward SpecUpdate(playerid);
  227. forward SettingPlayerTeam(); //teamkill
  228. forward GameModeExitFunc();
  229. forward ZoneUpdate();
  230. //forward SaveAllStats();
  231.  
  232. forward SystemMsg(playerid,msg[]);
  233. forward Restart();
  234. forward CLOCK_EverySecondTimer();
  235. forward Information();
  236. forward DropPlayerWeapons(playerid);
  237. forward DeletePickup(pickupid);
  238.  
  239. //------------------------------------------------------------------------------
  240.  
  241. main()
  242. {
  243.         print("\n----------------------------------");
  244.         print("  SFTDM:4.6.1 by TheKingWillem (2009)\n");
  245.         print("----------------------------------\n");
  246. }
  247.  
  248. //------------------------------------------------------------------------------
  249.  
  250. public OnGameModeInit()
  251. {
  252.         SetGameModeText("San Fierro: TDM 4.6.1");
  253.  
  254.     UsePlayerPedAnims();
  255.         SetTeamCount(13);
  256.         ShowNameTags(1);
  257.         ShowPlayerMarkers(1);
  258.  
  259.     SetDisabledWeapons(44,45,38,35,36);//44=nightvision, 45=thermal, 38=minigun, 35-36=rocket
  260.  
  261.         AddPlayerClass(260,-2062.5583,237.4662,35.7149,268.8936,30,150,25,50,29,150); //Worker
  262.         AddPlayerClass(249,-2653.6443,1388.2767,7.1301,212.8453,26,100,29,150,16,8); //Pimp
  263.         AddPlayerClass(259,-2642.2583,-274.9985,7.5393,135.0036,34,18,32,150,2,1); //Golfer
  264.         AddPlayerClass(118,-2182.8789,609.0111,35.1641,90.3134,30,150,32,150,24,50); //Triad
  265.         AddPlayerClass(50,-540.9334,-493.9939,25.5234,2.1357,26,100,30,150,16,8); //Mechanic
  266.     AddPlayerClass(248,-590.2386,-1070.6687,23.4799,245.1315,29,150,16,8,25,50); //Biker
  267.         AddPlayerClass(274,-2665.4282,635.6348,14.4531,179.8403,33,30,29,150,23,30); //Medic
  268.     AddPlayerClass(285,-1635.0077,665.8105,7.1875,264.2244,29,150,31,150,16,8); //Swat
  269.         AddPlayerClass(162,-530.9717,-98.2034,63.2969,4.3698,26,100,28,150,24,20); //Hick
  270.         AddPlayerClass(255,-1331.1147,-235.3819,858.4656,106.3832,34,18,23,30,18,8); //Pilot
  271.     AddPlayerClass(187,-2664.8774,940.8234,79.7101,184.9922,31,150,27,100,16,8); //Toreno
  272.     AddPlayerClass(122,-1478.7167,1489.1571,8.2501,272.8738,27,100,28,150,24,50); // nang
  273.     AddPlayerClass(167,-2671.8293,267.5992,4.3359,358.9251,26,100,29,150,24,20); // chicken
  274.     AddPlayerClass(287,-1335.4381,506.1993,11.1953,83.7755,31,150,24,20,27,100); // army
  275.  
  276.         CreateVehicle(471,-1331.0846,-232.7304,858.1304,106.1061,0,7,120); // quad1
  277.         CreateVehicle(471,-1333.1228,-233.3187,857.6396,106.1063,0,7,120); // quad2
  278.         CreateVehicle(471,-1334.9735,-233.8529,857.1973,106.0828,0,7,120); // qaud3
  279.         CreateVehicle(471,-1336.8336,-234.3891,856.7507,106.0772,0,7,120); // qaud4
  280.         CreateVehicle(471,-1338.6772,-234.9201,856.3088,106.0686,0,7,120); // qaud5
  281.         CreateVehicle(471,-1329.3984,-238.3599,858.1602,104.6697,0,7,120); // quad6
  282.         CreateVehicle(471,-1331.0671,-238.7967,857.7630,104.6650,0,7,120); // quad7
  283.         CreateVehicle(471,-1332.7803,-239.2450,857.3539,104.6976,0,7,120); // quad8
  284.         CreateVehicle(471,-1334.5336,-239.7271,856.9307,106.4921,0,7,120); // quad9
  285.         CreateVehicle(471,-1336.1462,-240.2041,856.5461,106.4772,0,7,120); // quad10
  286.         CreateVehicle(519,-1289.7424,-350.5048,15.1024,195.3063,0,7,120); // shamal1
  287.         CreateVehicle(519,-1311.3673,-355.8325,15.0744,194.4418,0,7,120); // shamal2
  288.         CreateVehicle(476,-1266.8002,-341.9807,14.8562,202.8707,0,7,120); // rustler1
  289.         CreateVehicle(463,-588.1334,-1075.4253,22.9613,235.9492,0,7,120); // freeway1
  290.         CreateVehicle(463,-586.3122,-1072.1973,22.9270,234.7390,0,7,120); // freeway2
  291.         CreateVehicle(463,-584.4375,-1069.1838,22.8900,234.7676,0,7,120); // freeway3
  292.         CreateVehicle(463,-581.8464,-1066.4482,22.9467,235.5516,0,7,120); // freeway4
  293.         CreateVehicle(463,-580.2595,-1063.2745,23.0204,234.4455,0,7,120); // freeway5
  294.         CreateVehicle(463,-578.2027,-1060.0898,23.1023,234.5559,0,7,120); // freeway6
  295.         CreateVehicle(463,-576.0919,-1057.0671,23.1828,233.2619,0,7,120); // freeway7
  296.         CreateVehicle(463,-574.0414,-1054.0868,23.2618,234.4510,0,7,120); // freeway8
  297.         CreateVehicle(463,-572.5219,-1050.8461,23.3353,234.0683,0,7,120); // freeway
  298.         CreateVehicle(463,-570.2981,-1047.8882,23.4104,234.5488,0,7,120); // freeway10
  299.         CreateVehicle(520,-1586.9945,-288.4680,14.8716,47.7482,0,7,120); // hydra1
  300.         CreateVehicle(520,-1595.4969,-298.8236,14.8716,52.5507,0,7,120); // hydra2
  301.         CreateVehicle(519,-1440.1042,-525.9028,15.0938,205.9727,0,7,120); // shamalhangar
  302.         CreateVehicle(519,-1361.4075,-493.6789,15.0908,206.8716,0,7,120); // shamalhangar1
  303.         CreateVehicle(592,-1603.1377,-500.5093,23.2879,44.3925,0,7,120); // andromedabrug
  304.         CreateVehicle(577,-1684.7770,-190.2014,14.0623,314.7069,0,0,120); // at400hydra
  305.         CreateVehicle(556,-374.5188,-792.5562,30.8738,240.0383,0,7,120); // monstertruck
  306.         CreateVehicle(520,706.6594,-2261.2424,13.5735,274.6305,0,7,120); // hydraadmin1
  307.         CreateVehicle(520,705.5833,-2249.1421,13.5735,282.7750,0,7,120); // hydraadmin2
  308.         CreateVehicle(497,-1681.3857,705.7542,30.7787,268.3755,1,1,120); // policeswatheli
  309.         CreateVehicle(427,-1605.8827,673.2131,7.3195,179.9547,0,1,120); // enforcerswat1
  310.         CreateVehicle(427,-1594.0354,673.1947,7.3191,180.0891,0,1,120); // enforcerswat2
  311.         CreateVehicle(597,-1599.9773,673.2905,6.9573,180.4921,0,1,120); // sfpd1
  312.         CreateVehicle(601,-1588.1655,673.2490,6.9463,180.3133,1,1,120); // swatwater1
  313.         CreateVehicle(601,-1581.6047,651.1897,6.9463,0.5391,1,1,120); // swatwater2
  314.         CreateVehicle(427,-1587.9159,652.1567,7.3194,359.6385,0,1,120); // enforcerswat
  315.         CreateVehicle(597,-1593.7037,652.1074,6.9557,0.6342,0,1,120); // sfpd
  316.         CreateVehicle(597,-1599.5651,652.1554,6.9564,359.5761,0,1,120); // sfpd
  317.         CreateVehicle(597,-1610.7178,652.1724,6.9576,357.6054,0,1,120); // sfpd
  318.         CreateVehicle(427,-1616.4803,651.7550,7.3192,0.2895,0,1,120); // enforcerswat
  319.         CreateVehicle(593,-1283.2323,-259.4105,14.5798,26.5470,60,1,120); // dodo1
  320.         CreateVehicle(593,-1325.9102,-279.6250,14.6085,26.3195,58,8,120); // dodo2
  321.         CreateVehicle(593,-1312.5881,-273.3793,14.6102,24.4373,2,1,120); // dodo4
  322.         CreateVehicle(476,-1297.6835,-267.1807,14.8538,24.6283,7,6,120); // rustler1
  323.         CreateVehicle(593,-1390.2306,-215.9052,14.6066,243.2827,68,8,120); // dodo5
  324.         CreateVehicle(593,-1382.8989,-199.9279,14.6058,244.6571,13,8,120); // dodo6
  325.         CreateVehicle(513,-1271.8248,-254.2045,14.6964,25.8020,0,7,120); // stuntplane
  326.         CreateVehicle(476,-1376.3331,-183.9525,14.8587,244.2562,1,6,120); // rustler
  327.         CreateVehicle(511,-1124.1268,-215.5061,15.5241,103.6089,8,66,120); // beagle
  328.         CreateVehicle(511,-1131.9965,-191.5900,15.5180,109.1899,0,7,120); // beagle
  329.         CreateVehicle(417,-1223.6155,-11.2785,14.2421,43.9280,0,7,120); // levathian heli
  330.         CreateVehicle(417,-1185.4189,24.8705,14.2279,44.7164,0,0,120); // levathian ap 2
  331.         CreateVehicle(485,-1175.7916,-148.4632,13.8019,136.6563,1,74,120); // baggagecar-ap
  332.         CreateVehicle(433,-1453.4021,459.5739,7.6209,0.0983,43,0,120); // barrack
  333.         CreateVehicle(433,-1447.2100,459.6718,7.6222,0.7908,43,0,120); // barrack
  334.         CreateVehicle(470,-1441.2654,461.2669,7.1746,0.1664,43,0,120); // patriot
  335.         CreateVehicle(470,-1435.7161,461.3101,7.1741,2.2390,43,0,120); // patriot
  336.         CreateVehicle(470,-1459.3347,461.3413,7.1724,0.5497,43,0,120); // patriot
  337.         CreateVehicle(470,-1475.2953,461.0638,7.1701,358.1463,43,0,120); // patriot
  338.         CreateVehicle(548,-1459.7053,501.1780,19.9128,90.4667,0,7,120); // cargobob schip
  339.         CreateVehicle(430,-1453.2120,493.0416,-0.2642,89.9948,0,7,120); // predator schip
  340.         CreateVehicle(430,-1449.8503,509.2277,-0.4126,88.6226,46,26,120); // predator schip
  341.         CreateVehicle(409,-2618.0696,1349.3864,6.9744,180.0236,1,1,120); // stretcher
  342.         CreateVehicle(439,-2087.2488,254.1511,35.8860,182.2311,0,7,120); // stallion workers
  343.         CreateVehicle(455,-2072.5313,255.8437,36.0024,180.7321,84,58,120); // flatbed workers
  344.         CreateVehicle(541,-2033.2311,170.2635,28.4609,272.0341,58,8,120); // bullet workers
  345.         CreateVehicle(451,-1949.8311,258.7238,35.1766,67.1317,16,16,120); // turismo showroom workers
  346.         CreateVehicle(522,-1950.2866,273.5888,40.6224,90.0485,3,3,120); // nrg showroom workers
  347.         CreateVehicle(477,-1954.6924,303.0300,35.2243,143.7713,0,7,120); // sportwagen showroom workers
  348.         CreateVehicle(471,-1732.1516,594.3750,24.3583,1.1434,74,91,120); // quad
  349.         CreateVehicle(507,-1629.5237,872.6083,8.2645,180.6872,0,7,120); // elegant
  350.         CreateVehicle(522,-1661.5031,1207.4307,20.7293,306.4218,3,8,120); // nrg showroom
  351.         CreateVehicle(506,-1658.9474,1212.4692,6.9546,291.5670,0,7,120); // supergt showroom
  352.         CreateVehicle(603,-1661.9515,1213.7438,13.5104,295.7164,0,7,120); // phoenix showroom
  353.         CreateVehicle(446,-1572.1675,1263.2318,-0.4548,271.1535,3,3,120); // squalo pier 69
  354.         CreateVehicle(473,-1446.9709,1506.0396,-0.4551,274.4062,56,53,120); // dinghy nang
  355.         CreateVehicle(446,-1456.0205,1464.7013,-1.0466,183.4196,1,22,120); // squalo nang
  356.         CreateVehicle(446,-1439.7700,1465.2950,-0.8570,178.5492,1,35,120); // squalo2 nang
  357.         CreateVehicle(493,-1424.1104,1464.4220,0.2635,180.0312,0,7,120); // jetmax nang
  358.         CreateVehicle(460,-1392.3185,1524.1824,1.3338,353.0948,1,9,120); // skimmer nang1
  359.         CreateVehicle(453,-1382.1621,1520.8270,-0.7090,331.1713,0,7,120); // reefer nang
  360.         CreateVehicle(515,-484.3663,-473.5274,26.5414,178.2755,24,77,120); // roadtrain mech
  361.         CreateVehicle(515,-479.2825,-473.5772,26.5403,179.5269,54,77,120); // roadtrain mech1
  362.         CreateVehicle(524,-2063.3633,229.2307,36.6795,2.4409,0,7,120); // cementworkers
  363.         CreateVehicle(601,-1574.1744,726.4121,-5.4834,89.7060,0,7,120); // SWAT garage
  364.         CreateVehicle(412,-1784.1588,715.8806,34.7033,358.3048,0,7,120); // voodo city
  365.         CreateVehicle(422,-1914.5186,792.3923,39.7259,266.6577,0,7,120); // bobcat city
  366.         CreateVehicle(424,-2915.4692,411.2508,3.7899,104.1431,0,7,120); // beachcar
  367.         CreateVehicle(460,-2953.7786,499.2873,1.8422,0.8239,1,18,120); // skimmer chicken
  368.         CreateVehicle(429,-2875.6758,793.5854,35.4228,263.6978,14,14,120); // banshee
  369.         CreateVehicle(451,-2660.7803,885.7050,79.4807,0.6360,36,36,120); // turismo torenos
  370.         CreateVehicle(429,-2664.9697,912.9534,79.3542,181.6790,1,2,120); // banshee torenos
  371.         CreateVehicle(522,-2669.8237,893.5916,79.1174,285.0875,7,79,120); // nrg torenos
  372.         CreateVehicle(595,-1500.0380,1390.4011,0.1715,292.7947,0,7,120); // launch nang
  373.         CreateVehicle(424,-364.5125,-1409.9636,25.5088,92.9053,2,2,120); // bf farmers
  374.         CreateVehicle(555,-378.9482,-1454.7550,25.4099,356.7096,0,7,120); // windsor farmers
  375.         CreateVehicle(447,-1466.7335,-153.8585,6.0169,4.9886,0,7,120); // secret seasparrow
  376.         CreateVehicle(487,-1290.2253,-17.9604,14.3259,132.8653,29,42,120); // maverick ap
  377.         CreateVehicle(487,-1304.6489,-3.2582,14.3246,134.1127,26,57,120); // maverik ap
  378.         CreateVehicle(421,-1943.1354,161.0854,27.0362,356.3368,13,1,120); // washington train workers
  379.         CreateVehicle(537,-1942.2499,177.6045,27.2245,356.4843,1,1,120); // train workers
  380.         CreateVehicle(480,-524.2804,-471.3609,25.2977,178.4148,2,2,120); // comet
  381.         CreateVehicle(480,-529.5109,-471.6548,25.2953,176.6715,12,12,120); // comet
  382.         CreateVehicle(424,-519.4714,-471.3319,25.3041,176.5628,2,2,120); // bf mech
  383.         CreateVehicle(412,-559.5734,-473.0458,25.3588,179.5488,11,1,120); // voodo mech
  384.         CreateVehicle(422,-560.0017,-488.1627,25.5089,359.9904,101,25,120); // bobcat mech
  385.         CreateVehicle(542,-542.7549,-99.3194,63.1745,357.8329,24,118,120); // clover hick
  386.         CreateVehicle(468,-536.0410,-77.7962,62.5291,269.1149,46,46,120); // sanchez hick
  387.         CreateVehicle(555,-539.9163,-74.2539,62.5439,270.4185,58,1,120); // windsor hick
  388.         CreateVehicle(531,-526.5109,-102.4536,63.2589,267.8327,36,2,120); // tractor hick
  389.         CreateVehicle(478,-551.0283,-77.5382,63.1451,180.9080,66,1,120); // walton
  390.         CreateVehicle(471,-500.4510,-69.9420,61.0480,115.8333,120,112,120); // quad hick
  391.         CreateVehicle(468,-533.0751,-98.3595,62.9655,326.2289,53,53,120); // sanchez hick
  392.         CreateVehicle(422,-956.1768,-224.3703,40.0620,129.4595,111,31,120); // bobcat
  393.         CreateVehicle(468,-917.0044,-524.4356,25.6224,116.3784,3,3,120); // sancehz camping
  394.         CreateVehicle(424,-1124.3544,-555.4586,30.4514,70.3185,3,2,120); // injection weg vliegveld
  395.         CreateVehicle(478,-1162.9553,-586.7974,34.6831,172.5060,59,1,120); // walton weg ap
  396.         CreateVehicle(533,-1184.4913,-670.3323,47.8833,172.2101,74,1,120); // feltzer weg ap
  397.         CreateVehicle(518,-1652.1440,-563.9786,13.8196,312.8725,9,39,120); // buccaneer ap
  398.         CreateVehicle(522,-2267.5876,204.3293,34.7205,87.8311,36,105,120); // nrg
  399.         CreateVehicle(451,-2266.2581,192.6582,34.8702,90.1014,36,36,120); // turismo city
  400.         CreateVehicle(434,-2685.0981,268.1706,4.3045,359.9309,12,12,120); // hotknife chicken
  401.         CreateVehicle(603,-2678.3521,268.4741,4.1741,0.5581,75,77,120); // phoenix chicken
  402.         CreateVehicle(522,-2664.8284,268.8790,3.9084,356.9640,39,106,120); // nrg chicken
  403.         CreateVehicle(471,-2697.6968,277.3120,3.8046,359.3735,74,83,120); // quad chicken
  404.         CreateVehicle(575,-2617.6062,1370.0277,6.6775,178.9059,19,96,120); // broadway pimp
  405.         CreateVehicle(545,-2622.5396,1349.1959,6.9676,181.5360,47,1,120); // hustler
  406.         CreateVehicle(467,-2622.1089,1370.8529,6.8204,180.4827,58,8,120); // oceanic pimp
  407.         CreateVehicle(541,-2626.4973,1371.4775,6.7170,178.4769,60,1,120); // bullet pimp
  408.         CreateVehicle(409,-2607.1426,1365.7740,6.9326,267.3618,1,1,120); // stretcher
  409.         CreateVehicle(429,-2626.6687,1349.0995,6.8149,358.6410,13,13,120); // banshee pimp
  410.         CreateVehicle(447,-1313.7881,1488.2650,0.6646,352.2195,75,2,120); // seasparrow nang
  411.         CreateVehicle(541,-2674.1563,892.1849,79.2515,282.5140,68,8,120); // bullet troreno
  412.         CreateVehicle(545,-2019.7070,432.7517,34.9827,268.8799,44,96,120); // hustler city workers
  413.         CreateVehicle(459,-1539.2094,1012.3886,7.2382,123.5332,28,28,120); // van city
  414.         CreateVehicle(541,-1797.1143,1312.0325,59.3594,176.6748,68,8,120); // bullet garage
  415.         CreateVehicle(429,-1810.4651,1311.1039,59.4141,187.0934,2,1,120); // banshee garage
  416.         CreateVehicle(480,-1816.3813,1310.8966,59.5092,186.4798,6,6,120); // comet garage
  417.         CreateVehicle(522,-1802.8806,1312.6412,59.2954,180.7814,39,106,120); // nrg garage
  418.         CreateVehicle(522,-2137.9922,1251.8378,22.6064,354.9411,39,106,120); // nrg city
  419.         CreateVehicle(405,-2178.0479,1251.9452,29.7961,359.2146,24,1,120); // sentinel city
  420.         CreateVehicle(411,-2284.1589,1101.8370,79.8259,273.1972,64,1,120); // infernus city
  421.         CreateVehicle(410,-2213.2407,1104.7272,79.6655,179.3469,9,1,120); // manana city
  422.         CreateVehicle(522,-2127.5107,650.8709,51.9389,89.0601,51,118,120); // nrg triads
  423.         CreateVehicle(462,-2212.7847,612.6624,34.7604,177.0334,13,13,120); // faggio triad
  424.         CreateVehicle(585,-2228.8389,572.9700,34.6790,270.6666,42,42,120); // emperor triads
  425.         CreateVehicle(587,-2285.3010,580.3007,34.8914,271.7863,40,1,120); // euros city triad
  426.         CreateVehicle(507,-2271.6318,545.0032,34.8415,272.7581,53,53,120); // elegant city traids
  427.         CreateVehicle(416,-2570.7822,622.0333,14.6006,267.3199,1,3,120); // ambulance medic
  428.         CreateVehicle(416,-2570.7798,638.4097,14.6082,273.1752,1,3,120); // ambulance medic
  429.         CreateVehicle(561,-2545.4460,632.8561,14.2671,89.1344,43,21,120); // stratum medic
  430.         CreateVehicle(416,-2646.1672,613.5593,14.6024,178.5010,1,3,120); // amublance medic
  431.         CreateVehicle(516,-2671.1431,613.2625,14.2885,178.3544,119,1,120); // nebula medic
  432.         CreateVehicle(489,-2653.1895,583.9393,14.5955,89.5334,14,123,120); // rancher medic
  433.         CreateVehicle(480,-2872.7922,727.6775,29.1738,278.1286,46,46,120); // comet city
  434.         CreateVehicle(603,-2404.9995,942.4192,45.2247,269.5974,18,1,120); // phoenix city
  435.         CreateVehicle(442,-2572.2646,1147.5435,55.5530,157.3655,11,105,120); // romero city
  436.         CreateVehicle(445,-2379.5295,1231.7673,32.0811,271.6473,35,35,120); // adminiral city
  437.         CreateVehicle(475,-1833.4215,113.0971,14.9194,269.6346,9,39,120); // sabre dock city
  438.         CreateVehicle(522,-1708.6316,977.6370,17.1580,349.0795,6,25,120); // nrg under garage
  439.         CreateVehicle(480,-1687.4658,999.8015,17.3605,89.9063,73,45,120); // comet under garage
  440.         CreateVehicle(451,-1687.5680,1036.5848,17.2912,91.5156,18,18,120); // turismo under garage
  441.         CreateVehicle(429,-1688.0038,983.5756,17.2656,90.3479,1,3,120); // banshee under garage
  442.         CreateVehicle(445,-1703.3503,1012.4879,17.4609,269.3854,37,37,120); // adminiral under garage
  443.         CreateVehicle(475,-1736.8923,1028.7772,17.3912,268.1563,21,1,120); // sabre under gargae
  444.         CreateVehicle(411,-1736.1353,1007.8314,17.3130,269.6040,123,1,120); // internus under garage
  445.         CreateVehicle(522,-1720.1289,1010.7611,17.1334,92.6104,3,8,120); // nrg under gararge
  446.         CreateVehicle(479,-1800.9136,822.4512,24.6873,2.1440,59,36,120); // regina city
  447.         CreateVehicle(483,-1730.5592,751.7266,24.8828,268.6238,1,31,120); // hippie city
  448.         CreateVehicle(499,-2159.3887,454.2749,35.1642,270.0649,109,32,120); // benson city
  449.         CreateVehicle(490,-2175.8828,292.8557,35.2439,359.1608,0,0,120); // fbirancher city
  450.         CreateVehicle(506,-2218.5198,305.8065,34.8217,181.4081,7,7,120); // super gt city
  451.         CreateVehicle(411,-2033.7422,-95.7351,34.8911,356.6624,116,1,120); // infernus city
  452.         CreateVehicle(463,-2021.5338,-100.8840,34.7042,273.7768,11,11,120); // freeway city
  453.         CreateVehicle(457,-2655.8318,-279.1873,7.1280,131.0528,2,1,120); // caddy golfer
  454.         CreateVehicle(457,-2652.2632,-296.2739,7.0983,315.0136,34,1,120); // caddy golfers
  455.         CreateVehicle(457,-2653.6724,-281.4860,7.1300,135.4543,32,1,120); // caddy golers
  456.         CreateVehicle(457,-2657.4885,-277.3954,7.1233,129.5761,18,1,120); // caddy golfers
  457.         CreateVehicle(457,-2661.0266,-287.4526,7.1138,310.9831,63,1,120); // caddy golfers
  458.         CreateVehicle(489,-2676.4258,-276.1584,7.3181,314.3358,120,123,120); // rancher golfers
  459.         CreateVehicle(475,-2674.7202,-251.1950,6.4957,134.3407,33,0,120); // sabre golfers
  460.         CreateVehicle(457,-2478.0408,-303.5780,40.8994,39.6081,58,1,120); // caddy golf terain
  461.         CreateVehicle(527,-2592.8733,-100.8010,4.0241,91.0810,53,1,120); // cadrona city
  462.         CreateVehicle(533,-2718.8149,10.8991,4.0450,269.5640,75,1,120); // feltzer city
  463.         CreateVehicle(543,-2755.4929,171.0767,6.8602,174.0683,32,8,120); // sadler city
  464.         CreateVehicle(444,-2884.8330,160.6096,5.7309,183.4403,32,42,120); // monster beach chicken
  465.         CreateVehicle(411,-2796.2339,223.6504,6.9145,90.7779,112,1,120); // infernus city
  466.         CreateVehicle(409,-2757.9580,376.0507,4.1391,0.4436,1,1,120); // stretcher city
  467.         CreateVehicle(541,-2585.1760,332.3127,4.4764,90.2705,22,1,120); // bullet city
  468.         CreateVehicle(566,-2585.6011,325.1963,4.6342,269.3877,30,8,120); // tahoma city
  469.         CreateVehicle(580,-2586.3020,310.9505,4.6513,91.0530,81,81,120); // stafford city
  470.         CreateVehicle(468,-895.4147,-1155.3451,102.7189,185.4269,6,6,120); // sanchez country
  471.         CreateVehicle(522,-1387.5490,-618.0760,13.7097,61.4423,39,106,120); // nrg vliegveld
  472.         CreateVehicle(476,-1344.7352,-616.6428,14.8596,37.2596,119,117,120); // rustler vliegveld hangar
  473.         CreateVehicle(460,-1372.8444,1516.3047,1.5853,338.4427,1,30,120); // skimmer nang
  474.         CreateVehicle(541,-2578.4207,999.5179,77.8375,89.0168,22,1,120); // bullet toreno
  475.         CreateVehicle(476,-1410.9948,517.0949,18.9493,182.4897,119,117,120); // rustler army ship
  476.         CreateVehicle(476,-1428.5999,507.6015,18.9360,269.5311,103,102,120); // rustler army ship
  477.         CreateVehicle(520,-1820.8499,-1609.9801,23.7388,189.7787,0,0,120); // secret hydra
  478.     CreateVehicle(553,-1187.6145,-165.4155,15.4787,105.1306,55,23,120); // nevada ap
  479.     CreateVehicle(553,-1246.8854,-101.2565,15.4789,135.0078,61,74,120); // nevada ap1
  480.     CreateVehicle(453,-1364.5394,-703.4726,-0.2448,269.0192,56,56,120); // reefer ap
  481.     CreateVehicle(443,-605.2082,-498.4219,26.1568,269.6630,20,1,120); // packer mechanics
  482.     CreateVehicle(542,-599.8732,-560.0121,25.2666,272.3698,31,93,120); // clover mech
  483.     CreateVehicle(468,-767.8223,-630.7264,65.7323,358.6574,46,46,120); // sanchez country
  484.     CreateVehicle(407,-2053.5063,75.4488,28.6258,91.9088,3,1,120); // firetruck fdsa
  485.     CreateVehicle(559,-1707.7039,1348.4867,6.8361,135.6851,60,1,120); // jester
  486.     CreateVehicle(559,-1817.1080,1293.3694,59.3907,5.6484,60,1,120); // Jester
  487.  
  488.         Clock = TextDrawCreate(547.0, 24.0, "12:00");
  489.         TextDrawSetShadow(Clock, 0);
  490.         TextDrawSetOutline(Clock, 2);
  491.         TextDrawLetterSize(Clock, 0.6, 1.8);
  492.         TextDrawFont(Clock, 3);
  493.        
  494.         Textdraw0 = TextDrawCreate(176.000000,390.000000,"Spectating, respawn in 10 seconds");
  495.     TextDrawAlignment(Textdraw0,0);
  496.     TextDrawBackgroundColor(Textdraw0,0x000000ff);
  497.     TextDrawFont(Textdraw0,3);
  498.     TextDrawLetterSize(Textdraw0,0.499999,0.799999);
  499.     TextDrawColor(Textdraw0,0xffffff99);
  500.     TextDrawSetOutline(Textdraw0,1);
  501.     TextDrawSetProportional(Textdraw0,1);
  502.     TextDrawSetShadow(Textdraw0,1);
  503.        
  504.         rules0 = TextDrawCreate(218.000000,93.000000,"PartyRules");
  505.         rules1 = TextDrawCreate(152.000000,121.000000,"~w~-no cheating or glitching~n~ ~n~-always play as a team~n~ ~n~-respect other players~n~ ~n~-no racism~n~ ~n~-respect the admin");
  506.         rules2 = TextDrawCreate(109.000000,279.000000,"Abusing of these rules may result in a kick or a ban");
  507.         TextDrawAlignment(rules0,0);
  508.         TextDrawAlignment(rules1,0);
  509.         TextDrawAlignment(rules2,0);
  510.         TextDrawBackgroundColor(rules0,0x000000ff);
  511.         TextDrawBackgroundColor(rules1,0x000000ff);
  512.         TextDrawBackgroundColor(rules2,0x000000ff);
  513.         TextDrawFont(rules0,3);
  514.         TextDrawLetterSize(rules0,1.000000,2.200000);
  515.         TextDrawFont(rules1,3);
  516.         TextDrawLetterSize(rules1,0.799999,1.800000);
  517.         TextDrawFont(rules2,1);
  518.         TextDrawLetterSize(rules2,0.499999,1.000000);
  519.         TextDrawColor(rules0,0xff0000cc);
  520.         TextDrawColor(rules1,0xffffffff);
  521.         TextDrawColor(rules2,0xff0000cc);
  522.         TextDrawSetOutline(rules0,1);
  523.         TextDrawSetOutline(rules1,1);
  524.         TextDrawSetOutline(rules2,1);
  525.         TextDrawSetProportional(rules0,1);
  526.         TextDrawSetProportional(rules1,1);
  527.         TextDrawSetProportional(rules2,1);
  528.         TextDrawSetShadow(rules0,1);
  529.         TextDrawSetShadow(rules1,1);
  530.         TextDrawSetShadow(rules2,1);
  531.        
  532.         worker0 = TextDrawCreate(69.000000,118.000000,"~y~the workers~n~ ~n~~g~alias~n~~w~bikers~n~ ~n~~r~rivals~n~~w~the hicks~n~ ~n~~y~respawn point~n~~w~construction side");
  533.         worker1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~orange~n~ ~n~~y~weapons~n~~w~ak-47~n~shotgun~n~MP5~n~grenades");
  534.         TextDrawAlignment(worker0,0);
  535.         TextDrawAlignment(worker1,0);
  536.         TextDrawBackgroundColor(worker0,0x000000ff);
  537.         TextDrawBackgroundColor(worker1,0x000000ff);
  538.         TextDrawFont(worker0,3);
  539.         TextDrawLetterSize(worker0,0.299999,1.000000);
  540.         TextDrawFont(worker1,3);
  541.         TextDrawLetterSize(worker1,0.399999,1.000000);
  542.         TextDrawColor(worker0,0xffffffff);
  543.         TextDrawColor(worker1,0xffffffff);
  544.         TextDrawSetOutline(worker0,1);
  545.         TextDrawSetOutline(worker1,1);
  546.         TextDrawSetProportional(worker0,1);
  547.         TextDrawSetProportional(worker1,1);
  548.         TextDrawSetShadow(worker0,1);
  549.         TextDrawSetShadow(worker1,1);
  550.        
  551.         pimp0 = TextDrawCreate(69.000000,118.000000,"~y~The pimps~n~ ~n~~g~alias~n~~w~nang~n~ ~n~~r~rivals~n~~w~Rich~n~ ~n~~y~respawn point~n~~w~jizzy's club");
  552.         pimp1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~red~n~ ~n~~y~weapons~n~~w~sawn-off~n~MP5~n~grenades~n~cane");
  553.         TextDrawAlignment(pimp0,0);
  554.         TextDrawAlignment(pimp1,0);
  555.         TextDrawBackgroundColor(pimp0,0x000000ff);
  556.         TextDrawBackgroundColor(pimp1,0x000000ff);
  557.         TextDrawFont(pimp0,3);
  558.         TextDrawLetterSize(pimp0,0.299999,1.000000);
  559.         TextDrawFont(pimp1,3);
  560.         TextDrawLetterSize(pimp1,0.399999,1.000000);
  561.         TextDrawColor(pimp0,0xffffffff);
  562.         TextDrawColor(pimp1,0xffffffff);
  563.         TextDrawSetOutline(pimp0,1);
  564.         TextDrawSetOutline(pimp1,1);
  565.         TextDrawSetProportional(pimp0,1);
  566.         TextDrawSetProportional(pimp1,1);
  567.         TextDrawSetShadow(pimp0,1);
  568.         TextDrawSetShadow(pimp1,1);
  569.        
  570.         golfer0 = TextDrawCreate(69.000000,118.000000,"~y~The golfers~n~ ~n~~g~alias~n~~w~rich~n~ ~n~~r~rivals~n~~w~pilots~n~ ~n~~y~respawn point~n~~w~golf course");
  571.         golfer1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~yellow~n~ ~n~~y~weapons~n~~w~sniper~n~tec9~n~golf club~n~nvg goggles");
  572.         TextDrawAlignment(golfer0,0);
  573.         TextDrawAlignment(golfer1,0);
  574.         TextDrawBackgroundColor(golfer0,0x000000ff);
  575.         TextDrawBackgroundColor(golfer1,0x000000ff);
  576.         TextDrawFont(golfer0,3);
  577.         TextDrawLetterSize(golfer0,0.299999,1.000000);
  578.         TextDrawFont(golfer1,3);
  579.         TextDrawLetterSize(golfer1,0.399999,1.000000);
  580.         TextDrawColor(golfer0,0xffffffff);
  581.         TextDrawColor(golfer1,0xffffffff);
  582.         TextDrawSetOutline(golfer0,1);
  583.         TextDrawSetOutline(golfer1,1);
  584.         TextDrawSetProportional(golfer0,1);
  585.         TextDrawSetProportional(golfer1,1);
  586.         TextDrawSetShadow(golfer0,1);
  587.         TextDrawSetShadow(golfer1,1);
  588.        
  589.         triad0 = TextDrawCreate(69.000000,118.000000,"~y~the triads~n~ ~n~~g~alias~n~~w~chickens~n~ ~n~~r~rivals~n~~w~the nang~n~ ~n~~y~respawn point~n~~w~china town");
  590.         triad1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~dark red~n~ ~n~~y~weapons~n~~w~ak-47~n~TEC9~n~desert eagle~n~katana");
  591.         TextDrawAlignment(triad0,0);
  592.         TextDrawAlignment(triad1,0);
  593.         TextDrawBackgroundColor(triad0,0x000000ff);
  594.         TextDrawBackgroundColor(triad1,0x000000ff);
  595.         TextDrawFont(triad0,3);
  596.         TextDrawLetterSize(triad0,0.299999,1.000000);
  597.         TextDrawFont(triad1,3);
  598.         TextDrawLetterSize(triad1,0.399999,1.000000);
  599.         TextDrawColor(triad0,0xffffffff);
  600.         TextDrawColor(triad1,0xffffffff);
  601.         TextDrawSetOutline(triad0,1);
  602.         TextDrawSetOutline(triad1,1);
  603.         TextDrawSetProportional(triad0,1);
  604.         TextDrawSetProportional(triad1,1);
  605.         TextDrawSetShadow(triad0,1);
  606.         TextDrawSetShadow(triad1,1);
  607.        
  608.         mechanic0 = TextDrawCreate(69.000000,118.000000,"~y~The mechanics~n~ ~n~~g~alias~n~~w~none~n~ ~n~~r~rivals~n~~w~bikers~n~ ~n~~y~respawn point~n~~w~repair shop");
  609.         mechanic1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~light blue~n~ ~n~~y~weapons~n~~w~sawn-off~n~ak-47~n~desert eagle~n~grenades");
  610.         TextDrawAlignment(mechanic0,0);
  611.         TextDrawAlignment(mechanic1,0);
  612.         TextDrawBackgroundColor(mechanic0,0x000000ff);
  613.         TextDrawBackgroundColor(mechanic1,0x000000ff);
  614.         TextDrawFont(mechanic0,3);
  615.         TextDrawLetterSize(mechanic0,0.299999,1.000000);
  616.         TextDrawFont(mechanic1,3);
  617.         TextDrawLetterSize(mechanic1,0.399999,1.000000);
  618.         TextDrawColor(mechanic0,0xffffffff);
  619.         TextDrawColor(mechanic1,0xffffffff);
  620.         TextDrawSetOutline(mechanic0,1);
  621.         TextDrawSetOutline(mechanic1,1);
  622.         TextDrawSetProportional(mechanic0,1);
  623.         TextDrawSetProportional(mechanic1,1);
  624.         TextDrawSetShadow(mechanic0,1);
  625.         TextDrawSetShadow(mechanic1,1);
  626.        
  627.         biker0 = TextDrawCreate(69.000000,118.000000,"~y~The bikers~n~ ~n~~g~alias~n~~w~workers~n~ ~n~~r~rivals~n~~w~mechanics~n~ ~n~~y~respawn point~n~~w~drive-in motel");
  628.         biker1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~dark blue~n~ ~n~~y~weapons~n~~w~MP5~n~desert eagle~n~shotgun~n~grenades");
  629.         TextDrawAlignment(biker0,0);
  630.         TextDrawAlignment(biker1,0);
  631.         TextDrawBackgroundColor(biker0,0x000000ff);
  632.         TextDrawBackgroundColor(biker1,0x000000ff);
  633.         TextDrawFont(biker0,3);
  634.         TextDrawLetterSize(biker0,0.299999,1.000000);
  635.         TextDrawFont(biker1,3);
  636.         TextDrawLetterSize(biker1,0.399999,1.000000);
  637.         TextDrawColor(biker0,0xffffffff);
  638.         TextDrawColor(biker1,0xffffffff);
  639.         TextDrawSetOutline(biker0,1);
  640.         TextDrawSetOutline(biker1,1);
  641.         TextDrawSetProportional(biker0,1);
  642.         TextDrawSetProportional(biker1,1);
  643.         TextDrawSetShadow(biker0,1);
  644.         TextDrawSetShadow(biker1,1);
  645.        
  646.         medic0 = TextDrawCreate(69.000000,118.000000,"~y~The medics~n~ ~n~~g~alias~n~~w~NONE~n~ ~n~~r~rivals~n~~w~NONE~n~ ~n~~y~respawn point~n~~w~hospital");
  647.         medic1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~purple~n~ ~n~~y~weapons~n~~w~rifle~n~MP5~n~silenced 45mm~n~knife");
  648.         TextDrawAlignment(medic0,0);
  649.         TextDrawAlignment(medic1,0);
  650.         TextDrawBackgroundColor(medic0,0x000000ff);
  651.         TextDrawBackgroundColor(medic1,0x000000ff);
  652.         TextDrawFont(medic0,3);
  653.         TextDrawLetterSize(medic0,0.299999,1.000000);
  654.         TextDrawFont(medic1,3);
  655.         TextDrawLetterSize(medic1,0.399999,1.000000);
  656.         TextDrawColor(medic0,0xffffffff);
  657.         TextDrawColor(medic1,0xffffffff);
  658.         TextDrawSetOutline(medic0,1);
  659.         TextDrawSetOutline(medic1,1);
  660.         TextDrawSetProportional(medic0,1);
  661.         TextDrawSetProportional(medic1,1);
  662.         TextDrawSetShadow(medic0,1);
  663.         TextDrawSetShadow(medic1,1);
  664.        
  665.         swat0 = TextDrawCreate(69.000000,118.000000,"~y~S.W.A.T/justice~n~ ~n~~g~alias~n~~w~army~n~ ~n~~r~rivals~n~~w~chickens~n~ ~n~~y~respawn point~n~~w~sfpd");
  666.         swat1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~dark green~n~ ~n~~y~weapons~n~~w~mp5~n~m4~n~grenades~n~nv goggles");
  667.         TextDrawAlignment(swat0,0);
  668.         TextDrawAlignment(swat1,0);
  669.         TextDrawBackgroundColor(swat0,0x000000ff);
  670.         TextDrawBackgroundColor(swat1,0x000000ff);
  671.         TextDrawFont(swat0,3);
  672.         TextDrawLetterSize(swat0,0.299999,1.000000);
  673.         TextDrawFont(swat1,3);
  674.         TextDrawLetterSize(swat1,0.399999,1.000000);
  675.         TextDrawColor(swat0,0xffffffff);
  676.         TextDrawColor(swat1,0xffffffff);
  677.         TextDrawSetOutline(swat0,1);
  678.         TextDrawSetOutline(swat1,1);
  679.         TextDrawSetProportional(swat0,1);
  680.         TextDrawSetProportional(swat1,1);
  681.         TextDrawSetShadow(swat0,1);
  682.         TextDrawSetShadow(swat1,1);
  683.        
  684.         hick0 = TextDrawCreate(69.000000,118.000000,"~y~the hicks~n~ ~n~~g~alias~n~~w~None~n~ ~n~~r~rivals~n~~w~bikers~n~ ~n~~y~respawn point~n~~w~wood hut");
  685.         hick1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~brown red~n~ ~n~~y~weapons~n~~w~sawn-off~n~uzi~n~45mm~n~shovel");
  686.         TextDrawAlignment(hick0,0);
  687.         TextDrawAlignment(hick1,0);
  688.         TextDrawBackgroundColor(hick0,0x000000ff);
  689.         TextDrawBackgroundColor(hick1,0x000000ff);
  690.         TextDrawFont(hick0,3);
  691.         TextDrawLetterSize(hick0,0.299999,1.000000);
  692.         TextDrawFont(hick1,3);
  693.         TextDrawLetterSize(hick1,0.399999,1.000000);
  694.         TextDrawColor(hick0,0xffffffff);
  695.         TextDrawColor(hick1,0xffffffff);
  696.         TextDrawSetOutline(hick0,1);
  697.         TextDrawSetOutline(hick1,1);
  698.         TextDrawSetProportional(hick0,1);
  699.         TextDrawSetProportional(hick1,1);
  700.         TextDrawSetShadow(hick0,1);
  701.         TextDrawSetShadow(hick1,1);
  702.        
  703.         pilot0 = TextDrawCreate(69.000000,118.000000,"~y~The pilots~n~ ~n~~g~alias~n~~w~mechanics~n~ ~n~~r~rivals~n~~w~golfers~n~ ~n~~y~respawn point~n~~w~cargo plane");
  704.         pilot1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~grey~n~ ~n~~y~weapons~n~~w~sniper~n~silenced 45mm~n~molotovs~n~parachute");
  705.         TextDrawAlignment(pilot0,0);
  706.         TextDrawAlignment(pilot1,0);
  707.         TextDrawBackgroundColor(pilot0,0x000000ff);
  708.         TextDrawBackgroundColor(pilot1,0x000000ff);
  709.         TextDrawFont(pilot0,3);
  710.         TextDrawLetterSize(pilot0,0.299999,1.000000);
  711.         TextDrawFont(pilot1,3);
  712.         TextDrawLetterSize(pilot1,0.399999,1.000000);
  713.         TextDrawColor(pilot0,0xffffffff);
  714.         TextDrawColor(pilot1,0xffffffff);
  715.         TextDrawSetOutline(pilot0,1);
  716.         TextDrawSetOutline(pilot1,1);
  717.         TextDrawSetProportional(pilot0,1);
  718.         TextDrawSetProportional(pilot1,1);
  719.         TextDrawSetShadow(pilot0,1);
  720.         TextDrawSetShadow(pilot1,1);
  721.        
  722.         rich0 = TextDrawCreate(69.000000,118.000000,"~y~The richs~n~ ~n~~g~alias~n~~w~golfers~n~ ~n~~r~rivals~n~~w~pimps~n~ ~n~~y~respawn point~n~~w~rich neighborhood");
  723.         rich1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~peach~n~ ~n~~y~weapons~n~~w~m4~n~combat shotgun~n~desert eagle~n~grenades");
  724.         TextDrawAlignment(rich0,0);
  725.         TextDrawAlignment(rich1,0);
  726.         TextDrawBackgroundColor(rich0,0x000000ff);
  727.         TextDrawBackgroundColor(rich1,0x000000ff);
  728.         TextDrawFont(rich0,3);
  729.         TextDrawLetterSize(rich0,0.299999,1.000000);
  730.         TextDrawFont(rich1,3);
  731.         TextDrawLetterSize(rich1,0.399999,1.000000);
  732.         TextDrawColor(rich0,0xffffffff);
  733.         TextDrawColor(rich1,0xffffffff);
  734.         TextDrawSetOutline(rich0,1);
  735.         TextDrawSetOutline(rich1,1);
  736.         TextDrawSetProportional(rich0,1);
  737.         TextDrawSetProportional(rich1,1);
  738.         TextDrawSetShadow(rich0,1);
  739.         TextDrawSetShadow(rich1,1);
  740.        
  741.         nang0 = TextDrawCreate(69.000000,118.000000,"~y~The nang~n~ ~n~~g~alias~n~~w~pimps~n~ ~n~~r~rivals~n~~w~triads~n~ ~n~~y~respawn point~n~~w~cargo ship");
  742.         nang1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~dark red~n~ ~n~~y~weapons~n~~w~combat shotgun~n~uzi~n~desert eagle~n~grenades");
  743.         TextDrawAlignment(nang0,0);
  744.         TextDrawAlignment(nang1,0);
  745.         TextDrawBackgroundColor(nang0,0x000000ff);
  746.         TextDrawBackgroundColor(nang1,0x000000ff);
  747.         TextDrawFont(nang0,3);
  748.         TextDrawLetterSize(nang0,0.299999,1.000000);
  749.         TextDrawFont(nang1,3);
  750.         TextDrawLetterSize(nang1,0.399999,1.000000);
  751.         TextDrawColor(nang0,0xffffffff);
  752.         TextDrawColor(nang1,0xffffffff);
  753.         TextDrawSetOutline(nang0,1);
  754.         TextDrawSetOutline(nang1,1);
  755.         TextDrawSetProportional(nang0,1);
  756.         TextDrawSetProportional(nang1,1);
  757.         TextDrawSetShadow(nang0,1);
  758.         TextDrawSetShadow(nang1,1);
  759.        
  760.         chicken0 = TextDrawCreate(69.000000,118.000000,"~y~The chickens~n~ ~n~~g~alias~n~~w~triads~n~ ~n~~r~rivals~n~~w~S.W.A.T.~n~ ~n~~y~respawn point~n~~w~Cluckin' Bell");
  761.         chicken1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~Dark yellow~n~ ~n~~y~weapons~n~~w~Sawn-off~n~MP5~n~45mm~n~molotov");
  762.         TextDrawAlignment(chicken0,0);
  763.         TextDrawAlignment(chicken1,0);
  764.         TextDrawBackgroundColor(chicken0,0x000000ff);
  765.         TextDrawBackgroundColor(chicken1,0x000000ff);
  766.         TextDrawFont(chicken0,3);
  767.         TextDrawLetterSize(chicken0,0.299999,1.000000);
  768.         TextDrawFont(chicken1,3);
  769.         TextDrawLetterSize(chicken1,0.399999,1.000000);
  770.         TextDrawColor(chicken0,0xffffffff);
  771.         TextDrawColor(chicken1,0xffffffff);
  772.         TextDrawSetOutline(chicken0,1);
  773.         TextDrawSetOutline(chicken1,1);
  774.         TextDrawSetProportional(chicken0,1);
  775.         TextDrawSetProportional(chicken1,1);
  776.         TextDrawSetShadow(chicken0,1);
  777.         TextDrawSetShadow(chicken1,1);
  778.        
  779.         army0 = TextDrawCreate(69.000000,118.000000,"~y~army/justice~n~ ~n~~g~alias~n~~w~S.W.A.T.~n~ ~n~~r~rivals~n~~w~bikers~n~ ~n~~y~respawn point~n~~w~army ship");
  780.         army1 = TextDrawCreate(69.000000,215.000000,"~y~color~n~~w~dark green~n~ ~n~~y~weapons~n~~w~M4~n~45mm~n~combat shotgun~n~grenades");
  781.         TextDrawAlignment(army0,0);
  782.         TextDrawAlignment(army1,0);
  783.         TextDrawBackgroundColor(army0,0x000000ff);
  784.         TextDrawBackgroundColor(army1,0x000000ff);
  785.         TextDrawFont(army0,3);
  786.         TextDrawLetterSize(army0,0.299999,1.000000);
  787.         TextDrawFont(army1,3);
  788.         TextDrawLetterSize(army1,0.399999,1.000000);
  789.         TextDrawColor(army0,0xffffffff);
  790.         TextDrawColor(army1,0xffffffff);
  791.         TextDrawSetOutline(army0,1);
  792.         TextDrawSetOutline(army1,1);
  793.         TextDrawSetProportional(army0,1);
  794.         TextDrawSetProportional(army1,1);
  795.         TextDrawSetShadow(army0,1);
  796.         TextDrawSetShadow(army1,1);
  797.  
  798.         //--objects
  799.         CreateObject(14548,-1355.7847900391, -242.65003967285, 853.583984375, 0.000000, 0.000000, 18105.466326);
  800.  
  801.         for(new i=0; i<MAX_ZONES; i++)
  802.         {
  803.             ZoneInfo[i][z_id] = GangZoneCreate(ZoneInfo[i][z_minx], ZoneInfo[i][z_miny], ZoneInfo[i][z_maxx], ZoneInfo[i][z_maxy]);
  804.             ZoneTakeOverTeam[i] = -1;
  805.         }
  806.  
  807. //spawninfo text
  808.  
  809.  
  810. //Trains
  811.  
  812. //      AddStaticVehicle(537,-1943.3127,158.0254,27.0006,357.3614,121,1);
  813. //      AddStaticVehicle(569,-1943.3127,158.0254,27.0006,357.3614,121,1);
  814. //      AddStaticVehicle(569,-1943.3127,158.0254,27.0006,357.3614,121,1);
  815. //      AddStaticVehicle(569,-1943.3127,158.0254,27.0006,357.3614,121,1);
  816.  
  817.         //Pickups
  818.         AddStaticPickup(370, 15, -2209.4707,294.1174,35.1172); // jetpack
  819.         AddStaticPickup(370, 15, -1765.4392,-174.7473,3.5547); // jetpack
  820.         AddStaticPickup(370, 15, -2669.4919,921.7230,87.1120); //jetpack
  821.        
  822.         infotimer = SetTimer("Information", 300000, true);
  823.     //savetimer = SetTimer("SaveAllStats", 600000, true);
  824.     zonetimer = SetTimer("ZoneUpdate", 2000, true);
  825.     teamtimer = SetTimer("SettingPlayerTeam", 5000 ,true); //teamkill
  826.  
  827.     CLOCK_timer = SetTimer("CLOCK_EverySecondTimer",999,1);
  828.         CLOCK_hour = YOUR_START_HOUR;
  829.         CLOCK_minute = YOUR_START_MINUTE;
  830.  
  831.         return 1;
  832. }
  833.  
  834. public OnGameModeExit()
  835. {
  836.         KillTimer(infotimer);
  837.         //KillTimer(savetimer);
  838.         KillTimer(zonetimer);
  839.         KillTimer(teamtimer);
  840.         KillTimer(CLOCK_timer);
  841.         return 1;
  842. }
  843.  
  844.  
  845. //------------------------------------------------------------------------------
  846.  
  847. public OnPlayerConnect(playerid)
  848. {
  849.         SendDeathMessage(INVALID_PLAYER_ID,playerid,200);
  850.         //SendClientMessage(playerid,COLOR_RED, "If you don't have an account yet, use /register to create one.");
  851.         //rules--------------------------------------------------------------------------
  852.         TextDrawShowForPlayer(playerid, rules0);
  853.         TextDrawShowForPlayer(playerid, rules1);
  854.         TextDrawShowForPlayer(playerid, rules2);
  855. //-------------------------------------------------------------------------------
  856.     TextDrawShowForPlayer(playerid, Clock);
  857.         SetPlayerColor(playerid, COLOR_GREY); // Set the player's color to inactive
  858.        
  859.         pInfo[playerid][pAdmin] = 0;
  860.         pInfo[playerid][pDeaths] = 0;
  861.         pInfo[playerid][pKills] = 0;
  862.     LoggedIn[playerid] = 0;
  863.     IsPlayerMuted[playerid] = 0;
  864.     Bounty[playerid] = 0;
  865.         BountyKills[playerid] = 0;
  866.    
  867.         new PName[MAX_PLAYER_NAME];
  868.         GetPlayerName(playerid, PName, MAX_PLAYER_NAME);
  869.  
  870.         if(!udb_Exists(PName))
  871.         {
  872.             Registered[playerid] = 0;
  873.                 SystemMsg(playerid,"Type /register <password> to create an account");
  874.         }
  875.         else
  876.         {
  877.             Registered[playerid] = 1;
  878.                 SystemMsg(playerid,"This nickname is registered! If you haven't registered this nickname please choose a different one!");
  879.         SystemMsg(playerid,"Please login by typing /login <password>");
  880.         }
  881.        
  882.         /*if(fsearch(KICKPORTAL, PName, true))
  883.     {
  884.         new second, minute, hour, day, month, year, str[128];
  885.             SystemMessage(playerid, "Your name has been banned on this server.");
  886.                 gettime(hour, minute, second);
  887.                 getdate(year, month, day);
  888.                 format(str, sizeof(str), "Player %s tried to join server with banned name on %d/%d/%d at %d:%d:%d.", PName, month, day, year, hour, minute, second);
  889.             KickPlayer(playerid, "");
  890.         }*/
  891.         if(IsServerLocked == true)
  892.     {
  893.             SystemMessage(playerid, "    Server is currently locked down by Administrator.");
  894.             SystemMessage(playerid, "    Please try connecting later.");
  895.             KickPlayer(playerid, "");
  896.     }
  897.  
  898.         return 1;
  899.  
  900. }
  901.  
  902. public OnPlayerDisconnect(playerid, reason)
  903. {
  904.     SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
  905.     if(reason == 0)
  906.     {
  907.         new str[128];
  908.         GetName(playerid, playername);
  909.         format(str, sizeof(str), "Player %s (%d) game crashed", playername, playerid);
  910.         SendMessageToAdmins(str);
  911.         }
  912.     if(Registered[playerid])
  913.         {
  914.             new playername[MAX_PLAYER_NAME];
  915.             GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  916.         dUserSetINT(playername).("Money",GetPlayerMoney(playerid));
  917.         dUserSetINT(playername).("Kills",pInfo[playerid][pKills]);
  918.         dUserSetINT(playername).("Deaths",pInfo[playerid][pDeaths]);
  919.         dUserSetINT(playername).("Admin",pInfo[playerid][pAdmin]);
  920.         dUserSetINT(playername).("Wantedlvl",GetPlayerWantedLevel(playerid));
  921.         }
  922.         return 1;
  923. }
  924. //------------------------------------------------------------------------------
  925.  
  926.  
  927.  
  928. public OnPlayerSpawn(playerid)
  929. {
  930.         if(Killed[playerid] != -1)
  931.         {
  932.                 TextDrawShowForPlayer (playerid, Textdraw0);
  933.                 TogglePlayerSpectating(playerid, true);
  934.                 SetTimerEx("StopSpeccing", 10000, false, "i", playerid);
  935.                 if(Killed[playerid] != INVALID_PLAYER_ID)
  936.                 {
  937.                         PlayerSpectatePlayer(playerid, Killed[playerid]);
  938.                         if (IsPlayerInAnyVehicle(Killed[playerid])) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(Killed[playerid]));
  939.                         gSpectateID[playerid] = Killed[playerid];
  940.                 }
  941.                 else
  942.                 {
  943.                     new randid = GetRandomID();
  944.                         PlayerSpectatePlayer(playerid, randid);
  945.                         if (IsPlayerInAnyVehicle(randid)) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(randid));
  946.                         gSpectateID[playerid] = randid;
  947.                 }
  948.         }
  949.  
  950.         //turfs zone
  951.        
  952.         for(new i=0; i<MAX_ZONES; i++)
  953.         {
  954.             GangZoneShowForPlayer(playerid, ZoneInfo[i][z_id], GetTeamColor(ZoneInfo[i][z_team]));
  955.             if(ZoneTakeOverTeam[i] != -1) GangZoneFlashForPlayer(playerid, ZoneInfo[i][z_id], GetTeamColor(ZoneTakeOverTeam[i]));
  956.         }
  957.  
  958.         //hide spawn info
  959.         TextDrawHideForPlayer(playerid, army0);
  960.         TextDrawHideForPlayer(playerid, army1);
  961.         TextDrawHideForPlayer(playerid, nang0);
  962.         TextDrawHideForPlayer(playerid, nang1);
  963.         TextDrawHideForPlayer(playerid, worker0);
  964.         TextDrawHideForPlayer(playerid, worker1);
  965.         TextDrawHideForPlayer(playerid, rich0);
  966.         TextDrawHideForPlayer(playerid, rich1);
  967.         TextDrawHideForPlayer(playerid, golfer0);
  968.         TextDrawHideForPlayer(playerid, golfer1);
  969.         TextDrawHideForPlayer(playerid, pilot0);
  970.         TextDrawHideForPlayer(playerid, pilot1);
  971.         TextDrawHideForPlayer(playerid, biker0);
  972.         TextDrawHideForPlayer(playerid, biker1);
  973.         TextDrawHideForPlayer(playerid, swat0);
  974.         TextDrawHideForPlayer(playerid, swat1);
  975.         TextDrawHideForPlayer(playerid, pimp0);
  976.         TextDrawHideForPlayer(playerid, pimp1);
  977.         TextDrawHideForPlayer(playerid, triad0);
  978.         TextDrawHideForPlayer(playerid, triad1);
  979.         TextDrawHideForPlayer(playerid, mechanic0);
  980.         TextDrawHideForPlayer(playerid, mechanic1);
  981.         TextDrawHideForPlayer(playerid, chicken0);
  982.         TextDrawHideForPlayer(playerid, chicken1);
  983.         TextDrawHideForPlayer(playerid, hick0);
  984.         TextDrawHideForPlayer(playerid, hick1);
  985.         TextDrawHideForPlayer(playerid, rules0);
  986.         TextDrawHideForPlayer(playerid, rules1);
  987.         TextDrawHideForPlayer(playerid, rules2);
  988.         TextDrawHideForPlayer(playerid, medic0);
  989.         TextDrawHideForPlayer(playerid, medic1);
  990.  
  991.         PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0); //spawn sound
  992.  
  993.         if(gTeam[playerid] == TEAM_WORKER)
  994.         {
  995.             GivePlayerWeapon(playerid, 16, 8);
  996.                 SetPlayerColor(playerid,COLOR_ORANGE); // Orange
  997.         }
  998.         else if(gTeam[playerid] == TEAM_PIMP)
  999.         {
  1000.             GivePlayerWeapon(playerid, 15, 1);
  1001.                 SetPlayerColor(playerid,COLOR_DARKRED); // Red
  1002.         }
  1003.         else if(gTeam[playerid] == TEAM_GOLFER)
  1004.         {
  1005.             GivePlayerWeapon(playerid, 45, 1);
  1006.                 SetPlayerColor(playerid,COLOR_YELLOW); // Yellow
  1007.         }
  1008.         else if(gTeam[playerid] == TEAM_TRIAD)
  1009.         {
  1010.             GivePlayerWeapon(playerid, 8, 1);
  1011.                 SetPlayerColor(playerid,COLOR_PINK); // Pink
  1012.         }
  1013.         else if(gTeam[playerid] == TEAM_MECHANIC)
  1014.         {
  1015.             GivePlayerWeapon(playerid, 24, 40);
  1016.                 SetPlayerColor(playerid,COLOR_LIGHTBLUE); // LightBlue
  1017.         }
  1018.     else if(gTeam[playerid] == TEAM_BIKER)
  1019.         {
  1020.             GivePlayerWeapon(playerid, 24, 40);
  1021.                 SetPlayerColor(playerid,COLOR_BLUE); // Blue
  1022.         }
  1023.         else if(gTeam[playerid] == TEAM_MEDIC)
  1024.         {
  1025.             GivePlayerWeapon(playerid, 4, 1);
  1026.                 SetPlayerColor(playerid,COLOR_PURPLE); // Purple
  1027.         }
  1028.         else if(gTeam[playerid] == TEAM_SWAT)
  1029.         {
  1030.             GivePlayerWeapon(playerid, 44, 1);
  1031.                 SetPlayerColor(playerid,COLOR_DARKGREEN); // DarkGreen
  1032.         }
  1033.         else if(gTeam[playerid] == TEAM_HICK)
  1034.         {
  1035.             GivePlayerWeapon(playerid, 6, 1);
  1036.                 SetPlayerColor(playerid,COLOR_BROWN); // Brown
  1037.     }
  1038.         else if(gTeam[playerid] == TEAM_PILOT)
  1039.         {
  1040.             GivePlayerWeapon(playerid, 46, 1);
  1041.                 SetPlayerColor(playerid,COLOR_DARKGREY); // Grey good
  1042.     }
  1043.     else if(gTeam[playerid] == TEAM_TORENO)
  1044.         {
  1045.             GivePlayerWeapon(playerid, 16, 8);
  1046.                 SetPlayerColor(playerid,COLOR_BEGE); // Bege
  1047.         }
  1048.         else if(gTeam[playerid] == TEAM_NANG)
  1049.         {
  1050.             GivePlayerWeapon(playerid, 16, 8);
  1051.             SetPlayerColor(playerid,COLOR_RED); // lRed
  1052.     }
  1053.         else if(gTeam[playerid] == TEAM_CHICKEN)
  1054.         {
  1055.             GivePlayerWeapon(playerid, 18, 8);
  1056.                 SetPlayerColor(playerid,COLOR_DARKYELLOW); // DarkYellow
  1057.     }
  1058.         else if(gTeam[playerid] == TEAM_ARMY)
  1059.         {
  1060.             GivePlayerWeapon(playerid, 16, 8);
  1061.                 SetPlayerColor(playerid,COLOR_DARKGREEN); // DarkGreen
  1062.         }
  1063.  
  1064.         return 1;
  1065.  
  1066. }
  1067.  
  1068.  
  1069.  
  1070. //------------------------------------------------------------------------------
  1071.  
  1072.  
  1073. public OnPlayerDeath(playerid, killerid, reason)
  1074. {
  1075.     SendDeathMessage(killerid,playerid,reason);
  1076.         Killed[playerid] = killerid;
  1077.         pInfo[playerid][pDeaths]++;
  1078.         DropPlayerWeapons(playerid);
  1079.         if(killerid != INVALID_PLAYER_ID)
  1080.         {
  1081.             pInfo[killerid][pKills]++;
  1082.         if(gTeam[killerid] != gTeam[playerid])
  1083.                 {
  1084.                 // Valid kill
  1085.                 new str[128];
  1086.                 SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  1087.                 GivePlayerMoney(killerid, 1000);
  1088.                 if(IsPlayerJustice(playerid) && !IsPlayerJustice(killerid))
  1089.                         {
  1090.                             BountyKills[killerid]++;
  1091.                             if(BountyKills[killerid] > 3)
  1092.                             {
  1093.                                 if(BountyKills[killerid] == 4) Bounty[killerid] = 10000;
  1094.                                 else Bounty[killerid] += 2500;
  1095.                                 GetName(killerid, killername);
  1096.                                 format(str, sizeof(str), "%s (%d) now has a bounty of $%d", killername, killerid, Bounty[killerid]);
  1097.                                 SendClientMessageToAll(COLOR_YELLOW, str);
  1098.                                 }
  1099.                         }
  1100.                         if(Bounty[playerid] > 0)
  1101.                         {
  1102.                             GetName(playerid, playername);
  1103.                             GivePlayerMoney(killerid, Bounty[playerid]);
  1104.                             format(str, sizeof(str), "You got $%d bounty reward for killing %s (%d)", Bounty[playerid], playername, playerid);
  1105.                                 SendClientMessage(killerid, COLOR_YELLOW, str);
  1106.                         }
  1107.                 }
  1108.         }
  1109.         Bounty[playerid] = 0;
  1110.         BountyKills[playerid] = 0;
  1111.     return 1;
  1112. }
  1113.  
  1114.  
  1115. //------------------------------------------------------------------------------
  1116.  
  1117.  
  1118. public OnPlayerRequestClass(playerid, classid)
  1119. {
  1120.     Killed[playerid] = -1;
  1121.  
  1122.         //rules
  1123.     TextDrawHideForPlayer(playerid, rules0);
  1124.     TextDrawHideForPlayer(playerid, rules1);
  1125.     TextDrawHideForPlayer(playerid, rules2);
  1126.     //-------------------------------------
  1127.         SetPlayerClass(playerid, classid);
  1128.     PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0);
  1129.         gPlayerClass[playerid] = classid;
  1130.  
  1131.         switch (classid)
  1132.         {
  1133.             case 0:
  1134.         {
  1135.                                 //worker
  1136.                                 TextDrawShowForPlayer(playerid, worker0);
  1137.                                 TextDrawShowForPlayer(playerid, worker1);
  1138.                                 //hide
  1139.                                 TextDrawHideForPlayer(playerid, army0);
  1140.                                 TextDrawHideForPlayer(playerid, army1);
  1141.                                 TextDrawHideForPlayer(playerid, pimp0);
  1142.                                 TextDrawHideForPlayer(playerid, pimp1);
  1143.                 SetPlayerPos(playerid, -2112.2437,176.7923,35.3929);
  1144.                 SetPlayerFacingAngle(playerid,1);
  1145.                 SetPlayerCameraPos(playerid, -2112.2803,181.6424,36.3327);
  1146.                 SetPlayerCameraLookAt(playerid, -2112.2437,176.7923,35.3929);
  1147.                 }
  1148.                 case 1:
  1149.                 {
  1150.                                 //pimp
  1151.                                 TextDrawShowForPlayer(playerid, pimp0);
  1152.                                 TextDrawShowForPlayer(playerid, pimp1);
  1153.                                 //hide
  1154.                                 TextDrawHideForPlayer(playerid, worker0);
  1155.                                 TextDrawHideForPlayer(playerid, worker1);
  1156.                                 TextDrawHideForPlayer(playerid, golfer0);
  1157.                                 TextDrawHideForPlayer(playerid, golfer1);
  1158.                 SetPlayerPos(playerid, -2716.8499,1434.0413,7.1875);
  1159.                 SetPlayerFacingAngle(playerid,0);
  1160.                 SetPlayerCameraPos(playerid, -2717.1458,1438.8533,8.3975);
  1161.                 SetPlayerCameraLookAt(playerid, -2716.8499,1434.0413,7.1875);
  1162.                 }
  1163.                 case 2:
  1164.                 {
  1165.                                 //golfer
  1166.                                 TextDrawShowForPlayer(playerid, golfer0);
  1167.                                 TextDrawShowForPlayer(playerid, golfer1);
  1168.                                 //hide
  1169.                                 TextDrawHideForPlayer(playerid, triad0);
  1170.                                 TextDrawHideForPlayer(playerid, triad1);
  1171.                                 TextDrawHideForPlayer(playerid, pimp0);
  1172.                                 TextDrawHideForPlayer(playerid, pimp1);
  1173.                 SetPlayerPos(playerid, -2512.3667,-266.4278,38.9365);
  1174.                 SetPlayerFacingAngle(playerid,0);
  1175.                 SetPlayerCameraPos(playerid, -2512.5325,-261.5241,39.9224);
  1176.                 SetPlayerCameraLookAt(playerid, -2512.3667,-266.4278,38.9365);
  1177.                 }
  1178.                 case 3:
  1179.                 {
  1180.                                 //triad
  1181.                                 TextDrawShowForPlayer(playerid, triad0);
  1182.                                 TextDrawShowForPlayer(playerid, triad1);
  1183.  
  1184.                                 //hide
  1185.                                 TextDrawHideForPlayer(playerid, mechanic0);
  1186.                                 TextDrawHideForPlayer(playerid, mechanic1);
  1187.                                 TextDrawHideForPlayer(playerid, golfer0);
  1188.                                 TextDrawHideForPlayer(playerid, golfer1);
  1189.                 SetPlayerPos(playerid, -2191.1252,607.3189,35.1641);
  1190.                 SetPlayerFacingAngle(playerid,0);
  1191.                 SetPlayerCameraPos(playerid, -2191.0605,611.9641,36.2765);
  1192.                 SetPlayerCameraLookAt(playerid, -2191.1252,607.3189,35.1641);
  1193.                 }
  1194.                 case 4:
  1195.                 {
  1196.                                 //mechanic
  1197.                                 TextDrawShowForPlayer(playerid, mechanic0);
  1198.                                 TextDrawShowForPlayer(playerid, mechanic1);
  1199.                                 //hide
  1200.                                 TextDrawHideForPlayer(playerid, triad0);
  1201.                                 TextDrawHideForPlayer(playerid, triad1);
  1202.                                 TextDrawHideForPlayer(playerid, biker0);
  1203.                                 TextDrawHideForPlayer(playerid, biker1);
  1204.                 SetPlayerPos(playerid, -541.4526,-491.8309,25.5234);
  1205.                 SetPlayerFacingAngle(playerid,180);
  1206.                 SetPlayerCameraPos(playerid, -541.3816,-496.9438,26.6260);
  1207.                 SetPlayerCameraLookAt(playerid, -541.4526,-491.8309,25.5234);
  1208.                 }
  1209.                 case 5:
  1210.                 {
  1211.                                 //biker
  1212.                                 TextDrawShowForPlayer(playerid, biker0);
  1213.                                 TextDrawShowForPlayer(playerid, biker1);
  1214.                                 //hide
  1215.                                 TextDrawHideForPlayer(playerid, medic0);
  1216.                                 TextDrawHideForPlayer(playerid, medic1);
  1217.                                 TextDrawHideForPlayer(playerid, mechanic0);
  1218.                                 TextDrawHideForPlayer(playerid, mechanic1);
  1219.                 SetPlayerPos(playerid, -595.8671,-1065.9160,23.4248);
  1220.                                 SetPlayerFacingAngle(playerid,295);
  1221.                 SetPlayerCameraPos(playerid, -591.7051,-1063.6787,24.5159);
  1222.                 SetPlayerCameraLookAt(playerid, -595.8671,-1065.9160,23.4248);
  1223.                 }
  1224.                 case 6:
  1225.                 {
  1226.                                 //medic
  1227.                                 TextDrawShowForPlayer(playerid, medic0);
  1228.                                 TextDrawShowForPlayer(playerid, medic1);
  1229.                                
  1230.                                 //hide
  1231.                                 TextDrawHideForPlayer(playerid, swat0);
  1232.                                 TextDrawHideForPlayer(playerid, swat1);
  1233.                                 TextDrawHideForPlayer(playerid, biker0);
  1234.                                 TextDrawHideForPlayer(playerid, biker1);
  1235.                 SetPlayerPos(playerid, -2613.8987,598.3188,14.4531);
  1236.                 SetPlayerFacingAngle(playerid,180);
  1237.                 SetPlayerCameraPos(playerid, -2613.8223,593.5840,15.5394);
  1238.                 SetPlayerCameraLookAt(playerid, -2613.8987,598.3188,14.4531);
  1239.                 }
  1240.                 case 7:
  1241.                 {
  1242.                                 //swat
  1243.                                 TextDrawShowForPlayer(playerid, swat0);
  1244.                                 TextDrawShowForPlayer(playerid, swat1);
  1245.                                
  1246.                                 //hide
  1247.                                 TextDrawHideForPlayer(playerid, hick0);
  1248.                                 TextDrawHideForPlayer(playerid, hick1);
  1249.                                 TextDrawHideForPlayer(playerid, medic0);
  1250.                                 TextDrawHideForPlayer(playerid, medic1);
  1251.                 SetPlayerPos(playerid, -1600.3812,737.4028,-5.2422);
  1252.                 SetPlayerFacingAngle(playerid,0);
  1253.                 SetPlayerCameraPos(playerid, -1600.5311,741.8755,-4.1332);
  1254.                 SetPlayerCameraLookAt(playerid, -1600.3812,737.4028,-5.2422);
  1255.                 }
  1256.                 case 8:
  1257.                 {
  1258.                                 //hicks
  1259.                                 TextDrawShowForPlayer(playerid, hick0);
  1260.                                 TextDrawShowForPlayer(playerid, hick1);
  1261.  
  1262.                                 //hide
  1263.                                 TextDrawHideForPlayer(playerid, swat0);
  1264.                                 TextDrawHideForPlayer(playerid, swat1);
  1265.                                 TextDrawHideForPlayer(playerid, pilot0);
  1266.                                 TextDrawHideForPlayer(playerid, pilot1);
  1267.                 SetPlayerPos(playerid, -527.5626,-96.3141,62.9619);
  1268.                 SetPlayerFacingAngle(playerid,0);
  1269.                 SetPlayerCameraPos(playerid, -527.9584,-91.4849,63.6649);
  1270.                 SetPlayerCameraLookAt(playerid, -527.5626,-96.3141,62.9619);
  1271.                 }
  1272.                 case 9:
  1273.                 {
  1274.                                 //pilots
  1275.                                 TextDrawShowForPlayer(playerid, pilot0);
  1276.                                 TextDrawShowForPlayer(playerid, pilot1);
  1277.                                 //hide
  1278.                                 TextDrawHideForPlayer(playerid, hick0);
  1279.                                 TextDrawHideForPlayer(playerid, hick1);
  1280.                                 TextDrawHideForPlayer(playerid, rich0);
  1281.                                 TextDrawHideForPlayer(playerid, rich1);
  1282.  
  1283.                 SetPlayerPos(playerid, -1255.9720,-263.9608,14.1484);
  1284.                 SetPlayerFacingAngle(playerid,0);
  1285.                 SetPlayerCameraPos(playerid, -1256.4557,-258.9485,15.2540);
  1286.                 SetPlayerCameraLookAt(playerid, -1255.9720,-263.9608,14.1484);
  1287.                 }
  1288.                 case 10:
  1289.                 {
  1290.                                 //toreno
  1291.                                 TextDrawShowForPlayer(playerid, rich0);
  1292.                                 TextDrawShowForPlayer(playerid, rich1);
  1293.  
  1294.                                 //hide
  1295.                                 TextDrawHideForPlayer(playerid, pilot0);
  1296.                                 TextDrawHideForPlayer(playerid, pilot1);
  1297.                                 TextDrawHideForPlayer(playerid, nang0);
  1298.                                 TextDrawHideForPlayer(playerid, nang1);
  1299.                     SetPlayerPos(playerid, -2680.3953,931.0175,79.7031);
  1300.                                 SetPlayerFacingAngle(playerid,0);
  1301.                                 SetPlayerCameraPos(playerid,-2680.5896,935.7803,80.8995);
  1302.                                 SetPlayerCameraLookAt(playerid, -2680.3953,931.0175,79.7031);
  1303.                 }
  1304.                 case 11:
  1305.                 {
  1306.                                 //nang
  1307.                                 TextDrawShowForPlayer(playerid, nang0);
  1308.                                 TextDrawShowForPlayer(playerid, nang1);
  1309.                                 //hide
  1310.                                 TextDrawHideForPlayer(playerid, chicken0);
  1311.                                 TextDrawHideForPlayer(playerid, chicken1);
  1312.                                 TextDrawHideForPlayer(playerid, rich0);
  1313.                                 TextDrawHideForPlayer(playerid, rich1);
  1314.  
  1315.                 SetPlayerPos(playerid, -1459.7673,1490.9714,8.2578);
  1316.                 SetPlayerFacingAngle(playerid,85);
  1317.                 SetPlayerCameraPos(playerid, -1464.5118,1490.9004,9.3470);
  1318.                 SetPlayerCameraLookAt(playerid, -1459.7673,1490.9714,8.2578);
  1319.                 }
  1320.                 case 12:
  1321.                 {
  1322.                                 //chickens
  1323.                                 TextDrawShowForPlayer(playerid, chicken0);
  1324.                                 TextDrawShowForPlayer(playerid, chicken1);
  1325.                                 //hide
  1326.                                 TextDrawHideForPlayer(playerid, army0);
  1327.                                 TextDrawHideForPlayer(playerid, army1);
  1328.                                 TextDrawHideForPlayer(playerid, nang0);
  1329.                                 TextDrawHideForPlayer(playerid, nang1);
  1330.                 SetPlayerPos(playerid, -2671.8293,267.5992,4.3359);
  1331.                 SetPlayerFacingAngle(playerid,0);
  1332.                 SetPlayerCameraPos(playerid, -2671.7861,272.2567,5.4376);
  1333.                 SetPlayerCameraLookAt(playerid, -2671.8293,267.5992,4.3359);
  1334.                 }
  1335.                 case 13:
  1336.                 {
  1337.                         //army
  1338.                         TextDrawShowForPlayer(playerid, army0);
  1339.                         TextDrawShowForPlayer(playerid, army1);
  1340.                         //hide
  1341.                         TextDrawHideForPlayer(playerid, worker0);
  1342.                         TextDrawHideForPlayer(playerid, worker1);
  1343.                         TextDrawHideForPlayer(playerid, chicken0);
  1344.                         TextDrawHideForPlayer(playerid, chicken1);
  1345.             SetPlayerPos(playerid, -1399.3936,493.3810,18.2294);
  1346.             SetPlayerFacingAngle(playerid,85);
  1347.             SetPlayerCameraPos(playerid, -1404.4672,493.5200,19.3241);
  1348.             SetPlayerCameraLookAt(playerid, -1399.3936,493.3810,18.2294);
  1349.                 }
  1350.  
  1351.         }
  1352.         return 1;
  1353. }
  1354.  
  1355. public OnPlayerRequestSpawn(playerid)
  1356. {
  1357.     if(Registered[playerid] == 1 && LoggedIn[playerid] == 0)
  1358.         {
  1359.         SystemMsg(playerid,"Please login first, use /login password!");
  1360.                 return 0; //if registered but not logged in cant spawn till /login
  1361.         }
  1362.         else if(Registered[playerid] == 0)
  1363.         {
  1364.         SystemMsg(playerid,"Register an account to save stats & money!");
  1365.                 return 1; //not registered can spawn & choose to register/Change this to Return 0; if you want ppl to have to register
  1366.         }
  1367.         else if(LoggedIn[playerid] == 1)
  1368.         return 1; //if registered & logged in can spawn
  1369.  
  1370.         return 0;
  1371. }
  1372.  
  1373. public OnPlayerStateChange(playerid, newstate, oldstate)
  1374. {
  1375.         SpecUpdate(playerid);
  1376.         return 1;
  1377. }
  1378.  
  1379.  
  1380. //------------------------------------------------------------------------------
  1381.  
  1382.  
  1383. public GameModeExitFunc()
  1384. {
  1385.         GameModeExit();
  1386.         return 1;
  1387. }
  1388.  
  1389.  
  1390. //------------------------------------------------------------------------------
  1391.  
  1392. GetMembersInZone(zoneid, team)
  1393. {
  1394.         new count = 0;
  1395.         new Float:px, Float:py, Float:pz;
  1396.         for(new i=0; i<MAX_PLAYERS; i++)
  1397.         {
  1398.             if(IsPlayerConnected(i))
  1399.             {
  1400.                 if(GetPlayerState(i) != PLAYER_STATE_WASTED && gTeam[i] == team)
  1401.                 {
  1402.                     GetPlayerPos(i, px, py, pz);
  1403.                             if(px > ZoneInfo[zoneid][z_minx] && py > ZoneInfo[zoneid][z_miny] && px < ZoneInfo[zoneid][z_maxx] && py < ZoneInfo[zoneid][z_maxy])
  1404.                             {
  1405.                                 count++;
  1406.                                 }
  1407.                         }
  1408.                 }
  1409.         }
  1410.         return count;
  1411. }
  1412.  
  1413. GetTeamColor(team)
  1414. {
  1415.         switch(team)
  1416.         {
  1417.             case TEAM_WORKER: return 0xFF8000AF;
  1418.                 case TEAM_MEDIC: return 0xFF80FF96;
  1419.             case TEAM_PIMP: return 0xE6000096;
  1420.             case TEAM_GOLFER: return 0xC1C10096;
  1421.             case TEAM_TRIAD: return 0xE800E896;
  1422.             case TEAM_MECHANIC: return 0x00E1E196;
  1423.             case TEAM_BIKER: return 0x0059B39B;
  1424.             case TEAM_SWAT: return 0x00800096;
  1425.             case TEAM_HICK: return 0x8E594096;
  1426.             case TEAM_PILOT: return 0x80808096;
  1427.             case TEAM_TORENO: return 0xFFCA9596;
  1428.             case TEAM_NANG: return 0xFF090996;
  1429.             case TEAM_CHICKEN: return 0xFFFF0096;
  1430.             case TEAM_ARMY: return 0x00800096;
  1431.         }
  1432.         return 0;
  1433. }
  1434.  
  1435. stock GetPlayerZone(playerid)
  1436. {
  1437.         if(GetPlayerState(playerid) != PLAYER_STATE_WASTED)
  1438.         {
  1439.                 new Float:px, Float:py, Float:pz;
  1440.                 GetPlayerPos(playerid, px, py, pz);
  1441.                 for(new i=0; i<MAX_ZONES; i++)
  1442.                 {
  1443.                     if(px > ZoneInfo[i][z_minx] && py > ZoneInfo[i][z_miny] && px < ZoneInfo[i][z_maxx] && py < ZoneInfo[i][z_maxy]) return i;
  1444.                 }
  1445.         }
  1446.         return -1;
  1447. }
  1448.  
  1449. public ZoneUpdate()
  1450. {
  1451.         for(new z=0; z < MAX_ZONES; z++)
  1452.         {
  1453.             if(ZoneTakeOverTeam[z] == -1)
  1454.             {
  1455.                 for(new t=0; t < MAX_TEAMS; t++)
  1456.                 {
  1457.                     if(t == ZoneInfo[z][z_team]) continue;
  1458.                     if(GetMembersInZone(z, t) >= 3)
  1459.                     {
  1460.                         ZoneTakeOverTeam[z] = t;
  1461.                         GangZoneFlashForAll(ZoneInfo[z][z_id], GetTeamColor(t));
  1462.                         ZoneTakeOverTime[z] = 0;
  1463.                                 }
  1464.                         }
  1465.                 }
  1466.                 else
  1467.                 {
  1468.                     if(GetMembersInZone(z, ZoneTakeOverTeam[z]) > 0)
  1469.                     {
  1470.                         ZoneTakeOverTime[z]++;
  1471.                         if(ZoneTakeOverTime[z] >= 120)
  1472.                         {
  1473.                             GangZoneStopFlashForAll(ZoneInfo[z][z_id]);
  1474.                         GangZoneShowForAll(ZoneInfo[z][z_id], GetTeamColor(ZoneTakeOverTeam[z]));
  1475.                         ZoneInfo[z][z_team] = ZoneTakeOverTeam[z];
  1476.                         for(new i=0; i<MAX_PLAYERS; i++)
  1477.                         {
  1478.                             if(IsPlayerConnected(i))
  1479.                             {
  1480.                                 if(GetPlayerZone(i) == z && gTeam[i] == ZoneTakeOverTeam[z])
  1481.                                 {
  1482.                                     SetPlayerScore(i, GetPlayerScore(i) + 2);
  1483.                                     pInfo[i][pKills] += 2;
  1484.                                     GameTextForPlayer(i, "~g~Turf ~r~taken over~n~~b~~h~+2 score", 6000, 3);
  1485.                                                         }
  1486.                                                 }
  1487.                                         }
  1488.                         ZoneTakeOverTeam[z] = -1;
  1489.                         ZoneTakeOverTime[z] = 0;
  1490.                                 }
  1491.                         }
  1492.                         else
  1493.                         {
  1494.                 ZoneTakeOverTeam[z] = -1;
  1495.                 GangZoneStopFlashForAll(ZoneInfo[z][z_id]);
  1496.                 ZoneTakeOverTime[z] = 0;
  1497.                         }
  1498.                 }
  1499.         }
  1500. }
  1501.  
  1502. IsPlayerJustice(playerid)
  1503. {
  1504.         if(gTeam[playerid] == TEAM_SWAT || gTeam[playerid] == TEAM_ARMY) return 1;
  1505.         else return 0;
  1506. }
  1507.  
  1508. SetPlayerClass(playerid, classid) {
  1509.  
  1510.         if(classid == 0) {
  1511.  
  1512.         gTeam[playerid] = TEAM_WORKER;
  1513.  
  1514.         } else if(classid == 1) {
  1515.  
  1516.         gTeam[playerid] = TEAM_PIMP;
  1517.  
  1518.         } else if(classid == 2) {
  1519.  
  1520.         gTeam[playerid] = TEAM_GOLFER;
  1521.  
  1522.         } else if(classid == 3) {
  1523.  
  1524.         gTeam[playerid] = TEAM_TRIAD;
  1525.  
  1526.         } else if(classid == 4) {
  1527.  
  1528.         gTeam[playerid] = TEAM_MECHANIC;
  1529.  
  1530.         } else if(classid == 5) {
  1531.  
  1532.         gTeam[playerid] = TEAM_BIKER;
  1533.  
  1534.         } else if(classid == 6) {
  1535.  
  1536.         gTeam[playerid] = TEAM_MEDIC;
  1537.  
  1538.         } else if(classid == 7) {
  1539.  
  1540.         gTeam[playerid] = TEAM_SWAT;
  1541.        
  1542.         } else if(classid == 8) {
  1543.  
  1544.         gTeam[playerid] = TEAM_HICK;
  1545.        
  1546.         } else if(classid == 9) {
  1547.  
  1548.         gTeam[playerid] = TEAM_PILOT;
  1549.        
  1550.         } else if(classid == 10) {
  1551.  
  1552.         gTeam[playerid] = TEAM_TORENO;
  1553.        
  1554.         } else if(classid == 11) {
  1555.  
  1556.         gTeam[playerid] = TEAM_NANG;
  1557.        
  1558.         } else if(classid == 12) {
  1559.  
  1560.         gTeam[playerid] = TEAM_CHICKEN;
  1561.        
  1562.         } else if(classid == 13) {
  1563.  
  1564.         gTeam[playerid] = TEAM_ARMY;
  1565.  
  1566.         }
  1567.  
  1568. }
  1569.  
  1570. public SettingPlayerTeam()
  1571. {
  1572.     for(new i; i < MAX_PLAYERS; i++)
  1573.     {
  1574.         if(IsPlayerConnected(i))
  1575.         {
  1576.                 SetPlayerTeam(i, gTeam[i]);
  1577.         }
  1578.     }
  1579. }
  1580.  
  1581. public DropPlayerWeapons(playerid)
  1582. {
  1583.     new playerweapons[13][2];
  1584.     new Float:x,Float:y,Float:z;
  1585.     GetPlayerPos(playerid, x, y, z);
  1586.  
  1587.         for(new i=0; i<13; i++)
  1588.         {
  1589.         GetPlayerWeaponData(playerid, i, playerweapons[i][0], playerweapons[i][1]);
  1590.         new model = GetWeaponModel(playerweapons[i][0]);
  1591.                 new times = floatround(playerweapons[i][1]/10.0001);
  1592.         new Float:X = x + (random(3) - random(3));
  1593.         new Float:Y = y + (random(3) - random(3));
  1594.         if(playerweapons[i][1] != 0 && model != -1)
  1595.                 {
  1596.                     if(times > DropLimit) times = DropLimit;
  1597.                 for(new a=0; a<times; a++)
  1598.                         {
  1599.                                 new pickupid = CreatePickup(model, 3, X, Y, z);
  1600.                                 SetTimerEx("DeletePickup", DeleteTime*1000, false, "d", pickupid);
  1601.                         }
  1602.                 }
  1603.         }
  1604.         return 1;
  1605. }
  1606.  
  1607. public DeletePickup(pickupid)
  1608. {
  1609.         DestroyPickup(pickupid);
  1610.         return 1;
  1611. }
  1612.  
  1613. GetWeaponModel(weaponid)
  1614. {
  1615.         switch(weaponid)
  1616.         {
  1617.             case 1: return 331; case 2: return 333; case 3: return 334;
  1618.                 case 4: return 335; case 5: return 336; case 6: return 337;
  1619.                 case 7: return 338; case 8: return 339; case 9: return 341;
  1620.                 case 10: return 321; case 11: return 322; case 12: return 323;
  1621.                 case 13: return 324; case 14: return 325; case 15: return 326;
  1622.                 case 16: return 342; case 17: return 343; case 18: return 344;
  1623.                 case 22: return 346; case 23: return 347; case 24: return 348;
  1624.                 case 25: return 349; case 26: return 350; case 27: return 351;
  1625.                 case 28: return 352; case 29: return 353; case 30: return 355;
  1626.                 case 31: return 356; case 32: return 372; case 33: return 357;
  1627.                 case 34: return 358; case 35: return 359; case 36: return 360;
  1628.                 case 37: return 361; case 38: return 362; case 39: return 363;
  1629.                 case 41: return 365; case 42: return 366; case 46: return 371;
  1630.         }
  1631.         return -1;
  1632. }
  1633.  
  1634. public OnPlayerPickUpPickup(playerid, pickupid)
  1635. {
  1636.         DestroyPickup(pickupid);
  1637.         return 1;
  1638. }
  1639.  
  1640. // spectating
  1641. public StopSpeccing(playerid)
  1642. {
  1643.         Killed[playerid] = -1;
  1644.         gSpectateID[playerid] = INVALID_PLAYER_ID;
  1645.         TogglePlayerSpectating(playerid, 0);
  1646.         TextDrawHideForPlayer (playerid, Textdraw0);
  1647. }
  1648.        
  1649. public SpecUpdate(playerid)
  1650. {
  1651.         for(new i=0; i<MAX_PLAYERS; i++)
  1652.         {
  1653.             if(IsPlayerConnected(i))
  1654.             {
  1655.                 if(gSpectateID[i] == playerid)
  1656.                 {
  1657.                     if(IsPlayerInAnyVehicle(playerid)) PlayerSpectateVehicle(i, GetPlayerVehicleID(playerid));
  1658.                     else PlayerSpectatePlayer(i, playerid);
  1659.                         }
  1660.                 }
  1661.         }
  1662.         return 1;
  1663. }
  1664.  
  1665. //-------------------commands----------
  1666. public OnPlayerCommandText(playerid, cmdtext[])
  1667. {
  1668.     new cmd[256];
  1669.         new string[256];
  1670.         new idx;
  1671.  
  1672.         cmd = strtok(cmdtext, idx);
  1673.  
  1674.         //commands
  1675.         if(strcmp(cmdtext, "/commands", true) == 0 || strcmp(cmdtext, "/help", true) == 0)
  1676.         {
  1677.            SendClientMessage(playerid, COLOR_YELLOW, "Commands: /kill, /report, /pm, /id, /me, /givecash, /turfhelp");
  1678.            return 1;
  1679.         }
  1680.  
  1681.         //kill
  1682.         if(strcmp(cmdtext, "/kill", true) == 0)
  1683.         {
  1684.            SetPlayerHealth(playerid, 0.0);
  1685.            return 1;
  1686.         }
  1687.  
  1688.     if(strcmp(cmdtext, "/turfhelp", true) == 0)
  1689.         {
  1690.            SendClientMessage(playerid, COLOR_RED, "_______________________________[TURF HELP]_________________________________");
  1691.            SendClientMessage(playerid, COLOR_YELLOW, "To take over a turf you need 3 team members on enemy's turf to start a war.");
  1692.            SendClientMessage(playerid, COLOR_YELLOW, "Your team must hold the turf for 4 minutes to win. If all of your team members");
  1693.            SendClientMessage(playerid, COLOR_YELLOW, "die or leave the turf, you will fail. If your team stays on the turf for 4 minutes,");
  1694.            SendClientMessage(playerid, COLOR_YELLOW, "turf will be taken over and you will receive +2 score.");
  1695.            return 1;
  1696.         }
  1697.  
  1698.         if(strcmp(cmd, "/stats", true) == 0)
  1699.          {
  1700.             new idplayer;
  1701.                 tmp2 = strtok(cmdtext, idx);
  1702.                 if(!strlen(tmp2))
  1703.                 {
  1704.                     ShowStats(playerid);
  1705.                         return 1;
  1706.                 }
  1707.                 idplayer = strval(tmp2);
  1708.  
  1709.                 if(IsPlayerConnected(idplayer))
  1710.                 {
  1711.                         new playername[MAX_PLAYER_NAME];
  1712.                         GetPlayerName(idplayer, playername, sizeof(playername));
  1713.                         format(string, sizeof(string), "%s's Stats:  Kills: %d | Deaths: %d | Ratio: %0.2f | Money: $%d",playername,pInfo[idplayer][pKills],pInfo[idplayer][pDeaths],Float:pInfo[idplayer][pKills]/Float:pInfo[idplayer][pDeaths],GetPlayerMoney(idplayer));
  1714.                         SendClientMessage(playerid, COLOR_GREEN, string);
  1715.                         return 1;
  1716.                 }
  1717.                 else
  1718.                 {
  1719.                         SendClientMessage(playerid, COLOR_RED, "Player Not Connected!");
  1720.                         return 1;
  1721.                 }
  1722.         }
  1723.          
  1724.     dcmd(login,5,cmdtext);
  1725.         dcmd(register,8,cmdtext);
  1726.         dcmd(report, 6, cmdtext);
  1727.         dcmd(givecash, 8, cmdtext);
  1728.         dcmd(id, 2, cmdtext);
  1729.         dcmd(me, 2, cmdtext);
  1730.        
  1731.         dcmd(kick, 4, cmdtext);
  1732.     dcmd(ban, 3, cmdtext);
  1733.     dcmd(banip, 5, cmdtext);
  1734.     dcmd(unbanip, 7, cmdtext);
  1735.     dcmd(freeze, 6, cmdtext);
  1736.     dcmd(unfreeze, 8, cmdtext);
  1737.     dcmd(killplayer, 10, cmdtext);
  1738.     dcmd(jail, 4, cmdtext);
  1739.     dcmd(unjail, 6, cmdtext);
  1740.     dcmd(slap, 4, cmdtext);
  1741.     dcmd(mute, 4, cmdtext);
  1742.     dcmd(unmute, 6, cmdtext);
  1743.     dcmd(explodeplayer, 13, cmdtext);
  1744.     dcmd(resetweapons, 12, cmdtext);
  1745.     dcmd(restart, 7, cmdtext);
  1746.     dcmd(lockserver, 10, cmdtext);
  1747.     dcmd(unlockserver, 12, cmdtext);
  1748.     dcmd(spec, 4, cmdtext);
  1749.     dcmd(specvehicle, 11, cmdtext);
  1750.     dcmd(specoff, 7, cmdtext);
  1751.     dcmd(settime, 7, cmdtext);
  1752.     dcmd(cs, 2, cmdtext);
  1753.     dcmd(setweather, 10, cmdtext);
  1754.     dcmd(setgravity, 10, cmdtext);
  1755.     dcmd(whois, 5, cmdtext);
  1756.     dcmd(skick, 5, cmdtext);
  1757.     dcmd(sban, 4, cmdtext);
  1758.     dcmd(sbanip, 6, cmdtext);
  1759.     dcmd(sfreeze, 7, cmdtext);
  1760.     dcmd(sunfreeze, 9, cmdtext);
  1761.     dcmd(skillplayer, 11, cmdtext);
  1762.     dcmd(sjail, 5, cmdtext);
  1763.     dcmd(sunjail, 7, cmdtext);
  1764.     dcmd(sslap, 5, cmdtext);
  1765.     dcmd(smute, 5, cmdtext);
  1766.     dcmd(sunmute, 7, cmdtext);
  1767.     dcmd(sexplodeplayer, 14, cmdtext);
  1768.     dcmd(sresetweapons, 13, cmdtext);
  1769.     dcmd(createmoney, 11, cmdtext);
  1770.     dcmd(deletemoney, 11, cmdtext);
  1771.     dcmd(srestart, 8, cmdtext);
  1772.     dcmd(slockserver, 11, cmdtext);
  1773.     dcmd(sunlockserver, 13, cmdtext);
  1774.     dcmd(setadmin, 8, cmdtext);
  1775.     dcmd(setkills, 8, cmdtext);
  1776.     dcmd(ahelp, 5, cmdtext);
  1777.     dcmd(goto, 4, cmdtext);
  1778.    
  1779.         return 0;
  1780. }
  1781.  
  1782. dcmd_register(playerid,params[])
  1783. {
  1784.         new playername[MAX_PLAYER_NAME];
  1785.         GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  1786.     if(udb_Exists(playername)) return SystemMsg(playerid,"Account already exists, please use '/login password'.");
  1787.         if(strlen(params)==0) return SystemMsg(playerid,"Correct usage: '/register password'");
  1788.         if(udb_Create(playername,params))
  1789.         {
  1790.                 SystemMsg(playerid,"Account successfully created. Login with '/login password' now.");
  1791.                 GivePlayerMoney(playerid,5000);
  1792.         }
  1793.         return 1;
  1794. }
  1795.  
  1796. dcmd_login(playerid,params[])
  1797. {
  1798.         if(LoggedIn[playerid] == 1) return SystemMsg(playerid,"You are already logged in!");
  1799.     new playername[MAX_PLAYER_NAME];
  1800.         GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  1801.         if(!udb_Exists(playername)) return SystemMsg(playerid,"Account doesn't exist, please use '/register password'.");
  1802.         if(strlen(params)==0) return SystemMsg(playerid,"Correct usage: '/login password'");
  1803.         if(udb_CheckLogin(playername,params)) // Login was correct
  1804.         {
  1805.         LoggedIn[playerid] = 1;
  1806.                 GivePlayerMoney(playerid,dUserINT(playername).("money"));
  1807.                 pInfo[playerid][pAdmin] = dUserINT(playername).("Admin");
  1808.                 pInfo[playerid][pDeaths] = dUserINT(playername).("deaths");
  1809.                 pInfo[playerid][pKills] = dUserINT(playername).("kills");
  1810.                 SetPlayerScore(playerid,pInfo[playerid][pKills] + GetPlayerScore(playerid));
  1811.         SetPlayerWantedLevel(playerid,dUserINT(playername).("Wantedlvl"));
  1812.  
  1813.         if(pInfo[playerid][pAdmin] == 0 )
  1814.                 {
  1815.                         SystemMsg(playerid,"You can now spawn");
  1816.                         return 1;
  1817.                 }
  1818.                 else if(pInfo[playerid][pAdmin] == 1)
  1819.                 {
  1820.                         SystemMsg(playerid,"Welcome back Moderator Lvl[1]");
  1821.                         return 1;
  1822.                 }
  1823.                 else if(pInfo[playerid][pAdmin] == 2)
  1824.                 {
  1825.                         SystemMsg(playerid,"Welcome back Chief Moderator Lvl[2]");
  1826.                         return 1;
  1827.                 }
  1828.                 else if(pInfo[playerid][pAdmin] == 3)
  1829.                 {
  1830.                         SystemMsg(playerid,"Welcome back Administrator Lvl[3]");
  1831.                         return 1;
  1832.                 }
  1833.                 else if(pInfo[playerid][pAdmin] == 4)
  1834.                 {
  1835.                         SystemMsg(playerid,"Welcome back Chief Administrator Lvl[4]");
  1836.                         return 1;
  1837.                 }
  1838.                 else if(pInfo[playerid][pAdmin] == 5)
  1839.                 {
  1840.                         SystemMsg(playerid,"Welcome back Server Owner Lvl[5]");
  1841.                         return 1;
  1842.                 }
  1843.                 return SystemMsg(playerid,"You have successfully logged into your account!");
  1844.         }
  1845.     return SystemMsg(playerid,"Login failed!");
  1846.  
  1847. }
  1848.  
  1849. dcmd_report(playerid, params[])
  1850. {
  1851.         new index = 0;
  1852.     tmp2 = strtok(params, index);
  1853.     if(!strlen(tmp2))
  1854.         {
  1855.                 SystemMessage(playerid, "Correct usage: '/report [playername] [reason]'");
  1856.                 return 1;
  1857.         }
  1858.         new string[MAX_STRING];
  1859.         new second, minute, hour, day, month, year;
  1860.     giveplayerid = ReturnUser(tmp2);
  1861.         if (IsPlayerConnected(giveplayerid))
  1862.         {
  1863.             format(string, sizeof(string), "Report was sent to currently administrators/moderators online.");
  1864.             SystemMessage(giveplayerid, string);
  1865.                 format(string, sizeof(string), "Report: %s has reported %s. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), params);
  1866.             SendMessageToAdmins(string);
  1867.                 print(string);
  1868.                 gettime(hour, minute, second);
  1869.                 getdate(year, month, day);
  1870.                 format(string, sizeof(string), "Player %s reported player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  1871.                 ServerLog(string);
  1872.     }
  1873.         else
  1874.     {
  1875.                 SystemMessage(playerid, "That player is not active.");
  1876.         }
  1877.     return 1;
  1878. }
  1879.  
  1880. dcmd_givecash(playerid, params[])
  1881. {
  1882.         new amount, str[128];
  1883.         if(sscanf(params, "ud", giveplayerid, amount)) return SystemMessage(playerid, "Correct usage: '/givecash [playername] [amount]'");
  1884.         if(!IsPlayerConnected(giveplayerid) || giveplayerid == playerid) return SystemMessage(playerid, "This player is not active.");
  1885.         if(amount < 1 || amount > GetPlayerMoney(playerid)) return SystemMessage(playerid, "Invalid amount!");
  1886.         GetName(playerid, playername);
  1887.         GetName(giveplayerid, giveplayer);
  1888.         GivePlayerMoney(playerid, -amount);
  1889.         GivePlayerMoney(giveplayerid, amount);
  1890.         format(str, sizeof(str), "You have sent $%d to %s (%d)", amount, giveplayer, giveplayerid);
  1891.         SystemMessage(playerid, str);
  1892.         format(str, sizeof(str), "%s (%d) has sent you $%d", playername, playerid, amount);
  1893.         SystemMessage(giveplayerid, str);
  1894.         return 1;
  1895. }
  1896.  
  1897. dcmd_me(playerid, params[])
  1898. {
  1899.         new message[128], str[128];
  1900.         if(sscanf(params, "s", message)) return SystemMessage(playerid, "Correct usage: '/me [message]'");
  1901.         new pName[MAX_PLAYER_NAME];
  1902.         GetPlayerName(playerid, pName, sizeof(pName));
  1903.         format(str, sizeof(str), "*** %s %s", pName, message);
  1904.         SendClientMessageToAll(COLOR_ORANGE, str);
  1905.         return 1;
  1906. }
  1907.  
  1908. dcmd_id(playerid, params[])
  1909. {
  1910.         new pid, str[128];
  1911.         if(sscanf(params, "u", pid)) return SystemMessage(playerid, "Correct usage: '/id [playername]'");
  1912.         if(!IsPlayerConnected(pid)) return SystemMessage(playerid, "That player is not active.");
  1913.         format(str, sizeof(str), "ID: (%d) %s", pid, PlayerName(pid));
  1914.         SendClientMessage(playerid, COLOR_GREY, str);
  1915.         return 1;
  1916. }
  1917.  
  1918. dcmd_kick(playerid, params[])
  1919. {
  1920.         new index = 0;
  1921.     tmp2 = strtok(params, index);
  1922.         if (pInfo[playerid][pAdmin] == 0)
  1923.         {
  1924.                 SystemMessage(playerid, "You are not Administrator.");
  1925.                 return 1;
  1926.         }
  1927.     if(!strlen(tmp2))
  1928.         {
  1929.                 SystemMessage(playerid, "Correct usage: '/kick [playername] [reason]'");
  1930.                 return 1;
  1931.         }
  1932.         new string[MAX_STRING];
  1933.         new second, minute, hour, day, month, year;
  1934.     giveplayerid = ReturnUser(tmp2);
  1935.         if (IsPlayerConnected(giveplayerid))
  1936.         {
  1937.             format(string, sizeof(string), "You have been kicked by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  1938.             SystemMessage(giveplayerid, string);
  1939.             format(string, sizeof(string), "Player %s has been kicked by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  1940.             SystemMessageToAll(string);
  1941.                 format(string, sizeof(string), "%s has been kicked by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  1942.                 print(string);
  1943.                 gettime(hour, minute, second);
  1944.                 getdate(year, month, day);
  1945.                 format(string, sizeof(string), "Player %s kicked player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  1946.                 ServerLog(string);
  1947.                 KickPlayer(giveplayerid, "");
  1948.     }
  1949.         else
  1950.     {
  1951.                 SystemMessage(playerid, "That player is not active.");
  1952.         }
  1953.     return 1;
  1954. }
  1955.  
  1956. dcmd_ban(playerid, params[])
  1957. {
  1958.         new index = 0;
  1959.     tmp2 = strtok(params, index);
  1960.         if (pInfo[playerid][pAdmin] == 0)
  1961.         {
  1962.                 SystemMessage(playerid, "You are not Administrator.");
  1963.                 return 1;
  1964.         }
  1965.     if(!strlen(tmp2))
  1966.         {
  1967.                 SystemMessage(playerid, "Correct usage: '/ban [playername] [reason]'");
  1968.                 return 1;
  1969.         }
  1970.         new string[MAX_STRING];
  1971.         new second, minute, hour, day, month, year;
  1972.     giveplayerid = ReturnUser(tmp2);
  1973.         if (IsPlayerConnected(giveplayerid))
  1974.         {
  1975.                 format(string, sizeof(string), "You have been banned by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  1976.                 SystemMessage(giveplayerid, string);
  1977.             if(dini_Exists(KICKPORTAL))
  1978.             {
  1979.                     new File:fhandle;
  1980.                     new temp[256];
  1981.                     fhandle = fopen(KICKPORTAL, io_append);
  1982.                     format(temp, sizeof(temp), "\n%s", PlayerName(giveplayerid));
  1983.                     fwrite(fhandle, temp);
  1984.                     fclose(fhandle);
  1985.             }
  1986.                 format(string, sizeof(string), "Player %s has been banned by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  1987.                 SystemMessageToAll(string);
  1988.                 format(string, sizeof(string), "%s has been banned by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  1989.                 print(string);
  1990.                 gettime(hour, minute, second);
  1991.                 getdate(year, month, day);
  1992.                 format(string, sizeof(string), "Player %s banned player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  1993.                 ServerLog(string);
  1994.                 KickPlayer(giveplayerid, "");
  1995.     }
  1996.         else
  1997.     {
  1998.                 SystemMessage(playerid, "That player is not active.");
  1999.         }
  2000.     return 1;
  2001. }
  2002.  
  2003. dcmd_banip(playerid, params[])
  2004. {
  2005.         new index = 0;
  2006.     tmp2 = strtok(params, index);
  2007.         if (pInfo[playerid][pAdmin] == 0)
  2008.         {
  2009.                 SystemMessage(playerid, "You are not Administrator.");
  2010.                 return 1;
  2011.         }
  2012.     if(!strlen(tmp2))
  2013.         {
  2014.                 SystemMessage(playerid, "Correct usage: '/banip [playername] [reason]'");
  2015.                 return 1;
  2016.         }
  2017.         new string[MAX_STRING];
  2018.         new second, minute, hour, day, month, year;
  2019.         giveplayerid = ReturnUser(tmp2);
  2020.         if (IsPlayerConnected(giveplayerid))
  2021.         {
  2022.                 format(string, sizeof(string), "You have been IP banned by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2023.                 SendClientMessage(giveplayerid, COLOR_SYSTEM, string);
  2024.                 format(string, sizeof(string), "Player %s has been IP banned by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2025.                 SendClientMessageToAll(COLOR_SYSTEM, string);
  2026.                 format(string, sizeof(string), "%s has been IP banned by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2027.                 print(string);
  2028.                 gettime(hour, minute, second);
  2029.                 getdate(year, month, day);
  2030.                 format(string,sizeof(string),"Player %s IP banned player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2031.                 ServerLog(string);
  2032.                 BanPlayer(giveplayerid, "");
  2033.     }
  2034.         else
  2035.     {
  2036.                 SendClientMessage(playerid, COLOR_SYSTEM, "That player is not active.");
  2037.         }
  2038.     return 1;
  2039. }
  2040.  
  2041. dcmd_unbanip(playerid, params[])
  2042. {
  2043.         if (pInfo[playerid][pAdmin] == 0)
  2044.         {
  2045.         SystemMessage(playerid, "You are not Administrator.");
  2046.         return 1;
  2047.         }
  2048.     if(!strlen(params)) return SystemMessage(playerid, "Correct usage: '/unbanip [ip]'");
  2049.     new string[MAX_STRING];
  2050.         format(string, sizeof(string), "IP %s unbanned.", params);
  2051.     SystemMessage(playerid, string);
  2052.     format(string, sizeof(string), "unbanip %s", params);
  2053.         SendRconCommandEx(0, string);
  2054.         return 1;
  2055. }
  2056.  
  2057. dcmd_freeze(playerid, params[])
  2058. {
  2059.         new index = 0;
  2060.     tmp2 = strtok(params, index);
  2061.         if (pInfo[playerid][pAdmin] == 0)
  2062.         {
  2063.         SystemMessage(playerid, "You are not Administrator.");
  2064.         return 1;
  2065.         }
  2066.     if(!strlen(tmp2))
  2067.         {
  2068.         SystemMessage(playerid, "Correct usage: '/freeze [playername] [reason]'");
  2069.         return 1;
  2070.         }
  2071.         new string[MAX_STRING];
  2072.         new second, minute, hour, day, month, year;
  2073.     giveplayerid = ReturnUser(tmp2);
  2074.         if (IsPlayerConnected(giveplayerid))
  2075.         {
  2076.     format(string, sizeof(string), "You have been freezed by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2077.     SystemMessage(giveplayerid, string);
  2078.         FreezePlayer(giveplayerid, "");
  2079.     format(string, sizeof(string), "Player %s has been freezed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2080.     SystemMessageToAll(string);
  2081.         format(string, sizeof(string), "%s has been freezed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2082.         print(string);
  2083.         gettime(hour, minute, second);
  2084.         getdate(year, month, day);
  2085.         format(string, sizeof(string), "Player %s freezed player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2086.         ServerLog(string);
  2087.     }
  2088.         else
  2089.     {
  2090.         SystemMessage(playerid, "That player is not active.");
  2091.         }
  2092.     return 1;
  2093. }
  2094.  
  2095. dcmd_unfreeze(playerid, params[])
  2096. {
  2097.         new index = 0;
  2098.     tmp2 = strtok(params, index);
  2099.         if (pInfo[playerid][pAdmin] == 0)
  2100.         {
  2101.         SystemMessage(playerid, "You are not Administrator.");
  2102.         return 1;
  2103.         }
  2104.     if(!strlen(tmp2))
  2105.         {
  2106.         SystemMessage(playerid, "Correct usage: '/unfreeze [playername] [reason]'");
  2107.         return 1;
  2108.         }
  2109.         new string[MAX_STRING];
  2110.         new second, minute, hour, day, month, year;
  2111.     giveplayerid = ReturnUser(tmp2);
  2112.         if (IsPlayerConnected(giveplayerid))
  2113.         {
  2114.     format(string, sizeof(string), "You have been unfreezed by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2115.     SystemMessage(giveplayerid, string);
  2116.         UnfreezePlayer(giveplayerid, "");
  2117.     format(string, sizeof(string), "Player %s has been unfreezed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2118.     SystemMessageToAll(string);
  2119.         format(string, sizeof(string), "%s has been unfreezed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2120.         print(string);
  2121.         gettime(hour, minute, second);
  2122.         getdate(year, month, day);
  2123.         format(string, sizeof(string), "Player %s unfreezed player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2124.         ServerLog(string);
  2125.     }
  2126.         else
  2127.     {
  2128.         SystemMessage(playerid, "That player is not active.");
  2129.         }
  2130.     return 1;
  2131. }
  2132.  
  2133. dcmd_killplayer(playerid, params[])
  2134. {
  2135.         new index = 0;
  2136.     tmp2 = strtok(params, index);
  2137.         if (pInfo[playerid][pAdmin] == 0)
  2138.         {
  2139.         SystemMessage(playerid, "You are not Administrator.");
  2140.         return 1;
  2141.         }
  2142.     if(!strlen(tmp2))
  2143.         {
  2144.         SystemMessage(playerid, "Correct usage: '/killplayer [playername] [reason]'");
  2145.         return 1;
  2146.         }
  2147.         new string[MAX_STRING];
  2148.         new second, minute, hour, day, month, year;
  2149.     giveplayerid = ReturnUser(tmp2);
  2150.         if (IsPlayerConnected(giveplayerid))
  2151.         {
  2152.     format(string, sizeof(string), "You have been killed by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2153.     SystemMessage(giveplayerid, string);
  2154.         KillPlayer(giveplayerid, "");
  2155.     format(string, sizeof(string), "Player %s has been killed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2156.     SystemMessageToAll(string);
  2157.         format(string, sizeof(string), "%s has been killed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2158.         print(string);
  2159.         gettime(hour, minute, second);
  2160.         getdate(year, month, day);
  2161.         format(string, sizeof(string), "Player %s killed player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2162.         ServerLog(string);
  2163.     }
  2164.         else
  2165.     {
  2166.         SystemMessage(playerid, "That player is not active.");
  2167.         }
  2168.     return 1;
  2169. }
  2170.  
  2171. dcmd_jail(playerid, params[])
  2172. {
  2173.         new index = 0;
  2174.     tmp2 = strtok(params, index);
  2175.         if (pInfo[playerid][pAdmin] == 0)
  2176.         {
  2177.         SystemMessage(playerid, "You are not Administrator.");
  2178.         return 1;
  2179.         }
  2180.     if(!strlen(tmp2))
  2181.         {
  2182.         SystemMessage(playerid, "Correct usage: '/jail [playername] [reason]'");
  2183.         return 1;
  2184.         }
  2185.         new string[MAX_STRING];
  2186.         new second, minute, hour, day, month, year;
  2187.     giveplayerid = ReturnUser(tmp2);
  2188.         if (IsPlayerConnected(giveplayerid))
  2189.         {
  2190.     format(string, sizeof(string), "You have been jailed by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2191.     SystemMessage(giveplayerid, string);
  2192.         JailPlayer(giveplayerid, "");
  2193.     format(string, sizeof(string), "Player %s has been jailed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2194.     SystemMessageToAll(string);
  2195.         format(string, sizeof(string), "%s has been jailed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2196.         print(string);
  2197.         gettime(hour, minute, second);
  2198.         getdate(year, month, day);
  2199.         format(string, sizeof(string), "Player %s jailed player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2200.         ServerLog(string);
  2201.     }
  2202.         else
  2203.     {
  2204.         SystemMessage(playerid, "That player is not active.");
  2205.         }
  2206.     return 1;
  2207. }
  2208.  
  2209. dcmd_unjail(playerid, params[])
  2210. {
  2211.         new index = 0;
  2212.     tmp2 = strtok(params, index);
  2213.         if (pInfo[playerid][pAdmin] == 0)
  2214.         {
  2215.         SystemMessage(playerid, "You are not Administrator.");
  2216.         return 1;
  2217.         }
  2218.     if(!strlen(tmp2))
  2219.         {
  2220.         SystemMessage(playerid, "Correct usage: '/unjail [playername] [reason]'");
  2221.         return 1;
  2222.         }
  2223.         new string[MAX_STRING];
  2224.         new second, minute, hour, day, month, year;
  2225.     giveplayerid = ReturnUser(tmp2);
  2226.         if (IsPlayerConnected(giveplayerid))
  2227.         {
  2228.     format(string, sizeof(string), "You have been unjailed by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2229.     SystemMessage(giveplayerid, string);
  2230.         UnjailPlayer(giveplayerid, "");
  2231.     format(string, sizeof(string), "Player %s has been unjailed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2232.     SystemMessageToAll(string);
  2233.         format(string, sizeof(string), "%s has been unjailed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2234.         print(string);
  2235.         gettime(hour, minute, second);
  2236.         getdate(year, month, day);
  2237.         format(string, sizeof(string), "Player %s unjailed player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2238.         ServerLog(string);
  2239.     }
  2240.         else
  2241.     {
  2242.         SystemMessage(playerid, "That player is not active.");
  2243.         }
  2244.     return 1;
  2245. }
  2246.  
  2247. dcmd_slap(playerid, params[])
  2248. {
  2249.         new index = 0;
  2250.     tmp2 = strtok(params, index);
  2251.         if (pInfo[playerid][pAdmin] == 0)
  2252.         {
  2253.         SystemMessage(playerid, "You are not Administrator.");
  2254.         return 1;
  2255.         }
  2256.     if(!strlen(tmp2))
  2257.         {
  2258.         SystemMessage(playerid, "Correct usage: '/slap [playername] [reason]'");
  2259.         return 1;
  2260.         }
  2261.         new string[MAX_STRING];
  2262.         new second, minute, hour, day, month, year;
  2263.     giveplayerid = ReturnUser(tmp2);
  2264.         if (IsPlayerConnected(giveplayerid))
  2265.         {
  2266.     format(string, sizeof(string), "You have been slapped by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2267.     SystemMessage(giveplayerid, string);
  2268.         SlapPlayer(giveplayerid, "");
  2269.     format(string, sizeof(string), "Player %s has been slapped by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2270.     SystemMessageToAll(string);
  2271.         format(string, sizeof(string), "%s has been slapped by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2272.         print(string);
  2273.         gettime(hour, minute, second);
  2274.         getdate(year, month, day);
  2275.         format(string, sizeof(string), "Player %s slapped player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2276.         ServerLog(string);
  2277.     }
  2278.         else
  2279.     {
  2280.         format(string, sizeof(string), "That player is not active.");
  2281.         SystemMessage(playerid, string);
  2282.         }
  2283.     return 1;
  2284. }
  2285.  
  2286. dcmd_mute(playerid, params[])
  2287. {
  2288.         new index = 0;
  2289.     tmp2 = strtok(params, index);
  2290.         if (pInfo[playerid][pAdmin] == 0)
  2291.         {
  2292.         SystemMessage(playerid, "You are not Administrator.");
  2293.         return 1;
  2294.         }
  2295.     if(!strlen(tmp2))
  2296.         {
  2297.         SystemMessage(playerid, "Correct usage: '/mute [playername] [reason]'");
  2298.         return 1;
  2299.         }
  2300.         new string[MAX_STRING];
  2301.         new second, minute, hour, day, month, year;
  2302.     giveplayerid = ReturnUser(tmp2);
  2303.         if (IsPlayerConnected(giveplayerid))
  2304.         {
  2305.     format(string, sizeof(string), "You have been muted by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2306.     SystemMessage(giveplayerid, string);
  2307.         MutePlayer(giveplayerid, "");
  2308.     format(string, sizeof(string), "Player %s has been muted by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2309.     SystemMessageToAll(string);
  2310.         format(string, sizeof(string), "%s has been muted by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2311.         print(string);
  2312.         gettime(hour, minute, second);
  2313.         getdate(year, month, day);
  2314.         format(string, sizeof(string), "Player %s muted player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2315.         ServerLog(string);
  2316.     }
  2317.         else
  2318.     {
  2319.         format(string, sizeof(string), "That player is not active.");
  2320.         SystemMessage(playerid, string);
  2321.         }
  2322.     return 1;
  2323. }
  2324.  
  2325. dcmd_unmute(playerid, params[])
  2326. {
  2327.         new index = 0;
  2328.     tmp2 = strtok(params, index);
  2329.         if (pInfo[playerid][pAdmin] == 0)
  2330.         {
  2331.         SystemMessage(playerid, "You are not Administrator.");
  2332.         return 1;
  2333.         }
  2334.     if(!strlen(tmp2))
  2335.         {
  2336.         SystemMessage(playerid, "Correct usage: '/unmute [playername] [reason]'");
  2337.         return 1;
  2338.         }
  2339.         new string[MAX_STRING];
  2340.         new second, minute, hour, day, month, year;
  2341.     giveplayerid = ReturnUser(tmp2);
  2342.         if (IsPlayerConnected(giveplayerid))
  2343.         {
  2344.     format(string, sizeof(string), "You have been unmuted by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2345.     SystemMessage(giveplayerid, string);
  2346.         UnmutePlayer(giveplayerid, "");
  2347.     format(string, sizeof(string), "Player %s has been unmuted by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2348.     SystemMessageToAll(string);
  2349.         format(string, sizeof(string), "%s has been unmuted by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2350.         print(string);
  2351.         gettime(hour, minute, second);
  2352.         getdate(year, month, day);
  2353.         format(string, sizeof(string), "Player %s unmuted player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2354.         ServerLog(string);
  2355.     }
  2356.         else
  2357.     {
  2358.         format(string, sizeof(string), "That player is not active.");
  2359.         SystemMessage(playerid, string);
  2360.         }
  2361.     return 1;
  2362. }
  2363.  
  2364. dcmd_explodeplayer(playerid, params[])
  2365. {
  2366.         new index = 0;
  2367.     tmp2 = strtok(params, index);
  2368.         if (pInfo[playerid][pAdmin] == 0)
  2369.         {
  2370.         SystemMessage(playerid, "You are not Administrator.");
  2371.         return 1;
  2372.         }
  2373.     if(!strlen(tmp2))
  2374.         {
  2375.         SystemMessage(playerid, "Correct usage: '/explodeplayer [playername] [reason]'");
  2376.         return 1;
  2377.         }
  2378.         new string[MAX_STRING];
  2379.         new second, minute, hour, day, month, year;
  2380.     giveplayerid = ReturnUser(tmp2);
  2381.         if (IsPlayerConnected(giveplayerid))
  2382.         {
  2383.     format(string, sizeof(string), "You have been exploded by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2384.     SystemMessage(giveplayerid, string);
  2385.         ExplodePlayer(giveplayerid, "");
  2386.     format(string, sizeof(string), "Player %s has been exploded by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2387.     SystemMessageToAll(string);
  2388.         format(string, sizeof(string), "%s has been exploded by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2389.         print(string);
  2390.         gettime(hour, minute, second);
  2391.         getdate(year, month, day);
  2392.         format(string, sizeof(string), "Player %s exploded player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2393.         ServerLog(string);
  2394.     }
  2395.         else
  2396.     {
  2397.         format(string, sizeof(string), "That player is not active.");
  2398.         SystemMessage(playerid, string);
  2399.         }
  2400.     return 1;
  2401. }
  2402.  
  2403. dcmd_resetweapons(playerid, params[])
  2404. {
  2405.         new index = 0;
  2406.     tmp2 = strtok(params, index);
  2407.         if (pInfo[playerid][pAdmin] == 0)
  2408.         {
  2409.         SystemMessage(playerid, "You are not Administrator.");
  2410.         return 1;
  2411.         }
  2412.     if(!strlen(tmp2))
  2413.         {
  2414.         SystemMessage(playerid, "Correct usage: '/resetweapons [playername] [reason]'");
  2415.         return 1;
  2416.         }
  2417.         new string[MAX_STRING];
  2418.         new second, minute, hour, day, month, year;
  2419.     giveplayerid = ReturnUser(tmp2);
  2420.         if (IsPlayerConnected(giveplayerid))
  2421.         {
  2422.     format(string, sizeof(string), "Your all weapons have been reseted by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2423.     SystemMessage(giveplayerid, string);
  2424.         ResetPlayerWeapons(giveplayerid);
  2425.     format(string, sizeof(string), "Administrator %s reseted all weapons on player %s. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), params);
  2426.     SystemMessageToAll(string);
  2427.         format(string, sizeof(string), "Administrator %s reseted all weapons on player %s. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), params);
  2428.         print(string);
  2429.         gettime(hour, minute, second);
  2430.         getdate(year, month, day);
  2431.         format(string, sizeof(string), "Player %s reseted all weapons to player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2432.         ServerLog(string);
  2433.     }
  2434.         else
  2435.     {
  2436.         format(string, sizeof(string), "That player is not active.");
  2437.         SystemMessage(playerid, string);
  2438.         }
  2439.     return 1;
  2440. }
  2441.  
  2442. dcmd_restart(playerid, params[])
  2443. {
  2444.         #pragma unused params
  2445.         if (pInfo[playerid][pAdmin] == 0)
  2446.         {
  2447.         SystemMessage(playerid, "You are not Administrator.");
  2448.         return 1;
  2449.         }
  2450.         SystemMessageToAll("Current gamemode will restart in 5 seconds.");
  2451.         SetTimer("Restart", 5000, 0);
  2452.     return 1;
  2453. }
  2454.  
  2455. dcmd_lockserver(playerid, params[])
  2456. {
  2457.         #pragma unused params
  2458.         if (pInfo[playerid][pAdmin] == 0)
  2459.         {
  2460.         SystemMessage(playerid, "You are not Administrator.");
  2461.         return 1;
  2462.         }
  2463.         new string[MAX_STRING];
  2464.     IsServerLocked = true;
  2465.     format(string, sizeof(string), "Server has been locked by Administrator %s.", PlayerName(playerid));
  2466.         SystemMessageToAll(string);
  2467.         print(string);
  2468.     return 1;
  2469. }
  2470.  
  2471. dcmd_unlockserver(playerid, params[])
  2472. {
  2473.         #pragma unused params
  2474.         if (pInfo[playerid][pAdmin] == 0)
  2475.         {
  2476.         SystemMessage(playerid, "You are not Administrator.");
  2477.         return 1;
  2478.         }
  2479.         new string[MAX_STRING];
  2480.         IsServerLocked = false;
  2481.     format(string, sizeof(string), "Server has been unlocked by Administrator %s.", PlayerName(playerid));
  2482.         SystemMessageToAll(string);
  2483.         print(string);
  2484.     return 1;
  2485. }
  2486.  
  2487. dcmd_spec(playerid, params[])
  2488. {
  2489.         new index = 0;
  2490.     tmp2 = strtok(params, index);
  2491.         if (pInfo[playerid][pAdmin] == 0)
  2492.         {
  2493.                 SystemMessage(playerid, "You are not Administrator.");
  2494.                 return 1;
  2495.         }
  2496.     if(!strlen(tmp2))
  2497.         {
  2498.                 SystemMessage(playerid, "Correct usage: '/spec [playername]'");
  2499.                 return 1;
  2500.         }
  2501.         new string[MAX_STRING];
  2502.         new second, minute, hour, day, month, year;
  2503.         giveplayerid = ReturnUser(tmp2);
  2504.         if(IsPlayerConnected(giveplayerid))
  2505.         {
  2506.                 TogglePlayerSpectating(playerid, 1);
  2507.                 if(IsPlayerInAnyVehicle(giveplayerid)) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(giveplayerid));
  2508.                 else PlayerSpectatePlayer(playerid, giveplayerid);
  2509.                 SetPlayerInterior(playerid, GetPlayerInterior(giveplayerid));
  2510.                 gSpectateID[playerid] = giveplayerid;
  2511.                 gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER;
  2512.                 gettime(hour, minute, second);
  2513.                 getdate(year, month, day);
  2514.                 format(string, sizeof(string), "Player %s started spectating player %s on %d/%d/%d at %d:%d:%d.", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second);
  2515.                 ServerLog(string);
  2516.                 printf(string);
  2517.         }
  2518.         else
  2519.     {
  2520.         format(string, sizeof(string), "That player is not active.");
  2521.         SystemMessage(playerid, string);
  2522.         }
  2523.         return 1;
  2524. }
  2525.  
  2526. dcmd_specvehicle(playerid, params[])
  2527. {
  2528.         new index = 0;
  2529.     tmp2 = strtok(params, index);
  2530.     new specvehicleid;
  2531.         if (pInfo[playerid][pAdmin] == 0)
  2532.         {
  2533.         SystemMessage(playerid, "You are not Administrator.");
  2534.         return 1;
  2535.         }
  2536.         if(!strlen(tmp2))
  2537.         {
  2538.         SystemMessage(playerid, "Correct usage: '/specvehicle [vehicleid]'");
  2539.         return 1;
  2540.         }
  2541.         specvehicleid = strval(tmp2);
  2542.         if(specvehicleid < MAX_VEHICLES)
  2543.         {
  2544.         TogglePlayerSpectating(playerid, 1);
  2545.         PlayerSpectateVehicle(playerid, specvehicleid);
  2546.         gSpectateID[playerid] = specvehicleid;
  2547.         gSpectateType[playerid] = ADMIN_SPEC_TYPE_VEHICLE;
  2548.         }
  2549.         else
  2550.         {
  2551.         SystemMessage(playerid, "Correct usage: '/specvehicle [vehicleid]'");
  2552.         }
  2553.         return 1;
  2554. }
  2555.  
  2556. dcmd_specoff(playerid, params[])
  2557. {
  2558.         #pragma unused params
  2559.         if (pInfo[playerid][pAdmin] == 0)
  2560.         {
  2561.         SystemMessage(playerid, "You are not Administrator.");
  2562.         return 1;
  2563.         }
  2564.     TogglePlayerSpectating(playerid, 0);
  2565.     gSpectateID[playerid] = INVALID_PLAYER_ID;
  2566.     gSpectateType[playerid] = ADMIN_SPEC_TYPE_NONE;
  2567.         return 1;
  2568. }
  2569.  
  2570. dcmd_settime(playerid, params[])
  2571. {
  2572.         new index = 0;
  2573.     tmp2 = strtok(params, index);
  2574.     new time;
  2575.         if (pInfo[playerid][pAdmin] == 0)
  2576.         {
  2577.         SystemMessage(playerid, "You are not Administrator.");
  2578.         return 1;
  2579.         }
  2580.         if(!strlen(tmp2) || !IsNumeric(tmp2))
  2581.         {
  2582.         SendClientMessage(playerid, COLOR_SYSTEM, "Correct usage: '/settime [hour]'");
  2583.         return 1;
  2584.         }
  2585.         time = strval(tmp2);
  2586.         SetWorldTime(time);
  2587.         SystemMessage(playerid, "New time setted.");
  2588.         return 1;
  2589. }
  2590.  
  2591. dcmd_cs(playerid, params[])
  2592. {
  2593.         new index = 0;
  2594.     tmp2 = strtok(params, index);
  2595.     new skin;
  2596.         if (pInfo[playerid][pAdmin] == 0)
  2597.         {
  2598.                 SystemMessage(playerid, "You are not Administrator.");
  2599.                 return 1;
  2600.         }
  2601.         if(!strlen(tmp2) || !IsNumeric(tmp2) || IsInvalidSkin(skin))
  2602.         {
  2603.                 SystemMessage(playerid, "Correct usage: '/cs [skinid]'");
  2604.                 return 1;
  2605.         }
  2606.         if(skin > 299 || skin < 0)
  2607.         {
  2608.                 SystemMessage(playerid, "Pick a skin from 0-299.");
  2609.                 return 1;
  2610.         }
  2611.         skin = strval(tmp2);
  2612.         SetPlayerSkin(playerid, skin);
  2613.         SystemMessage(playerid, "Skin changed.");
  2614.         return 1;
  2615. }
  2616.  
  2617. dcmd_setweather(playerid, params[])
  2618. {
  2619.         if (pInfo[playerid][pAdmin] == 0)
  2620.         {
  2621.                 SystemMessage(playerid, "You are not Administrator.");
  2622.                 return 1;
  2623.         }
  2624.     if(!strlen(params)) return SystemMessage(playerid, "Correct usage: '/setweather [weatherid]'");
  2625.     new string[MAX_STRING];
  2626.     new index = 0;
  2627.     tmp2 = strtok(params, index);
  2628.     new toweatherid = strval(tmp2);
  2629.     if(toweatherid < 41 && toweatherid > -1)
  2630.     {
  2631.                 format(string, sizeof(string), "Setted new weather. (%d)", toweatherid);
  2632.             SystemMessage(playerid, string);
  2633.             format(string, sizeof(string), "weather %d", toweatherid);
  2634.                 SendRconCommandEx(0, string);
  2635.         }
  2636.         else
  2637.         {
  2638.                 SystemMessage(playerid, "Enter weather id from 0 to 40.");
  2639.         }
  2640.         return 1;
  2641. }
  2642.  
  2643. dcmd_setgravity(playerid, params[])
  2644. {
  2645.         if (pInfo[playerid][pAdmin] == 0)
  2646.         {
  2647.                 SystemMessage(playerid, "You are not Administrator.");
  2648.                 return 1;
  2649.         }
  2650.     if(!strlen(params)) return SystemMessage(playerid, "Correct usage: '/setgravity [gravity]'");
  2651.     new string[MAX_STRING];
  2652.     new index = 0;
  2653.     tmp2 = strtok(params, index);
  2654.     new Float:togravityid = floatstr(tmp2);
  2655.     if(togravityid < 41 && togravityid > -1)
  2656.     {
  2657.                 format(string, sizeof(string), "Setted new gravity. (%f)", togravityid);
  2658.             SystemMessage(playerid, string);
  2659.             format(string, sizeof(string), "gravity %f", togravityid);
  2660.                 SendRconCommandEx(0, string);
  2661.         }
  2662.         else
  2663.         {
  2664.                 SystemMessage(playerid, "Enter gravity id from 0 to 40.");
  2665.         }
  2666.         return 1;
  2667. }
  2668.  
  2669. dcmd_whois(playerid, params[])
  2670. {
  2671.     new index = 0;
  2672.         new playermoney;
  2673.     tmp2 = strtok(params, index);
  2674.         if (pInfo[playerid][pAdmin] == 0)
  2675.         {
  2676.                 SystemMessage(playerid, "You are not Administrator.");
  2677.                 return 1;
  2678.         }
  2679.     if(!strlen(tmp2))
  2680.         {
  2681.                 SystemMessage(playerid, "Correct usage: '/whois [playername]'");
  2682.                 return 1;
  2683.         }
  2684.         new string[MAX_STRING];
  2685.         giveplayerid = ReturnUser(tmp2);
  2686.         if (IsPlayerConnected(giveplayerid))
  2687.         {
  2688.                 playermoney = GetPlayerMoney(giveplayerid);
  2689.                 format(string, sizeof(string), "Whois (Name: %s, ID: %d, money: $%d)", PlayerName(giveplayerid), giveplayerid, playermoney);
  2690.                 SystemMessage(playerid, string);
  2691.         }
  2692.         else
  2693.     {
  2694.                 format(string, sizeof(string), "That player is not active.");
  2695.                 SystemMessage(playerid, string);
  2696.         }
  2697.         return 1;
  2698. }
  2699.  
  2700. dcmd_skick(playerid, params[])
  2701. {
  2702.         new index = 0;
  2703.     tmp2 = strtok(params, index);
  2704.         if (pInfo[playerid][pAdmin] == 0)
  2705.         {
  2706.                 SystemMessage(playerid, "You are not Administrator.");
  2707.                 return 1;
  2708.         }
  2709.     if(!strlen(tmp2))
  2710.         {
  2711.                 SystemMessage(playerid, "Correct usage: '/skick [playername] [reason]'");
  2712.                 return 1;
  2713.         }
  2714.         new string[MAX_STRING];
  2715.         new second, minute, hour, day, month, year;
  2716.     giveplayerid = ReturnUser(tmp2);
  2717.         if (IsPlayerConnected(giveplayerid))
  2718.         {
  2719.             format(string, sizeof(string), "You have been silently kicked by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2720.             SystemMessage(giveplayerid, string);
  2721.                 format(string, sizeof(string), "%s has been silently kicked by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2722.                 print(string);
  2723.                 gettime(hour, minute, second);
  2724.                 getdate(year, month, day);
  2725.                 format(string, sizeof(string), "Player %s silently kicked player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2726.                 ServerLog(string);
  2727.                 KickPlayer(giveplayerid, "");
  2728.     }
  2729.         else
  2730.     {
  2731.                 format(string, sizeof(string), "That player is not active.");
  2732.                 SystemMessage(playerid, string);
  2733.         }
  2734.     return 1;
  2735. }
  2736.  
  2737. dcmd_sban(playerid, params[])
  2738. {
  2739.         new index = 0;
  2740.     tmp2 = strtok(params, index);
  2741.         if (pInfo[playerid][pAdmin] == 0)
  2742.         {
  2743.                 SystemMessage(playerid, "You are not Administrator.");
  2744.                 return 1;
  2745.         }
  2746.     if(!strlen(tmp2))
  2747.         {
  2748.                 SystemMessage(playerid, "Correct usage: '/sban [playername] [reason]'");
  2749.                 return 1;
  2750.         }
  2751.         new string[MAX_STRING];
  2752.         new second, minute, hour, day, month, year;
  2753.     giveplayerid = ReturnUser(tmp2);
  2754.         if (IsPlayerConnected(giveplayerid))
  2755.         {
  2756.                 format(string, sizeof(string), "You have been silently banned by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2757.                 SystemMessage(giveplayerid, string);
  2758.             if(dini_Exists(KICKPORTAL))
  2759.             {
  2760.                     new File:fhandle;
  2761.                     new temp[256];
  2762.                     fhandle = fopen(KICKPORTAL, io_append);
  2763.                     format(temp, sizeof(temp), "\n%s", PlayerName(giveplayerid));
  2764.                     fwrite(fhandle, temp);
  2765.                     fclose(fhandle);
  2766.             }
  2767.                 format(string, sizeof(string), "%s has been silently banned by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2768.                 print(string);
  2769.                 gettime(hour, minute, second);
  2770.                 getdate(year, month, day);
  2771.                 format(string, sizeof(string), "Player %s silently banned player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2772.                 ServerLog(string);
  2773.                 KickPlayer(giveplayerid, "");
  2774.     }
  2775.         else
  2776.     {
  2777.                 format(string, sizeof(string), "That player is not active.");
  2778.                 SystemMessage(playerid, string);
  2779.         }
  2780.     return 1;
  2781. }
  2782.  
  2783. dcmd_sbanip(playerid, params[])
  2784. {
  2785.         new index = 0;
  2786.     tmp2 = strtok(params, index);
  2787.         if (pInfo[playerid][pAdmin] == 0)
  2788.         {
  2789.                 SystemMessage(playerid, "You are not Administrator.");
  2790.                 return 1;
  2791.         }
  2792.     if(!strlen(tmp2))
  2793.         {
  2794.                 SystemMessage(playerid, "Correct usage: '/sbanip [playername] [reason]'");
  2795.                 return 1;
  2796.         }
  2797.         new string[MAX_STRING];
  2798.         new second, minute, hour, day, month, year;
  2799.         giveplayerid = ReturnUser(tmp2);
  2800.         if (IsPlayerConnected(giveplayerid))
  2801.         {
  2802.                 format(string, sizeof(string), "You have been silently IP banned by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2803.                 SendClientMessage(giveplayerid, COLOR_SYSTEM, string);
  2804.                 format(string, sizeof(string), "%s has been silently IP banned by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2805.                 print(string);
  2806.                 gettime(hour, minute, second);
  2807.                 getdate(year, month, day);
  2808.                 format(string,sizeof(string),"Player %s silently IP banned player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2809.                 ServerLog(string);
  2810.                 BanPlayer(giveplayerid, "");
  2811.     }
  2812.         else
  2813.     {
  2814.                 format(string, sizeof(string), "That player is not active.");
  2815.                 SendClientMessage(playerid, COLOR_SYSTEM, string);
  2816.         }
  2817.     return 1;
  2818. }
  2819.  
  2820. dcmd_sfreeze(playerid, params[])
  2821. {
  2822.         new index = 0;
  2823.     tmp2 = strtok(params, index);
  2824.         if (pInfo[playerid][pAdmin] == 0)
  2825.         {
  2826.                 SystemMessage(playerid, "You are not Administrator.");
  2827.                 return 1;
  2828.         }
  2829.     if(!strlen(tmp2))
  2830.         {
  2831.                 SystemMessage(playerid, "Correct usage: '/sfreeze [playername] [reason]'");
  2832.                 return 1;
  2833.         }
  2834.         new string[MAX_STRING];
  2835.         new second, minute, hour, day, month, year;
  2836.     giveplayerid = ReturnUser(tmp2);
  2837.         if (IsPlayerConnected(giveplayerid))
  2838.         {
  2839.             format(string, sizeof(string), "You have been silently freezed by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2840.             SystemMessage(giveplayerid, string);
  2841.                 FreezePlayer(giveplayerid, "");
  2842.                 format(string, sizeof(string), "%s has been silently freezed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2843.                 print(string);
  2844.                 gettime(hour, minute, second);
  2845.                 getdate(year, month, day);
  2846.                 format(string, sizeof(string), "Player %s silently freezed player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2847.                 ServerLog(string);
  2848.     }
  2849.         else
  2850.     {
  2851.                 format(string, sizeof(string), "That player is not active.");
  2852.                 SystemMessage(playerid, string);
  2853.         }
  2854.     return 1;
  2855. }
  2856.  
  2857. dcmd_sunfreeze(playerid, params[])
  2858. {
  2859.         new index = 0;
  2860.     tmp2 = strtok(params, index);
  2861.         if (pInfo[playerid][pAdmin] == 0)
  2862.         {
  2863.                 SystemMessage(playerid, "You are not Administrator.");
  2864.                 return 1;
  2865.         }
  2866.     if(!strlen(tmp2))
  2867.         {
  2868.                 SystemMessage(playerid, "Correct usage: '/sunfreeze [playername] [reason]'");
  2869.                 return 1;
  2870.         }
  2871.         new string[MAX_STRING];
  2872.         new second, minute, hour, day, month, year;
  2873.     giveplayerid = ReturnUser(tmp2);
  2874.         if (IsPlayerConnected(giveplayerid))
  2875.         {
  2876.             format(string, sizeof(string), "You have been silently unfreezed by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2877.             SystemMessage(giveplayerid, string);
  2878.                 UnfreezePlayer(giveplayerid, "");
  2879.                 format(string, sizeof(string), "%s has been silently unfreezed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2880.                 print(string);
  2881.                 gettime(hour, minute, second);
  2882.                 getdate(year, month, day);
  2883.                 format(string, sizeof(string), "Player %s silently unfreezed player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2884.                 ServerLog(string);
  2885.     }
  2886.         else
  2887.     {
  2888.                 format(string, sizeof(string), "That player is not active.");
  2889.                 SystemMessage(playerid, string);
  2890.         }
  2891.     return 1;
  2892. }
  2893.  
  2894. dcmd_skillplayer(playerid, params[])
  2895. {
  2896.         new index = 0;
  2897.     tmp2 = strtok(params, index);
  2898.         if (pInfo[playerid][pAdmin] == 0)
  2899.         {
  2900.                 SystemMessage(playerid, "You are not Administrator.");
  2901.                 return 1;
  2902.         }
  2903.     if(!strlen(tmp2))
  2904.         {
  2905.                 SystemMessage(playerid, "Correct usage: '/skillplayer [playername] [reason]'");
  2906.                 return 1;
  2907.         }
  2908.         new string[MAX_STRING];
  2909.         new second, minute, hour, day, month, year;
  2910.     giveplayerid = ReturnUser(tmp2);
  2911.         if (IsPlayerConnected(giveplayerid))
  2912.         {
  2913.             format(string, sizeof(string), "You have been silently killed by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2914.             SystemMessage(giveplayerid, string);
  2915.                 KillPlayer(giveplayerid, "");
  2916.                 format(string, sizeof(string), "%s has been silently killed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2917.                 print(string);
  2918.                 gettime(hour, minute, second);
  2919.                 getdate(year, month, day);
  2920.                 format(string, sizeof(string), "Player %s silently killed player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2921.                 ServerLog(string);
  2922.     }
  2923.         else
  2924.     {
  2925.                 format(string, sizeof(string), "That player is not active.");
  2926.                 SystemMessage(playerid, string);
  2927.         }
  2928.     return 1;
  2929. }
  2930.  
  2931. dcmd_sjail(playerid, params[])
  2932. {
  2933.         new index = 0;
  2934.     tmp2 = strtok(params, index);
  2935.         if (pInfo[playerid][pAdmin] == 0)
  2936.         {
  2937.                 SystemMessage(playerid, "You are not Administrator.");
  2938.                 return 1;
  2939.         }
  2940.     if(!strlen(tmp2))
  2941.         {
  2942.                 SystemMessage(playerid, "Correct usage: '/sjail [playername] [reason]'");
  2943.                 return 1;
  2944.         }
  2945.         new string[MAX_STRING];
  2946.         new second, minute, hour, day, month, year;
  2947.     giveplayerid = ReturnUser(tmp2);
  2948.         if (IsPlayerConnected(giveplayerid))
  2949.         {
  2950.             format(string, sizeof(string), "You have been silently jailed by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2951.             SystemMessage(giveplayerid, string);
  2952.                 JailPlayer(giveplayerid, "");
  2953.                 format(string, sizeof(string), "%s has been silently jailed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2954.                 print(string);
  2955.                 gettime(hour, minute, second);
  2956.                 getdate(year, month, day);
  2957.                 format(string, sizeof(string), "Player %s silently jailed player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2958.                 ServerLog(string);
  2959.     }
  2960.         else
  2961.     {
  2962.                 format(string, sizeof(string), "That player is not active.");
  2963.                 SystemMessage(playerid, string);
  2964.         }
  2965.     return 1;
  2966. }
  2967.  
  2968. dcmd_sunjail(playerid, params[])
  2969. {
  2970.         new index = 0;
  2971.     tmp2 = strtok(params, index);
  2972.         if (pInfo[playerid][pAdmin] == 0)
  2973.         {
  2974.                 SystemMessage(playerid, "You are not Administrator.");
  2975.                 return 1;
  2976.         }
  2977.     if(!strlen(tmp2))
  2978.         {
  2979.                 SystemMessage(playerid, "Correct usage: '/sunjail [playername] [reason]'");
  2980.                 return 1;
  2981.         }
  2982.         new string[MAX_STRING];
  2983.         new second, minute, hour, day, month, year;
  2984.     giveplayerid = ReturnUser(tmp2);
  2985.         if (IsPlayerConnected(giveplayerid))
  2986.         {
  2987.             format(string, sizeof(string), "You have been silently unjailed by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  2988.             SystemMessage(giveplayerid, string);
  2989.                 UnjailPlayer(giveplayerid, "");
  2990.                 format(string, sizeof(string), "%s has been silently unjailed by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  2991.                 print(string);
  2992.                 gettime(hour, minute, second);
  2993.                 getdate(year, month, day);
  2994.                 format(string, sizeof(string), "Player %s silently unjailed player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  2995.                 ServerLog(string);
  2996.     }
  2997.         else
  2998.     {
  2999.                 format(string, sizeof(string), "That player is not active.");
  3000.                 SystemMessage(playerid, string);
  3001.         }
  3002.     return 1;
  3003. }
  3004.  
  3005. dcmd_sslap(playerid, params[])
  3006. {
  3007.         new index = 0;
  3008.     tmp2 = strtok(params, index);
  3009.         if (pInfo[playerid][pAdmin] == 0)
  3010.         {
  3011.                 SystemMessage(playerid, "You are not Administrator.");
  3012.                 return 1;
  3013.         }
  3014.     if(!strlen(tmp2))
  3015.         {
  3016.                 SystemMessage(playerid, "Correct usage: '/sslap [playername] [reason]'");
  3017.                 return 1;
  3018.         }
  3019.         new string[MAX_STRING];
  3020.         new second, minute, hour, day, month, year;
  3021.     giveplayerid = ReturnUser(tmp2);
  3022.         if (IsPlayerConnected(giveplayerid))
  3023.         {
  3024.             format(string, sizeof(string), "You have been silently slapped by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  3025.             SystemMessage(giveplayerid, string);
  3026.                 SlapPlayer(giveplayerid, "");
  3027.                 format(string, sizeof(string), "%s has been silently slapped by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  3028.                 print(string);
  3029.                 gettime(hour, minute, second);
  3030.                 getdate(year, month, day);
  3031.                 format(string, sizeof(string), "Player %s silently slapped player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  3032.                 ServerLog(string);
  3033.     }
  3034.         else
  3035.     {
  3036.                 format(string, sizeof(string), "That player is not active.");
  3037.                 SystemMessage(playerid, string);
  3038.         }
  3039.     return 1;
  3040. }
  3041.  
  3042. dcmd_smute(playerid, params[])
  3043. {
  3044.         new index = 0;
  3045.     tmp2 = strtok(params, index);
  3046.         if (pInfo[playerid][pAdmin] == 0)
  3047.         {
  3048.                 SystemMessage(playerid, "You are not Administrator.");
  3049.                 return 1;
  3050.         }
  3051.     if(!strlen(tmp2))
  3052.         {
  3053.                 SystemMessage(playerid, "Correct usage: '/smute [playername] [reason]'");
  3054.                 return 1;
  3055.         }
  3056.         new string[MAX_STRING];
  3057.         new second, minute, hour, day, month, year;
  3058.     giveplayerid = ReturnUser(tmp2);
  3059.         if (IsPlayerConnected(giveplayerid))
  3060.         {
  3061.             format(string, sizeof(string), "You have been silently muted by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  3062.             SystemMessage(giveplayerid, string);
  3063.                 MutePlayer(giveplayerid, "");
  3064.                 format(string, sizeof(string), "%s has been silently muted by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  3065.                 print(string);
  3066.                 gettime(hour, minute, second);
  3067.                 getdate(year, month, day);
  3068.                 format(string, sizeof(string), "Player %s silently muted player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  3069.                 ServerLog(string);
  3070.     }
  3071.         else
  3072.     {
  3073.                 format(string, sizeof(string), "That player is not active.");
  3074.                 SystemMessage(playerid, string);
  3075.         }
  3076.     return 1;
  3077. }
  3078.  
  3079. dcmd_sunmute(playerid, params[])
  3080. {
  3081.         new index = 0;
  3082.     tmp2 = strtok(params, index);
  3083.         if (pInfo[playerid][pAdmin] == 0)
  3084.         {
  3085.                 SystemMessage(playerid, "You are not Administrator.");
  3086.                 return 1;
  3087.         }
  3088.     if(!strlen(tmp2))
  3089.         {
  3090.                 SystemMessage(playerid, "Correct usage: '/sunmute [playername] [reason]'");
  3091.                 return 1;
  3092.         }
  3093.         new string[MAX_STRING];
  3094.         new second, minute, hour, day, month, year;
  3095.     giveplayerid = ReturnUser(tmp2);
  3096.         if (IsPlayerConnected(giveplayerid))
  3097.         {
  3098.             format(string, sizeof(string), "You have been silently unmuted by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  3099.             SystemMessage(giveplayerid, string);
  3100.                 UnmutePlayer(giveplayerid, "");
  3101.                 format(string, sizeof(string), "%s has been silently unmuted by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  3102.                 print(string);
  3103.                 gettime(hour, minute, second);
  3104.                 getdate(year, month, day);
  3105.                 format(string, sizeof(string), "Player %s silently unmuted player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  3106.                 ServerLog(string);
  3107.     }
  3108.         else
  3109.     {
  3110.                 format(string, sizeof(string), "That player is not active.");
  3111.                 SystemMessage(playerid, string);
  3112.         }
  3113.     return 1;
  3114. }
  3115.  
  3116. dcmd_sexplodeplayer(playerid, params[])
  3117. {
  3118.         new index = 0;
  3119.     tmp2 = strtok(params, index);
  3120.         if (pInfo[playerid][pAdmin] == 0)
  3121.         {
  3122.                 SystemMessage(playerid, "You are not Administrator.");
  3123.                 return 1;
  3124.         }
  3125.     if(!strlen(tmp2))
  3126.         {
  3127.                 SystemMessage(playerid, "Correct usage: '/sexplodeplayer [playername] [reason]'");
  3128.                 return 1;
  3129.         }
  3130.         new string[MAX_STRING];
  3131.         new second, minute, hour, day, month, year;
  3132.     giveplayerid = ReturnUser(tmp2);
  3133.         if (IsPlayerConnected(giveplayerid))
  3134.         {
  3135.             format(string, sizeof(string), "You have been silently exploded by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  3136.             SystemMessage(giveplayerid, string);
  3137.                 ExplodePlayer(giveplayerid, "");
  3138.                 format(string, sizeof(string), "%s has been silently exploded by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  3139.                 print(string);
  3140.                 gettime(hour, minute, second);
  3141.                 getdate(year, month, day);
  3142.                 format(string, sizeof(string), "Player %s silently exploded player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  3143.                 ServerLog(string);
  3144.     }
  3145.         else
  3146.     {
  3147.                 format(string, sizeof(string), "That player is not active.");
  3148.                 SystemMessage(playerid, string);
  3149.         }
  3150.     return 1;
  3151. }
  3152.  
  3153. dcmd_sresetweapons(playerid, params[])
  3154. {
  3155.         new index = 0;
  3156.     tmp2 = strtok(params, index);
  3157.         if (pInfo[playerid][pAdmin] == 0)
  3158.         {
  3159.                 SystemMessage(playerid, "You are not Administrator.");
  3160.                 return 1;
  3161.         }
  3162.     if(!strlen(tmp2))
  3163.         {
  3164.                 SystemMessage(playerid, "Correct usage: '/sresetweapons [playername] [reason]'");
  3165.                 return 1;
  3166.         }
  3167.         new string[MAX_STRING];
  3168.         new second, minute, hour, day, month, year;
  3169.     giveplayerid = ReturnUser(tmp2);
  3170.         if (IsPlayerConnected(giveplayerid))
  3171.         {
  3172.             format(string, sizeof(string), "Your all weapons have been silently reseted by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  3173.             SystemMessage(giveplayerid, string);
  3174.                 ResetPlayerWeapons(giveplayerid);
  3175.                 format(string, sizeof(string), "Administrator %s silently reseted all weapons on player %s. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), params);
  3176.                 print(string);
  3177.                 gettime(hour, minute, second);
  3178.                 getdate(year, month, day);
  3179.                 format(string, sizeof(string), "Player %s silently reseted all weapons to player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
  3180.                 ServerLog(string);
  3181.     }
  3182.         else
  3183.     {
  3184.                 format(string, sizeof(string), "That player is not active.");
  3185.                 SystemMessage(playerid, string);
  3186.         }
  3187.     return 1;
  3188. }
  3189.  
  3190. dcmd_createmoney(playerid, params[])
  3191. {
  3192.         new index = 0;
  3193.     tmp2 = strtok(params, index);
  3194.     new createmoney;
  3195.     new string[MAX_STRING];
  3196.         if (pInfo[playerid][pAdmin] == 0)
  3197.         {
  3198.                 SystemMessage(playerid, "You are not Administrator.");
  3199.                 return 1;
  3200.         }
  3201.         if(!strlen(params))
  3202.         {
  3203.                 SystemMessage(playerid, "Correct usage: '/createmoney [amount]'");
  3204.                 return 1;
  3205.         }
  3206.         if (createmoney < 0)
  3207.         {
  3208.             SystemMessage(playerid, "Correct usage: '/createmoney [amount]'");
  3209.             return 1;
  3210.         }
  3211.         createmoney = strval(tmp2);
  3212.     format(string, sizeof(string), "You created $%d.", createmoney);
  3213.     SystemMessage(playerid, string);
  3214.     GivePlayerMoney(playerid, createmoney);
  3215.     return 1;
  3216. }
  3217.  
  3218. dcmd_deletemoney(playerid, params[])
  3219. {
  3220.         new index = 0;
  3221.     tmp2 = strtok(params, index);
  3222.     new deletemoney;
  3223.     new string[MAX_STRING];
  3224.         if (pInfo[playerid][pAdmin] == 0)
  3225.         {
  3226.                 SystemMessage(playerid, "You are not Administrator.");
  3227.                 return 1;
  3228.         }
  3229.         if(!strlen(params))
  3230.         {
  3231.                 SystemMessage(playerid, "Correct usage: '/deletemoney [amount]'");
  3232.                 return 1;
  3233.         }
  3234.         if (deletemoney < 0)
  3235.         {
  3236.             SystemMessage(playerid, "Correct usage: '/deletemoney [amount]'");
  3237.             return 1;
  3238.         }
  3239.         if (deletemoney > GetPlayerMoney(playerid))
  3240.         {
  3241.             SystemMessage(playerid, "You don't have that much money to delete.");
  3242.                 return 1;
  3243.         }
  3244.         deletemoney = strval(tmp2);
  3245.     format(string, sizeof(string), "You deleted $%d.", deletemoney);
  3246.     SystemMessage(playerid, string);
  3247.     GivePlayerMoney(playerid, -deletemoney);
  3248.     return 1;
  3249. }
  3250.  
  3251. dcmd_srestart(playerid, params[])
  3252. {
  3253.         #pragma unused params
  3254.         if (pInfo[playerid][pAdmin] == 0)
  3255.         {
  3256.                 SystemMessage(playerid, "You are not Administrator.");
  3257.                 return 1;
  3258.         }
  3259.         SystemMessage(playerid, "Current server gamemode will now silently restart in 5 seconds.");
  3260.         SetTimer("Restart", 5000, 0);
  3261.     return 1;
  3262. }
  3263.  
  3264. dcmd_slockserver(playerid, params[])
  3265. {
  3266.         #pragma unused params
  3267.         if (pInfo[playerid][pAdmin] == 0)
  3268.         {
  3269.                 SystemMessage(playerid, "You are not Administrator.");
  3270.                 return 1;
  3271.         }
  3272.     IsServerLocked = true;
  3273.         SystemMessage(playerid, "You have silently locked server.");
  3274.     return 1;
  3275. }
  3276.  
  3277. dcmd_sunlockserver(playerid, params[])
  3278. {
  3279.         #pragma unused params
  3280.         if (pInfo[playerid][pAdmin] == 0)
  3281.         {
  3282.                 SystemMessage(playerid, "You are not Administrator.");
  3283.                 return 1;
  3284.         }
  3285.         IsServerLocked = false;
  3286.     SystemMessage(playerid, "You have silently unlocked server.");
  3287.     return 1;
  3288. }
  3289.  
  3290. dcmd_setadmin(playerid, params[])
  3291. {
  3292.     if(pInfo[playerid][pAdmin] == 0) return SystemMessage(playerid, "You are not Administrator.");
  3293.     new alevel, str[128];
  3294.     if(sscanf(params, "ud", giveplayerid, alevel)) return SystemMessage(playerid, "Correct usage: '/setadmin [playername] [level]'");
  3295.     if(!IsPlayerConnected(giveplayerid)) return SystemMessage(playerid, "This player is not active.");
  3296.         if(alevel < 0) return SystemMessage(playerid, "Invalid level!");
  3297.         GetName(giveplayerid, playername);
  3298.         GetName(playerid, adminname);
  3299.         pInfo[giveplayerid][pAdmin] = alevel;
  3300.         format(str, sizeof(str), "Administrator %s (%d) has set your admin level to %d", adminname, playerid, alevel);
  3301.         SystemMessage(giveplayerid, str);
  3302.         format(str, sizeof(str), "You have set %s (%d) admin level to %d", playername, giveplayerid, alevel);
  3303.         SystemMessage(playerid, str);
  3304.         return 1;
  3305. }
  3306.  
  3307. dcmd_setkills(playerid, params[])
  3308. {
  3309.     if(pInfo[playerid][pAdmin] == 0) return SystemMessage(playerid, "You are not Administrator.");
  3310.     new amount, str[128];
  3311.     if(sscanf(params, "ud", giveplayerid, amount)) return SystemMessage(playerid, "Correct usage: '/setkills [playername] [amount]'");
  3312.     if(!IsPlayerConnected(giveplayerid)) return SystemMessage(playerid, "This player is not active.");
  3313.         if(amount < 0) return SystemMessage(playerid, "Invalid amount!");
  3314.         GetName(giveplayerid, playername);
  3315.         GetName(playerid, adminname);
  3316.         pInfo[giveplayerid][pKills] = amount;
  3317.         SetPlayerScore(giveplayerid, amount);
  3318.         format(str, sizeof(str), "Administrator %s (%d) has set your kills to %d", adminname, playerid, amount);
  3319.         SystemMessage(giveplayerid, str);
  3320.         format(str, sizeof(str), "You have set %s (%d) kills to %d", playername, giveplayerid, amount);
  3321.         SystemMessage(playerid, str);
  3322.         return 1;
  3323. }
  3324.  
  3325. dcmd_ahelp(playerid, params[])
  3326. {
  3327.         #pragma unused params
  3328.         if(pInfo[playerid][pAdmin] == 0) return SystemMessage(playerid, "You are not Administrator.");
  3329.         SystemMessage(playerid, "  /kick  /ban  /banip  /unbanip  /freeze  /unfreeze  /killplayer  /jail  /unjail  /slap  /mute  /unmute");
  3330.         SystemMessage(playerid, "  /explodeplayer  /resetweapons  /restart  /lockserver  /unlockserver  /spec  /specvehicle  /specoff");
  3331.         SystemMessage(playerid, "  /settime  /setweather  /setgravity  /cs  whois  /skick  /sban  /sbanip  /sfreeze  /sunfreeze  /skillplayer");
  3332.     SystemMessage(playerid, "  /sjail  /sunjail  /sslap  /smute  /sunmute  /sexplodeplayer  /sresetweapons  /createmoney  /deletemoney");
  3333.     SystemMessage(playerid, "  /srestart  /slockserver  /sunlockserver  /setadmin  /setkills  /goto");
  3334.         return 1;
  3335. }
  3336.  
  3337. dcmd_goto(playerid, params[])
  3338. {
  3339.     if(pInfo[playerid][pAdmin] == 0) return SystemMessage(playerid, "You are not Administrator.");
  3340.     if(sscanf(params, "u", giveplayerid)) return SystemMessage(playerid, "Correct usage: '/goto [playername]'");
  3341.     if(!IsPlayerConnected(giveplayerid) || giveplayerid == playerid) return SystemMessage(playerid, "This player is not active.");
  3342.         new str[128];
  3343.         GetName(giveplayerid, playername);
  3344.     new Float:posx, Float:posy, Float:posz;
  3345.     GetPlayerPos(giveplayerid, posx, posy, posz);
  3346.     SetPlayerPos(playerid, posx+1, posy+1, posz);
  3347.     SetPlayerInterior(playerid, GetPlayerInterior(giveplayerid));
  3348.     format(str, sizeof(str), "You have teleported to %s (%d)", playername, giveplayerid);
  3349.     SystemMessage(playerid, str);
  3350.         return 1;
  3351. }
  3352.  
  3353. stock GetRandomID()
  3354. {
  3355.         new randn;
  3356.         do
  3357.         {
  3358.             randn = random(MAX_PLAYERS);
  3359.         }
  3360.         while(!IsPlayerConnected(randn));
  3361.     return randn;
  3362. }
  3363.  
  3364. public OnPlayerText(playerid, text[])
  3365. {
  3366.     if (IsPlayerMuted[playerid] == 1)
  3367.         {
  3368.                 SystemMessage(playerid, "You can't speak while you are muted!");
  3369.                 return 0;
  3370.         }
  3371.     if(text[0] == ';')
  3372.     {
  3373.         new str[128];
  3374.         new playername[MAX_PLAYER_NAME];
  3375.         GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  3376.         format(str, sizeof(str), "[TEAM] %s: %s", playername, text[1]);
  3377.         for(new i = 0; i < MAX_PLAYERS; i++)
  3378.             if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid])
  3379.                 SendClientMessage(i, 0xFFFF30FF, str);
  3380.         return 0;
  3381.     }
  3382.     return 1;
  3383. }
  3384.  
  3385. public Information()
  3386. {
  3387.         switch(InfoMessage)
  3388.         {
  3389.             case 0:
  3390.             {
  3391.                         SendClientMessageToAll(COLOR_YELLOW, "If you spot a cheater/abuser, please use /report to report them");
  3392.                         InfoMessage = 1;
  3393.                 }
  3394.                 case 1:
  3395.                 {
  3396.                     SendClientMessageToAll(COLOR_YELLOW, "Type /commands to see available commands");
  3397.                         InfoMessage = 2;
  3398.                 }
  3399.                 case 2:
  3400.                 {
  3401.                     SendClientMessageToAll(COLOR_YELLOW, "Put ; in front of your text for team chat");
  3402.                         InfoMessage = 3;
  3403.                 }
  3404.                 case 3:
  3405.                 {
  3406.                     SendClientMessageToAll(COLOR_YELLOW, "Visit our forums at http://www.TKGang.com");
  3407.                         InfoMessage = 0;
  3408.                 }
  3409.         }
  3410.         return 1;
  3411. }
  3412. /*
  3413. public SaveAllStats()
  3414. {
  3415.         new playername[MAX_PLAYER_NAME];
  3416.         for(new i=0; i<MAX_PLAYERS; i++)
  3417.         {
  3418.             if(IsPlayerConnected(i))
  3419.             {
  3420.                 if(Registered[i])
  3421.                         {
  3422.                             GetPlayerName(i, playername, MAX_PLAYER_NAME);
  3423.                         dUserSetINT(playername).("Money",GetPlayerMoney(i));
  3424.                         dUserSetINT(playername).("Kills",pInfo[i][pKills]);
  3425.                         dUserSetINT(playername).("Deaths",pInfo[i][pDeaths]);
  3426.                         dUserSetINT(playername).("Admin",pInfo[i][pAdmin]);
  3427.                         dUserSetINT(playername).("Wantedlvl",GetPlayerWantedLevel(i));
  3428.                         }
  3429.                 }
  3430.         }
  3431.         print("All players stats saved!");
  3432. }*/
  3433.  
  3434. //PlayerName
  3435. stock PlayerName(playerid)
  3436. {
  3437.         new name[MAX_PLAYER_NAME];
  3438.         GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  3439.         return name;
  3440. }
  3441.  
  3442. //SystemMsg
  3443. public SystemMsg(playerid,msg[])
  3444. {
  3445.         if((IsPlayerConnected(playerid))&&(strlen(msg)>0))
  3446.         {
  3447.                 SendClientMessage(playerid,COLOR_RED,msg);
  3448.         }
  3449.         return 1;
  3450. }
  3451.  
  3452. //------------------------------------------------------------------------------
  3453.  
  3454. ShowStats(playerid)
  3455. {
  3456.         new tmpTotal[128];
  3457.         new playername[MAX_PLAYER_NAME];
  3458.         GetPlayerName(playerid, playername, sizeof(playername));
  3459.         format(tmpTotal, sizeof(tmpTotal), "%s's Stats: Kills: %d | Deaths: %d | Ratio: %0.2f | Money: $%d",playername,pInfo[playerid][pKills],pInfo[playerid][pDeaths], (Float:pInfo[playerid][pKills]/Float:pInfo[playerid][pDeaths]),GetPlayerMoney(playerid));
  3460.         SendClientMessage(playerid,COLOR_GREEN, tmpTotal);
  3461. }
  3462.  
  3463. stock IsNumeric(const string[])
  3464. {
  3465.         for (new i = 0, j = strlen(string); i < j; i++)
  3466.         if (string[i] > '9' || string[i] < '0') return 0;
  3467.         return 1;
  3468. }
  3469.  
  3470. stock ReturnPlayerID(PlayerName[])
  3471. {
  3472.         for(new i = 0; i < MAX_PLAYERS; i++)
  3473.         if(IsPlayerConnected(i))
  3474.         {
  3475.                 new name[MAX_PLAYER_NAME];
  3476.                 GetPlayerName(i,name,MAX_PLAYER_NAME);
  3477.                 if(strfind(name,PlayerName,true) != -1) return i;
  3478.         }
  3479.         return INVALID_PLAYER_ID;
  3480. }
  3481.  
  3482. stock ReturnWeaponID(WeaponName[])
  3483. {
  3484.         if(strfind("molotov",WeaponName,true) != -1) return 18;
  3485.         for(new i = 0; i <= 46; i++)
  3486.         {
  3487.                 switch(i)
  3488.                 {
  3489.                         case 0,19,20,21,44,45: continue;
  3490.                         default:
  3491.                         {
  3492.                                 new name[24];
  3493.                                 GetWeaponName(i,name,24);
  3494.                                 if(strfind(name,WeaponName,true) != -1) return i;
  3495.                         }
  3496.                 }
  3497.         }
  3498.         return -1;
  3499. }
  3500.  
  3501. stock SystemMessage(playerid, message[])
  3502. {
  3503.     if ((IsPlayerConnected(playerid)) && (strlen(message) > 0))
  3504.         {
  3505.         SendClientMessage(playerid, COLOR_SYSTEM, message);
  3506.     }
  3507.     return 1;
  3508. }
  3509.  
  3510. stock SystemMessageEx(playerid, time, message[])
  3511. {
  3512.     if ((IsPlayerConnected(playerid)) && (strlen(message) > 0))
  3513.         {
  3514.                 Wait(time);
  3515.             SystemMessage(playerid, message);
  3516.     }
  3517.     return 1;
  3518. }
  3519.  
  3520. stock SystemMessageToAll(message[])
  3521. {
  3522.         if(strlen(message) > 0)
  3523.         {
  3524.             for(new i=0; i<MAX_PLAYERS; i++)
  3525.                 {
  3526.                     if (IsPlayerConnected(i))
  3527.                         {
  3528.                         SendClientMessage(i, COLOR_SYSTEM, message);
  3529.                     }
  3530.             }
  3531.     }
  3532.     return 1;
  3533. }
  3534.  
  3535. stock SendMessageToAdmins(string[])
  3536. {
  3537.         for (new i = 0; i < MAX_PLAYERS; i++)
  3538.         {
  3539.                 if (IsPlayerConnected(i))
  3540.                 {
  3541.                     if (pInfo[i][pAdmin] > 0)
  3542.                         {
  3543.                                 SystemMessage(i, string);
  3544.                         }
  3545.                 }
  3546.         }
  3547.         return 1;
  3548. }
  3549.  
  3550. stock PlayerIp(playerid)
  3551. {
  3552.         new ip[16];
  3553.         GetPlayerIp(playerid, ip, sizeof(ip));
  3554.         return ip;
  3555. }
  3556.  
  3557. stock PlayerPing(playerid)
  3558. {
  3559.     if (!IsPlayerConnected(playerid)) return 0;
  3560.         new ping = GetPlayerPing(playerid);
  3561.         return ping;
  3562. }
  3563.  
  3564. stock ServerLog(message[])
  3565. {
  3566.     new File:fhnd;
  3567.     if (fexist("ServerLog.log.txt")) fhnd = fopen("ServerLog.log.txt", io_append);
  3568.         else fhnd = fopen("ServerLog.log.txt", io_write);
  3569.     fwrite(fhnd, message);
  3570.     fputchar(fhnd, 13);
  3571.     fputchar(fhnd, 10);
  3572.     fclose(fhnd);
  3573. }
  3574.  
  3575. stock KickPlayer(playerid, reason[])
  3576. {
  3577.     if (IsPlayerConnected(playerid))
  3578.         {
  3579.             SystemMessage(playerid, reason);
  3580.             TogglePlayerControllable(playerid, 0);
  3581.             Kick(playerid);
  3582.     }
  3583.         return 1;
  3584. }
  3585.  
  3586. stock BanPlayer(playerid, reason[])
  3587. {
  3588.     if (IsPlayerConnected(playerid))
  3589.         {
  3590.             SystemMessage(playerid, reason);
  3591.             TogglePlayerControllable(playerid, 0);
  3592.             Ban(playerid);
  3593.     }
  3594.         return 1;
  3595. }
  3596.  
  3597. stock FreezePlayer(playerid, reason[])
  3598. {
  3599.     if (IsPlayerConnected(playerid))
  3600.         {
  3601.             SystemMessage(playerid, reason);
  3602.             TogglePlayerControllable(playerid, 0);
  3603.     }
  3604.         return 1;
  3605. }
  3606.  
  3607. stock UnfreezePlayer(playerid, reason[])
  3608. {
  3609.     if (IsPlayerConnected(playerid))
  3610.         {
  3611.             SystemMessage(playerid, reason);
  3612.             TogglePlayerControllable(playerid, 1);
  3613.     }
  3614.         return 1;
  3615. }
  3616.  
  3617. stock KillPlayer(playerid, reason[])
  3618. {
  3619.     if (IsPlayerConnected(playerid))
  3620.         {
  3621.             SystemMessage(playerid, reason);
  3622.             SetPlayerHealth(playerid, 0.0);
  3623.     }
  3624.         return 1;
  3625. }
  3626.  
  3627. stock JailPlayer(playerid, reason[])
  3628. {
  3629.     if (IsPlayerConnected(playerid))
  3630.         {
  3631.                 SystemMessage(playerid, reason);
  3632.                 SetPlayerFacingAngle(playerid, 177.0350);
  3633.                 SetCameraBehindPlayer(playerid);
  3634.                 SetPlayerInterior(playerid, 3);
  3635.                 SetPlayerPos(playerid, 197.7029,174.8801,1003.0234);
  3636.     }
  3637.         return 1;
  3638. }
  3639.  
  3640. stock UnjailPlayer(playerid, reason[])
  3641. {
  3642.     if (IsPlayerConnected(playerid))
  3643.         {
  3644.                 SystemMessage(playerid, reason);
  3645.                 SpawnPlayer(playerid);
  3646.     }
  3647.         return 1;
  3648. }
  3649.  
  3650. stock SlapPlayer(playerid, reason[])
  3651. {
  3652.     if (IsPlayerConnected(playerid))
  3653.         {
  3654.                 SystemMessage(playerid, reason);
  3655.                 new Float:phealth;
  3656.                 GetPlayerHealth(playerid, phealth);
  3657.                 SetPlayerHealth(playerid, phealth-20);
  3658.     }
  3659.         return 1;
  3660. }
  3661.  
  3662. stock MutePlayer(playerid, reason[])
  3663. {
  3664.     if (IsPlayerConnected(playerid))
  3665.         {
  3666.                 SystemMessage(playerid, reason);
  3667.                 IsPlayerMuted[playerid] = 1;
  3668.     }
  3669.         return 1;
  3670. }
  3671.  
  3672. stock UnmutePlayer(playerid, reason[])
  3673. {
  3674.     if (IsPlayerConnected(playerid))
  3675.         {
  3676.                 SystemMessage(playerid, reason);
  3677.                 IsPlayerMuted[playerid] = 0;
  3678.     }
  3679.         return 1;
  3680. }
  3681.  
  3682. stock ExplodePlayer(playerid, reason[])
  3683. {
  3684.     if (IsPlayerConnected(playerid))
  3685.         {
  3686.                 SystemMessage(playerid, reason);
  3687.                 new Float:XPOS;
  3688.                 new Float:YPOS;
  3689.                 new Float:ZPOS;
  3690.                 GetPlayerPos(playerid, XPOS, YPOS, ZPOS);
  3691.                 CreateExplosion(XPOS, YPOS, ZPOS, 3, 5);
  3692.     }
  3693.         return 1;
  3694. }
  3695.  
  3696. stock fsearch(filename[], search[], bool:caps = false)
  3697. {
  3698.         if(fexist(filename))
  3699.         {
  3700.             new File:fhandle = fopen(filename, io_read);
  3701.                 new temp[255];
  3702.                 while(fread(fhandle, temp))
  3703.                 {
  3704.                         StripNewLine(temp);
  3705.                         if(equal(temp, search, caps)) return 1;
  3706.                 }
  3707.         }
  3708.         return 0;
  3709. }
  3710.  
  3711. ReturnUser(text[], playerid = INVALID_PLAYER_ID)
  3712. {
  3713.         new pos = 0;
  3714.         while (text[pos] < 0x21)
  3715.         {
  3716.                 if (text[pos] == 0) return INVALID_PLAYER_ID;
  3717.                 pos++;
  3718.         }
  3719.         new userid = INVALID_PLAYER_ID;
  3720.         if (IsNumeric(text[pos]))
  3721.         {
  3722.                 userid = strval(text[pos]);
  3723.                 if (userid >=0 && userid < MAX_PLAYERS)
  3724.                 {
  3725.                         if(!IsPlayerConnected(userid))
  3726.                         {
  3727.                                 userid = INVALID_PLAYER_ID;
  3728.                         }
  3729.                         else
  3730.                         {
  3731.                                 return userid;
  3732.                         }
  3733.                 }
  3734.         }
  3735.         new len = strlen(text[pos]);
  3736.         new count = 0;
  3737.         new name[MAX_PLAYER_NAME];
  3738.         for (new i = 0; i < MAX_PLAYERS; i++)
  3739.         {
  3740.                 if (IsPlayerConnected(i))
  3741.                 {
  3742.                         GetPlayerName(i, name, sizeof (name));
  3743.                         if (strcmp(name, text[pos], true, len) == 0)
  3744.                         {
  3745.                                 if (len == strlen(name))
  3746.                                 {
  3747.                                         return i;
  3748.                                 }
  3749.                                 else
  3750.                                 {
  3751.                                         count++;
  3752.                                         userid = i;
  3753.                                 }
  3754.                         }
  3755.                 }
  3756.         }
  3757.         if (count != 1)
  3758.         {
  3759.                 if (playerid != INVALID_PLAYER_ID)
  3760.                 {
  3761.                         if (count)
  3762.                         {
  3763.                                 SendClientMessage(playerid, COLOR_SYSTEM, "There are multiple users, enter full playername.");
  3764.                         }
  3765.                         else
  3766.                         {
  3767.                                 SendClientMessage(playerid, COLOR_SYSTEM, "Playername not found.");
  3768.                         }
  3769.                 }
  3770.                 userid = INVALID_PLAYER_ID;
  3771.         }
  3772.         return userid;
  3773. }
  3774.  
  3775. stock IsInvalidSkin(skinid)
  3776. {
  3777.         new badSkins[22] = {3, 4, 5, 6, 8, 42, 65, 74, 86,119, 149,
  3778.         208, 265, 266,267,268, 269, 270, 271, 272, 273, 289};
  3779.         for (new i = 0; i < 22; i++)
  3780.         {
  3781.         if (skinid == badSkins[i]) return true;
  3782.         }
  3783.         return false;
  3784. }
  3785.  
  3786. stock Wait(time)
  3787. {
  3788.     new stamp = tickcount();
  3789.     while (tickcount() - stamp < time){}
  3790.     return 1;
  3791. }
  3792.  
  3793. stock SendRconCommandEx(time, command[])
  3794. {
  3795.         Wait(time);
  3796.     SendRconCommand(command);
  3797.         return 1;
  3798. }
  3799.  
  3800. public CLOCK_EverySecondTimer()
  3801. {
  3802.         CLOCK_minute++;
  3803.         if(CLOCK_minute == 60)
  3804.         {
  3805.                 CLOCK_minute = 0;
  3806.                 CLOCK_hour++;
  3807.                 SetWorldTime(CLOCK_hour);
  3808.         }
  3809.         if(CLOCK_hour == 24)
  3810.         {
  3811.                 CLOCK_hour = 0;
  3812.         }
  3813.         new clockstr[32];
  3814.         format(clockstr,sizeof(clockstr),"%02d:%02d",CLOCK_hour,CLOCK_minute);
  3815.         TextDrawSetString(Clock, clockstr);
  3816. }
  3817.  
  3818. stock GetHour()
  3819. {
  3820.         return CLOCK_hour;
  3821. }
  3822.  
  3823. stock Minute()
  3824. {
  3825.         return CLOCK_minute;
  3826. }
  3827.  
  3828. stock sscanf(string[], format[], {Float,_}:...)
  3829. {
  3830.         #if defined isnull
  3831.                 if (isnull(string))
  3832.         #else
  3833.                 if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
  3834.         #endif
  3835.                 {
  3836.                         return format[0];
  3837.                 }
  3838.         #pragma tabsize 4
  3839.         new
  3840.                 formatPos = 0,
  3841.                 stringPos = 0,
  3842.                 paramPos = 2,
  3843.                 paramCount = numargs(),
  3844.                 delim = ' ';
  3845.         while (string[stringPos] && string[stringPos] <= ' ')
  3846.         {
  3847.                 stringPos++;
  3848.         }
  3849.         while (paramPos < paramCount && string[stringPos])
  3850.         {
  3851.                 switch (format[formatPos++])
  3852.                 {
  3853.                         case '\0':
  3854.                         {
  3855.                                 return 0;
  3856.                         }
  3857.                         case 'i', 'd':
  3858.                         {
  3859.                                 new
  3860.                                         neg = 1,
  3861.                                         num = 0,
  3862.                                         ch = string[stringPos];
  3863.                                 if (ch == '-')
  3864.                                 {
  3865.                                         neg = -1;
  3866.                                         ch = string[++stringPos];
  3867.                                 }
  3868.                                 do
  3869.                                 {
  3870.                                         stringPos++;
  3871.                                         if ('0' <= ch <= '9')
  3872.                                         {
  3873.                                                 num = (num * 10) + (ch - '0');
  3874.                                         }
  3875.                                         else
  3876.                                         {
  3877.                                                 return -1;
  3878.                                         }
  3879.                                 }
  3880.                                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  3881.                                 setarg(paramPos, 0, num * neg);
  3882.                         }
  3883.                         case 'h', 'x':
  3884.                         {
  3885.                                 new
  3886.                                         num = 0,
  3887.                                         ch = string[stringPos];
  3888.                                 do
  3889.                                 {
  3890.                                         stringPos++;
  3891.                                         switch (ch)
  3892.                                         {
  3893.                                                 case 'x', 'X':
  3894.                                                 {
  3895.                                                         num = 0;
  3896.                                                         continue;
  3897.                                                 }
  3898.                                                 case '0' .. '9':
  3899.                                                 {
  3900.                                                         num = (num << 4) | (ch - '0');
  3901.                                                 }
  3902.                                                 case 'a' .. 'f':
  3903.                                                 {
  3904.                                                         num = (num << 4) | (ch - ('a' - 10));
  3905.                                                 }
  3906.                                                 case 'A' .. 'F':
  3907.                                                 {
  3908.                                                         num = (num << 4) | (ch - ('A' - 10));
  3909.                                                 }
  3910.                                                 default:
  3911.                                                 {
  3912.                                                         return -1;
  3913.                                                 }
  3914.                                         }
  3915.                                 }
  3916.                                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  3917.                                 setarg(paramPos, 0, num);
  3918.                         }
  3919.                         case 'c':
  3920.                         {
  3921.                                 setarg(paramPos, 0, string[stringPos++]);
  3922.                         }
  3923.                         case 'f':
  3924.                         {
  3925.                                 setarg(paramPos, 0, _:floatstr(string[stringPos]));
  3926.                         }
  3927.                         case 'p':
  3928.                         {
  3929.                                 delim = format[formatPos++];
  3930.                                 continue;
  3931.                         }
  3932.                         case '\'':
  3933.                         {
  3934.                                 new
  3935.                                         end = formatPos - 1,
  3936.                                         ch;
  3937.                                 while ((ch = format[++end]) && ch != '\'') {}
  3938.                                 if (!ch)
  3939.                                 {
  3940.                                         return -1;
  3941.                                 }
  3942.                                 format[end] = '\0';
  3943.                                 if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
  3944.                                 {
  3945.                                         if (format[end + 1])
  3946.                                         {
  3947.                                                 return -1;
  3948.                                         }
  3949.                                         return 0;
  3950.                                 }
  3951.                                 format[end] = '\'';
  3952.                                 stringPos = ch + (end - formatPos);
  3953.                                 formatPos = end + 1;
  3954.                         }
  3955.                         case 'u':
  3956.                         {
  3957.                                 new
  3958.                                         end = stringPos - 1,
  3959.                                         id = 0,
  3960.                                         bool:num = true,
  3961.                                         ch;
  3962.                                 while ((ch = string[++end]) && ch != delim)
  3963.                                 {
  3964.                                         if (num)
  3965.                                         {
  3966.                                                 if ('0' <= ch <= '9')
  3967.                                                 {
  3968.                                                         id = (id * 10) + (ch - '0');
  3969.                                                 }
  3970.                                                 else
  3971.                                                 {
  3972.                                                         num = false;
  3973.                                                 }
  3974.                                         }
  3975.                                 }
  3976.                                 if (num && IsPlayerConnected(id))
  3977.                                 {
  3978.                                         setarg(paramPos, 0, id);
  3979.                                 }
  3980.                                 else
  3981.                                 {
  3982.                                         #if !defined foreach
  3983.                                                 #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  3984.                                                 #define __SSCANF_FOREACH__
  3985.                                         #endif
  3986.                                         string[end] = '\0';
  3987.                                         num = false;
  3988.                                         new
  3989.                                                 name[MAX_PLAYER_NAME];
  3990.                                         id = end - stringPos;
  3991.                                         foreach (Player, playerid)
  3992.                                         {
  3993.                                                 GetPlayerName(playerid, name, sizeof (name));
  3994.                                                 if (!strcmp(name, string[stringPos], true, id))
  3995.                                                 {
  3996.                                                         setarg(paramPos, 0, playerid);
  3997.                                                         num = true;
  3998.                                                         break;
  3999.                                                 }
  4000.                                         }
  4001.                                         if (!num)
  4002.                                         {
  4003.                                                 setarg(paramPos, 0, INVALID_PLAYER_ID);
  4004.                                         }
  4005.                                         string[end] = ch;
  4006.                                         #if defined __SSCANF_FOREACH__
  4007.                                                 #undef foreach
  4008.                                                 #undef __SSCANF_FOREACH__
  4009.                                         #endif
  4010.                                 }
  4011.                                 stringPos = end;
  4012.                         }
  4013.                         case 's', 'z':
  4014.                         {
  4015.                                 new
  4016.                                         i = 0,
  4017.                                         ch;
  4018.                                 if (format[formatPos])
  4019.                                 {
  4020.                                         while ((ch = string[stringPos++]) && ch != delim)
  4021.                                         {
  4022.                                                 setarg(paramPos, i++, ch);
  4023.                                         }
  4024.                                         if (!i)
  4025.                                         {
  4026.                                                 return -1;
  4027.                                         }
  4028.                                 }
  4029.                                 else
  4030.                                 {
  4031.                                         while ((ch = string[stringPos++]))
  4032.                                         {
  4033.                                                 setarg(paramPos, i++, ch);
  4034.                                         }
  4035.                                 }
  4036.                                 stringPos--;
  4037.                                 setarg(paramPos, i, '\0');
  4038.                         }
  4039.                         default:
  4040.                         {
  4041.                                 continue;
  4042.                         }
  4043.                 }
  4044.                 while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
  4045.                 {
  4046.                         stringPos++;
  4047.                 }
  4048.                 while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
  4049.                 {
  4050.                         stringPos++;
  4051.                 }
  4052.                 paramPos++;
  4053.         }
  4054.         do
  4055.         {
  4056.                 if ((delim = format[formatPos++]) > ' ')
  4057.                 {
  4058.                         if (delim == '\'')
  4059.                         {
  4060.                                 while ((delim = format[formatPos++]) && delim != '\'') {}
  4061.                         }
  4062.                         else if (delim != 'z')
  4063.                         {
  4064.                                 return delim;
  4065.                         }
  4066.                 }
  4067.         }
  4068.         while (delim > ' ');
  4069.         return 0;
  4070. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top