Guest User

Battlefield

a guest
Sep 2nd, 2012
990
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 152.75 KB | None | 0 0
  1. //====================================================
  2.  
  3. // V1.8
  4.  
  5. // UPDATE LOG
  6. //
  7. // Weapons drop when a player dies!
  8. // Some admin commands fixed + added /givescore.
  9. // Added nightvision into the shop.
  10. // Some little bugs fixed.
  11. //
  12. // NEED TO DO
  13. //
  14. // Random wars between 2 teams.
  15. // Add mappings!
  16. // Missions.
  17. // Fix battleshield.
  18.  
  19. //====================================================
  20.  
  21. #include <a_samp>
  22. #include <a_mysql>
  23. #include <zcmd>
  24. #include <foreach>
  25. #include <sscanf2>
  26. #include <streamer>
  27. #include <weaponsdrop>
  28. #include <carnames>
  29. #include <CleverBot>
  30.  
  31. //====================================================
  32.  
  33. #define mysql_host          "69.73.143.228"
  34. #define mysql_user          "risto_user"
  35. #define mysql_password      "MT^7?4CF6@ss"
  36. #define mysql_database      "risto_battlefield"
  37.  
  38. /*#define mysql_host            "localhost"
  39. #define mysql_user          "root"
  40. #define mysql_password      ""
  41. #define mysql_database      "server"*/
  42.  
  43. //====================================================
  44.  
  45. #define VERSION             "1.8"
  46. #define GAMEMODE            "BPR © V1.8"
  47. #define SCRIPTER            "Dan."
  48. #define SERVERNAME          "Battlefield - Project Reality"
  49.  
  50. #undef MAX_PLAYERS
  51. #define MAX_PLAYERS         50
  52.  
  53. //====================================================
  54.  
  55. #define C_RED               0xFF0000FF
  56. #define C_GANG_RED          0xFF000077
  57. #define C_WHITE             0xFFFFFFFF
  58. #define C_GANG_WHITE        0xFFFFFF77
  59. #define C_FADE              0xC8C8C8FF
  60. #define C_GREY              0xAFAFAFFF
  61. #define C_CYAN              0x00FFFFFF
  62. #define C_PINK              0xFF66FFFF
  63. #define C_ORANGE            0xFF9900FF
  64. #define C_LORANGE           0xFFB13DFF
  65. #define C_PURPLE            0xA86EFCFF
  66. #define C_GANG_PURPLE       0xA86EFC77
  67. #define C_YELLOW            0xFFFF00FF
  68. #define C_LYELLOW           0xD7DE16FF
  69. #define C_GANG_YELLOW       0xFFFF0077
  70. #define C_BLUE              0x0000BBFF
  71. #define C_RADIOBLUE         0x8D8DFFFF
  72. #define C_LBLUE             0x33CCFFFF
  73. #define C_VIOLET            0x9955DEFF
  74. #define C_DVIOLET           0x4B00B0FF
  75. #define C_DGREEN            0x33AA33FF
  76. #define C_GREEN             0x15FF00FF
  77. #define C_GANG_GREEN        0x15FF0077
  78. #define C_LGREEN            0x33FF33FF
  79. #define C_LIME              0x99FF00FF
  80.  
  81. #define COLOR_RED           "{FF0000}"
  82. #define COLOR_WHITE         "{FFFFFF}"
  83. #define COLOR_FADE          "{C8C8C8}"
  84. #define COLOR_GREY          "{AFAFAF}"
  85. #define COLOR_CYAN          "{00FFFF}"
  86. #define COLOR_PINK          "{FF66FF}"
  87. #define COLOR_ORANGE        "{FF9900}"
  88. #define COLOR_LORANGE       "{FFB13D}"
  89. #define COLOR_PURPLE        "{A86EFC}"
  90. #define COLOR_YELLOW        "{FFFF00}"
  91. #define COLOR_LYELLOW       "{D7DE16}"
  92. #define COLOR_BLUE          "{0000BB}"
  93. #define COLOR_RADIOBLUE     "{8D8DFF}"
  94. #define COLOR_LBLUE         "{33CCFF}"
  95. #define COLOR_VIOLET        "{9955DE}"
  96. #define COLOR_DVIOLET       "{4B00B0}"
  97. #define COLOR_DGREEN        "{33AA33}"
  98. #define COLOR_GREEN         "{15FF00}"
  99. #define COLOR_LGREEN        "{33FF33}"
  100. #define COLOR_LIME          "{99FF00}"
  101.  
  102. //====================================================
  103.  
  104. #define D_LOGIN             0
  105. #define D_REGISTER          1
  106. #define D_CLASS             2
  107. #define D_SUCCESS           3
  108. #define D_ADMINS            4
  109. #define D_SHOP              5
  110. #define D_HELP              6
  111. #define D_INFO              7
  112. #define D_RULES             8
  113. #define D_COMMANDS          9
  114. #define D_RANKS             10
  115. #define D_CLASSINFO         11
  116. #define D_ASSAULTINFO       12
  117. #define D_MEDICINFO         13
  118. #define D_ANTI-TANKINFO     14
  119. #define D_ENGINEERINFO      15
  120. #define D_AIRFORCEINFO      16
  121. #define D_SPEC-OPSINFO      17
  122. #define D_RADIO             18
  123. #define D_DONOR             19
  124. #define D_ROUNDSTATS        20
  125.  
  126. //====================================================
  127.  
  128. #define T_ENGLAND           100
  129. #define T_RUSSIA            101
  130. #define T_IRAQ              102
  131. #define T_MEXICO            103
  132.  
  133. #define T_ENGLAND_SKIN      287
  134. #define T_RUSSIA_SKIN       122
  135. #define T_IRAQ_SKIN         273
  136. #define T_MEXICO_SKIN       116
  137.  
  138. //====================================================
  139.  
  140. #define ASSAULT             200
  141. #define MEDIC               201
  142. #define ANTI-TANK           202
  143. #define ENGINEER            203
  144. #define AIRFORCE            204
  145. #define SPEC-OPS            205
  146.  
  147. //====================================================
  148.  
  149. #define RANK1               0
  150. #define RANK2               100
  151. #define RANK3               300
  152. #define RANK4               500
  153. #define RANK5               1000
  154. #define RANK6               1500
  155. #define RANK7               2000
  156. #define RANK8               2500
  157. #define RANK9               5000
  158.  
  159. #define RANK1NAME           "Private"
  160. #define RANK2NAME           "Specialist"
  161. #define RANK3NAME           "Corporal"
  162. #define RANK4NAME           "Second Lieutenant"
  163. #define RANK5NAME           "First Lieutenant"
  164. #define RANK6NAME           "Captain"
  165. #define RANK7NAME           "Major"
  166. #define RANK8NAME           "Lieutenant Colonel"
  167. #define RANK9NAME           "General"
  168.  
  169. //====================================================
  170.  
  171. #define INFO                300
  172. #define RULES               301
  173. #define COMMANDS            302
  174. #define RANKS               303
  175. #define CLASS               304
  176. #define DONOR               305
  177.  
  178. //====================================================
  179.  
  180. #define ADMINRANK1          "Trial Adminstrator"
  181. #define ADMINRANK2          "Administrator"
  182. #define ADMINRANK3          "Lead Administrator"
  183. #define ADMINRANK4          "Master Administrator"
  184. #define ADMINRANK5          "Co-Owner"
  185. #define ADMINRANK6          "Owner"
  186.  
  187. #define ZoneCaptureTime     25
  188. #define Donor1CaptureTime   20
  189. #define Donor2CaptureTime   15
  190. #define Donor3CaptureTime   10
  191.  
  192. //====================================================
  193.  
  194. #define PRESSED(%0) \
  195.     (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  196.  
  197. //====================================================
  198.  
  199. new gang_a51;        // Area 51
  200. new gang_airport;    // Old airport
  201. new gang_fortcarson; // Little town in desert
  202. new gang_ghosttown;  // Fort Carson
  203.  
  204. new A51CP; // Area 51
  205. new AIRCP; // Old airport
  206. new DESCP; // Little town in desert
  207. new FOCCP; // Fort Carson
  208.  
  209. //====================================================
  210.  
  211. new BigEarZone;
  212. new BigEarArea;
  213. new BigEarCP;
  214. new BigEarColor;
  215.  
  216. new SnakeZone;
  217. new SnakeArea;
  218. new SnakeCP;
  219. new SnakeColor;
  220.  
  221. new TeeMotelZone;
  222. new TeeMotelArea;
  223. new TeeMotelCP;
  224. new TeeMotelColor;
  225.  
  226. new OilZone;
  227. new OilArea;
  228. new OilCP;
  229. new OilColor;
  230.  
  231. new SeaZone;
  232. new SeaArea;
  233. new SeaCP;
  234. new SeaColor;
  235.  
  236. new HillZone;
  237. new HillArea;
  238. new HillCP;
  239. new HillColor;
  240.  
  241. new DamZone;
  242. new DamArea;
  243. new DamCP;
  244. new DamColor;
  245.  
  246. //====================================================
  247.  
  248. new RandomMSG[][] =
  249. {
  250.     "** [BOT] Do you want to be an admin? Apply at our forums www.bfpr.co.cc!",
  251.     "** [BOT] Like the server? Then add the server to your favorites :: 62.141.35.14:7805!",
  252.     "** [BOT] Are you new here? Type /help or /ask [text] to get help from admins!",
  253.     "** [BOT] Need some score for new ranks? Capture zones or kill some PLAYERS!",
  254.     "** [BOT] Welcome to Battlefield - Project Reality || Owned & scripted by Flashman!",
  255.     "** [BOT] See our super-awesome online donators using command /donors!",
  256.     "** [BOT] Register in our forums to get latest information about the server!",
  257.     "** [BOT] If you have ANY suggestions, post them in our forums at www.bfpr.co.cc!"
  258. };
  259.  
  260. //====================================================
  261. //====================================================
  262.  
  263. new Text:Textdraw0;               // Black box
  264. new Text:Textdraw1;               // "Stats"
  265. new Text:Textdraw2;               // "Kills"
  266. new Text:Textdraw3;               // "Deaths"
  267. new Text:Textdraw4;               // "Ratio"
  268. new Text:Textdraw5;               // "Points"
  269. new Text:Textkills[MAX_PLAYERS];  // Kills
  270. new Text:Textdeaths[MAX_PLAYERS]; // Deaths
  271. new Text:Textratio[MAX_PLAYERS];  // Ratio
  272. new Text:Textpoints[MAX_PLAYERS]; // Points
  273.  
  274. new Text:ForumURL;
  275.  
  276. //====================================================
  277.  
  278. new Text:ClassBox;
  279. new Text:ClassNameLine;
  280. new Text:ClassWeapons;
  281. new Text:ClassDescription1;
  282. new Text:ClassDescription2;
  283. new Text:ClassRequiredRank;
  284.  
  285. new Text:ClassHelpBox;
  286. new Text:ClassClick;
  287. new Text:ClassSpawn;
  288.  
  289. //====================================================
  290.  
  291. new Text3D:RankLabel[MAX_PLAYERS];
  292. new Text:RankStars;
  293.  
  294. //====================================================
  295. //====================================================
  296.  
  297. new PlayerCount[MAX_PLAYERS];
  298. new PlayerCountTimer[MAX_PLAYERS];
  299.  
  300. //====================================================
  301.  
  302. new aDuty[MAX_PLAYERS];
  303. new LastAdminVehicle[MAX_PLAYERS];
  304. new AFK[MAX_PLAYERS];
  305. new TogglePM[MAX_PLAYERS];
  306. new LagShoot[MAX_PLAYERS]              = 1;
  307. new RoundStats[MAX_PLAYERS]            = 1;
  308. new JustJoined[MAX_PLAYERS]            = 1;
  309. new IsPlayerChoosingTeam[MAX_PLAYERS]  = 1;
  310. new IsPlayerChoosingClass[MAX_PLAYERS] = 1;
  311. new ClassChoosingStep[MAX_PLAYERS];
  312. new ClassPositionSet[MAX_PLAYERS];
  313. new HackTest[MAX_PLAYERS]              = 0;
  314.  
  315. new gTeam[MAX_PLAYERS];
  316. new gClass[MAX_PLAYERS];
  317.  
  318. new CanHeal[MAX_PLAYERS]               = 1;
  319. new CanCaptureZone[MAX_PLAYERS]        = 1;
  320.  
  321. //====================================================
  322.  
  323. new DonorFix[MAX_PLAYERS]              = 1;
  324. new DonorHeal[MAX_PLAYERS]             = 1;
  325.  
  326. new LastDonorVehicle[MAX_PLAYERS];
  327.  
  328. //====================================================
  329.  
  330. enum pInfo
  331. {
  332.     pRegistered,
  333.     pLogged,
  334.     pAdmin,
  335.     pWarnings,
  336.     pKills,
  337.     pDeaths,
  338.     pPoints,
  339.     pCaptureZone,
  340.     pMoney,
  341.     pVIP,
  342.     pMuted,
  343.     pKillingspree
  344. }
  345.  
  346. new PlayerInfo[MAX_PLAYERS][pInfo];
  347.  
  348. enum zInfo
  349. {
  350.     gAttacked = 0,
  351.     gOwner = 0,
  352. }
  353.  
  354. new GangInfo[][zInfo];
  355.  
  356. enum rInfo
  357. {
  358.     Kills,
  359.     Float:Damage,
  360.     Zones
  361. }
  362.  
  363. new RoundInfo[MAX_PLAYERS][rInfo];
  364. //====================================================
  365.  
  366. main()
  367. {
  368.     print("                                                         ");
  369.     print("  _____           _           _     _____            _ _ _");
  370.     print(" |  __ \\         (_)         | |   |  __ \\          | (_) |");
  371.     print(" | |__) | __ ___  _  ___  ___| |_  | |__) |___  __ _| |_| |_ _   _");
  372.     print(" |  ___/ '__/ _ \\| |/ _ \\/ __| __| |  _  // _ \\/ _` | | | __| | | |");
  373.     print(" | |   | | | (_) | |  __/ (__| |_  | | \\ \\  __/ (_| | | | |_| |_| |");
  374.     print(" |_|   |_|  \\___/| |\\___|\\___|\\__| |_|  \\_\\___|\\__,_|_|_|\\__|\\__, |");
  375.     print("                _/ |                                          __/ |");
  376.     print("               |__/                                          |___/");
  377.     printf(" VERSION: %s  ||  SCRIPTER: %s  ||  Sharing this script not allowed.", VERSION, SCRIPTER);
  378.     print("                                                                    ");
  379. }
  380.  
  381. //====================================================
  382.  
  383. public OnGameModeInit()
  384. {
  385.     ShowPlayerMarkers(1);
  386.     EnableStuntBonusForAll(0);
  387.     DisableInteriorEnterExits();
  388.     SetWorldTime(12);
  389.     SetWeather(1);
  390.  
  391.     SetTimer("SendRandomMessage", 1000*30*7, true);
  392.     // SetTimer("BattleShield", 1000, true); NOT FINISHED, MAY FALSE BAN
  393.     // SetTimer("RandomWar", 1000*60*10, true); // NOT FINISHED
  394.  
  395.     AddPlayerClass(T_ENGLAND_SKIN,213.8508,1868.0325,13.1406,359.6966,0,0,0,0,0,0); // England
  396.     AddPlayerClass(T_RUSSIA_SKIN,-135.3077,1116.7949,20.1966,91.1457,0,0,0,0,0,0); // Russia
  397.     AddPlayerClass(T_IRAQ_SKIN,405.1154,2450.2124,16.5000,2.6969,0,0,0,0,0,0); // Iraq
  398.     AddPlayerClass(T_MEXICO_SKIN,-377.2719,2242.3125,42.6185,100.8263,0,0,0,0,0,0); // Mexico
  399.  
  400.     //====================================================
  401.  
  402.     mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
  403.     mysql_query("CREATE TABLE IF NOT EXISTS accounts(user VARCHAR(24), password VARCHAR(41), admin INT(20), vip INT(20), warnings INT(20), score INT(20), money INT(20), IP VARCHAR(16), kills INT(20), deaths INT(20), points INT(20) )");
  404.  
  405.     if(mysql_ping() == 1)
  406.     {
  407.         mysql_debug(1);
  408.         printf("[MYSQL] Connection with the database: SUCCESS!");
  409.     }
  410.     else
  411.     {
  412.         printf("[MYSQL] Connection with the database: FAIL!");
  413.     }
  414.  
  415.     //====================================================
  416.  
  417.     SetGameModeText(GAMEMODE);
  418.  
  419.     //====================================================
  420.     //====================================================
  421.  
  422.     Textdraw0 = TextDrawCreate(615.000000, 360.000000, "  ");
  423.     TextDrawBackgroundColor(Textdraw0, 255);
  424.     TextDrawFont(Textdraw0, 1);
  425.     TextDrawLetterSize(Textdraw0, 0.500000, 7.000000);
  426.     TextDrawColor(Textdraw0, -1);
  427.     TextDrawSetShadow(Textdraw0, 1);
  428.     TextDrawUseBox(Textdraw0, 1);
  429.     TextDrawBoxColor(Textdraw0, 85);
  430.     TextDrawTextSize(Textdraw0, 494.000000, 0.000000);
  431.  
  432.     Textdraw1 = TextDrawCreate(530.000000, 359.000000, "STATS");
  433.     TextDrawBackgroundColor(Textdraw1, 255);
  434.     TextDrawFont(Textdraw1, 2);
  435.     TextDrawLetterSize(Textdraw1, 0.360000, 1.400000);
  436.     TextDrawColor(Textdraw1, -1);
  437.     TextDrawSetShadow(Textdraw1, 1);
  438.  
  439.     Textdraw2 = TextDrawCreate(501.000000, 376.000000, "Kills");
  440.     TextDrawBackgroundColor(Textdraw2, 255);
  441.     TextDrawFont(Textdraw2, 1);
  442.     TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
  443.     TextDrawColor(Textdraw2, -1);
  444.     TextDrawSetShadow(Textdraw2, 1);
  445.  
  446.     Textdraw3 = TextDrawCreate(501.000000, 387.000000, "Deaths");
  447.     TextDrawBackgroundColor(Textdraw3, 255);
  448.     TextDrawFont(Textdraw3, 1);
  449.     TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
  450.     TextDrawColor(Textdraw3, -1);
  451.     TextDrawSetShadow(Textdraw3, 1);
  452.  
  453.     Textdraw4 = TextDrawCreate(501.000000, 399.000000, "Ratio");
  454.     TextDrawBackgroundColor(Textdraw4, 255);
  455.     TextDrawFont(Textdraw4, 1);
  456.     TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
  457.     TextDrawColor(Textdraw4, -1);
  458.     TextDrawSetShadow(Textdraw4, 1);
  459.  
  460.     Textdraw5 = TextDrawCreate(501.000000, 410.000000, "Score");
  461.     TextDrawBackgroundColor(Textdraw5, 255);
  462.     TextDrawFont(Textdraw5, 1);
  463.     TextDrawLetterSize(Textdraw5, 0.500000, 1.000000);
  464.     TextDrawColor(Textdraw5, -1);
  465.     TextDrawSetShadow(Textdraw5, 1);
  466.    
  467.     //====================================================
  468.  
  469.     ForumURL = TextDrawCreate(507.000000, 427.000000, "www.bfpr.co.cc");
  470.     TextDrawBackgroundColor(ForumURL, 255);
  471.     TextDrawFont(ForumURL, 2);
  472.     TextDrawLetterSize(ForumURL, 0.280000, 1.399999);
  473.     TextDrawColor(ForumURL, 3394815);
  474.     TextDrawSetOutline(ForumURL, 1);
  475.     TextDrawSetProportional(ForumURL, 1);
  476.  
  477.     //====================================================
  478.    
  479.     ClassBox = TextDrawCreate(468.000000, 360.000000, "  ");
  480.     TextDrawBackgroundColor(ClassBox, 255);
  481.     TextDrawFont(ClassBox, 1);
  482.     TextDrawLetterSize(ClassBox, -0.330000, -10.100000);
  483.     TextDrawColor(ClassBox, -1);
  484.     TextDrawSetOutline(ClassBox, 0);
  485.     TextDrawSetProportional(ClassBox, 1);
  486.     TextDrawSetShadow(ClassBox, 1);
  487.     TextDrawUseBox(ClassBox, 1);
  488.     TextDrawBoxColor(ClassBox, 85);
  489.     TextDrawTextSize(ClassBox, 179.000000, 102.000000);
  490.  
  491.     ClassNameLine = TextDrawCreate(187, 276.000000, "< %s CLASS >");
  492.     TextDrawBackgroundColor(ClassNameLine, 255);
  493.     TextDrawFont(ClassNameLine, 2);
  494.     TextDrawLetterSize(ClassNameLine, 0.490000, 1.600000);
  495.     TextDrawColor(ClassNameLine, -1);
  496.     TextDrawSetOutline(ClassNameLine, 1);
  497.     TextDrawSetProportional(ClassNameLine, 1);
  498.  
  499.     ClassWeapons = TextDrawCreate(187.000000, 296.000000, "Weapons: M4, Rocket Launcher, Deagle");
  500.     TextDrawBackgroundColor(ClassWeapons, 255);
  501.     TextDrawFont(ClassWeapons, 1);
  502.     TextDrawLetterSize(ClassWeapons, 0.270000, 1.300000);
  503.     TextDrawColor(ClassWeapons, -1);
  504.     TextDrawSetOutline(ClassWeapons, 1);
  505.     TextDrawSetProportional(ClassWeapons, 1);
  506.  
  507.     ClassDescription1 = TextDrawCreate(187.000000, 310.000000, "Description:");
  508.     TextDrawBackgroundColor(ClassDescription1, 255);
  509.     TextDrawFont(ClassDescription1, 1);
  510.     TextDrawLetterSize(ClassDescription1, 0.270000, 1.300000);
  511.     TextDrawColor(ClassDescription1, -1);
  512.     TextDrawSetOutline(ClassDescription1, 1);
  513.     TextDrawSetProportional(ClassDescription1, 1);
  514.  
  515.     ClassDescription2 = TextDrawCreate(187.000000, 325.000000, "Description line 2");
  516.     TextDrawBackgroundColor(ClassDescription2, 255);
  517.     TextDrawFont(ClassDescription2, 1);
  518.     TextDrawLetterSize(ClassDescription2, 0.270000, 1.300000);
  519.     TextDrawColor(ClassDescription2, -1);
  520.     TextDrawSetOutline(ClassDescription2, 1);
  521.     TextDrawSetProportional(ClassDescription2, 1);
  522.  
  523.     ClassRequiredRank = TextDrawCreate(187.000000, 340.000000, "Rank required:");
  524.     TextDrawBackgroundColor(ClassRequiredRank, 255);
  525.     TextDrawFont(ClassRequiredRank, 1);
  526.     TextDrawLetterSize(ClassRequiredRank, 0.27000, 1.300000);
  527.     TextDrawColor(ClassRequiredRank, -1);
  528.     TextDrawSetOutline(ClassRequiredRank, 1);
  529.     TextDrawSetProportional(ClassRequiredRank, 1);
  530.  
  531.     ClassHelpBox = TextDrawCreate(422.000000, 401.000000, "  ");
  532.     TextDrawBackgroundColor(ClassHelpBox, 255);
  533.     TextDrawFont(ClassHelpBox, 1);
  534.     TextDrawLetterSize(ClassHelpBox, -0.430000, -4.100001);
  535.     TextDrawColor(ClassHelpBox, -1);
  536.     TextDrawSetOutline(ClassHelpBox, 0);
  537.     TextDrawSetProportional(ClassHelpBox, 1);
  538.     TextDrawSetShadow(ClassHelpBox, 1);
  539.     TextDrawUseBox(ClassHelpBox, 1);
  540.     TextDrawBoxColor(ClassHelpBox, 85);
  541.     TextDrawTextSize(ClassHelpBox, 226.000000, 102.000000);
  542.  
  543.     ClassClick = TextDrawCreate(243.000000, 368.000000, "<< LMB choose your class RMB >>");
  544.     TextDrawBackgroundColor(ClassClick, 255);
  545.     TextDrawFont(ClassClick, 1);
  546.     TextDrawLetterSize(ClassClick, 0.270000, 1.299999);
  547.     TextDrawColor(ClassClick, -1);
  548.     TextDrawSetOutline(ClassClick, 1);
  549.     TextDrawSetProportional(ClassClick, 1);
  550.  
  551.     ClassSpawn = TextDrawCreate(282.000000, 382.000000, "LSHIFT to spawn");
  552.     TextDrawBackgroundColor(ClassSpawn, 255);
  553.     TextDrawFont(ClassSpawn, 1);
  554.     TextDrawLetterSize(ClassSpawn, 0.270000, 1.299999);
  555.     TextDrawColor(ClassSpawn, -1);
  556.     TextDrawSetOutline(ClassSpawn, 1);
  557.     TextDrawSetProportional(ClassSpawn, 1);
  558.    
  559.     //====================================================
  560.    
  561.     RankStars = TextDrawCreate(499.000000, 122.000000, "Your rank");
  562.     TextDrawBackgroundColor(RankStars, 255);
  563.     TextDrawFont(RankStars, 2);
  564.     TextDrawLetterSize(RankStars, 0.480000, 1.100000);
  565.     TextDrawColor(RankStars, -1);
  566.     TextDrawSetOutline(RankStars, 1);
  567.     TextDrawSetProportional(RankStars, 1);
  568.    
  569.    
  570.     //====================================================
  571.     //====================================================
  572.  
  573.     /*   ___________   ___ _____ _____ _____ _____
  574.         |  _  | ___ \ |_  |  ___/  __ \_   _/  ___|
  575.         | | | | |_/ /   | | |__ | /  \/ | | \ `--.
  576.         | | | | ___ \   | |  __|| |     | |  `--. \
  577.         \ \_/ / |_/ /\__/ / |___| \__/\ | | /\__/ /
  578.          \___/\____/\____/\____/ \____/ \_/ \____/
  579.                                                      */
  580.  
  581.    //=====================================================
  582.    
  583.     // Area 51 (mapping, vehicles, gangzone)
  584.     gang_a51 = GangZoneCreate(391.089019,2082.039550,96.008270,1798.399902);
  585.  
  586.     AddStaticVehicleEx(447,225.09960938,1883.09960938,17.70000076,0.00000000,-1,-1,90); //Seasparrow
  587.     AddStaticVehicleEx(447,203.00000000,1883.09997559,17.70000076,0.00000000,-1,-1,90); //Seasparrow
  588.     AddStaticVehicleEx(476,280.60000610,1955.80004883,18.79999924,270.00000000,-1,-1,90); //Rustler
  589.     AddStaticVehicleEx(476,280.60000610,1989.59997559,18.79999924,270.00000000,-1,-1,90); //Rustler
  590.     AddStaticVehicleEx(520,280.60000610,2023.69995117,18.29999924,270.00000000,-1,-1,90); //Hydra
  591.     AddStaticVehicleEx(476,312.00000000,2053.79980469,18.79999924,177.99499512,-1,-1,90); //Rustler
  592.     AddStaticVehicleEx(470,172.09960938,1932.09960938,18.39999962,180.00000000,36,1,90); //Patriot
  593.     AddStaticVehicleEx(470,179.80000305,1932.09997559,17.89999962,180.00000000,36,1,90); //Patriot
  594.     AddStaticVehicleEx(425,213.30000305,1970.00000000,19.10000038,90.00000000,-1,-1,90); //Hunter
  595.     AddStaticVehicleEx(599,284.50000000,1937.09997559,18.00000000,270.00000000,-1,1,90); //Police Ranger
  596.     AddStaticVehicleEx(487,325.09960938,1905.39941406,17.79999924,0.00000000,-1,-1,90); //Maverick
  597.     AddStaticVehicleEx(487,325.50000000,1865.19995117,17.79999924,0.00000000,-1,-1,90); //Maverick
  598.     AddStaticVehicleEx(500,293.00000000,1904.80004883,17.89999962,0.00000000,-1,-1,90); //Mesa
  599.     AddStaticVehicleEx(521,220.50000000,1920.79980469,17.29999924,180.00000000,-1,-1,90); //FCR-900
  600.     AddStaticVehicleEx(521,202.09960938,1920.89941406,17.30143547,177.74780273,-1,-1,90); //FCR-900
  601.     AddStaticVehicleEx(432,122.00000000,1900.59997559,18.70000076,0.00000000,-1,-1,90); //Rhino
  602.     AddStaticVehicleEx(470,290.89999390,1831.19995117,17.79999924,0.00000000,-1,-1,90); //Patriot
  603.     AddStaticVehicleEx(497,183.00000000,1834.50000000,23.50000000,270.00000000,-1,-1,90); //Police Maverick
  604.     AddStaticVehicleEx(470,154.60000610,1932.09960938,18.89999962,180.00000000,36,1,90); //Patriot
  605.     AddStaticVehicleEx(543,207.50000000,1862.80004883,13.10000038,0.00000000,-1,-1,90); //Sadler
  606.     AddStaticVehicleEx(475,203.00000000,1862.80004883,13.00000000,0.00000000,-1,-1,90); //Sabre
  607.     AddStaticVehicleEx(482,205.39999390,1872.80004883,13.19999981,269.25000000,-1,-1,90); //Burrito
  608.     AddStaticVehicleEx(427,133.69999695,1855.80004883,17.89999962,138.00000000,-1,-1,90); //Enforcer
  609.     AddStaticVehicleEx(427,133.80000305,1841.80004883,17.89999962,135.99926758,-1,-1,90); //Enforcer
  610.     CreateDynamicObject(2929,233.50000000,1822.80004883,8.19999981,0.00000000,0.00000000,90.50000000); //object(a51_blastdoorl) (1)
  611.     CreateDynamicObject(3399,278.50000000,1913.69995117,19.10000038,0.00000000,0.00000000,329.49645996); //object(cxrf_a51_stairs) (2)
  612.     CreateDynamicObject(3399,279.50000000,1915.40002441,19.10000038,0.00000000,0.00000000,329.49645996); //object(cxrf_a51_stairs) (3)
  613.     CreateDynamicObject(3399,284.29998779,1842.00000000,19.10000038,0.00000000,0.00000000,269.49462891); //object(cxrf_a51_stairs) (4)
  614.     CreateDynamicObject(3399,286.29998779,1842.00000000,19.10000038,0.00000000,0.00000000,269.49462891); //object(cxrf_a51_stairs) (5)
  615.     CreateDynamicObject(4726,213.30000305,1966.80004883,16.00000000,0.00000000,0.00000000,0.00000000); //object(libtwrhelipd_lan2) (1)
  616.     CreateDynamicObject(3279,194.10000610,2037.50000000,16.60000038,0.00000000,0.00000000,0.00000000); //object(a51_spottower) (1)
  617.     CreateDynamicObject(3279,382.00000000,2074.50000000,16.60000038,0.00000000,0.00000000,270.00000000); //object(a51_spottower) (2)
  618.     CreateDynamicObject(3279,383.50000000,1894.69995117,16.60000038,0.00000000,0.00000000,270.50000000); //object(a51_spottower) (3)
  619.     CreateDynamicObject(2985,190.89999390,1925.50000000,22.20000076,0.00000000,0.00000000,220.00000000); //object(minigun_base) (1)
  620.     CreateDynamicObject(2985,222.80000305,1925.50000000,22.20000076,0.00000000,0.00000000,315.00000000); //object(minigun_base) (2)
  621.     CreateDynamicObject(2985,207.09960938,1925.50000000,22.20000076,0.00000000,0.00000000,270.00000000); //object(minigun_base) (3)
  622.     CreateDynamicObject(3928,325.50000000,1866.69995117,16.70000076,0.00000000,0.00000000,270.00000000); //object(helipad) (2)
  623.     CreateDynamicObject(3928,325.10000610,1906.90002441,16.70000076,0.00000000,0.00000000,90.00000000); //object(helipad) (3)
  624.     CreateDynamicObject(3055,266.39999390,1875.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(kmb_shutter) (1)
  625.     CreateDynamicObject(3055,270.10000610,1884.09997559,16.29999924,90.00000000,0.00000000,90.00000000); //object(kmb_shutter) (2)
  626.     CreateDynamicObject(3055,266.70001221,1884.09997559,16.29999924,90.00000000,0.00000000,90.00000000); //object(kmb_shutter) (3)
  627.     CreateDynamicObject(3052,191.50000000,1926.00000000,22.39999962,0.00000000,0.00000000,310.00000000); //object(db_ammo) (1)
  628.     CreateDynamicObject(3052,222.30000305,1926.09997559,22.39999962,0.00000000,0.00000000,42.00000000); //object(db_ammo) (2)
  629.     CreateDynamicObject(3052,207.10000610,1926.19995117,22.39999962,0.00000000,0.00000000,0.00000000); //object(db_ammo) (3)
  630.     CreateDynamicObject(3399,188.10000610,1932.50000000,19.10000038,0.00000000,0.00000000,91.49645996); //object(cxrf_a51_stairs) (2)
  631.     CreateDynamicObject(10397,206.30000305,1883.09997559,21.50000000,0.00000000,0.00000000,1.99951172); //object(hc_stadlight1_sfs) (1)
  632.     CreateDynamicObject(3386,226.00000000,1862.50000000,12.10000038,0.00000000,0.00000000,0.00000000); //object(a51_srack2_) (1)
  633.     CreateDynamicObject(3387,226.00000000,1861.50000000,12.10000038,0.00000000,0.00000000,0.00000000); //object(a51_srack3_) (1)
  634.     CreateDynamicObject(3388,226.00000000,1860.50000000,12.10000038,0.00000000,0.00000000,0.00000000); //object(a51_srack4_) (1)
  635.     CreateDynamicObject(3389,225.89999390,1857.90002441,12.10000038,0.00000000,0.00000000,0.00000000); //object(a51_srack1_) (1)
  636.     CreateDynamicObject(3390,223.89999390,1854.69995117,11.80000019,0.00000000,0.00000000,307.50000000); //object(a51_sdsk_ncol1_) (1)
  637.     CreateDynamicObject(3391,219.60000610,1853.50000000,11.80000019,0.00000000,0.00000000,270.50000000); //object(a51_sdsk_ncol2_) (1)
  638.     CreateDynamicObject(3788,216.10000610,1856.00000000,12.39999962,0.00000000,0.00000000,36.00000000); //object(missile_03_sfxr) (1)
  639.     CreateDynamicObject(3790,216.19999695,1856.09997559,12.60000038,0.00000000,0.00000000,215.25000000); //object(missile_01_sfxr) (1)
  640.     CreateDynamicObject(3794,213.80000305,1853.59997559,12.39999962,0.00000000,5.00000000,320.00000000); //object(missile_07_sfxr) (1)
  641.     CreateDynamicObject(3795,212.10000610,1856.80004883,12.39999962,0.00000000,0.00000000,0.00000000); //object(missile_04_sfxr) (1)
  642.     CreateDynamicObject(2977,211.39999390,1860.00000000,12.10000038,0.00000000,0.00000000,0.00000000); //object(kmilitary_crate) (1)
  643.     CreateDynamicObject(2977,211.39999390,1861.50000000,12.10000038,0.00000000,0.00000000,0.00000000); //object(kmilitary_crate) (2)
  644.     CreateDynamicObject(2977,211.39999390,1863.09997559,12.10000038,0.00000000,0.00000000,0.00000000); //object(kmilitary_crate) (3)
  645.     CreateDynamicObject(2977,211.39999390,1862.30004883,13.10000038,0.00000000,0.00000000,90.00000000); //object(kmilitary_crate) (4)
  646.     CreateDynamicObject(2977,211.39999390,1860.80004883,13.10000038,0.00000000,0.00000000,90.00000000); //object(kmilitary_crate) (5)
  647.     CreateDynamicObject(3577,222.50000000,1869.19995117,12.89999962,0.00000000,0.00000000,90.00000000); //object(dockcrates1_la) (1)
  648.     CreateDynamicObject(7040,258.70001221,1835.50000000,20.10000038,0.00000000,0.00000000,0.00000000); //object(vgnplcehldbox01) (1)
  649.     CreateDynamicObject(12912,171.10000610,1880.30004883,29.20000076,0.00000000,0.00000000,0.00000000); //object(sw_silo04) (1)
  650.  
  651.  
  652.     // Old Airport in the desert (mapping, vehicles, gangzone)
  653.     gang_airport = GangZoneCreate(264, 2418, 480, 2568);
  654.  
  655.     AddStaticVehicleEx(432,415.5202,2455.9368,16.5142,0.6440,43,0,90);//Rhino
  656.     AddStaticVehicleEx(432,393.6799,2455.9368,16.5141,2.2203,43,0,90);//Rhino
  657.     AddStaticVehicleEx(425,365.29980469,2536.89941406,17.50000000,179.99975586,-1,-1,90); //Hunter
  658.     AddStaticVehicleEx(476,290.29998779,2541.00000000,18.00000000,180.00000000,-1,-1,90); //Rustler
  659.     AddStaticVehicleEx(476,324.39999390,2541.00000000,18.00000000,180.00000000,-1,-1,90); //Rustler
  660.     AddStaticVehicleEx(520,266.60000610,2541.00000000,17.70000076,180.00000000,-1,-1,90); //Hydra
  661.     AddStaticVehicleEx(487,403.10000610,2466.60009766,29.79999924,0.00000000,-1,-1,90); //Maverick
  662.     AddStaticVehicleEx(447,403.10000610,2446.10009766,29.60000038,0.00000000,-1,-1,90); //Seasparrow
  663.     AddStaticVehicleEx(470,311.20001221,2535.39990234,16.89999962,180.00000000,-1,-1,90); //Patriot
  664.     AddStaticVehicleEx(470,341.29998779,2541.00000000,16.89999962,180.00000000,-1,-1,90); //Patriot
  665.     AddStaticVehicleEx(433,389.50000000,2541.00000000,16.89999962,180.00000000,-1,-1,90); //Barracks
  666.     AddStaticVehicleEx(500,426.79998779,2478.60009766,16.70000076,90.00000000,-1,-1,90); //Mesa
  667.     AddStaticVehicleEx(470,432.50000000,2491.00000000,16.60000038,90.00000000,-1,-1,90); //Patriot
  668.     AddStaticVehicleEx(470,432.50000000,2502.19995117,16.60000038,90.00000000,-1,-1,90); //Patriot
  669.     AddStaticVehicleEx(470,432.50000000,2514.19995117,16.60000038,90.00000000,-1,-1,90); //Patriot
  670.     CreateDynamicObject(987,263.10000610,2556.60009766,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (2)
  671.     CreateDynamicObject(987,275.10000610,2556.60009766,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (3)
  672.     CreateDynamicObject(987,287.10000610,2556.60009766,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (4)
  673.     CreateDynamicObject(987,299.20001221,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (5)
  674.     CreateDynamicObject(987,311.20001221,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (6)
  675.     CreateDynamicObject(987,323.20001221,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (7)
  676.     CreateDynamicObject(987,335.20001221,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (8)
  677.     CreateDynamicObject(987,347.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (9)
  678.     CreateDynamicObject(987,359.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (10)
  679.     CreateDynamicObject(987,371.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (11)
  680.     CreateDynamicObject(987,383.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (12)
  681.     CreateDynamicObject(987,395.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (13)
  682.     CreateDynamicObject(987,407.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (14)
  683.     CreateDynamicObject(987,419.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (15)
  684.     CreateDynamicObject(987,431.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (16)
  685.     CreateDynamicObject(987,443.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (18)
  686.     CreateDynamicObject(987,455.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (19)
  687.     CreateDynamicObject(12805,449.39999390,2495.50000000,27.39999962,0.00000000,0.00000000,90.00000000); //object(ce_bigshed1) (2)
  688.     CreateDynamicObject(3055,433.60000610,2451.00000000,17.60000038,0.00000000,0.00000000,0.00000000); //object(kmb_shutter) (1)
  689.     CreateDynamicObject(3055,433.50000000,2451.00000000,21.29999924,0.00000000,0.00000000,0.25000000); //object(kmb_shutter) (2)
  690.     CreateDynamicObject(987,366.20001221,2433.89990234,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (21)
  691.     CreateDynamicObject(987,354.19921875,2433.89941406,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (22)
  692.     CreateDynamicObject(987,342.19921875,2433.89941406,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (23)
  693.     CreateDynamicObject(987,330.19921875,2433.89941406,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (24)
  694.     CreateDynamicObject(987,318.19921875,2433.89941406,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (25)
  695.     CreateDynamicObject(987,306.19921875,2434.00000000,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (26)
  696.     CreateDynamicObject(987,294.19921875,2434.00000000,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (27)
  697.     CreateDynamicObject(987,250.89999390,2544.39990234,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (29)
  698.     CreateDynamicObject(3749,250.89999390,2498.69995117,20.00000000,0.00000000,0.00000000,90.00000000); //object(clubgate01_lax) (2)
  699.     CreateDynamicObject(987,251.00000000,2488.80004883,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (31)
  700.     CreateDynamicObject(987,467.20001221,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (19)
  701.     CreateDynamicObject(987,250.89941406,2556.39941406,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (29)
  702.     CreateDynamicObject(987,250.89999390,2532.39990234,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (29)
  703.     CreateDynamicObject(987,250.89999390,2520.39990234,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (29)
  704.     CreateDynamicObject(987,251.00000000,2476.80004883,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (31)
  705.     CreateDynamicObject(987,251.00000000,2464.80004883,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (31)
  706.     CreateDynamicObject(987,251.00000000,2452.80004883,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (31)
  707.     CreateDynamicObject(987,251.00000000,2443.80004883,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (31)
  708.     CreateDynamicObject(3749,276.09960938,2434.09960938,21.29999924,0.00000000,0.00000000,0.00000000); //object(clubgate01_lax) (1)
  709.     CreateDynamicObject(3749,260.29998779,2434.10009766,21.29999924,0.00000000,0.00000000,0.00000000); //object(clubgate01_lax) (1)
  710.     CreateDynamicObject(987,282.20001221,2434.00000000,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (27)
  711.     CreateDynamicObject(14877,376.70001221,2471.19995117,17.60000038,0.00000000,0.00000000,270.00000000); //object(michelle-stairs) (1)
  712.     CreateDynamicObject(14877,376.70001221,2461.30004883,21.50000000,0.00000000,0.00000000,270.00000000); //object(michelle-stairs) (2)
  713.     CreateDynamicObject(3279,308.50000000,2549.50000000,15.80000019,0.00000000,0.00000000,270.00000000); //object(a51_spottower) (1)
  714.     CreateDynamicObject(3457,332.39999390,2455.30004883,18.60000038,0.00000000,0.00000000,0.00000000); //object(vgnhseblk2) (1)
  715.     CreateDynamicObject(3279,296.20001221,2437.30004883,15.50000000,0.00000000,0.00000000,179.99450684); //object(a51_spottower) (2)
  716.     CreateDynamicObject(8537,292.89999390,2473.30004883,22.70000076,0.00000000,0.00000000,0.00000000); //object(tikisign02_lvs) (1)
  717.     CreateDynamicObject(1443,374.50000000,2475.39990234,16.10000038,0.00000000,0.00000000,0.00000000); //object(dyn_street_sign_1) (1)
  718.     CreateDynamicObject(2580,377.89999390,2468.10009766,21.79999924,0.00000000,0.00000000,266.00000000); //object(sex_1) (1)
  719.     CreateDynamicObject(2583,376.39999390,2456.60009766,24.50000000,0.00000000,0.00000000,180.00000000); //object(cj_sex_video_2) (1)
  720.     CreateDynamicObject(2579,377.70001221,2456.60009766,24.50000000,0.00000000,0.00000000,180.00000000); //object(cj_sex_shelf_2) (1)
  721.     CreateDynamicObject(2580,378.10000610,2473.89990234,19.29999924,0.00000000,0.00000000,272.00000000); //object(sex_1) (2)
  722.     CreateDynamicObject(16781,363.20001221,2482.19995117,15.50000000,0.00000000,0.00000000,180.00000000); //object(cn2_ringking) (1)
  723.     CreateDynamicObject(3249,260.10000610,2514.00000000,15.60000038,0.00000000,0.00000000,90.00000000); //object(des_westsaloon_) (1)
  724.     CreateDynamicObject(1308,251.30000305,2556.60009766,15.60000038,0.00000000,0.00000000,0.00000000); //object(telgrphpole02) (1)
  725.  
  726.  
  727.     // Fort Carson (vehicles, gangzone)
  728.     gang_fortcarson = GangZoneCreate(-282,1086,-48,1230);
  729.  
  730.     AddStaticVehicleEx(425,-83.19999695,1124.40002441,20.60000038,0.00000000,-1,-1,90); //Hunter
  731.     AddStaticVehicleEx(470,-140.89999390,1085.00000000,19.89999962,0.00000000,-1,-1,90); //Patriot
  732.     AddStaticVehicleEx(470,-158.50000000,1085.00000000,19.89999962,0.00000000,-1,-1,90); //Patriot
  733.     AddStaticVehicleEx(520,-220.10000610,1216.50000000,20.29999924,0.00000000,-1,-1,90); //Hydra
  734.     AddStaticVehicleEx(447,-235.39941406,1085.00000000,19.79999924,0.00000000,-1,-1,90); //Seasparrow
  735.     AddStaticVehicleEx(447,-248.50000000,1085.00000000,19.79999924,0.00000000,-1,-1,90); //Seasparrow
  736.     AddStaticVehicleEx(432,-146.10000610,1179.50000000,18.70000076,0.00000000,-1,-1,90); //Rhino
  737.     AddStaticVehicleEx(433,-160.19999695,1131.90002441,20.10000038,180.00000000,-1,-1,90); //Barracks
  738.     AddStaticVehicleEx(490,-153.50000000,1217.09997559,20.10000038,0.00000000,-1,-1,90); //FBI Rancher
  739.     AddStaticVehicleEx(487,-46.59999847,1171.40002441,19.79999924,90.00000000,-1,-1,90); //Maverick
  740.     AddStaticVehicleEx(470,-77.19999695,1222.09997559,19.89999962,0.00000000,-1,-1,90); //Patriot
  741.     AddStaticVehicleEx(601,-30.20000076,1084.19995117,19.70000076,0.00000000,-1,-1,90); //S.W.A.T. Van
  742.     AddStaticVehicleEx(522,-177.30000305,1010.59997559,19.39999962,0.00000000,-1,-1,90); //NRG-500
  743.     AddStaticVehicleEx(521,-169.89999390,1010.59997559,19.39999962,0.00000000,-1,-1,90); //FCR-900
  744.     AddStaticVehicleEx(476,-349.29998779,1198.50000000,20.89999962,270.00000000,-1,-1,90); //Rustler
  745.     AddStaticVehicleEx(470,-46.20000076,1042.59997559,19.79999924,0.00000000,-1,-1,90); //Patriot
  746.     AddStaticVehicleEx(490,-222.00000000,1069.59997559,20.10000038,0.00000000,-1,-1,90); //FBI Rancher
  747.     AddStaticVehicleEx(500,-253.69999695,1183.30004883,20.00000000,90.00000000,-1,-1,90); //Mesa
  748.  
  749.  
  750.     // Ghost town (vehicles, gangzone)
  751.     gang_ghosttown = GangZoneCreate(-474,2196,-360,2286);
  752.  
  753.     AddStaticVehicleEx(425,-431.29998779,2205.50000000,43.29999924,2.00000000,-1,-1,90); //Hunter
  754.     AddStaticVehicleEx(520,-411.29998779,2205.50000000,43.29999924,0.00000000,-1,-1,90); //Hydra
  755.     AddStaticVehicleEx(470,-377.20001221,2251.39990234,42.59999847,106.00000000,-1,-1,90); //Patriot
  756.     AddStaticVehicleEx(500,-392.50000000,2248.80004883,42.59999847,10.00000000,-1,-1,90); //Mesa
  757.     AddStaticVehicleEx(432,-361.29998779,2199.69995117,42.59999847,100.00000000,-1,-1,90); //Rhino
  758.     AddStaticVehicleEx(447,-431.50000000,2228.19995117,42.50000000,0.00000000,-1,-1,90); //Seasparrow
  759.     AddStaticVehicleEx(522,-420.39999390,2225.89990234,42.00000000,0.00000000,-1,-1,90); //NRG-500
  760.     AddStaticVehicleEx(470,-386.70001221,2198.80004883,42.50000000,280.00000000,-1,-1,90); //Patriot
  761.     AddStaticVehicleEx(433,-355.00000000,2230.89990234,43.09999847,104.00000000,-1,-1,90); //Barracks
  762.     AddStaticVehicleEx(522,-402.10000610,2259.80004883,42.00000000,0.00000000,-1,-1,90); //NRG-500
  763.     AddStaticVehicleEx(528,-364.10000610,2262.80004883,42.70000076,4.00000000,-1,-1,90); //FBI Truck
  764.     AddStaticVehicleEx(470,-409.00000000,2226.60009766,42.50000000,0.00000000,-1,-1,90); //Patriot
  765.     AddStaticVehicleEx(468,-425.89999390,2242.69995117,42.20000076,0.00000000,-1,-1,90); //Sanchez
  766.  
  767.     // The Mighty Dam, some Dodos near the sea level
  768.     AddStaticVehicleEx(593,-573.59997559,1981.00000000,23.50000000,118.00000000,-1,-1,90); //Dodo
  769.     AddStaticVehicleEx(593,-584.20001221,1988.80004883,23.50000000,165.99554443,-1,-1,90); //Dodo
  770.  
  771.     //====================================================
  772.     // TEAM CHECKPOINTS
  773.  
  774.     A51CP = CreateDynamicCP(183.7988,1927.1082,17.8443, 3.0, -1, -1, -1, 100.0);
  775.     AIRCP = CreateDynamicCP(407.6558,2527.97850,16.5684, 3.0, -1, -1, -1, 100.0);
  776.     DESCP = CreateDynamicCP(-413.7866,2230.3303,42.4258, 3.0, -1, -1, -1, 100.0);
  777.     FOCCP = CreateDynamicCP(-148.4048,1136.2720,19.7422, 3.0, -1, -1, -1, 100.0);
  778.  
  779.     //====================================================
  780.     // CAPTURABLE CHECKPOINTS && ZONES && AREAS
  781.  
  782.     BigEarZone = GangZoneCreate(-366, 1512, -270, 1578);
  783.     BigEarArea = CreateDynamicRectangle(-366, 1512, -270, 1578, -1, -1, -1);
  784.     BigEarCP = CreateDynamicCP(-308.9923,1537.8146,75.5625, 3.0, -1, -1, -1, 100.0);
  785.     BigEarColor = C_GANG_WHITE;
  786.  
  787.     SnakeZone = GangZoneCreate(-66, 2322, 6, 2394);
  788.     SnakeArea = CreateDynamicRectangle(-66, 2322, 6, 2394, -1, -1, -1);
  789.     SnakeCP = CreateDynamicCP(-32.3534,2340.9919,24.1406, 3.0, -1, -1, -1, 100.0);
  790.     SnakeColor = C_GANG_WHITE;
  791.  
  792.     TeeMotelZone = GangZoneCreate(-906, 2724, -810, 2778);
  793.     TeeMotelArea = CreateDynamicRectangle(-906, 2724, -810, 2778, -1, -1, -1);
  794.     TeeMotelCP = CreateDynamicCP(-847.6240,2743.1699,45.8315, 3.0, -1, -1, -1, 100.0);
  795.     TeeMotelColor = C_GANG_WHITE;
  796.  
  797.     OilZone = GangZoneCreate(90, 1332, 288, 1494);
  798.     OilArea = CreateDynamicRectangle(90, 1332, 288, 1494, -1, -1, -1);
  799.     OilCP = CreateDynamicCP(254.6765,1411.3141,10.7075, 3.0, -1, -1, -1, 100.0);
  800.     OilColor = C_GANG_WHITE;
  801.  
  802.     SeaZone = GangZoneCreate(228, 2892, 300, 2958);
  803.     SeaArea = CreateDynamicRectangle(228, 2892, 300, 2958, -1, -1, -1);
  804.     SeaCP = CreateDynamicCP(263.2417,2896.1741,10.4772, 3.0, -1, -1, -1, 100.0);
  805.     SeaColor = C_GANG_WHITE;
  806.  
  807.     HillZone = GangZoneCreate(-846, 2364, -756, 2460);
  808.     HillArea = CreateDynamicRectangle(-846, 2364, -756, 2460, -1, -1, -1);
  809.     HillCP = CreateDynamicCP(-772.5001,2423.8455,157.0877, 3.0, -1, -1, -1, 100.0);
  810.     HillColor = C_GANG_WHITE;
  811.  
  812.     DamZone = GangZoneCreate(-912, 1980, -540, 2100);
  813.     DamArea = CreateDynamicRectangle(-912, 1980, -540, 2100, -1, -1, -1);
  814.     DamCP = CreateDynamicCP(-895.0860,2002.6703,60.9141, 3.0, -1, -1, -1, 100.0);
  815.     DamColor = C_GANG_WHITE;
  816.     return 1;
  817. }
  818.  
  819. public OnGameModeExit()
  820. {
  821.     return 1;
  822. }
  823.  
  824. public OnPlayerRequestClass(playerid, classid)
  825. {
  826.     IsPlayerChoosingTeam[playerid] = 1;
  827.  
  828.     SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
  829.     SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
  830.     SetPlayerFacingAngle( playerid, 270);
  831.     SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);
  832.  
  833.     switch (classid)
  834.     {
  835.         case 0:
  836.         {
  837.             gTeam[playerid] = T_ENGLAND;
  838.             SetPlayerColor(playerid, C_DGREEN);
  839.             GameTextForPlayer(playerid, "~g~England", 1000, 4);
  840.             CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
  841.         }
  842.         case 1:
  843.         {
  844.             gTeam[playerid] = T_RUSSIA;
  845.             SetPlayerColor(playerid, C_RED);
  846.             GameTextForPlayer(playerid, "~r~Russia", 1000, 4);
  847.             CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
  848.         }
  849.         case 2:
  850.         {
  851.             gTeam[playerid] = T_IRAQ;
  852.             SetPlayerColor(playerid, C_PURPLE);
  853.             GameTextForPlayer(playerid, "~p~Iraq", 1000, 4);
  854.             CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
  855.         }
  856.         case 3:
  857.         {
  858.             gTeam[playerid] = T_MEXICO;
  859.             SetPlayerColor(playerid, C_YELLOW);
  860.             GameTextForPlayer(playerid, "~y~Mexico", 1000, 4);
  861.             CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
  862.         }
  863.     }
  864.     return 1;
  865. }
  866.  
  867. public OnPlayerConnect(playerid)
  868. {
  869.     new string[128];
  870.     format(string, sizeof(string), "** {99FF00}[JOIN]{FFFFFF} %s has joined %s.", Name(playerid), SERVERNAME);
  871.     SendClientMessageToAll(C_WHITE, string);
  872.  
  873.     //====================================================
  874.  
  875.     PlayerInfo[playerid][pRegistered] = 0;
  876.     PlayerInfo[playerid][pLogged] = 0;
  877.     PlayerInfo[playerid][pAdmin] = 0;
  878.     PlayerInfo[playerid][pWarnings] = 0;
  879.     PlayerInfo[playerid][pKills] = 0;
  880.     PlayerInfo[playerid][pDeaths] = 0;
  881.     PlayerInfo[playerid][pPoints] = 0;
  882.     PlayerInfo[playerid][pCaptureZone] = 0;
  883.     PlayerInfo[playerid][pMoney] = 0;
  884.     PlayerInfo[playerid][pVIP] = 0;
  885.     PlayerInfo[playerid][pMuted] = 0;
  886.     PlayerInfo[playerid][pKillingspree] = 0;
  887.  
  888.     aDuty[playerid] = 0;
  889.     AFK[playerid] = 0;
  890.     LagShoot[playerid] = 1;
  891.     JustJoined[playerid] = 1;
  892.     RoundStats[playerid] = 1;
  893.     IsPlayerChoosingTeam[playerid] = 1;
  894.     IsPlayerChoosingClass[playerid] = 1;
  895.     ClassChoosingStep[playerid] = 0;
  896.     ClassPositionSet[playerid] = 0;
  897.     HackTest[playerid] = 0;
  898.    
  899.     CanCaptureZone[playerid] = 1;
  900.     TogglePM[playerid] = 1;
  901.     CanHeal[playerid] = 1;
  902.     DonorFix[playerid] = 1;
  903.  
  904.     //====================================================
  905.  
  906.     format(string, sizeof(string), "SELECT IP FROM `accounts` WHERE user = '%s' LIMIT 1", Name(playerid));
  907.  
  908.     mysql_query(string);
  909.     mysql_store_result();
  910.     new rows = mysql_num_rows();
  911.     if(rows == 0)
  912.     {
  913.         format(string, sizeof(string), "{FFFFFF}Hello {00AAFF}%s{FFFFFF}! This username isn't registered.\n\
  914.         Please type your new password here:", Name(playerid));
  915.         ShowPlayerDialog(playerid, D_REGISTER, DIALOG_STYLE_PASSWORD, "Register", string, "Register", "Kick");
  916.     }
  917.     else if(rows == 1)
  918.     {
  919.         format(string, sizeof(string), "{FFFFFF}Hello {00AAFF}%s{FFFFFF}! This username is registered.\n\
  920.         Please type your password here:", Name(playerid));
  921.         ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Kick");
  922.     }
  923.     mysql_free_result();
  924.  
  925.     //====================================================
  926.  
  927.     GangZoneShowForPlayer(playerid, gang_a51, C_GANG_GREEN );
  928.     GangZoneShowForPlayer(playerid, gang_airport, C_GANG_PURPLE);
  929.     GangZoneShowForPlayer(playerid, gang_fortcarson, C_GANG_RED);
  930.     GangZoneShowForPlayer(playerid, gang_ghosttown, C_GANG_YELLOW);
  931.  
  932.     GangZoneShowForPlayer(playerid, BigEarZone, BigEarColor);
  933.     GangZoneShowForPlayer(playerid, SnakeZone, SnakeColor);
  934.     GangZoneShowForPlayer(playerid, TeeMotelZone, TeeMotelColor);
  935.     GangZoneShowForPlayer(playerid, OilZone, OilColor);
  936.     GangZoneShowForPlayer(playerid, SeaZone, SeaColor);
  937.     GangZoneShowForPlayer(playerid, HillZone, HillColor);
  938.     GangZoneShowForPlayer(playerid, DamZone, DamColor);
  939.  
  940.     //====================================================
  941.  
  942.     Textkills[playerid] = TextDrawCreate(576.000000, 376.000000, "0");
  943.     TextDrawBackgroundColor(Textkills[playerid], 255);
  944.     TextDrawFont(Textkills[playerid], 1);
  945.     TextDrawLetterSize(Textkills[playerid], 0.410000, 1.100000);
  946.     TextDrawColor(Textkills[playerid], 369033386);
  947.     TextDrawSetShadow(Textkills[playerid], 1);
  948.  
  949.     Textdeaths[playerid] = TextDrawCreate(576.000000, 388.000000, "0");
  950.     TextDrawBackgroundColor(Textdeaths[playerid], 255);
  951.     TextDrawFont(Textdeaths[playerid], 1);
  952.     TextDrawLetterSize(Textdeaths[playerid], 0.410000, 1.100000);
  953.     TextDrawColor(Textdeaths[playerid], -16777046);
  954.     TextDrawSetShadow(Textdeaths[playerid], 1);
  955.  
  956.     Textratio[playerid] = TextDrawCreate(576.000000, 400.000000, "0");
  957.     TextDrawBackgroundColor(Textratio[playerid], 255);
  958.     TextDrawFont(Textratio[playerid], 1);
  959.     TextDrawLetterSize(Textratio[playerid], 0.410000, 1.100000);
  960.     TextDrawColor(Textratio[playerid], -673310977);
  961.     TextDrawSetShadow(Textratio[playerid], 1);
  962.  
  963.     Textpoints[playerid] = TextDrawCreate(576.000000, 412.000000, "0");
  964.     TextDrawBackgroundColor(Textpoints[playerid], 255);
  965.     TextDrawFont(Textpoints[playerid], 1);
  966.     TextDrawLetterSize(Textpoints[playerid], 0.410000, 1.100000);
  967.     TextDrawColor(Textpoints[playerid], -1347440726);
  968.     TextDrawSetShadow(Textpoints[playerid], 1);
  969.  
  970.     // Old Airport in the desert (removes planes and some objects)
  971.     RemoveBuildingForPlayer(playerid, 3368, 323.0078, 2411.3828, 15.4766, 0.25);
  972.     RemoveBuildingForPlayer(playerid, 3369, 349.8750, 2438.2500, 15.4766, 0.25);
  973.     RemoveBuildingForPlayer(playerid, 3369, 269.2656, 2411.3828, 15.4766, 0.25);
  974.     RemoveBuildingForPlayer(playerid, 3369, 242.3984, 2438.2500, 15.4766, 0.25);
  975.     RemoveBuildingForPlayer(playerid, 3367, 296.1406, 2438.2500, 15.4766, 0.25);
  976.     RemoveBuildingForPlayer(playerid, 3269, 242.3984, 2438.2500, 15.4766, 0.25);
  977.     RemoveBuildingForPlayer(playerid, 3269, 269.2656, 2411.3828, 15.4766, 0.25);
  978.     RemoveBuildingForPlayer(playerid, 3271, 296.1406, 2438.2500, 15.4766, 0.25);
  979.     RemoveBuildingForPlayer(playerid, 3270, 323.0078, 2411.3828, 15.4766, 0.25);
  980.     RemoveBuildingForPlayer(playerid, 16101, 321.6719, 2463.4922, 15.4766, 0.25);
  981.     RemoveBuildingForPlayer(playerid, 16368, 321.6719, 2463.4922, 25.6641, 0.25);
  982.     RemoveBuildingForPlayer(playerid, 3269, 349.8750, 2438.2500, 15.4766, 0.25);
  983.    
  984.     // Gets rid of all the vending machines (needed for anti-health hack to work)
  985.     RemoveBuildingForPlayer(playerid, 1302, 0.0, 0.0, 0.0, 6000.0);
  986.     RemoveBuildingForPlayer(playerid, 1209, 0.0, 0.0, 0.0, 6000.0);
  987.     RemoveBuildingForPlayer(playerid, 955, 0.0, 0.0, 0.0, 6000.0);
  988.     RemoveBuildingForPlayer(playerid, 956, 0.0, 0.0, 0.0, 6000.0);
  989.     RemoveBuildingForPlayer(playerid, 1775, 0.0, 0.0, 0.0, 6000.0);
  990.     RemoveBuildingForPlayer(playerid, 1776, 0.0, 0.0, 0.0, 6000.0);
  991.     RemoveBuildingForPlayer(playerid, 1977, 0.0, 0.0, 0.0, 6000.0);
  992.     return 1;
  993. }
  994.  
  995. public OnPlayerDisconnect(playerid, reason)
  996. {
  997.     new string[64];
  998.     switch(reason)
  999.     {
  1000.         case 0: format(string, sizeof string, "%s has left the server. (Timed out)", Name(playerid));
  1001.         case 1: format(string, sizeof string, "%s has left the server. (Leaving)", Name(playerid));
  1002.         case 2: format(string, sizeof string, "%s has left the server. (Kicked/Banned)", Name(playerid));
  1003.     }
  1004.     SendClientMessageToAll(C_GREY, string);
  1005.  
  1006.     if(PlayerInfo[playerid][pLogged] == 1)
  1007.     {
  1008.         SaveStats(playerid);
  1009.         PlayerInfo[playerid][pLogged] = 0;
  1010.  
  1011.         //=====================================================
  1012.  
  1013.         TextDrawHideForPlayer(playerid, Textdraw0);
  1014.         TextDrawHideForPlayer(playerid, Textdraw1);
  1015.         TextDrawHideForPlayer(playerid, Textdraw2);
  1016.         TextDrawHideForPlayer(playerid, Textdraw3);
  1017.         TextDrawHideForPlayer(playerid, Textdraw4);
  1018.  
  1019.         //=====================================================
  1020.  
  1021.         TextDrawDestroy(Textkills[playerid]);
  1022.         TextDrawDestroy(Textdeaths[playerid]);
  1023.         TextDrawDestroy(Textpoints[playerid]);
  1024.         TextDrawDestroy(Textratio[playerid]);
  1025.     }
  1026.     return 1;
  1027. }
  1028.  
  1029. public OnPlayerSpawn(playerid)
  1030. {
  1031.     if(IsPlayerChoosingClass[playerid] == 0)
  1032.     {
  1033.         SetPlayerHealth(playerid, 99);
  1034.    
  1035.         GiveClassWeapons(playerid);
  1036.  
  1037.         IsPlayerChoosingTeam[playerid] = 0;
  1038.  
  1039.         if(JustJoined[playerid] == 0)
  1040.         {
  1041.             ShowRoundStats(playerid);
  1042.         }
  1043.  
  1044.         if(JustJoined[playerid] == 1)
  1045.         {
  1046.             JustJoined[playerid] = 0;
  1047.         }
  1048.        
  1049.         SetTimerEx("Spawned", 6000, false, "i", playerid);
  1050.  
  1051.         UpdatePlayerTeam(playerid);
  1052.  
  1053.         TextDrawShowForPlayer(playerid, Textdraw0);
  1054.         TextDrawShowForPlayer(playerid, Textdraw1);
  1055.         TextDrawShowForPlayer(playerid, Textdraw2);
  1056.         TextDrawShowForPlayer(playerid, Textdraw3);
  1057.         TextDrawShowForPlayer(playerid, Textdraw4);
  1058.         TextDrawShowForPlayer(playerid, Textdraw5);
  1059.  
  1060.         TextDrawShowForPlayer(playerid, ForumURL);
  1061.  
  1062.         TextDrawShowForPlayer(playerid, Textkills[playerid]);
  1063.         TextDrawShowForPlayer(playerid, Textdeaths[playerid]);
  1064.         TextDrawShowForPlayer(playerid, Textratio[playerid]);
  1065.         TextDrawShowForPlayer(playerid, Textpoints[playerid]);
  1066.        
  1067.         TextDrawShowForPlayer(playerid, RankStars);
  1068.  
  1069.         UpdateStatsTextdraw(playerid);
  1070.  
  1071.         //====================================================
  1072.  
  1073.         new text[128];
  1074.         SendClientMessage(playerid, C_DGREEN, "");
  1075.        
  1076.         format(text, sizeof(text), "Your rank is %s (%d) and you belong to team %s!", RankName(playerid), Rank(playerid), PlayerTeamName(playerid));
  1077.         SendClientMessage(playerid, C_WHITE, text);
  1078.        
  1079.         if(LagShoot[playerid] == 1) format(text, sizeof text, "Your "COLOR_DGREEN"Anti Lag Shoot System"COLOR_WHITE" is currently "COLOR_GREEN"ENABLED"COLOR_WHITE"!");
  1080.         else format(text, sizeof text, "Your "COLOR_DGREEN"Anti Lag Shoot System"COLOR_WHITE" is currently "COLOR_RED"DISABLED"COLOR_WHITE"!");
  1081.         SendClientMessage(playerid, C_WHITE, text);
  1082.        
  1083.         SendClientMessage(playerid, C_DGREEN, "");
  1084.        
  1085.         SetPlayerWantedLevel(playerid, Rank(playerid));
  1086.  
  1087.         //====================================================
  1088.  
  1089.         SendClientMessage(playerid, C_RED, "Anti-SK: You are protected for 5 seconds.");
  1090.         {
  1091.             SetPlayerHealth(playerid, 99999);
  1092.             SetTimerEx("Spawnkill", 1000*5, false, "i", playerid);
  1093.         }
  1094.  
  1095.         //====================================================
  1096.  
  1097.         if(PlayerInfo[playerid][pVIP] > 0)
  1098.         {
  1099.             new Float:armour, level;
  1100.             GetPlayerArmour(playerid, armour);
  1101.             level = PlayerInfo[playerid][pVIP];
  1102.             switch(level)
  1103.             {
  1104.  
  1105.                 case 1:
  1106.                 {
  1107.                     SetPlayerArmour(playerid, 50.0);
  1108.                     SendClientMessage(playerid, C_GREY, "** VIP armour added!");
  1109.                 }
  1110.                 case 2:
  1111.                 {
  1112.                     SetPlayerArmour(playerid, 99);
  1113.                     SendClientMessage(playerid, C_GREY, "** VIP armour added!");
  1114.                 }
  1115.                 case 3:
  1116.                 {
  1117.                     SetPlayerArmour(playerid, 99);
  1118.                     SendClientMessage(playerid, C_GREY, "** VIP armour added!");
  1119.                 }
  1120.             }
  1121.         }
  1122.  
  1123.         SetRank3DText(playerid);
  1124.     }
  1125.     else
  1126.     {
  1127.         TogglePlayerControllable(playerid, 0);
  1128.         SetPlayerClass(playerid);
  1129.     }
  1130.     return 1;
  1131. }
  1132.  
  1133. public OnPlayerDeath(playerid, killerid, reason)
  1134. {
  1135.     HackTest[playerid] = 0;
  1136.  
  1137.     // == VICTIM ==
  1138.     new Float:XYZ[3], deathtext[64];
  1139.     GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
  1140.     GameTextForPlayer(playerid, "~r~ You got owned!", 3000, 3);
  1141.  
  1142.     PlayerInfo[playerid][pDeaths] ++;
  1143.     PlayerInfo[playerid][pKillingspree] = 0;
  1144.     DonorHeal[playerid] = 1;
  1145.     UpdateStatsTextdraw(playerid);
  1146.    
  1147.     TextDrawHideForPlayer(playerid, RankStars);
  1148.  
  1149.     new rand = random(1000-500)+500;
  1150.     format(deathtext, sizeof(deathtext), "You died! Lost {FFFFFF}-$%d{FF0000} because of death.", rand);
  1151.     SendClientMessage(playerid, C_RED, deathtext);
  1152.     GivePlayerMoney(playerid, -rand);
  1153.  
  1154.     SendDeathMessage(killerid, playerid, reason);
  1155.  
  1156.     if(killerid != INVALID_PLAYER_ID)
  1157.     {
  1158.         TogglePlayerSpectating(playerid, 1);
  1159.         if(IsPlayerInAnyVehicle(killerid))
  1160.         {
  1161.             new vehicleid = GetPlayerVehicleID(killerid);
  1162.             PlayerSpectateVehicle(playerid, vehicleid);
  1163.         }
  1164.         else
  1165.         {
  1166.             PlayerSpectatePlayer(playerid, killerid);
  1167.         }
  1168.  
  1169.         SetTimerEx("DeathCameraStop", 1000*6, false, "i", playerid);
  1170.     }
  1171.  
  1172.     //====================================================
  1173.  
  1174.     // == KILLER ==
  1175.     if(killerid != INVALID_PLAYER_ID)
  1176.     {
  1177.         SendClientMessage(killerid, C_VIOLET, "You killed a player. You earned $1500 and +3 score!");
  1178.         GameTextForPlayer(killerid, "~r~An enemy killed\n~g~+3 score and $1500", 3000, 3);
  1179.  
  1180.         SetPlayerScore(killerid, GetPlayerScore(killerid) +3);
  1181.         GivePlayerMoney(killerid, 1500);
  1182.  
  1183.         RoundInfo[killerid][Kills] ++;
  1184.         PlayerInfo[killerid][pKills] ++;
  1185.         PlayerInfo[killerid][pKillingspree] ++;
  1186.         UpdateStatsTextdraw(killerid);
  1187.     }
  1188.  
  1189.     // == KILLING SPREE ==
  1190.     new text[128];
  1191.     if(PlayerInfo[killerid][pKillingspree] == 3)
  1192.     {
  1193.         format(text, sizeof(text), "** %s is starting to OWN PEOPLE (3 killing spree)!", Name(killerid));
  1194.         SendClientMessageToAll(C_CYAN, text);
  1195.         SendClientMessage(killerid, C_LBLUE, "You get $1500 and +2 score! (killing spree bonus)");
  1196.         GivePlayerMoney(playerid, 1500);
  1197.         GivePlayerScore(playerid, 2);
  1198.     }
  1199.     else if(PlayerInfo[killerid][pKillingspree] == 5)
  1200.     {
  1201.         format(text, sizeof(text), "** %s is on a fucking rampage (5 killing spree)!", Name(killerid));
  1202.         SendClientMessageToAll(C_CYAN, text);
  1203.         SendClientMessage(killerid, C_LBLUE, "You get $2500 and +3 score! (killing spree bonus)");
  1204.         GivePlayerMoney(playerid, 2500);
  1205.         GivePlayerScore(playerid, 3);
  1206.     }
  1207.     else if(PlayerInfo[killerid][pKillingspree] == 10)
  1208.     {
  1209.         format(text, sizeof(text), "** %s has mastered the art of killing (10 killing spree)!", Name(killerid));
  1210.         SendClientMessageToAll(C_CYAN, text);
  1211.         SendClientMessage(killerid, C_LBLUE, "You get $5000 and +4 score! (killing spree bonus)");
  1212.         GivePlayerMoney(playerid, 5000);
  1213.         GivePlayerScore(playerid, 4);
  1214.     }
  1215.     else if(PlayerInfo[killerid][pKillingspree] == 15)
  1216.     {
  1217.         format(text, sizeof(text), "** %s can kill the whole world (15 killing spree)!", Name(killerid));
  1218.         SendClientMessageToAll(C_CYAN, text);
  1219.         SendClientMessage(killerid, C_LBLUE, "You get $7 500 and +6 score! (killing spree bonus)");
  1220.         GivePlayerMoney(playerid, 7500);
  1221.         GivePlayerScore(playerid, 6);
  1222.     }
  1223.     else if(PlayerInfo[killerid][pKillingspree] == 20)
  1224.     {
  1225.         format(text, sizeof(text), "** %s is the god of the universe (20 killing spree)!", Name(killerid));
  1226.         SendClientMessageToAll(C_CYAN, text);
  1227.         SendClientMessage(killerid, C_LBLUE, "You get $12 500 and +10 score! (killing spree bonus)");
  1228.         GivePlayerMoney(playerid, 12500);
  1229.         GivePlayerScore(playerid, 10);
  1230.     }
  1231.     else if(PlayerInfo[killerid][pKillingspree] == 25)
  1232.     {
  1233.         format(text, sizeof(text), "** %s - no words.. (25 killing spree)!", Name(killerid));
  1234.         SendClientMessageToAll(C_CYAN, text);
  1235.         SendClientMessage(killerid, C_LBLUE, "You get $20 000 and +15 score! (killing spree bonus)");
  1236.         GivePlayerMoney(playerid, 20000);
  1237.         GivePlayerScore(playerid, 15);
  1238.     }
  1239.  
  1240.     //====================================================
  1241.  
  1242.     return 1;
  1243. }
  1244.  
  1245. public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
  1246. {
  1247.     RoundInfo[playerid][Damage] += amount;
  1248.  
  1249.     if(LagShoot[playerid] == 1)
  1250.     {
  1251.         if(aDuty[playerid] == 0)
  1252.         {
  1253.             if(damagedid != INVALID_PLAYER_ID)
  1254.             {
  1255.                 if(gTeam[playerid] != gTeam[damagedid])
  1256.                 {
  1257.                     new Float:HEALTH;
  1258.                     new Float:ARMOR;
  1259.                     new Float:DAMAGE;
  1260.  
  1261.                     GetPlayerArmour(damagedid, ARMOR);
  1262.                     GetPlayerHealth(damagedid, HEALTH);
  1263.  
  1264.                     if(ARMOR > 0)
  1265.                     {
  1266.                         if(amount > ARMOR)
  1267.                         {
  1268.                             DAMAGE = ARMOR-amount;
  1269.  
  1270.                             SetPlayerArmour(damagedid, 0.0);
  1271.                             SetPlayerHealth(damagedid, HEALTH-DAMAGE);
  1272.                             return 1;
  1273.                         }
  1274.                         else
  1275.                         {
  1276.                             DAMAGE = ARMOR-amount;
  1277.                             SetPlayerArmour(damagedid, DAMAGE);
  1278.                             return 1;
  1279.                         }
  1280.                     }
  1281.                     else
  1282.                     {
  1283.                         DAMAGE = HEALTH-amount;
  1284.                         SetPlayerHealth(damagedid, DAMAGE);
  1285.                         return 1;
  1286.                     }
  1287.                 }
  1288.             }
  1289.         }
  1290.     }
  1291.     else return 1;
  1292.     return 0;
  1293. }
  1294.  
  1295. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  1296. {
  1297.     if(aDuty[playerid] == 1)
  1298.     {
  1299.         return 0;
  1300.     }
  1301.     if(AFK[playerid] == 1)
  1302.     {
  1303.         return 0;
  1304.     }
  1305.     else return 1;
  1306. }
  1307.  
  1308. public OnVehicleSpawn(vehicleid)
  1309. {
  1310.  
  1311.     return 1;
  1312. }
  1313.  
  1314. public OnVehicleDeath(vehicleid, killerid)
  1315. {
  1316.     return 1;
  1317. }
  1318.  
  1319. public OnPlayerText(playerid, text[])
  1320. {
  1321.     if(PlayerInfo[playerid][pMuted] == 0)
  1322.     {
  1323.         if(text[0] == '@' && PlayerInfo[playerid][pAdmin] > 0)
  1324.         {
  1325.             new string[128];
  1326.             format(string,sizeof(string),"* aCHAT: %s: %s", Name(playerid), text[1]);
  1327.             SendAdminMessage(C_ORANGE, string);
  1328.         }
  1329.         else if(text[0] == '$' && PlayerInfo[playerid][pVIP] > 0)
  1330.         {
  1331.             new string[128];
  1332.             format(string,sizeof(string),"* dCHAT: %s: %s", Name(playerid), text[1]);
  1333.             SendDonorMessage(C_PINK, string);
  1334.         }
  1335.         else
  1336.         {
  1337.             new message[128];
  1338.             format(message, sizeof(message), "%s [%d]:{FFFFFF} %s", Name(playerid), playerid, text);
  1339.             SendClientMessageToAll(GetPlayerColor(playerid), message);
  1340.         }
  1341.     }
  1342.     else return SendClientMessage(playerid, C_RED, "Sorry, but you are muted!");
  1343.     return 0;
  1344. }
  1345.  
  1346. public OnPlayerCommandText(playerid, cmdtext[])
  1347. {
  1348.     return 1;
  1349. }
  1350.  
  1351. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  1352. {
  1353.     if(!success) SendClientMessage(playerid, C_WHITE, "{FFFFFF}[{6B6B6B}ERROR{FFFFFF}] Unknown command, see /help for all commands.");
  1354.     return 1;
  1355. }
  1356.  
  1357.  
  1358. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1359. {
  1360.     return 1;
  1361. }
  1362.  
  1363. public OnPlayerExitVehicle(playerid, vehicleid)
  1364. {
  1365.     return 1;
  1366. }
  1367.  
  1368. public OnPlayerStateChange(playerid, newstate, oldstate)
  1369. {
  1370.     if(newstate == PLAYER_STATE_DRIVER)
  1371.     {
  1372.         new vehicleid = GetPlayerVehicleID(playerid);
  1373.         if(IsVehicleAirforce(vehicleid))
  1374.         {
  1375.             if(gClass[playerid] != AIRFORCE)
  1376.             {
  1377.                 RemovePlayerFromVehicle(playerid);
  1378.                 SendClientMessage(playerid, C_RED, "You need to be airforce class to drive this vehicle!");
  1379.             }
  1380.         }
  1381.         if(IsVehicleEngineer(vehicleid))
  1382.         {
  1383.             if(gClass[playerid] != ENGINEER)
  1384.             {
  1385.                 RemovePlayerFromVehicle(playerid);
  1386.                 SendClientMessage(playerid, C_RED, "You need to be engineer class to drive this vehicle!");
  1387.             }
  1388.         }
  1389.        
  1390.         if(GetPlayerWeapon(playerid) == 29)
  1391.         {
  1392.             SetPlayerArmedWeapon(playerid, 0);
  1393.             SendClientMessage(playerid, C_LGREEN, "You may not driver-drive-by with this weapon!");
  1394.         }
  1395.     }
  1396.     if(newstate == PLAYER_STATE_PASSENGER)
  1397.     {
  1398.         if(GetPlayerWeapon(playerid) == 24 || 27 || 26)
  1399.         {
  1400.             SetPlayerArmedWeapon(playerid, 0);
  1401.             SendClientMessage(playerid, C_LGREEN, "You may not drive-by with this weapon!");
  1402.         }
  1403.     }
  1404.     return 1;
  1405. }
  1406.  
  1407. public OnPlayerEnterCheckpoint(playerid)
  1408. {
  1409.     return 1;
  1410. }
  1411.  
  1412. forward OnPlayerEnterDynamicCP(playerid, checkpointid);
  1413. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  1414. {
  1415.     if(checkpointid == A51CP || checkpointid == AIRCP || checkpointid ==  DESCP || checkpointid ==  FOCCP)
  1416.     {
  1417.         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1418.     }
  1419.     else if(checkpointid == BigEarCP || checkpointid ==  SnakeCP || checkpointid ==  TeeMotelCP || checkpointid ==  OilCP || checkpointid ==  SeaCP || checkpointid ==  HillCP || checkpointid ==  DamCP)
  1420.     {
  1421.         new string[128], pZone;
  1422.         if(GangInfo[checkpointid][gAttacked] == 1) return SendClientMessage(playerid, C_RED, "The zone is being captured!");
  1423.         if(GangInfo[checkpointid][gOwner] == gTeam[playerid]) return SendClientMessage(playerid, C_LBLUE, "Your team owns this zone.");
  1424.         if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You cant capture while in a vehicle!");
  1425.         if(CanCaptureZone[playerid] == 0) return SendClientMessage(playerid, C_RED, "You can capture a zone every 10 seconds!");
  1426.         if(aDuty[playerid] == 1) return SendClientMessage(playerid, C_RED, "You cant capture when on duty!");
  1427.  
  1428.         GangInfo[checkpointid][gAttacked] = 1;
  1429.  
  1430.         pZone = PlayerArea(playerid);
  1431.  
  1432.         PlayerInfo[playerid][pCaptureZone] = 1;
  1433.         if(PlayerInfo[playerid][pVIP] == 1)
  1434.         {
  1435.             PlayerCount[playerid] = Donor1CaptureTime;
  1436.         }
  1437.         else if(PlayerInfo[playerid][pVIP] == 2)
  1438.         {
  1439.             PlayerCount[playerid] = Donor2CaptureTime;
  1440.         }
  1441.         else if(PlayerInfo[playerid][pVIP] == 3)
  1442.         {
  1443.             PlayerCount[playerid] = Donor3CaptureTime;
  1444.         }
  1445.         else
  1446.         {
  1447.             PlayerCount[playerid] = ZoneCaptureTime;
  1448.         }
  1449.  
  1450.         PlayerCountTimer[playerid] = SetTimerEx("GangCount", 1000, true, "iii", playerid,  checkpointid, pZone);
  1451.         format(string, sizeof(string), "[ZONE] %s is being taken over!", ZoneName(checkpointid));
  1452.  
  1453.         CanCaptureZone[playerid] = 0;
  1454.         SetTimerEx("CanCapture", 1000*10, false, "i", playerid);
  1455.         SendClientMessageToAll(C_LGREEN, string);
  1456.     }
  1457.     return 1;
  1458. }
  1459.  
  1460. forward OnPlayerLeaveDynamicCP(playerid, checkpointid);
  1461. public OnPlayerLeaveDynamicCP(playerid, checkpointid)
  1462. {
  1463.     if(PlayerInfo[playerid][pCaptureZone] == 1)
  1464.     {
  1465.         if(GangInfo[checkpointid][gOwner] == gTeam[playerid]) return 0;
  1466.  
  1467.         new pZone;
  1468.         GangInfo[checkpointid][gAttacked] = 0;
  1469.  
  1470.         pZone = PlayerArea(playerid);
  1471.         GangZoneStopFlashForAll(pZone);
  1472.  
  1473.         SendClientMessage(playerid, C_RED, "You stopped capturing the zone!");
  1474.         KillTimer(PlayerCountTimer[playerid]);
  1475.         PlayerInfo[playerid][pCaptureZone] = 0;
  1476.     }
  1477.     return 1;
  1478. }
  1479. public OnPlayerLeaveCheckpoint(playerid)
  1480. {
  1481.     return 1;
  1482. }
  1483.  
  1484. public OnPlayerEnterRaceCheckpoint(playerid)
  1485. {
  1486.     return 1;
  1487. }
  1488.  
  1489. public OnPlayerLeaveRaceCheckpoint(playerid)
  1490. {
  1491.     return 1;
  1492. }
  1493.  
  1494. public OnRconCommand(cmd[])
  1495. {
  1496.     return 1;
  1497. }
  1498.  
  1499. public OnPlayerRequestSpawn(playerid)
  1500. {
  1501.     if(IsTeamFull(gTeam[playerid]))
  1502.     {
  1503.         SendClientMessage(playerid, C_GREY, "Team full! Please choose another one.");
  1504.         return 0;
  1505.     }
  1506.     else return 1;
  1507.  
  1508. }
  1509.  
  1510. public OnObjectMoved(objectid)
  1511. {
  1512.     return 1;
  1513. }
  1514.  
  1515. public OnPlayerObjectMoved(playerid, objectid)
  1516. {
  1517.     return 1;
  1518. }
  1519.  
  1520. public OnPlayerPickUpPickup(playerid, pickupid)
  1521. {
  1522.     return 1;
  1523. }
  1524.  
  1525. public OnVehicleMod(playerid, vehicleid, componentid)
  1526. {
  1527.     return 1;
  1528. }
  1529.  
  1530. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1531. {
  1532.     return 1;
  1533. }
  1534.  
  1535. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1536. {
  1537.     return 1;
  1538. }
  1539.  
  1540. public OnPlayerSelectedMenuRow(playerid, row)
  1541. {
  1542.     return 1;
  1543. }
  1544.  
  1545. public OnPlayerExitedMenu(playerid)
  1546. {
  1547.     return 1;
  1548. }
  1549.  
  1550. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  1551. {
  1552.     return 1;
  1553. }
  1554.  
  1555. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1556. {
  1557.     if(PRESSED(KEY_FIRE)) // LMB
  1558.     {
  1559.         if(IsPlayerChoosingClass[playerid] == 1)
  1560.         {
  1561.             ClassChoosingStep[playerid] --;
  1562.            
  1563.             if(ClassChoosingStep[playerid] == -1)
  1564.             {
  1565.                 ClassChoosingStep[playerid] = 5;
  1566.             }
  1567.            
  1568.             SetPlayerClass(playerid);
  1569.         }
  1570.     }
  1571.     if(PRESSED(KEY_HANDBRAKE)) // RMB
  1572.     {
  1573.         if(IsPlayerChoosingClass[playerid] == 1)
  1574.         {
  1575.             ClassChoosingStep[playerid] ++;
  1576.            
  1577.             if(ClassChoosingStep[playerid] == 6)
  1578.             {
  1579.                 ClassChoosingStep[playerid] = 0;
  1580.             }
  1581.            
  1582.             SetPlayerClass(playerid);
  1583.         }
  1584.     }
  1585.     if(PRESSED(KEY_JUMP)) // LSHIFT
  1586.     {
  1587.         if(IsPlayerChoosingClass[playerid] == 1)
  1588.         {
  1589.             if(ClassChoosingStep[playerid] == 0) // ASSAULT
  1590.             {
  1591.                 gClass[playerid] = ASSAULT;
  1592.             }
  1593.             if(ClassChoosingStep[playerid] == 1) // MEDIC
  1594.             {
  1595.                 if(Rank(playerid) != 2) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
  1596.                 gClass[playerid] = MEDIC;
  1597.             }
  1598.             if(ClassChoosingStep[playerid] == 2) // ANTI-TANK
  1599.             {
  1600.                 if(Rank(playerid) != 3) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
  1601.                 gClass[playerid] = ANTI-TANK;
  1602.             }
  1603.             if(ClassChoosingStep[playerid] == 3) // ENGINEER
  1604.             {
  1605.                 if(Rank(playerid) != 4) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
  1606.                 gClass[playerid] = ENGINEER;
  1607.             }
  1608.             if(ClassChoosingStep[playerid] == 4) // AIRFORCE
  1609.             {
  1610.                 if(Rank(playerid) != 5) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
  1611.                 gClass[playerid] = AIRFORCE;
  1612.             }
  1613.             if(ClassChoosingStep[playerid] == 5) // SPECICAL-OPS
  1614.             {
  1615.                 if(Rank(playerid) != 6) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
  1616.                 gClass[playerid] = SPEC-OPS;
  1617.             }
  1618.  
  1619.             TextDrawHideForPlayer(playerid, ClassBox);
  1620.             TextDrawHideForPlayer(playerid, ClassNameLine);
  1621.             TextDrawHideForPlayer(playerid, ClassWeapons);
  1622.             TextDrawHideForPlayer(playerid, ClassDescription1);
  1623.             TextDrawHideForPlayer(playerid, ClassDescription2);
  1624.             TextDrawHideForPlayer(playerid, ClassRequiredRank);
  1625.            
  1626.             TextDrawHideForPlayer(playerid, ClassHelpBox);
  1627.             TextDrawHideForPlayer(playerid, ClassClick);
  1628.             TextDrawHideForPlayer(playerid, ClassSpawn);
  1629.  
  1630.             IsPlayerChoosingClass[playerid] = 0;
  1631.             TogglePlayerControllable(playerid, 1);
  1632.             SpawnPlayer(playerid);
  1633.         }
  1634.     }
  1635.  
  1636.        
  1637.     return 1;
  1638. }
  1639.  
  1640. public OnRconLoginAttempt(ip[], password[], success)
  1641. {
  1642.     return 1;
  1643. }
  1644.  
  1645. public OnPlayerUpdate(playerid)
  1646. {
  1647.     return 1;
  1648. }
  1649.  
  1650. public OnPlayerStreamIn(playerid, forplayerid)
  1651. {
  1652.     return 1;
  1653. }
  1654.  
  1655. public OnPlayerStreamOut(playerid, forplayerid)
  1656. {
  1657.     return 1;
  1658. }
  1659.  
  1660. public OnVehicleStreamIn(vehicleid, forplayerid)
  1661. {
  1662.     return 1;
  1663. }
  1664.  
  1665. public OnVehicleStreamOut(vehicleid, forplayerid)
  1666. {
  1667.     return 1;
  1668. }
  1669.  
  1670. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1671. {
  1672.     switch(dialogid)
  1673.     {
  1674.         case D_REGISTER:
  1675.         {
  1676.             if(response)
  1677.             {
  1678.                 if(strlen(inputtext) >= 1)
  1679.                 {
  1680.                     new pass[50];
  1681.                     mysql_real_escape_string(inputtext, pass);
  1682.                     Register(playerid, pass);
  1683.                 }
  1684.                 else
  1685.                 {
  1686.                     new string[128];
  1687.                     format(string, sizeof(string), "{FFFFFF}Hello {00AAFF}%s{FFFFFF}! This username isn't registered.\nPlease type your new password here:", Name(playerid));
  1688.                     ShowPlayerDialog(playerid, D_REGISTER, DIALOG_STYLE_PASSWORD, "Register", string, "Register", "Kick");
  1689.                 }
  1690.             }
  1691.             if(!response)
  1692.             {
  1693.                 return Kick(playerid);
  1694.             }
  1695.         }
  1696.         case D_LOGIN:
  1697.         {
  1698.             if(response)
  1699.             {
  1700.                 new query[200], pass[50];
  1701.                 mysql_real_escape_string(inputtext, pass);
  1702.                 format(query, sizeof(query), "SELECT `user` FROM `accounts` WHERE user = '%s' AND password = md5('%s')", Name(playerid), pass);
  1703.                 mysql_query(query);
  1704.                 mysql_store_result();
  1705.                 new rows = mysql_num_rows();
  1706.                 if(rows == 1)
  1707.                 {
  1708.                     Login(playerid);
  1709.                 }
  1710.                 if(!rows)
  1711.                 {
  1712.                     new string[150];
  1713.                     format(string, sizeof(string), "{FFFFFF}Hello {00AAFF}%s{FFFFFF}! This username is registered.\n{FF0000}Please type your correct password here:", Name(playerid));
  1714.                     ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Kick");
  1715.                 }
  1716.                 mysql_free_result();
  1717.             }
  1718.             if(!response)
  1719.             {
  1720.                 return Kick(playerid);
  1721.             }
  1722.         }
  1723.         case D_SHOP:
  1724.         {
  1725.             if(response)
  1726.             {
  1727.                 if(listitem == 0)
  1728.                 {
  1729.                     if(GetPlayerMoney(playerid) >= 3000)
  1730.                     {
  1731.                         GivePlayerMoney(playerid, -3000);
  1732.                         SetPlayerHealth(playerid, 99);
  1733.                         SendClientMessage(playerid, C_LGREEN, "Health refilled! It cost $3000!");
  1734.                         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1735.                     }
  1736.                     else return SendClientMessage(playerid, C_RED, "Not enough money!");
  1737.                 }
  1738.                 if(listitem == 1)
  1739.                 {
  1740.                     if(GetPlayerMoney(playerid) >= 3000)
  1741.                     {
  1742.                         GivePlayerMoney(playerid, -3000);
  1743.                         SetPlayerArmour(playerid, 99);
  1744.                         SendClientMessage(playerid, C_LGREEN, "Armour refilled! It cost $3000!");
  1745.                         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1746.                     }
  1747.                     else return SendClientMessage(playerid, C_RED, "Not enough money!");
  1748.                 }
  1749.                 if(listitem == 2)
  1750.                 {
  1751.                     if(GetPlayerMoney(playerid) >= 1000)
  1752.                     {
  1753.                         GivePlayerMoney(playerid, -1000);
  1754.                         GivePlayerWeapon(playerid, 4, 1);
  1755.                         SendClientMessage(playerid, C_LGREEN, "You bought a knife! It cost $1000!");
  1756.                         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1757.                     }
  1758.                     else return SendClientMessage(playerid, C_RED, "Not enough money!");
  1759.                 }
  1760.                 if(listitem == 3)
  1761.                 {
  1762.                     if(GetPlayerMoney(playerid) >= 1500)
  1763.                     {
  1764.                         GivePlayerMoney(playerid, -1500);
  1765.                         GivePlayerWeapon(playerid, 9, 1);
  1766.                         SendClientMessage(playerid, C_LGREEN, "You bought a chainsaw! It cost $1500!");
  1767.                         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1768.                     }
  1769.                     else return SendClientMessage(playerid, C_RED, "Not enough money!");
  1770.                 }
  1771.                 if(listitem == 4)
  1772.                 {
  1773.                     if(GetPlayerMoney(playerid) >= 2000)
  1774.                     {
  1775.                         GivePlayerMoney(playerid, -2000);
  1776.                         GivePlayerWeapon(playerid, 24, 50);
  1777.                         SendClientMessage(playerid, C_LGREEN, "You bought a Deagle! It cost $2000!");
  1778.                         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1779.                     }
  1780.                     else return SendClientMessage(playerid, C_RED, "Not enough money!");
  1781.                 }
  1782.                 if(listitem == 5)
  1783.                 {
  1784.                     if(GetPlayerMoney(playerid) >= 4000)
  1785.                     {
  1786.                         GivePlayerMoney(playerid, -4000);
  1787.                         GivePlayerWeapon(playerid, 27, 50);
  1788.                         SendClientMessage(playerid, C_LGREEN, "You bought a Combat Shotgun! It cost $4000!");
  1789.                         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1790.                     }
  1791.                     else return SendClientMessage(playerid, C_RED, "Not enough money!");
  1792.                 }
  1793.                 if(listitem == 6)
  1794.                 {
  1795.                     if(GetPlayerMoney(playerid) >= 2500)
  1796.                     {
  1797.                         GivePlayerMoney(playerid, -2500);
  1798.                         GivePlayerWeapon(playerid, 29, 50);
  1799.                         SendClientMessage(playerid, C_LGREEN, "You bought a MP5! It cost $2500!");
  1800.                         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1801.                     }
  1802.                     else return SendClientMessage(playerid, C_RED, "Not enough money!");
  1803.                 }
  1804.                 if(listitem == 7)
  1805.                 {
  1806.                     if(GetPlayerMoney(playerid) >= 1500)
  1807.                     {
  1808.                         GivePlayerMoney(playerid, -4000);
  1809.                         GivePlayerWeapon(playerid, 31, 50);
  1810.                         SendClientMessage(playerid, C_LGREEN, "You bought a M4! It cost $4000!");
  1811.                         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1812.                     }
  1813.                     else return SendClientMessage(playerid, C_RED, "Not enough money!");
  1814.                 }
  1815.                 if(listitem == 8)
  1816.                 {
  1817.                     if(GetPlayerMoney(playerid) >= 1500)
  1818.                     {
  1819.                         GivePlayerMoney(playerid, -1500);
  1820.                         GivePlayerWeapon(playerid, 8, 1);
  1821.                         SendClientMessage(playerid, C_LGREEN, "You bought a Katana! It cost $1500!");
  1822.                         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1823.                     }
  1824.                     else return SendClientMessage(playerid, C_RED, "Not enough money!");
  1825.                 }
  1826.                 if(listitem == 9)
  1827.                 {
  1828.                     if(GetPlayerMoney(playerid) >= 4000)
  1829.                     {
  1830.                         GivePlayerMoney(playerid, -4000);
  1831.                         GivePlayerWeapon(playerid, 44, 1);
  1832.                         SendClientMessage(playerid, C_LGREEN, "You bought Nightvision! It cost $4000!");
  1833.                         ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
  1834.                     }
  1835.                     else return SendClientMessage(playerid, C_RED, "Not enough money!");
  1836.                 }
  1837.             }
  1838.         }
  1839.         case D_HELP:
  1840.         {
  1841.             if(response)
  1842.             {
  1843.                 if(listitem == 0)
  1844.                 {
  1845.                     ShowDialogHelp(playerid, INFO);
  1846.                 }
  1847.                 else if(listitem == 1)
  1848.                 {
  1849.                     ShowDialogHelp(playerid, RULES);
  1850.                 }
  1851.                 else if(listitem == 2)
  1852.                 {
  1853.                     ShowDialogHelp(playerid, COMMANDS);
  1854.                 }
  1855.                 else if(listitem == 3)
  1856.                 {
  1857.                     ShowDialogHelp(playerid, RANKS);
  1858.                 }
  1859.                 else if(listitem == 4)
  1860.                 {
  1861.                     ShowDialogHelp(playerid, CLASS);
  1862.                 }
  1863.             }
  1864.         }
  1865.         case D_INFO:
  1866.         {
  1867.             if(response)
  1868.             {
  1869.                 ShowDialogHelp(playerid, RULES);
  1870.             }
  1871.             else return ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
  1872.         }
  1873.         case D_RULES:
  1874.         {
  1875.             if(response)
  1876.             {
  1877.                 ShowDialogHelp(playerid, COMMANDS);
  1878.             }
  1879.             else return ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
  1880.         }
  1881.         case D_COMMANDS:
  1882.         {
  1883.             if(response)
  1884.             {
  1885.                 ShowDialogHelp(playerid, RANKS);
  1886.             }
  1887.             else return ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
  1888.         }
  1889.         case D_RANKS:
  1890.         {
  1891.             if(response)
  1892.             {
  1893.                 ShowDialogHelp(playerid, CLASS);
  1894.             }
  1895.             else return ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
  1896.         }
  1897.         case D_CLASSINFO:
  1898.         {
  1899.             if(response)
  1900.             {
  1901.                 ShowDialogHelp(playerid, INFO);
  1902.             }
  1903.             else return ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
  1904.         }
  1905.         case D_RADIO:
  1906.         {
  1907.             if(response)
  1908.             {
  1909.                 if(listitem == 0)
  1910.                 {
  1911.                     PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=21585");
  1912.                 }
  1913.                 if(listitem == 1)
  1914.                 {
  1915.                     PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377200");
  1916.                 }
  1917.                 if(listitem == 2)
  1918.                 {
  1919.                     PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
  1920.                 }
  1921.                 if(listitem == 3)
  1922.                 {
  1923.                     PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=728272");
  1924.                 }
  1925.                 if(listitem == 4)
  1926.                 {
  1927.                     PlayAudioStreamForPlayer(playerid, "http://212.95.32.219:8005");
  1928.                 }
  1929.                 if(listitem == 5)
  1930.                 {
  1931.                     PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=65456");
  1932.                 }
  1933.                 if(listitem == 6)
  1934.                 {
  1935.                     PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=27824");
  1936.                 }
  1937.             }
  1938.         }
  1939.     }
  1940.     return 1;
  1941. }
  1942.  
  1943. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  1944. {
  1945.     return 1;
  1946. }
  1947.  
  1948. CMD:help(playerid, params[])
  1949. {
  1950.     ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
  1951.     return 1;
  1952. }
  1953.  
  1954. CMD:info(playerid, params[])
  1955. {
  1956.     ShowDialogHelp(playerid, INFO);
  1957.     return 1;
  1958. }
  1959.  
  1960. CMD:rules(playerid, params[])
  1961. {
  1962.     ShowDialogHelp(playerid, RULES);
  1963.     return 1;
  1964. }
  1965.  
  1966. CMD:commands(playerid, params[])
  1967. {
  1968.     ShowDialogHelp(playerid, COMMANDS);
  1969.     return 1;
  1970. }
  1971.  
  1972. CMD:ranks(playerid, params[])
  1973. {
  1974.     ShowDialogHelp(playerid, RANKS);
  1975.     return 1;
  1976. }
  1977.  
  1978. CMD:class(playerid, params[])
  1979. {
  1980.     ShowDialogHelp(playerid, CLASS);
  1981.     return 1;
  1982. }
  1983.  
  1984. CMD:pm(playerid, params[])
  1985. {
  1986.     new targetid, string[128], message[128];
  1987.     if(sscanf(params, "us[128]", targetid, message)) return SendClientMessage(playerid, C_GREY, "USAGE: /pm [playerid] [message]");
  1988.     if(playerid == targetid) return SendClientMessage(playerid, C_RED, "You can't message yourself!");
  1989.     if(targetid == INVALID_PLAYER_ID || !IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "Player is not connected!");
  1990.     {
  1991.         if(TogglePM[targetid] == 0) return SendClientMessage(playerid, C_RED, "The player has disabled his PM's!");
  1992.         format(string, sizeof(string), "((PM from %s[%d]: %s ))", Name(playerid), playerid, message);
  1993.         SendClientMessage(targetid, C_YELLOW, string);
  1994.         format(string, sizeof(string), "((PM to %s[%d]: %s ))", Name(targetid), targetid, message);
  1995.         SendClientMessage(playerid, C_YELLOW, string);
  1996.         printf("PM: %s (%s -> %s)", message, Name(playerid), Name(targetid));
  1997.     }
  1998.     return 1;
  1999. }
  2000.  
  2001. CMD:togglepm(playerid, params[])
  2002. {
  2003.     if(TogglePM[playerid] == 0)
  2004.     {
  2005.         SendClientMessage(playerid, C_ORANGE, "You have enabled your PM's!");
  2006.         TogglePM[playerid] = 1;
  2007.     }
  2008.     else if(TogglePM[playerid] == 1)
  2009.     {
  2010.         SendClientMessage(playerid, C_ORANGE, "You have disabled your PM's!");
  2011.         TogglePM[playerid] = 0;
  2012.     }
  2013.     return 1;
  2014. }
  2015.  
  2016. CMD:kill(playerid, params[])
  2017. {
  2018.     SetPlayerHealth(playerid, 0);
  2019.     return 1;
  2020. }
  2021.  
  2022. CMD:resetteam(playerid, params[])
  2023. {
  2024.     ForceClassSelection(playerid);
  2025.     SendClientMessage(playerid, C_LBLUE, "Team selection after death!");
  2026.     return 1;
  2027. }
  2028.  
  2029. CMD:rt(playerid, params[])
  2030.     return cmd_resetteam(playerid, params);
  2031.  
  2032. CMD:resetclass(playerid, params[])
  2033. {
  2034.     IsPlayerChoosingClass[playerid] = 1;
  2035.     ClassPositionSet[playerid] = 0;
  2036.     SendClientMessage(playerid, C_LBLUE, "Class selection when you spawn!");
  2037.     return 1;
  2038. }
  2039.  
  2040. CMD:rc(playerid, params[])
  2041.     return cmd_resetclass(playerid, params);
  2042.  
  2043. CMD:radio(playerid, params[])
  2044. {
  2045.     StopAudioStreamForPlayer(playerid);
  2046.     ShowPlayerDialog(playerid, D_RADIO, DIALOG_STYLE_LIST, "Online radio stations", "idobi Radio (Pop)\nTechnobase (Techno)\nHot 108 Jamz (Pop)\nSky.FM (Top Hits)\nTre.ee (Misc)\nDefay.DE (R&B)\nGroove Salad (Chill)","Start", "Stop");
  2047.     return 1;
  2048. }
  2049.  
  2050. CMD:mheal(playerid, params[])
  2051. {
  2052.     if(gClass[playerid] == MEDIC)
  2053.     {
  2054.         if(CanHeal[playerid] == 1)
  2055.         {
  2056.             new targetid, Float:XYZ[3];
  2057.             if(sscanf(params, "u", targetid))
  2058.             {
  2059.                 SendClientMessage(playerid, C_LORANGE, "You have healed yourself! {FFFFFF}You can also use: /mheal [playerid]");
  2060.                 SetPlayerHealth(playerid, 99);
  2061.  
  2062.                 SetTimerEx("MedicHeal", 1000*60*1, false, "i", playerid);
  2063.             }
  2064.             else
  2065.             {
  2066.                 if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, C_RED, "Player not found!");
  2067.  
  2068.                 GetPlayerPos(targetid, XYZ[0], XYZ[1], XYZ[2]);
  2069.                 if(IsPlayerInRangeOfPoint(playerid, 5.0, XYZ[0], XYZ[1], XYZ[2]))
  2070.                 {
  2071.                     SendClientMessage(playerid, C_LORANGE, "Player healed! {FFFFFF}You can also use: /mheal to heal yourself.");
  2072.  
  2073.                     SendClientMessage(targetid, C_LORANGE, "You have been healed by a medic!");
  2074.                     SetPlayerHealth(targetid, 100.0);
  2075.  
  2076.                     SetTimerEx("MedicHeal", 1000*60*1, false, "i", playerid);
  2077.                 }
  2078.                 else return SendClientMessage(playerid, C_RED, "You need to be closer!");
  2079.             }
  2080.  
  2081.             CanHeal[playerid] = 0;
  2082.         }
  2083.         else return SendClientMessage(playerid, C_LORANGE, "You can heal after 1 minute!");
  2084.     }
  2085.     else return SendClientMessage(playerid, C_RED, "You need to be medic class to use this command!");
  2086.     return 1;
  2087. }
  2088.  
  2089. CMD:r(playerid, params[])
  2090. {
  2091.     new text[128];
  2092.     if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, C_GREY, "USAGE: /r [text]");
  2093.  
  2094.     new string[128];
  2095.     format(string, sizeof(string), "** %s %s [%d]: %s **", ClassName(playerid), Name(playerid), playerid, text);
  2096.     foreach(new i: Player)
  2097.     {
  2098.         if(gTeam[playerid] == gTeam[i])
  2099.         {
  2100.             SendClientMessage(i, C_RADIOBLUE, string);
  2101.         }
  2102.     }
  2103.     return 1;
  2104. }
  2105.  
  2106. CMD:sync(playerid, params[])
  2107. {
  2108.     new Float: XYZ[3];
  2109.     GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
  2110.     if(IsPlayerInAnyVehicle(playerid))
  2111.     {
  2112.         new vehicleid = GetPlayerVehicleID(playerid);
  2113.         new seat = GetPlayerVehicleSeat(playerid);
  2114.         SetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
  2115.         PutPlayerInVehicle(playerid, vehicleid, seat);
  2116.     }
  2117.     else
  2118.     {
  2119.         SetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
  2120.     }
  2121.  
  2122.     SendClientMessage(playerid, C_DGREEN, "You are synchronized with the server!");
  2123.     return 1;
  2124. }
  2125.  
  2126. CMD:ask(playerid, params[])
  2127. {
  2128.     new text[128], string[128];
  2129.     if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, C_GREY, "USAGE: /ask [text]");
  2130.  
  2131.     SendClientMessage(playerid, C_LORANGE, "Your question has been sent to all online admins!");
  2132.     format(string, sizeof(string), "PLAYER QUESTION:{FFB13D} %s [%d] {FFFFFF}-{FFB13D} %s", Name(playerid), playerid, text);
  2133.     SendAdminMessage(C_WHITE, string);
  2134.     return 1;
  2135. }
  2136.  
  2137. CMD:myteam(playerid, params[])
  2138. {
  2139.     new string[128];
  2140.     format(string, sizeof(string), "<< Your current team is: %s", TeamName(playerid));
  2141.     SendClientMessage(playerid, C_WHITE, string);
  2142.     return 1;
  2143. }
  2144.  
  2145. CMD:myrank(playerid, params[])
  2146. {
  2147.     new string[128];
  2148.     format(string, sizeof(string), "<< Your current rank is: %d (%s)", Rank(playerid), RankName(playerid));
  2149.     SendClientMessage(playerid, C_WHITE, string);
  2150.     return 1;
  2151. }
  2152.  
  2153. CMD:afk(playerid, params[])
  2154. {
  2155.     new string[128];
  2156.     if(AFK[playerid] == 0)
  2157.     {
  2158.         if(IsPlayerCloseToEnemy(playerid)) return SendClientMessage(playerid, C_ORANGE, "You cannot go AFK, when enemies are nearby!");
  2159.  
  2160.         TogglePlayerControllable(playerid, 0);
  2161.         AFK[playerid] = 1;
  2162.         SetRank3DText(playerid);
  2163.  
  2164.         format(string, sizeof(string), "** %s is now AFK!", Name(playerid));
  2165.         SendClientMessageToAll(C_LIME, string);
  2166.     }
  2167.     else
  2168.     {
  2169.         format(string, sizeof(string), "** %s isn't AFK anymore!", Name(playerid));
  2170.         SendClientMessageToAll(C_LIME, string);
  2171.         TogglePlayerControllable(playerid, 1);
  2172.         AFK[playerid] = 0;
  2173.         SetRank3DText(playerid);
  2174.     }
  2175.     return 1;
  2176. }
  2177.  
  2178. CMD:chat(playerid, params[])
  2179. {
  2180.     if(isnull(params)) return SendClientMessage(playerid,-1,"Usage: /message [Text]");
  2181.     new test[128];
  2182.     format(test, sizeof(test), "Me: %s", params);
  2183.     SendClientMessage(playerid, 0xFFFFFFFF, test);
  2184.     SendPlayerMessageToCleverbot(playerid, params);
  2185.     return 1;
  2186. }
  2187.  
  2188. CMD:lagshoot(playerid, params[])
  2189. {
  2190.     if(LagShoot[playerid] == 0)
  2191.     {
  2192.         LagShoot[playerid] = 1;
  2193.         SendClientMessage(playerid, C_WHITE, "["COLOR_LIME"ALSS"COLOR_WHITE"] You have enabled anti-lag shoot system! (NOTE: You have it enabled, others can still disable it and lag-shoot you).");
  2194.     }
  2195.     else
  2196.     {
  2197.         LagShoot[playerid] = 0;
  2198.         SendClientMessage(playerid, C_WHITE, "["COLOR_RED"ALSS"COLOR_WHITE"] You have disabled anti-lag shoot system! (NOTE: You have it disabled, others can still anti-lag shoot you).");
  2199.     }
  2200.     return 1;
  2201. }
  2202.  
  2203. CMD:roundstats(playerid, params[])
  2204. {
  2205.     if(RoundStats[playerid] == 0)
  2206.     {
  2207.         RoundStats[playerid] = 1;
  2208.         SendClientMessage(playerid, C_WHITE, "** You have "COLOR_DGREEN"enabled"COLOR_WHITE" showing last round's stats!");
  2209.     }
  2210.     else
  2211.     {
  2212.         RoundStats[playerid] = 0;
  2213.         SendClientMessage(playerid, C_WHITE, "** You have "COLOR_RED"disabled"COLOR_WHITE" showing last round's stats!");
  2214.     }
  2215.     return 1;
  2216. }
  2217.  
  2218. //========================================================================
  2219. /*   ____                                         _
  2220.     |  _ \  ___  _ __   ___  _ __   ___ _   _ ___| |_ ___ _ __ ___
  2221.     | | | |/ _ \| '_ \ / _ \| '__| / __| | | / __| __/ _ \ '_ ` _ \
  2222.     | |_| | (_) | | | | (_) | |    \__ \ |_| \__ \ ||  __/ | | | | |
  2223.     |____/ \___/|_| |_|\___/|_|    |___/\__, |___/\__\___|_| |_| |_|
  2224.                                      |___/                              */
  2225. //========================================================================
  2226. // Donor system
  2227. // GENERAL..
  2228. //
  2229.  
  2230. CMD:donors(playerid, params[])
  2231. {
  2232.     new count = 0, dialogstring[576], namestring[96];
  2233.     foreach(new i: Player)
  2234.     {
  2235.         if(PlayerInfo[i][pVIP] > 0)
  2236.         {
  2237.             format(namestring, sizeof(namestring), "{FF0000}%s [ID: %d] ::{FF9900} Donor level - {FF0000}%d\n", Name(i), playerid, PlayerInfo[i][pVIP]);
  2238.             strcat(dialogstring, namestring);
  2239.             count ++;
  2240.         }
  2241.     }
  2242.     if(count != 0)
  2243.     {
  2244.         ShowPlayerDialog(playerid, D_ADMINS, DIALOG_STYLE_MSGBOX, "----==== Online Donors ====----", dialogstring, "Close", "");
  2245.     }
  2246.     else ShowPlayerDialog(playerid, D_ADMINS, DIALOG_STYLE_MSGBOX, "----==== Online Donors ====----", "No online donors!", "Close", "");
  2247.     return 1;
  2248. }
  2249.  
  2250. CMD:makedonor(playerid, params[])
  2251. {
  2252.     new targetid, level, string[128], sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
  2253.     if(sscanf(params, "ui", targetid, level)) return SendClientMessage(playerid, C_GREY, "USAGE: /makedonor [playerid] [level 0-3]");
  2254.     {
  2255.         if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
  2256.         if(level < 0 || level > 3) return SendClientMessage(playerid, C_GREY, "SERVER: Cannot go under 0 or above 3.");
  2257.         if(PlayerInfo[playerid][pAdmin] >= 3)
  2258.         {
  2259.             PlayerInfo[targetid][pVIP] = level;
  2260.             format(sendername, sizeof(sendername), "%s", Name(playerid));
  2261.             format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
  2262.             format(string, sizeof(string),"aCMD: %s has promoted %s to donor level %d.", sendername, giveplayer, level);
  2263.             SendAdminMessage(C_YELLOW, string);
  2264.             format(string, sizeof(string),"aCMD: %s has promoted you to donor level %d.", sendername, level);
  2265.             SendClientMessage(targetid, C_YELLOW, string);
  2266.         }
  2267.         else return SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
  2268.     }
  2269.     return 1;
  2270. }
  2271.  
  2272. CMD:dhelp(playerid, params[])
  2273. {
  2274.     if(PlayerInfo[playerid][pVIP] > 0)
  2275.     {
  2276.         ShowDialogHelp(playerid, DONOR);
  2277.     }
  2278.     return 1;
  2279. }
  2280.  
  2281. //
  2282. // DONOR LEVEL 1
  2283. //
  2284.  
  2285. CMD:dheal(playerid, params[])
  2286. {
  2287.     if(DonorHeal[playerid] == 1)
  2288.     {
  2289.         SendClientMessage(playerid, C_LIME, "Health refilled! (abusing the command will cause removing donor)");
  2290.         SetPlayerHealth(playerid, 99);
  2291.         DonorHeal[playerid] = 1;
  2292.     }
  2293.     else return SendClientMessage(playerid, C_RED, "Only 1 heal per death!");
  2294.     return 1;
  2295. }
  2296.  
  2297. CMD:dnos(playerid, params[])
  2298. {
  2299.     if(PlayerInfo[playerid][pVIP] > 0)
  2300.     {
  2301.         if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You aren't in any vehicle!");
  2302.         SendClientMessage(playerid, C_LIME, "NOS added to your vehicle!");
  2303.         AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  2304.     }
  2305.     return 1;
  2306. }
  2307.  
  2308. CMD:dnrg(playerid, params[])
  2309. {
  2310.     if(PlayerInfo[playerid][pVIP] > 0)
  2311.     {
  2312.         if(LastDonorVehicle[playerid] != 0) DestroyVehicle(LastDonorVehicle[playerid]);
  2313.         if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You already are in a vehicle!");
  2314.  
  2315.         new Float:XYZ[3], Float:Angle;
  2316.         GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
  2317.         GetPlayerFacingAngle(playerid, Angle);
  2318.         new car = CreateVehicle(522, XYZ[0]+1.0, XYZ[1]+1.0, XYZ[2], Angle, 6, 6, -1);
  2319.         PutPlayerInVehicle(playerid, car, 0);
  2320.         LastDonorVehicle[playerid] = GetPlayerVehicleID(playerid);
  2321.     }
  2322.     return 1;
  2323. }
  2324.  
  2325. CMD:dhot(playerid, params[])
  2326. {
  2327.     if(PlayerInfo[playerid][pVIP] > 0)
  2328.     {
  2329.         if(LastDonorVehicle[playerid] != 0) DestroyVehicle(LastDonorVehicle[playerid]);
  2330.         if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You already are in a vehicle!");
  2331.  
  2332.         new Float:XYZ[3], Float:Angle;
  2333.         GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
  2334.         GetPlayerFacingAngle(playerid, Angle);
  2335.         new car = CreateVehicle(434, XYZ[0]+1.0, XYZ[1]+1.0, XYZ[2], Angle, 6, 6, -1);
  2336.         PutPlayerInVehicle(playerid, car, 0);
  2337.         LastDonorVehicle[playerid] = GetPlayerVehicleID(playerid);
  2338.     }
  2339.     return 1;
  2340. }
  2341.  
  2342. //
  2343. // DONOR LEVEL 2
  2344. //
  2345.  
  2346. CMD:dsay(playerid, params[])
  2347. {
  2348.     if(PlayerInfo[playerid][pVIP] > 1)
  2349.     {
  2350.         new string[64], message[64], targetid;
  2351.         if(sscanf(params, "us[128]", targetid, message)) return SendClientMessage(playerid, C_GREY, "USAGE: /dsay [playerid] [message]");
  2352.         format(string, sizeof(string),"~r~VIP~w~ %s: %s", Name(playerid), message);
  2353.         GameTextForPlayer(targetid, string, 2500, 3);
  2354.     }
  2355.     return 1;
  2356. }
  2357.  
  2358. CMD:denf(playerid, params[])
  2359. {
  2360.     if(PlayerInfo[playerid][pVIP] > 1)
  2361.     {
  2362.         if(LastDonorVehicle[playerid] != 0) DestroyVehicle(LastDonorVehicle[playerid]);
  2363.         if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You already are in a vehicle!");
  2364.  
  2365.         new Float:XYZ[3], Float:Angle;
  2366.         GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
  2367.         GetPlayerFacingAngle(playerid, Angle);
  2368.         new car = CreateVehicle(427, XYZ[0]+1.0, XYZ[1]+1.0, XYZ[2], Angle, 6, 6, -1);
  2369.         PutPlayerInVehicle(playerid, car, 0);
  2370.         LastDonorVehicle[playerid] = GetPlayerVehicleID(playerid);
  2371.     }
  2372.     return 1;
  2373. }
  2374.  
  2375. CMD:dqua(playerid, params[])
  2376. {
  2377.     if(PlayerInfo[playerid][pVIP] > 1)
  2378.     {
  2379.         if(LastDonorVehicle[playerid] != 0) DestroyVehicle(LastDonorVehicle[playerid]);
  2380.         if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You already are in a vehicle!");
  2381.  
  2382.         new Float:XYZ[3], Float:Angle;
  2383.         GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
  2384.         GetPlayerFacingAngle(playerid, Angle);
  2385.         new car = CreateVehicle(471, XYZ[0]+1.0, XYZ[1]+1.0, XYZ[2], Angle, 6, 6, -1);
  2386.         PutPlayerInVehicle(playerid, car, 0);
  2387.         LastDonorVehicle[playerid] = GetPlayerVehicleID(playerid);
  2388.     }
  2389.     return 1;
  2390. }
  2391.  
  2392. //
  2393. // DONOR LEVEL 3
  2394. //
  2395.  
  2396. CMD:dskin(playerid, params[])
  2397. {
  2398.     if(PlayerInfo[playerid][pVIP] > 2)
  2399.     {
  2400.         new string[64], skinid;
  2401.         if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, C_GREY, "USAGE: /dskin [skinid]");
  2402.         if(skinid < 0 || skinid > 299) return SendClientMessage(playerid, C_GREY, "Skins ID 0-299 only!");
  2403.  
  2404.         SetPlayerSkin(playerid, skinid);
  2405.         format(string, sizeof(string), "Skin changed to ID: %d!", skinid);
  2406.         SendClientMessage(playerid, C_LIME, string);
  2407.     }
  2408.     return 1;
  2409. }
  2410.  
  2411. CMD:dfix(playerid, params[])
  2412. {
  2413.     if(PlayerInfo[playerid][pVIP] > 2)
  2414.     {
  2415.         if(DonorFix[playerid] == 1)
  2416.         {
  2417.             if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You aren't in a vehicle!");
  2418.             RepairVehicle(GetPlayerVehicleID(playerid));
  2419.             SendClientMessage(playerid, C_LIME, "Your current vehicle repaired (new repair in 5 minutes)!");
  2420.             SetTimerEx("DonorFixTimer", 1000*60*5, false, "i", playerid);
  2421.             DonorFix[playerid] = 0;
  2422.         }
  2423.         else
  2424.         {
  2425.             SendClientMessage(playerid, C_RED, "You can use /dfix in every 5 minutes!");
  2426.         }
  2427.     }
  2428.     return 1;
  2429. }
  2430.  
  2431. CMD:changepass(playerid, params[])
  2432. {
  2433.     new oldpassword[128], newpassword[128], query[256];
  2434.     if(sscanf(params, "s[128]s[128]", oldpassword, newpassword)) return SendClientMessage(playerid, C_GREY, "USAGE: /changepass [oldpassword][newpassword]");
  2435.  
  2436.     format(query, sizeof(query), "SELECT `user` FROM `accounts` WHERE user = '%s' and password = md5('%s')", Name(playerid), oldpassword);
  2437.     mysql_query(query);
  2438.     mysql_store_result();
  2439.  
  2440.     new rows = mysql_num_rows();
  2441.     if(rows == 1)
  2442.     {
  2443.         format(query, sizeof(query), "UPDATE `accounts` SET password = md5('%s') WHERE user = '%s'", newpassword, Name(playerid));
  2444.         mysql_query(query);
  2445.  
  2446.         format(query, sizeof(query), "Your password is changed! New password: %s (hashed)", newpassword);
  2447.         SendClientMessage(playerid, C_LGREEN, query);
  2448.     }
  2449.     if(!rows)
  2450.     {
  2451.         SendClientMessage(playerid, C_RED, "The old password you entered, is wrong!");
  2452.     }
  2453.  
  2454.     mysql_free_result();
  2455.     return 1;
  2456. }
  2457.  
  2458. //========================================================================
  2459. /*    ___      _           _         _____           _
  2460.      / _ \    | |         (_)       /  ___|         | |
  2461.     / /_\ \ __| |_ __ ___  _ _ __   \ `--. _   _ ___| |_ ___ _ __ ___
  2462.     |  _  |/ _` | '_ ` _ \| | '_ \   `--. \ | | / __| __/ _ \ '_ ` _ \
  2463.     | | | | (_| | | | | | | | | | | /\__/ / |_| \__ \ ||  __/ | | | | |
  2464.     \_| |_/\__,_|_| |_| |_|_|_| |_| \____/ \__, |___/\__\___|_| |_| |_|
  2465.                                             __/ |
  2466.                                            |___/                        */
  2467. //========================================================================
  2468. // Admin system
  2469. // GENERAL..
  2470. //
  2471.  
  2472. CMD:admins(playerid, params[])
  2473. {
  2474.     new count = 0, dialogstring[576], namestring[96];
  2475.     foreach(new i: Player)
  2476.     {
  2477.         if(PlayerInfo[i][pAdmin] > 0 )
  2478.         {
  2479.             format(namestring, sizeof(namestring), "{FF0000}%s [ID: %d] {CCFFAA}|{FF0000} Level: %d - {D7DE16}%s\n", Name(i), i, PlayerInfo[i][pAdmin], AdminLevelName(i));
  2480.             strcat(dialogstring, namestring);
  2481.             count ++;
  2482.         }
  2483.     }
  2484.     if(count != 0)
  2485.     {
  2486.         ShowPlayerDialog(playerid, D_ADMINS, DIALOG_STYLE_MSGBOX, "----==== Online Admins ====----", dialogstring, "Close", "");
  2487.     }
  2488.     else ShowPlayerDialog(playerid, D_ADMINS, DIALOG_STYLE_MSGBOX, "----==== Online Admins ====----", "No online admins!", "Close", "");
  2489.     return 1;
  2490. }
  2491.  
  2492. CMD:ahelp(playerid, params[])
  2493. {
  2494.     if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, C_WHITE, "SERVER: You are not an admin.");
  2495.     SendClientMessage(playerid, C_WHITE, "____________________________________________________________________");
  2496.     SendClientMessage(playerid, C_FADE, "                             Admin Commands:                          ");
  2497.  
  2498.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2499.     {
  2500.         SendClientMessage(playerid, C_FADE, "Administration Commands: /goto, /gethere, /warn, /kick");
  2501.         SendClientMessage(playerid, C_FADE, "Administration Commands: /sethealth, /setarmour, /spec, /specoff, /freeze, /unfreeze");
  2502.         SendClientMessage(playerid, C_FADE, "Administration Commands: /slap, /aduty, @[text], /mute, /unmute");
  2503.     }
  2504.     if(PlayerInfo[playerid][pAdmin] >= 2)
  2505.     {
  2506.         SendClientMessage(playerid, C_FADE, "Administration Commands: /ban, /(v)ehicle, /disarm, /getall, /freezeall, /unfreezeall, /spawn");
  2507.         SendClientMessage(playerid, C_FADE, "Administration Commands: /givegun, /event");
  2508.     }
  2509.     if(PlayerInfo[playerid][pAdmin] >= 3)
  2510.     {
  2511.         SendClientMessage(playerid, C_FADE, "Administration Commands: /setkills, /setdeaths");
  2512.     }
  2513.     if(PlayerInfo[playerid][pAdmin] >= 4)
  2514.     {
  2515.  
  2516.     }
  2517.     if(PlayerInfo[playerid][pAdmin] == 5)
  2518.     {
  2519.         SendClientMessage(playerid, C_FADE, "Administration Commands: /makeadmin, /setskin, /givescore");
  2520.     }
  2521.     if(PlayerInfo[playerid][pAdmin] >= 6)
  2522.     {
  2523.  
  2524.     }
  2525.     SendClientMessage(playerid, C_WHITE, "____________________________________________________________________");
  2526.     return 1;
  2527. }
  2528.  
  2529. CMD:report(playerid, params[])
  2530. {
  2531.     new text[128], targetid, string[128], sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
  2532.     if(sscanf(params, "us[128]", targetid, text)) return SendClientMessage(playerid, C_GREY, "USAGE: /report [playerid] [reason]");
  2533.     {
  2534.         if (playerid == targetid) return SendClientMessage(playerid, C_GREY, "SERVER: You cannot do this to yourself.");
  2535.         if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
  2536.  
  2537.         format(sendername, sizeof(sendername), "%s", Name(playerid));
  2538.         format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
  2539.  
  2540.         format(string, sizeof(string), "REPORT: %s [ID:%d] has reported %s [ID:%d].", sendername, playerid, giveplayer, targetid);
  2541.         SendAdminMessage(0xE19898AA,string);
  2542.         format(string, sizeof(string), "REPORT: Reason: %s.", text);
  2543.         SendAdminMessage(0xE19898AA,string);
  2544.  
  2545.         SendClientMessage(playerid,C_GREEN,"INFO: You're report has been sent to all the online Admins.");
  2546.     }
  2547.     return 1;
  2548. }
  2549.  
  2550. //
  2551. // LEVEL 1..
  2552. //
  2553.  
  2554. CMD:goto(playerid, params[])
  2555. {
  2556.     new Float:x, Float:y, Float:z;
  2557.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2558.     {
  2559.         new targetid;
  2560.         if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, C_WHITE, "USAGE: /goto [Player ID]");
  2561.         {
  2562.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  2563.  
  2564.             GetPlayerPos(targetid, x, y, z);
  2565.             SetPlayerPos(playerid, x, y, z);
  2566.  
  2567.         }
  2568.     }
  2569.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2570.     return 1;
  2571. }
  2572.  
  2573. CMD:gethere(playerid, params[])
  2574. {
  2575.     new Float:x, Float:y, Float:z;
  2576.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2577.     {
  2578.         new targetid;
  2579.         if(sscanf(params,"ui", targetid)) return SendClientMessage(playerid, C_WHITE, "USAGE: /gethere [Player ID]");
  2580.         {
  2581.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  2582.  
  2583.             GetPlayerPos(playerid, x, y, z);
  2584.             SetPlayerPos(targetid, x, y, z);
  2585.         }
  2586.     }
  2587.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2588.     return 1;
  2589. }
  2590.  
  2591. CMD:warn(playerid, params[])
  2592. {
  2593.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2594.     {
  2595.         new str[128], reason[64], targetid;
  2596.         if(sscanf(params,"us", targetid, reason)) return SendClientMessage(playerid, C_WHITE, "USAGE: /warn [Player ID] [Reason]");
  2597.         {
  2598.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  2599.             if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
  2600.             PlayerInfo[targetid][pWarnings] ++;
  2601.             format(str, sizeof(str), "ADMIN: %s has been warned by %s. [REASON: %s (%i/3 warnings)]", Name(targetid), Name(playerid), reason, PlayerInfo[targetid][pWarnings]);
  2602.  
  2603.             SendClientMessageToAll(C_RED, str);
  2604.  
  2605.             if(PlayerInfo[targetid][pWarnings] == 3)
  2606.             {
  2607.                 format(str, sizeof(str), "ADMIN: %s has been kicked. [REASON: 3/3 warnings reached]", Name(targetid));
  2608.                 SendClientMessageToAll(C_YELLOW, str);
  2609.                 PlayerInfo[targetid][pWarnings] = 0;
  2610.                 Kick(targetid);
  2611.             }
  2612.         }
  2613.     }
  2614.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2615.     return 1;
  2616. }
  2617.  
  2618. CMD:kick(playerid, params[])
  2619. {
  2620.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2621.     {
  2622.         new str[128], reason[64], targetid;
  2623.         if(sscanf(params,"us", targetid, reason)) return SendClientMessage(playerid, C_WHITE, "USAGE: /kick [Player ID] [Reason]");
  2624.         {
  2625.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  2626.             if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
  2627.             format(str, sizeof(str), "aCMD: %s was kicked by %s %s for reason: %s", Name(targetid), AdminLevelName(playerid), Name(playerid), reason);
  2628.  
  2629.             SendClientMessageToAll(C_RED, str);
  2630.             Kick(targetid);
  2631.         }
  2632.     }
  2633.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2634.     return 1;
  2635. }
  2636.  
  2637. CMD:sethealth(playerid, params[])
  2638. {
  2639.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2640.     {
  2641.         new str[128], health, targetid;
  2642.         if(sscanf(params,"un", targetid, health)) return SendClientMessage(playerid, C_WHITE, "USAGE: /sethealth [Player ID] [Amount]");
  2643.         {
  2644.             if(health >= 100) health = 99;
  2645.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  2646.             if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
  2647.             format(str, sizeof(str), "aCMD: %s's health points have been updated by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
  2648.             SendAdminMessage(C_RED,str);
  2649.             SetPlayerHealth(targetid, health);
  2650.         }
  2651.     }
  2652.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2653.     return 1;
  2654. }
  2655.  
  2656. CMD:setarmour(playerid, params[])
  2657. {
  2658.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2659.     {
  2660.         new str[128], armour, targetid;
  2661.         if(sscanf(params,"un", targetid, armour)) return SendClientMessage(playerid, C_WHITE, "USAGE: /setarmour [Player ID] [Amount]");
  2662.         {
  2663.             if(armour >= 100) armour = 99;
  2664.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  2665.             if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
  2666.             format(str, sizeof(str), "aCMD: %s's armor points have been updated by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
  2667.             SendAdminMessage(C_RED,str);
  2668.             SetPlayerArmour(targetid, armour);
  2669.         }
  2670.     }
  2671.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2672.     return 1;
  2673. }
  2674.  
  2675. CMD:spec(playerid, params[])
  2676. {
  2677.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2678.     {
  2679.         new targetid;
  2680.         new string[128];
  2681.         if(sscanf(params,"ui", targetid)) return SendClientMessage(playerid, C_WHITE, "USAGE: /spec [Player ID]");
  2682.         {
  2683.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  2684.             if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
  2685.             HackTest[playerid] = 1;
  2686.             TogglePlayerSpectating(playerid, 1);
  2687.             if(IsPlayerInAnyVehicle(targetid))
  2688.             {
  2689.                 new vehicleid = GetPlayerVehicleID(targetid);
  2690.                 PlayerSpectateVehicle(playerid, vehicleid);
  2691.             }
  2692.             else
  2693.             {
  2694.                 PlayerSpectatePlayer(playerid, targetid);
  2695.                 SetPlayerInterior(playerid,GetPlayerInterior(targetid));
  2696.             }
  2697.             format(string, sizeof(string), "INFO: You are now spectating %s - ID:%d - PING:%d - Remember to /timestamp", Name(targetid), targetid, GetPlayerPing(targetid));
  2698.             SendClientMessage(playerid, C_WHITE, string);
  2699.            
  2700.         }
  2701.     }
  2702.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2703.     return 1;
  2704. }
  2705.  
  2706. CMD:freeze(playerid, params[])
  2707. {
  2708.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2709.     {
  2710.         new string[128];
  2711.         new targetid;
  2712.         if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, C_WHITE, "USAGE: /freeze [Player ID]");
  2713.         {
  2714.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  2715.             if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
  2716.             format(string, sizeof(string), "aCMD: %s was frozen by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
  2717.             SendAdminMessage(C_YELLOW,string);
  2718.             TogglePlayerControllable(targetid, false);
  2719.             GameTextForPlayer(targetid, "~r~Frozen", 3000, 5);
  2720.         }
  2721.     }
  2722.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2723.     return 1;
  2724. }
  2725.  
  2726. CMD:unfreeze(playerid, params[])
  2727. {
  2728.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2729.     {
  2730.         new str[128];
  2731.         new targetid;
  2732.         if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, C_WHITE, "USAGE: /unfreeze [Player ID]");
  2733.         {
  2734.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  2735.             if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
  2736.             format(str, sizeof(str), "aCMD: %s was un-frozen by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
  2737.             SendAdminMessage(C_YELLOW,str);
  2738.             SendClientMessage(playerid, C_GREY, "Player un-frozen!");
  2739.             TogglePlayerControllable(targetid, true);
  2740.             GameTextForPlayer(targetid, "~g~Unfrozen", 3000, 5);
  2741.         }
  2742.     }
  2743.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2744.     return 1;
  2745. }
  2746.  
  2747. CMD:specoff(playerid, params[])
  2748. {
  2749.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2750.     {
  2751.         HackTest[playerid] = 0;
  2752.         TogglePlayerSpectating(playerid, 0);
  2753.         SendClientMessage(playerid, C_GREY, "INFO: You have cancelled spectating.");
  2754.         SetPlayerInterior(playerid, 0);
  2755.         SpawnPlayer(playerid);
  2756.     }
  2757.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2758.     return 1;
  2759. }
  2760.  
  2761. CMD:slap(playerid, params[])
  2762. {
  2763.     new targetid,string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
  2764.     if(sscanf(params, "u", targetid)) SendClientMessage(playerid, C_GREY, "USAGE: /slap [playerid]");
  2765.     else
  2766.     {
  2767.         if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
  2768.         if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
  2769.         if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: Cant do this to a NPC.");
  2770.         if(PlayerInfo[playerid][pAdmin] >= 1)
  2771.         {
  2772.             format(sendername, sizeof(sendername), "%s", Name(playerid));
  2773.             format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
  2774.  
  2775.             format(string, sizeof(string), "aCMD: %s was slapped by %s.", giveplayer, sendername);
  2776.             SendAdminMessage(C_RED,string);
  2777.             new Float:x,Float:y,Float:z,Float:health;
  2778.             GetPlayerPos(targetid,x,y,z);
  2779.             SetPlayerPos(targetid,x,y,z+5);
  2780.             GetPlayerHealth(targetid,health);
  2781.             SetPlayerHealth(targetid,health-15.0);
  2782.             GameTextForPlayer(targetid, "~r~Slapped", 5000, 3);
  2783.         }
  2784.         else
  2785.         {
  2786.             SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
  2787.         }
  2788.     }
  2789.     return 1;
  2790. }
  2791.  
  2792. CMD:aduty(playerid, params[])
  2793. {
  2794.     new str[128];
  2795.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2796.     {
  2797.         if(aDuty[playerid] == 0)
  2798.         {
  2799.             aDuty[playerid] = 1;
  2800.             format(str, sizeof(str), "aCMD: %s %s is now on Administration Duty!", AdminLevelName(playerid), Name(playerid));
  2801.             SendClientMessageToAll(C_RED, str);
  2802.             SetPlayerSkin(playerid, 217);
  2803.             SetPlayerHealth(playerid, 99999);
  2804.             SetPlayerArmour(playerid, 99999);
  2805.             SetPlayerColor(playerid, C_ORANGE);
  2806.             SetRank3DText(playerid);
  2807.         }
  2808.         else
  2809.         {
  2810.             aDuty[playerid] = 0;
  2811.             format(str, sizeof(str), "aCMD: %s %s is now off Administration Duty!", AdminLevelName(playerid), Name(playerid));
  2812.             SendClientMessageToAll(C_RED, str);
  2813.             SetPlayerSkin(playerid, TeamSkin(playerid));
  2814.             SetPlayerColor(playerid, TeamColor(playerid));
  2815.             SetPlayerHealth(playerid, 99);
  2816.             SetPlayerArmour(playerid, 0);
  2817.             SetRank3DText(playerid);
  2818.         }
  2819.     }
  2820.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2821.     return 1;
  2822. }
  2823.  
  2824. CMD:mute(playerid, params[])
  2825. {
  2826.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2827.     {
  2828.         new targetid, reason[128], string[128];
  2829.         if(sscanf(params, "us[128]", targetid)) SendClientMessage(playerid, C_GREY, "USAGE: /mute [playerid] [reason]");
  2830.  
  2831.         format(string, sizeof(string), "ADMIN: %s has been muted. [REASON: %s]", Name(targetid), reason);
  2832.         SendClientMessageToAll(C_YELLOW, string);
  2833.         PlayerInfo[targetid][pMuted] = 1;
  2834.     }
  2835.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2836.     return 1;
  2837. }
  2838.  
  2839. CMD:unmute(playerid, params[])
  2840. {
  2841.     if(PlayerInfo[playerid][pAdmin] >= 1)
  2842.     {
  2843.         new targetid, string[128];
  2844.         if(sscanf(params, "u", targetid)) SendClientMessage(playerid, C_GREY, "USAGE: /unmute [playerid]");
  2845.  
  2846.         format(string, sizeof(string), "ADMIN: %s has been un-muted.", Name(targetid));
  2847.         SendClientMessageToAll(C_YELLOW, string);
  2848.         PlayerInfo[targetid][pMuted] = 0;
  2849.     }
  2850.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2851.     return 1;
  2852. }
  2853.  
  2854. //
  2855. // LEVEL 2..
  2856. //
  2857.  
  2858. CMD:getall(playerid, params[])
  2859. {
  2860.     if(PlayerInfo[playerid][pAdmin] >=2)
  2861.     {
  2862.         foreach(Player, i)
  2863.         {
  2864.             new Float:x, Float:y, Float:z;
  2865.             GetPlayerPos(playerid, x, y, z);
  2866.  
  2867.             SetPlayerPos(i, x, y, z);
  2868.             SendClientMessage(i, C_YELLOW, "aCMD: You have been teleported by an admin!");
  2869.         }
  2870.  
  2871.         new string[128];
  2872.         format(string, sizeof(string), "aCMD: %s has teleported all players to his location.", Name(playerid));
  2873.         SendAdminMessage(C_YELLOW, string);
  2874.     }
  2875.     else return SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2876.     return 1;
  2877. }
  2878.  
  2879. CMD:freezeall(playerid, params[])
  2880. {
  2881.     if(PlayerInfo[playerid][pAdmin] >=2)
  2882.     {
  2883.         foreach(Player, i)
  2884.         {
  2885.             TogglePlayerControllable(i, 0);
  2886.             SendClientMessage(i, C_YELLOW, "aCMD: You have been frozen by an admin!");
  2887.         }
  2888.  
  2889.         new string[128];
  2890.         format(string, sizeof(string), "aCMD: %s has frozen all players.", Name(playerid));
  2891.         SendAdminMessage(C_YELLOW, string);
  2892.     }
  2893.     else return SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2894.     return 1;
  2895. }
  2896.  
  2897. CMD:unfreezeall(playerid, params[])
  2898. {
  2899.     if(PlayerInfo[playerid][pAdmin] >=2)
  2900.     {
  2901.         foreach(Player, i)
  2902.         {
  2903.             TogglePlayerControllable(i, 1);
  2904.             SendClientMessage(i, C_YELLOW, "aCMD: You have been unfrozen by an admin!");
  2905.         }
  2906.  
  2907.         new string[128];
  2908.         format(string, sizeof(string), "aCMD: %s has unfrozen all players.", Name(playerid));
  2909.         SendAdminMessage(C_YELLOW, string);
  2910.     }
  2911.     else return SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2912.     return 1;
  2913. }
  2914.  
  2915. CMD:spawn(playerid, params[])
  2916. {
  2917.     if(PlayerInfo[playerid][pAdmin] >=2)
  2918.     {
  2919.         new targetid;
  2920.         if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, C_GREY, "USAGE: /spawn [playerid]");
  2921.         {
  2922.             SendClientMessage(playerid, C_YELLOW, "You have spawned the player!");
  2923.             SendClientMessage(targetid, C_YELLOW, "You have spawned by an admin!");
  2924.             SpawnPlayer(targetid);
  2925.         }
  2926.     }
  2927.     return 1;
  2928. }
  2929.  
  2930. CMD:vehicle(playerid, params[])
  2931. {
  2932.     if(PlayerInfo[playerid][pAdmin] >=2)
  2933.     {
  2934.         if(!IsPlayerInAnyVehicle(playerid))
  2935.         {
  2936.             new carname[40], machine;
  2937.             if(sscanf(params, "s[40]", carname)) return SendClientMessage(playerid, C_GREY, "USAGE: /(v)ehicle [id/carname]");
  2938.             {
  2939.                 new Float:x, Float:y, Float:z, Float:angle, string[60];
  2940.                 GetPlayerPos(playerid, x, y, z);
  2941.                 GetPlayerFacingAngle(playerid, angle);
  2942.                 DestroyVehicle(LastAdminVehicle[playerid]);
  2943.  
  2944.                 machine = GetVehicleModelIDFromName(carname);
  2945.                 new machine2 = CreateVehicle(machine, x, y, z, angle, 0, 0, -1);
  2946.                 PutPlayerInVehicle(playerid, machine2, 0);
  2947.                 LastAdminVehicle[playerid] = GetPlayerVehicleID(playerid);
  2948.  
  2949.                 format(string, sizeof(string), "You spawned a new vehicle (%s)!", CarNames[machine-400]);
  2950.                 SendClientMessage(playerid, C_BLUE, string);
  2951.             }
  2952.         }
  2953.         else return SendClientMessage(playerid, C_RED, "You already are in a vehicle!");
  2954.     }
  2955.     else return SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2956.     return 1;
  2957. }
  2958.  
  2959. CMD:v(playerid, params[])
  2960.     return cmd_vehicle(playerid, params);
  2961.  
  2962. CMD:ban(playerid, params[])
  2963. {
  2964.     if(PlayerInfo[playerid][pAdmin] >= 2)
  2965.     {
  2966.         new str[128], reason[64], targetid;
  2967.         if(sscanf(params,"us", targetid, reason)) return SendClientMessage(playerid, C_WHITE, "USAGE: /ban [Player ID] [Reason]");
  2968.         {
  2969.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  2970.             if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
  2971.             format(str, sizeof(str), "aCMD: %s was banned by %s %s for reason: %s", Name(targetid), AdminLevelName(playerid), Name(playerid), reason);
  2972.  
  2973.             SendClientMessageToAll(C_RED, str);
  2974.             Ban(targetid);
  2975.         }
  2976.     }
  2977.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  2978.     return 1;
  2979. }
  2980.  
  2981. CMD:disarm(playerid, params[])
  2982. {
  2983.     new targetid,string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
  2984.     if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, C_GREY, "USAGE: /disarm [playerid]");
  2985.     {
  2986.         if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
  2987.         if(PlayerInfo[playerid][pAdmin] >= 2)
  2988.         {
  2989.             if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
  2990.             format(sendername, sizeof(sendername), "%s", Name(playerid));
  2991.             format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
  2992.             format(string, sizeof(string), "aCMD: %s was disarmed by %s.", giveplayer, sendername);
  2993.  
  2994.             SendAdminMessage(C_RED,string);
  2995.             ResetPlayerWeapons(targetid);
  2996.         }
  2997.         else return SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
  2998.     }
  2999.     return 1;
  3000. }
  3001.  
  3002. CMD:givegun(playerid, params[])
  3003. {
  3004.     if(PlayerInfo[playerid][pAdmin] >= 1)
  3005.     {
  3006.         new str[128], ammo, gun, targetid;
  3007.         if(sscanf(params,"unn", targetid, gun, ammo)) return SendClientMessage(playerid, C_WHITE, "USAGE: /givegun [Player ID] [WeaponID] [Ammo] - Do not use ID: 38 as you will be banned.");
  3008.         {
  3009.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  3010.             SendClientMessage(targetid, C_WHITE, "Weapon recieved!");
  3011.             format(str, sizeof(str), "aCMD: %s has been given a weapon by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
  3012.             SendAdminMessage(C_RED,str);
  3013.             GivePlayerWeapon(targetid, gun, ammo);
  3014.         }
  3015.     }
  3016.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  3017.     return 1;
  3018. }
  3019.  
  3020. CMD:event(playerid, params[])
  3021. {
  3022.     if(PlayerInfo[playerid][pAdmin] >= 2)
  3023.     {
  3024.         new number;
  3025.         if(sscanf(params, "i", number)) return SendClientMessage(playerid, C_GREY, "USAGE: /event [1-6]");
  3026.  
  3027.         if(number == 1)
  3028.         {
  3029.             SetPlayerPos(playerid, -1393.2266,1482.1432,1.8672);
  3030.         }
  3031.         else if(number == 2)
  3032.         {
  3033.             SetPlayerPos(playerid, -2435.4832,1547.9771,8.3984);
  3034.         }
  3035.         else if(number == 3)
  3036.         {
  3037.             SetPlayerPos(playerid, -2322.1799,-1619.3059,483.7125);
  3038.         }
  3039.         else if(number == 4)
  3040.         {
  3041.             SetPlayerPos(playerid, -535.7612,-179.6608,78.4047);
  3042.         }
  3043.         else if(number == 5)
  3044.         {
  3045.             SetPlayerPos(playerid, -1031.6322,-676.5753,32.0078);
  3046.         }
  3047.         else if(number == 6)
  3048.         {
  3049.             SetPlayerPos(playerid, 1290.3351,172.9764,20.4609);
  3050.         }
  3051.         else return SendClientMessage(playerid, C_GREY, "USAGE: Only [1-6] available!");
  3052.     }
  3053.     return 1;
  3054. }
  3055.  
  3056. //
  3057. // LEVEL 3..
  3058. //
  3059.  
  3060. CMD:setkills(playerid, params[])
  3061. {
  3062.     new targetid, kills, string[128];
  3063.     if(sscanf(params, "ui", targetid, kills)) return SendClientMessage(playerid, C_GREY, "USAGE: /setkills [playerid] [amount]");
  3064.     {
  3065.         if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
  3066.         if(PlayerInfo[playerid][pAdmin] >= 3)
  3067.         {
  3068.             format(string, sizeof(string), "aCMD: %s has changed %s's kills to amount %d", Name(playerid), Name(targetid), kills);
  3069.             SendAdminMessage(C_YELLOW, string);
  3070.             format(string, sizeof(string), "aCMD: Admin %s changed your kills to amount %d", Name(playerid), kills);
  3071.             SendClientMessage(playerid, C_YELLOW, string);
  3072.             PlayerInfo[targetid][pKills] = kills;
  3073.             UpdateStatsTextdraw(targetid);
  3074.         }
  3075.         else return SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
  3076.     }
  3077.     return 1;
  3078. }
  3079.  
  3080. CMD:setdeaths(playerid, params[])
  3081. {
  3082.     new targetid, deaths, string[128];
  3083.     if(sscanf(params, "ui", targetid, deaths)) return SendClientMessage(playerid, C_GREY, "USAGE: /setdeaths [playerid] [amount]");
  3084.     {
  3085.         if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
  3086.         if(PlayerInfo[playerid][pAdmin] >= 3)
  3087.         {
  3088.             format(string, sizeof(string), "aCMD: %s has changed %s's deaths to amount %d", Name(playerid), Name(targetid), deaths);
  3089.             SendAdminMessage(C_YELLOW, string);
  3090.             format(string, sizeof(string), "aCMD: Admin %s changed your deaths to amount %d", Name(playerid), deaths);
  3091.             SendClientMessage(playerid, C_YELLOW, string);
  3092.             PlayerInfo[targetid][pDeaths] = deaths;
  3093.             UpdateStatsTextdraw(targetid);
  3094.         }
  3095.         else return SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
  3096.     }
  3097.     return 1;
  3098. }
  3099.  
  3100. //
  3101. // LEVEL 5..
  3102. //
  3103.  
  3104. CMD:makeadmin(playerid, params[])
  3105. {
  3106.     new targetid,type,string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
  3107.     if(sscanf(params, "ui", targetid, type)) return SendClientMessage(playerid, C_GREY, "USAGE: /makeadmin [playerid] [level 0-5]");
  3108.     {
  3109.         if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
  3110.         if(type < 0 || type > 11) return SendClientMessage(playerid, C_GREY, "SERVER: Cannot go under 0 or above 5.");
  3111.         if(PlayerInfo[playerid][pAdmin] >= 5)
  3112.         {
  3113.             format(sendername, sizeof(sendername), "%s", Name(playerid));
  3114.             format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
  3115.             PlayerInfo[targetid][pAdmin] = type;
  3116.             format(string, sizeof(string),"aCMD: %s has promoted %s to Admin-Level %d.", sendername, giveplayer, type);
  3117.             SendAdminMessage(C_YELLOW,string);
  3118.         }
  3119.         else return SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
  3120.     }
  3121.     return 1;
  3122. }
  3123.  
  3124. CMD:setskin(playerid, params[])
  3125. {
  3126.     if(PlayerInfo[playerid][pAdmin] >= 5)
  3127.     {
  3128.         new str[128], skin, targetid;
  3129.         if(sscanf(params,"ui", targetid, skin)) return SendClientMessage(playerid, C_WHITE, "USAGE: /setskin [Player ID] [SkinID 1-299] - Do not go above, it crashes the server");
  3130.         {
  3131.             if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
  3132.             SendClientMessage(targetid, C_WHITE, "Your skin was changed");
  3133.             format(str, sizeof(str), "aCMD: %s's skin has been changed by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
  3134.  
  3135.             SendAdminMessage(C_RED,str);
  3136.             SetPlayerSkin(targetid, skin);
  3137.         }
  3138.     }
  3139.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  3140.     return 1;
  3141. }
  3142.  
  3143. CMD:givescore(playerid, params[])
  3144. {
  3145.     if(PlayerInfo[playerid][pAdmin] >= 5)
  3146.     {
  3147.         new str[128], score, targetid;
  3148.         if(sscanf(params,"ui", targetid, score)) return SendClientMessage(playerid, C_WHITE, "USAGE: /givescore [Player ID/partofname] [SCORE]");
  3149.         {
  3150.             format(str, sizeof(str), "aCMD: Admin %s gave %i score to player %s.", Name(playerid), score, Name(playerid));
  3151.  
  3152.             SendAdminMessage(C_YELLOW, str);
  3153.  
  3154.             format(str, sizeof(str), "aCMD: You got %d score from admin %s!", score, Name(playerid));
  3155.             SendClientMessage(targetid, C_YELLOW, str);
  3156.  
  3157.             SetPlayerScore(targetid, GetPlayerScore(targetid)+score);
  3158.         }
  3159.     }
  3160.     return 1;
  3161. }
  3162.  
  3163. //
  3164. // LEVEL 6..
  3165. //
  3166.  
  3167. CMD:makemeadmin(playerid, params[])
  3168. {
  3169.     if(IsPlayerAdmin(playerid))
  3170.     {
  3171.         PlayerInfo[playerid][pAdmin] = 6;
  3172.         ShowPlayerDialog(playerid, D_SUCCESS, DIALOG_STYLE_MSGBOX, "  ", "You have made yourself Server Owner!", "Ok", "");
  3173.     }
  3174.     else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
  3175.     return 1;
  3176. }
  3177.  
  3178. //====================================================
  3179. // TIMERS -- TIMERS -- TIMERS -- TIMERS -- TIMERS -- T
  3180.  
  3181. forward Spawnkill(playerid);
  3182. public Spawnkill(playerid)
  3183. {
  3184.     SetPlayerHealth(playerid, 99);
  3185.     SendClientMessage(playerid, C_RED, "Anti-SK: Spawn protection over!");
  3186.     return 1;
  3187. }
  3188.  
  3189. forward Spawned(playerid);
  3190. public Spawned(playerid)
  3191. {
  3192.     HackTest[playerid] = 1;
  3193. }
  3194.  
  3195. forward DeathCameraStop(playerid);
  3196. public DeathCameraStop(playerid)
  3197. {
  3198.     TogglePlayerSpectating(playerid, 0);
  3199.     return 1;
  3200. }
  3201.  
  3202. forward SendRandomMessage();
  3203. public SendRandomMessage()
  3204. {
  3205.     new randMSG = random(sizeof(RandomMSG));
  3206.     SendClientMessageToAll(C_GREEN, RandomMSG[randMSG]);
  3207.     return 1;
  3208. }
  3209.  
  3210. /* forward BattleShield();
  3211. public BattleShield()
  3212. {
  3213.     new
  3214.         string[128],
  3215.         Float:health,
  3216.         Float:armour
  3217.     ;
  3218.    
  3219.     foreach(Player, i)
  3220.     {
  3221.         GetPlayerHealth(i, health);
  3222.         GetPlayerArmour(i, armour);
  3223.        
  3224.         if(health >= 100 && health != 99999 && IsPlayerChoosingClass[i] != 1 && HackTest[i] == 1)
  3225.         {
  3226.             format(string, sizeof string, "BATTLESHIELD: "COLOR_YELLOW" User '%s' has been banned because of Health hacking!", Name(i));
  3227.             SendClientMessageToAll(C_RED, string);
  3228.             BanEx(i, "Health hacking!");
  3229.         }
  3230.        
  3231.         if(armour >= 100 && armour != 99999 && IsPlayerChoosingClass[i] != 1 && HackTest[i] != 1)
  3232.         {
  3233.             format(string, sizeof string, "BATTLESHIELD: "COLOR_YELLOW" User '%s' has been banned because of Armour hacking!", Name(i));
  3234.             SendClientMessageToAll(C_RED, string);
  3235.             BanEx(i, "Armour hacking!");
  3236.         }
  3237.        
  3238.     }
  3239. }
  3240.  
  3241. forward RandomWar();
  3242. public RandomWar()
  3243. {
  3244.     new string[128], team1, team2, team3;
  3245.    
  3246.     team1 = random(4);
  3247.     team2 = random(4);
  3248.     team3 = random(4);
  3249.    
  3250.     if(team1 == team2) team1 = team3;
  3251.     if(team2 == team1 && team1 != team3) team2 = team3;
  3252.    
  3253.     if(team1 == 0) team1 = T_ENGLAND; if(team1 == 1) team1 = T_RUSSIA; if(team1 == 2) team1 = T_IRAQ; if(team1 == 3) team1 = T_MEXICO;
  3254.     if(team2 == 0) team2 = T_ENGLAND; if(team2 == 1) team2 = T_RUSSIA; if(team2 == 2) team2 = T_IRAQ; if(team2 == 3) team2 = T_MEXICO;
  3255.    
  3256.     format(string, sizeof string, "** A random war has started between team %s and %s!", TeamName(team1), TeamName(team2));
  3257.     SendClientMessageToAll(C_WHITE, string);
  3258.  
  3259.     format(string, sizeof string, "%s", TeamName(team1));
  3260.     TextDrawSetString(tTeam1, string);
  3261.     TextDrawShowForAll(tTeam1);
  3262.  
  3263.     format(string, sizeof string, "%s", TeamName(team2));
  3264.     TextDrawSetString(tTeam2, string);
  3265.     TextDrawShowForAll(tTeam2);
  3266.  
  3267. }*/
  3268.  
  3269. forward GangCount(playerid, checkpointid, zonename);
  3270. public GangCount(playerid, checkpointid, zonename)
  3271. {
  3272.     new time[16];
  3273.    
  3274.     PlayerCount[playerid] --;
  3275.     format(time, sizeof(time), "~g~%i..", PlayerCount[playerid]);
  3276.     GameTextForPlayer(playerid, time, 1100, 3);
  3277.  
  3278.     if(PlayerCount[playerid] == 0)
  3279.     {
  3280.         new string[128], Float:armour;
  3281.         GangInfo[checkpointid][gAttacked] = 0;
  3282.  
  3283.         GangZoneStopFlashForAll(zonename);
  3284.         GangZoneShowForAll(zonename, PlayerGangColor(playerid));
  3285.         SetZoneColor(zonename, playerid);
  3286.  
  3287.         format(string, sizeof(string), "You get {FFFF00}+3 score, +20 armor and $2500{FFFFFF} for capturing zone {15FF00}%s!", ZoneName(checkpointid));
  3288.         SendClientMessage(playerid, C_WHITE, string);
  3289.  
  3290.         GetPlayerArmour(playerid, armour);
  3291.         if(armour+20.0 > 99) SetPlayerArmour(playerid, 99);
  3292.         else SetPlayerArmour(playerid, armour+20.0);
  3293.         GivePlayerMoney(playerid, 5000);
  3294.         SetPlayerScore(playerid, GetPlayerScore(playerid)+3);
  3295.  
  3296.         RoundInfo[playerid][Zones] ++;
  3297.         PlayerInfo[playerid][pCaptureZone] = 0;
  3298.         UpdateStatsTextdraw(playerid);
  3299.  
  3300.         foreach(Player, i)
  3301.         {
  3302.             if(GangInfo[checkpointid][gOwner] == gTeam[i])
  3303.             {
  3304.                 format(string, sizeof(string), "Your team has lost the zone {FF0000}%s{FFFFFF}, you lose {FF0000}-1{FFFFFF} score!", ZoneName(checkpointid));
  3305.                 SetPlayerScore(i, GetPlayerScore(i)-1);
  3306.                 SendClientMessage(i, C_WHITE, string);
  3307.                 UpdateStatsTextdraw(i);
  3308.             }
  3309.             else if(gTeam[i] == gTeam[playerid])
  3310.             {
  3311.                 if(i != playerid)
  3312.                 {
  3313.                     format(string, sizeof(string), "Your team has captured the zone {15FF00}%s{FFFFFF}, you get {15FF00}+1{FFFFFF} score!", ZoneName(checkpointid));
  3314.                     SetPlayerScore(i, GetPlayerScore(i)+1);
  3315.                     SendClientMessage(i, C_WHITE, string);
  3316.                     UpdateStatsTextdraw(i);
  3317.                 }
  3318.             }
  3319.         }
  3320.  
  3321.         KillTimer(PlayerCountTimer[playerid]);
  3322.         GangInfo[checkpointid][gOwner] = gTeam[playerid];
  3323.     }
  3324.     return 1;
  3325. }
  3326.  
  3327. forward MedicHeal(playerid);
  3328. public MedicHeal(playerid)
  3329. {
  3330.     CanHeal[playerid] = 1;
  3331.     return 1;
  3332. }
  3333.  
  3334. forward DonorFixTimer(playerid);
  3335. public DonorFixTimer(playerid)
  3336. {
  3337.     DonorFix[playerid] = 1;
  3338.     return 1;
  3339. }
  3340.  
  3341. forward CanCapture(playerid);
  3342. public CanCapture(playerid)
  3343. {
  3344.     CanCaptureZone[playerid] = 1;
  3345.     return 1;
  3346. }
  3347.  
  3348. //====================================================
  3349. // STOCKS -- STOCKS -- STOCKS -- STOCKS -- STOCKS -- S
  3350.  
  3351. stock Register(playerid, pass[])
  3352. {
  3353.     new query[512], ip[16];
  3354.     GetPlayerIp(playerid, ip, sizeof(ip));
  3355.  
  3356.     format(query, sizeof(query), "INSERT INTO accounts(user, password, admin, VIP, warnings, score, money, IP, kills, deaths, points) VALUES('%s', md5('%s'), 0, 0, 0, 0, 0, '%s', 0, 0, 0)", Name(playerid), pass, ip);
  3357.     mysql_query(query);
  3358.  
  3359.     PlayerInfo[playerid][pLogged] = 1;
  3360.     SendClientMessage(playerid, C_LGREEN, "ACCOUNT: You are now registered, and automatically logged in.");
  3361.     return 1;
  3362. }
  3363.  
  3364. stock Login(playerid)
  3365. {
  3366.     new query[128], string[64], money, score;
  3367.     format(query, sizeof(query), "SELECT * FROM accounts WHERE user = '%s'", Name(playerid));
  3368.  
  3369.     mysql_query(query);
  3370.     mysql_store_result();
  3371.     while(mysql_fetch_row_format(query))
  3372.     {
  3373.         mysql_fetch_field_row(string, "admin"); PlayerInfo[playerid][pAdmin] = strval(string);
  3374.         mysql_fetch_field_row(string, "VIP"); PlayerInfo[playerid][pVIP] = strval(string);
  3375.         mysql_fetch_field_row(string, "warnings"); PlayerInfo[playerid][pWarnings] = strval(string);
  3376.         mysql_fetch_field_row(string, "score"); score = strval(string);
  3377.         mysql_fetch_field_row(string, "money"); money = strval(string);
  3378.         mysql_fetch_field_row(string, "kills"); PlayerInfo[playerid][pKills] = strval(string);
  3379.         mysql_fetch_field_row(string, "deaths"); PlayerInfo[playerid][pDeaths] = strval(string);
  3380.         mysql_fetch_field_row(string, "points"); PlayerInfo[playerid][pPoints] = strval(string);
  3381.     }
  3382.     mysql_free_result();
  3383.     GivePlayerMoney(playerid, money);
  3384.     SetPlayerScore(playerid, score);
  3385.     PlayerInfo[playerid][pLogged] = 1;
  3386.     UpdateStatsTextdraw(playerid);
  3387.     SendClientMessage(playerid, C_LGREEN, "ACCOUNT: Successfully logged in.");
  3388.     return 1;
  3389. }
  3390.  
  3391. stock SaveStats(playerid)
  3392. {
  3393.     new query[512];
  3394.     format(query, sizeof(query), "UPDATE `accounts` SET admin=%d, VIP=%d, warnings=%d, score=%d, money=%d, kills=%d, deaths=%d, points=%d WHERE user='%s'", PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pVIP], PlayerInfo[playerid][pWarnings], GetPlayerScore(playerid), GetPlayerMoney(playerid), PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pPoints], Name(playerid));
  3395.     printf("User %s stats saved in database!", Name(playerid));
  3396.     mysql_query(query);
  3397. }
  3398.  
  3399. //====================================================
  3400.  
  3401. stock UpdateStatsTextdraw(playerid)
  3402. {
  3403.     new killtxt[11], deathtxt[11], ratiotxt[11], pointstxt[11];
  3404.     format(killtxt, sizeof(killtxt), "%d", PlayerInfo[playerid][pKills]);
  3405.     TextDrawSetString(Textkills[playerid], killtxt);
  3406.  
  3407.     format(deathtxt, sizeof(deathtxt), "%d", PlayerInfo[playerid][pDeaths]);
  3408.     TextDrawSetString(Textdeaths[playerid], deathtxt);
  3409.  
  3410.     new Float:ratio = floatdiv(PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths]); // Divides kills and deaths, results ratio.
  3411.     format(ratiotxt, sizeof(ratiotxt), "%.2f", ratio); // Formats the float into string so I could use it in TextDrawSetString.
  3412.     TextDrawSetString(Textratio[playerid], ratiotxt);
  3413.  
  3414.     format(pointstxt, sizeof(pointstxt), "%d", GetPlayerScore(playerid));
  3415.     TextDrawSetString(Textpoints[playerid], pointstxt);
  3416. }
  3417.  
  3418. stock GiveClassWeapons(playerid)
  3419. {
  3420.     if(gClass[playerid] == ASSAULT)
  3421.     {
  3422.         GivePlayerWeapon(playerid, WEAPON_KNIFE, 1);
  3423.         GivePlayerWeapon(playerid, WEAPON_DEAGLE, 100);
  3424.         GivePlayerWeapon(playerid, WEAPON_MP5, 500);
  3425.         GivePlayerWeapon(playerid, WEAPON_M4, 350);
  3426.         GivePlayerWeapon(playerid, WEAPON_TEARGAS, 5);
  3427.     }
  3428.     else if(gClass[playerid] == MEDIC)
  3429.     {
  3430.         GivePlayerWeapon(playerid, WEAPON_KATANA, 1);
  3431.         GivePlayerWeapon(playerid, WEAPON_SILENCED, 100);
  3432.         GivePlayerWeapon(playerid, WEAPON_MP5, 500);
  3433.     }
  3434.     else if(gClass[playerid] == ANTI-TANK)
  3435.     {
  3436.         GivePlayerWeapon(playerid, WEAPON_CHAINSAW, 1);
  3437.         GivePlayerWeapon(playerid, WEAPON_COLT45, 150);
  3438.         GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 50);
  3439.         GivePlayerWeapon(playerid, WEAPON_ROCKETLAUNCHER, 10);
  3440.     }
  3441.     else if(gClass[playerid] == ENGINEER)
  3442.     {
  3443.         GivePlayerWeapon(playerid, WEAPON_KNIFE, 1);
  3444.         GivePlayerWeapon(playerid, WEAPON_SAWEDOFF, 125);
  3445.         GivePlayerWeapon(playerid, WEAPON_TEC9, 500);
  3446.         GivePlayerWeapon(playerid, WEAPON_FIREEXTINGUISHER, 500);
  3447.     }
  3448.     else if(gClass[playerid] == AIRFORCE)
  3449.     {
  3450.         GivePlayerWeapon(playerid, WEAPON_BRASSKNUCKLE, 1);
  3451.         GivePlayerWeapon(playerid, WEAPON_DEAGLE, 100);
  3452.         GivePlayerWeapon(playerid, WEAPON_AK47, 350);
  3453.         GivePlayerWeapon(playerid, WEAPON_SPRAYCAN, 500);
  3454.     }
  3455.     else if(gClass[playerid] == SPEC-OPS)
  3456.     {
  3457.         GivePlayerWeapon(playerid, WEAPON_KNIFE, 1);
  3458.         GivePlayerWeapon(playerid, WEAPON_DEAGLE, 100);
  3459.         GivePlayerWeapon(playerid, WEAPON_SAWEDOFF, 125);
  3460.         GivePlayerWeapon(playerid, WEAPON_MP5, 500);
  3461.         GivePlayerWeapon(playerid, WEAPON_M4, 350);
  3462.         GivePlayerWeapon(playerid, WEAPON_GRENADE, 5);
  3463.     }
  3464.     return 1;
  3465. }
  3466.  
  3467.  
  3468. stock SetPlayerClass(playerid)
  3469. {
  3470.     new string[128], teamcolor[2];
  3471.    
  3472.     if(ClassPositionSet[playerid] == 0)
  3473.     {
  3474.         ClassPositionSet[playerid] = 1;
  3475.    
  3476.         if(gTeam[playerid] == T_ENGLAND)
  3477.         {
  3478.             SetPlayerPos(playerid, 236.1258,1931.1813,25.5000);
  3479.             SetPlayerCameraPos(playerid, 237.3132,1933.1399,25.4985);
  3480.             SetPlayerFacingAngle(playerid, 325);
  3481.             SetPlayerCameraLookAt(playerid, 236.1258,1931.1813,25.5000);
  3482.         }
  3483.         if(gTeam[playerid] == T_RUSSIA)
  3484.         {
  3485.             SetPlayerPos(playerid, -177.6316,1166.8536,24.6861);
  3486.             SetPlayerCameraPos(playerid, -176.1896,1164.8327,24.6861);
  3487.             SetPlayerFacingAngle(playerid, 220);
  3488.             SetPlayerCameraLookAt(playerid, -177.6316,1166.8536,24.6861);
  3489.         }
  3490.         if(gTeam[playerid] == T_IRAQ)
  3491.         {
  3492.             SetPlayerPos(playerid, 312.0145,2545.3313,31.3781);
  3493.             SetPlayerCameraPos(playerid, 310.4868,2546.8164,31.3781);
  3494.             SetPlayerFacingAngle(playerid, 45);
  3495.             SetPlayerCameraLookAt(playerid, 312.0145,2545.3313,31.3781);
  3496.         }
  3497.         if(gTeam[playerid] == T_MEXICO)
  3498.         {
  3499.             SetPlayerPos(playerid, -356.5544,2222.3408,50.9858);
  3500.             SetPlayerCameraPos(playerid, -354.0334,2222.3083,50.9858);
  3501.             SetPlayerFacingAngle(playerid, 270);
  3502.             SetPlayerCameraLookAt(playerid, -356.5544,2222.3408,50.9858);
  3503.         }
  3504.     }
  3505.    
  3506.     if(gTeam[playerid] == T_ENGLAND) teamcolor = ("g");
  3507.     if(gTeam[playerid] == T_RUSSIA) teamcolor = ("r");
  3508.     if(gTeam[playerid] == T_IRAQ) teamcolor = ("p");
  3509.     if(gTeam[playerid] == T_MEXICO) teamcolor = ("y");
  3510.    
  3511.     TextDrawShowForPlayer(playerid, ClassBox);
  3512.     TextDrawShowForPlayer(playerid, ClassHelpBox);
  3513.  
  3514.     format(string, sizeof(string), "<< ~r~LMB~w~ choose your class ~r~RMB~w~ >>");
  3515.     TextDrawSetString(ClassClick, string);
  3516.     TextDrawShowForPlayer(playerid, ClassClick);
  3517.  
  3518.     format(string, sizeof(string), "~b~LSHIFT ~w~to spawn");
  3519.     TextDrawSetString(ClassSpawn, string);
  3520.     TextDrawShowForPlayer(playerid, ClassSpawn);
  3521.  
  3522.     IsPlayerChoosingClass[playerid] = 1;
  3523.     if(ClassChoosingStep[playerid] == 0) // Class Private
  3524.     {
  3525.         format(string, sizeof(string), "     < ~%s~PRIVATE ~w~CLASS >", teamcolor);
  3526.         TextDrawSetString(ClassNameLine, string);
  3527.        
  3528.         format(string, sizeof(string), "~r~Weapons:~w~ Knife, Deagle, MP5, M4, Smoke Grenade");
  3529.         TextDrawSetString(ClassWeapons, string);
  3530.        
  3531.         format(string, sizeof(string), "~y~Description:~w~ Good against infantry and light armoured");
  3532.         TextDrawSetString(ClassDescription1, string);
  3533.        
  3534.         format(string, sizeof(string), "vehicles, but weak against armoured vehicles.");
  3535.         TextDrawSetString(ClassDescription2, string);
  3536.        
  3537.         format(string, sizeof(string), "~p~Rank required:~w~ Private (rank 1)");
  3538.         TextDrawSetString(ClassRequiredRank, string);
  3539.        
  3540.     }
  3541.    
  3542.     if(ClassChoosingStep[playerid] == 1) // Class Medic
  3543.     {
  3544.         format(string, sizeof(string), "     < ~%s~MEDIC ~w~CLASS >", teamcolor);
  3545.         TextDrawSetString(ClassNameLine, string);
  3546.  
  3547.         format(string, sizeof(string), "~r~Weapons:~w~ Katana, Silenced Pistol, MP5");
  3548.         TextDrawSetString(ClassWeapons, string);
  3549.  
  3550.         format(string, sizeof(string), "~y~Description:~w~ Normal against infantry, but very useful");
  3551.         TextDrawSetString(ClassDescription1, string);
  3552.  
  3553.         format(string, sizeof(string), "to the team because can heal others with /mheal.");
  3554.         TextDrawSetString(ClassDescription2, string);
  3555.  
  3556.         format(string, sizeof(string), "~p~Rank required:~w~ Specialist (rank 2)");
  3557.         TextDrawSetString(ClassRequiredRank, string);
  3558.     }
  3559.     if(ClassChoosingStep[playerid] == 2) // Class Anti-Tank
  3560.     {
  3561.         format(string, sizeof(string), "     < ~%s~ANTI-TANK ~w~CLASS >", teamcolor);
  3562.         TextDrawSetString(ClassNameLine, string);
  3563.  
  3564.         format(string, sizeof(string), "~r~Weapons:~w~ Chainsaw, Colt 45, Shotgun, RPG");
  3565.         TextDrawSetString(ClassWeapons, string);
  3566.  
  3567.         format(string, sizeof(string), "~y~Description:~w~ Weak against infantry, best against");
  3568.         TextDrawSetString(ClassDescription1, string);
  3569.  
  3570.         format(string, sizeof(string), "armoured vehicles and combat planes.");
  3571.         TextDrawSetString(ClassDescription2, string);
  3572.  
  3573.         format(string, sizeof(string), "~p~Rank required:~w~ Corporal (rank 3)");
  3574.         TextDrawSetString(ClassRequiredRank, string);
  3575.     }
  3576.     if(ClassChoosingStep[playerid] == 3) // Class Engineer
  3577.     {
  3578.         format(string, sizeof(string), "     < ~%s~ENGINEER ~w~CLASS >", teamcolor);
  3579.         TextDrawSetString(ClassNameLine, string);
  3580.  
  3581.         format(string, sizeof(string), "~r~Weapons:~w~ Knife, Sawn-off, Tec 9, Extinguisher");
  3582.         TextDrawSetString(ClassWeapons, string);
  3583.  
  3584.         format(string, sizeof(string), "~y~Description:~w~ Good against infantry, also efficient");
  3585.         TextDrawSetString(ClassDescription1, string);
  3586.  
  3587.         format(string, sizeof(string), "against armored vehicles. Can drive tanks!");
  3588.         TextDrawSetString(ClassDescription2, string);
  3589.  
  3590.         format(string, sizeof(string), "~p~Rank required:~w~ Second Lieutenant (rank 4)");
  3591.         TextDrawSetString(ClassRequiredRank, string);
  3592.     }
  3593.     if(ClassChoosingStep[playerid] == 4) // Class Airforce
  3594.     {
  3595.         format(string, sizeof(string), "     < ~%s~AIRFORCE ~w~CLASS >", teamcolor);
  3596.         TextDrawSetString(ClassNameLine, string);
  3597.  
  3598.         format(string, sizeof(string), "~r~Weapons:~w~ Knuckles, Deagle, AK-47, Spray can");
  3599.         TextDrawSetString(ClassWeapons, string);
  3600.  
  3601.         format(string, sizeof(string), "~y~Description:~w~ Good in close combat battle, but weak");
  3602.         TextDrawSetString(ClassDescription1, string);
  3603.  
  3604.         format(string, sizeof(string), "against armored vehicles. Can drive any air vehicle!");
  3605.         TextDrawSetString(ClassDescription2, string);
  3606.  
  3607.         format(string, sizeof(string), "~p~Rank required:~w~ First Lieutenant (rank 5)");
  3608.         TextDrawSetString(ClassRequiredRank, string);
  3609.     }
  3610.     if(ClassChoosingStep[playerid] == 5) // Class Specical-Ops
  3611.     {
  3612.         format(string, sizeof(string), " < ~%s~SPECICAL-OPS ~w~CLASS >", teamcolor);
  3613.         TextDrawSetString(ClassNameLine, string);
  3614.  
  3615.         format(string, sizeof(string), "~r~Weapons:~w~ Knife, Deagle, Sawn-off, MP5, M4, Grenades");
  3616.         TextDrawSetString(ClassWeapons, string);
  3617.  
  3618.         format(string, sizeof(string), "~y~Description:~w~ Has the best weapons! Efficient against");
  3619.         TextDrawSetString(ClassDescription1, string);
  3620.  
  3621.         format(string, sizeof(string), "infantry + armored vehicles because of the powerful guns.");
  3622.         TextDrawSetString(ClassDescription2, string);
  3623.  
  3624.         format(string, sizeof(string), "~p~Rank required:~w~ Captain (rank 6)");
  3625.         TextDrawSetString(ClassRequiredRank, string);
  3626.     }
  3627.    
  3628.     TextDrawShowForPlayer(playerid, ClassNameLine);
  3629.     TextDrawShowForPlayer(playerid, ClassWeapons);
  3630.     TextDrawShowForPlayer(playerid, ClassDescription1);
  3631.     TextDrawShowForPlayer(playerid, ClassDescription2);
  3632.     TextDrawShowForPlayer(playerid, ClassRequiredRank);
  3633. }
  3634.  
  3635. stock ShowDialogHelp(playerid, helptype)
  3636. {
  3637.     new dialog[768];
  3638.     switch(helptype)
  3639.     {
  3640.         case INFO:
  3641.         {
  3642.             strcat(dialog,"Welcome to server Battlefield - Project Reality! Hope you like it here!\n");
  3643.             strcat(dialog,"This server is TDM server, meaning Team Death Match. You and your team fights against other teams.\n");
  3644.             strcat(dialog,"\n");
  3645.             strcat(dialog,"With enough score, you can get a new rank, class + more benefits like more armor at spawn.\n");
  3646.             strcat(dialog,"But how can I earn score?\n");
  3647.             strcat(dialog,"You can get score by killing people, capturing gangzones and when you're on a killing spree!\n");
  3648.             strcat(dialog,"When you capture a zone, you'll earn money and score. You cant capture other team's home bases.\n");
  3649.             strcat(dialog,"In every base is a red checkpoint, where you can buy weapons, armor and refill your health.\n");
  3650.             strcat(dialog,"Our server has a lot of features, like teamchat and enabling laser on your weapon. Explore them, enjoy your stay!\n");
  3651.             strcat(dialog,"\n");
  3652.             strcat(dialog,"--> Next --> rules of the server.");
  3653.             ShowPlayerDialog(playerid, D_INFO, DIALOG_STYLE_MSGBOX, "General Info", dialog, "Next", "Cancel");
  3654.         }
  3655.         case RULES:
  3656.         {
  3657.             strcat(dialog,"..:: Battlefield - Project Reality {33CCFF}rules of the server{A9C4E4} ::..\n");
  3658.             strcat(dialog,"\n");
  3659.             strcat(dialog,"By being on this server you agree to the following rules:\n");
  3660.             strcat(dialog,"1. Don't use any program that gives you advantages over others (hacks etc).\n");
  3661.             strcat(dialog,"2. Don't insult others or make racistic comments.\n");
  3662.             strcat(dialog,"3. Don't swear/curse and spam in the main chat.\n");
  3663.             strcat(dialog,"4. Don't advertise any other server/website in any chat.\n");
  3664.             strcat(dialog,"6. Don't carpark (parking vehicle on a player to kill them).\n");
  3665.             strcat(dialog,"7. Don't helikill (killing someone with helicopter's rotor blade).\n");
  3666.             strcat(dialog,"8. Don't baserape (killing people in their bases with an armored vehicle).\n");
  3667.             strcat(dialog,"9. Don't driver drive-by (passenger drive-by allowed).\n");
  3668.             strcat(dialog,"19. Don't spawnkill (killing players when they are in spawn area)\n");
  3669.             strcat(dialog,"\n");
  3670.             strcat(dialog,"--> Next --> commands of the server.");
  3671.             ShowPlayerDialog(playerid, D_RULES, DIALOG_STYLE_MSGBOX, "Rules", dialog, "Next", "Cancel");
  3672.         }
  3673.         case COMMANDS:
  3674.         {
  3675.             strcat(dialog,"..:: Server {33CCFF}commands{A9C4E4} ::..\n");
  3676.             strcat(dialog,"\n");
  3677.             strcat(dialog,"/help, /info, /rules, /commands, /ranks, /class, /pm, /togglepm, /admins, /donors\n");
  3678.             strcat(dialog,"/report, /kill, /laseron, /laseroff, /lasercol, /resetteam (/rt), /resetclass (/rc)\n");
  3679.             strcat(dialog,"/radio, /mheal, /r, /sync, /ask, /myteam, /myrank, /afk, /changepass, /lagshoot\n");
  3680.             strcat(dialog,"/ask, /roundstats\n");
  3681.             strcat(dialog,"\n");
  3682.             strcat(dialog,"--> Next --> ranks of the server.");
  3683.             ShowPlayerDialog(playerid, D_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", dialog, "Next", "Cancel");
  3684.         }
  3685.         case RANKS:
  3686.         {
  3687.             new rank[128];
  3688.             strcat(dialog,"..:: Server {33CCFF}ranks{A9C4E4} ::..\n");
  3689.             strcat(dialog,"\n");
  3690.             format(rank, sizeof(rank), "Rank: 1 - %d score - %s\n", RANK1, RANK1NAME);
  3691.             strcat(dialog, rank);
  3692.             format(rank, sizeof(rank), "Rank: 2 - %d score - %s\n", RANK2, RANK2NAME);
  3693.             strcat(dialog, rank);
  3694.             format(rank, sizeof(rank), "Rank: 3 - %d score - %s\n", RANK3, RANK3NAME);
  3695.             strcat(dialog, rank);
  3696.             format(rank, sizeof(rank), "Rank: 4 - %d score - %s\n", RANK4, RANK4NAME);
  3697.             strcat(dialog, rank);
  3698.             format(rank, sizeof(rank), "Rank: 5 - %d score - %s\n", RANK5, RANK5NAME);
  3699.             strcat(dialog, rank);
  3700.             format(rank, sizeof(rank), "Rank: 6 - %d score - %s\n", RANK6, RANK6NAME);
  3701.             strcat(dialog, rank);
  3702.             format(rank, sizeof(rank), "Rank: 7 - %d score - %s\n", RANK7, RANK7NAME);
  3703.             strcat(dialog, rank);
  3704.             format(rank, sizeof(rank), "Rank: 8 - %d score - %s\n", RANK8, RANK8NAME);
  3705.             strcat(dialog, rank);
  3706.             format(rank, sizeof(rank), "Rank: 9 - %d score - %s\n", RANK9, RANK9NAME);
  3707.             strcat(dialog, rank);
  3708.             strcat(dialog,"\n");
  3709.             strcat(dialog,"--> Next --> classes of the server.");
  3710.             ShowPlayerDialog(playerid, D_RANKS, DIALOG_STYLE_MSGBOX, "Ranks", dialog, "Next", "Cancel");
  3711.         }
  3712.         case CLASS:
  3713.         {
  3714.             strcat(dialog,"COMING\n");
  3715.             strcat(dialog,"\n");
  3716.             strcat(dialog,"--> Next --> info of the server.");
  3717.             ShowPlayerDialog(playerid, D_CLASSINFO, DIALOG_STYLE_MSGBOX, "Classes", dialog, "Next", "Cancel");
  3718.         }
  3719.         case DONOR:
  3720.         {
  3721.             if(PlayerInfo[playerid][pVIP] == 1)
  3722.             {
  3723.                 strcat(dialog,"{FFFFFF}..:: Battlefield - Project Reality {99FF00}donor commands{FFFFFF} ::..\n");
  3724.                 strcat(dialog,"\n");
  3725.                 strcat(dialog,"{99FF00}Donor Rank 1 -\n");
  3726.                 strcat(dialog,"{FFFFFF}------------------------\n");
  3727.                 strcat(dialog,"{99FF00}Use '$' in front of text, to talk in donor chat.\n");
  3728.                 strcat(dialog,"{99FF00}/dhelp (shows donor commands)\n");
  3729.                 strcat(dialog,"{99FF00}/dheal (can heal himself - once per death)\n");
  3730.                 strcat(dialog,"{99FF00}/dnos (adds x10 nitro to the car)\n");
  3731.                 strcat(dialog,"{99FF00}/dnrg (spawns a NRG-500)\n");
  3732.                 strcat(dialog,"{99FF00}/dhot (spawns a Hotknife)\n");
  3733.                 ShowPlayerDialog(playerid, D_DONOR, DIALOG_STYLE_MSGBOX, "$$ DONOR RANK COMMANDS $$", dialog, "Close", "");
  3734.             }
  3735.             else if(PlayerInfo[playerid][pVIP] == 2)
  3736.             {
  3737.                 strcat(dialog,"{FFFFFF}..:: Battlefield - Project Reality {FFB13D}donor commands{FFFFFF} ::..\n");
  3738.                 strcat(dialog,"\n");
  3739.                 strcat(dialog,"{FFB13D}Donor Rank 2 -\n");
  3740.                 strcat(dialog,"{FFFFFF}------------------------\n");
  3741.                 strcat(dialog,"{FFB13D}Use '$' in front of text, to talk in donor chat.\n");
  3742.                 strcat(dialog,"{FFB13D}/dhelp (shows donor commands)\n");
  3743.                 strcat(dialog,"{FFB13D}/dheal (can heal himself - once per death)\n");
  3744.                 strcat(dialog,"{FFB13D}/dnos (adds x10 nitro to the car)\n");
  3745.                 strcat(dialog,"{FFB13D}/dnrg (spawns a NRG-500)\n");
  3746.                 strcat(dialog,"{FFB13D}/dhot (spawns a Hotknife)\n");
  3747.                 strcat(dialog,"\n");
  3748.                 strcat(dialog,"{FFB13D}/dsay (displays a message on everyone's screen)\n");
  3749.                 strcat(dialog,"{FFB13D}/denf (spawns a police truck (enforcer))\n");
  3750.                 strcat(dialog,"{FFB13D}/dqua (spawns an ATV (quad))\n");
  3751.                 ShowPlayerDialog(playerid, D_DONOR, DIALOG_STYLE_MSGBOX, "$$ DONOR RANK COMMANDS $$", dialog, "Close", "");
  3752.             }
  3753.             else if(PlayerInfo[playerid][pVIP] == 3)
  3754.             {
  3755.                 strcat(dialog,"{FFFFFF}..:: Battlefield - Project Reality {C71585}donor commands{FFFFFF} ::..\n");
  3756.                 strcat(dialog,"\n");
  3757.                 strcat(dialog,"{C71585}Donor Rank 3 -\n");
  3758.                 strcat(dialog,"{FFFFFF}------------------------\n");
  3759.                 strcat(dialog,"{C71585}Use '$' in front of text, to talk in donor chat.\n");
  3760.                 strcat(dialog,"{C71585}/dhelp (shows donor commands)\n");
  3761.                 strcat(dialog,"{C71585}/dheal (can heal himself - once per death)\n");
  3762.                 strcat(dialog,"{C71585}/dnos (adds x10 nitro to the car)\n");
  3763.                 strcat(dialog,"{C71585}/dnrg (spawns a NRG-500)\n");
  3764.                 strcat(dialog,"{C71585}/dhot (spawns a Hotknife)\n");
  3765.                 strcat(dialog,"\n");
  3766.                 strcat(dialog,"{C71585}/dsay (displays a message on everyone's screen)\n");
  3767.                 strcat(dialog,"{C71585}/denf (spawns a police truck (enforcer))\n");
  3768.                 strcat(dialog,"{C71585}/dqua (spawns an ATV (quad))\n");
  3769.                 strcat(dialog,"\n");
  3770.                 strcat(dialog,"{C71585}/dskin (you can change your skin to whatever you want)\n");
  3771.                 strcat(dialog,"{C71585}/dfix (you can repair your vehicle once in 5 minutes))\n");
  3772.                 ShowPlayerDialog(playerid, D_DONOR, DIALOG_STYLE_MSGBOX, "$$ DONOR RANK COMMANDS $$", dialog, "Close", "");
  3773.             }
  3774.         }
  3775.     }
  3776.     return 1;
  3777. }
  3778.  
  3779. stock TeamMembers(teamid)
  3780. {
  3781.     new players = 0;
  3782.     foreach(Player, i)
  3783.     {
  3784.         if(gTeam[i] == teamid)
  3785.         {
  3786.             if(IsPlayerChoosingTeam[i] == 0) // If the player isn't choosing a class.
  3787.             {
  3788.               players ++;
  3789.             }
  3790.         }
  3791.     }
  3792.     return players;
  3793. }
  3794.  
  3795. stock IsTeamFull(teamid)
  3796. {
  3797.     if(teamid == T_ENGLAND)
  3798.     {
  3799.         if(TeamMembers(teamid) > TeamMembers(T_RUSSIA) || TeamMembers(teamid) > TeamMembers(T_MEXICO) || TeamMembers(teamid) > TeamMembers(T_IRAQ))
  3800.         {
  3801.             return 1;
  3802.         }
  3803.         else return 0;
  3804.     }
  3805.     if(teamid == T_RUSSIA)
  3806.     {
  3807.         if(TeamMembers(teamid) > TeamMembers(T_ENGLAND) || TeamMembers(teamid) > TeamMembers(T_MEXICO) || TeamMembers(teamid) > TeamMembers(T_IRAQ))
  3808.         {
  3809.             return 1;
  3810.         }
  3811.         else return 0;
  3812.     }
  3813.     if(teamid == T_MEXICO)
  3814.     {
  3815.         if(TeamMembers(teamid) > TeamMembers(T_RUSSIA) || TeamMembers(teamid) > TeamMembers(T_ENGLAND) || TeamMembers(teamid) > TeamMembers(T_IRAQ))
  3816.         {
  3817.             return 1;
  3818.         }
  3819.         else return 0;
  3820.     }
  3821.     if(teamid == T_IRAQ)
  3822.     {
  3823.         if(TeamMembers(teamid) > TeamMembers(T_RUSSIA) || TeamMembers(teamid) > TeamMembers(T_MEXICO) || TeamMembers(teamid) > TeamMembers(T_ENGLAND))
  3824.         {
  3825.             return 1;
  3826.         }
  3827.         else return 0;
  3828.     }
  3829.     return 0;
  3830. }
  3831.  
  3832. stock SendAdminMessage(color,string[])
  3833. {
  3834.     foreach(Player,i)
  3835.     {
  3836.         if(PlayerInfo[i][pAdmin] > 0)
  3837.         {
  3838.             SendClientMessage(i, color, string);
  3839.         }
  3840.     }
  3841. }
  3842.  
  3843. stock SendDonorMessage(color, string[])
  3844. {
  3845.     foreach(Player,i)
  3846.     {
  3847.         if(PlayerInfo[i][pVIP] > 0)
  3848.         {
  3849.             SendClientMessage(i, color, string);
  3850.         }
  3851.     }
  3852. }
  3853.  
  3854.  
  3855. stock GivePlayerScore(playerid, score)
  3856. {
  3857.     SetPlayerScore(playerid, GetPlayerScore(playerid)+score);
  3858.     return 1;
  3859. }
  3860.  
  3861. stock IsVehicleEngineer(vehicleid)
  3862. {
  3863.     switch(GetVehicleModel(vehicleid))
  3864.     {
  3865.         case 432: return 1;
  3866.     }
  3867.     return 0;
  3868. }
  3869.  
  3870. stock IsVehicleAirforce(vehicleid)
  3871. {
  3872.     switch(GetVehicleModel(vehicleid))
  3873.     {
  3874.         case 520, 425, 447, 476: return 1;
  3875.     }
  3876.     return 0;
  3877. }
  3878.  
  3879. stock Name(playerid)
  3880. {
  3881.     new name[MAX_PLAYER_NAME];
  3882.     GetPlayerName(playerid, name, sizeof(name));
  3883.     return name;
  3884. }
  3885.  
  3886. stock ShowRoundStats(playerid)
  3887. {
  3888.     new dialog[512], stats[128];
  3889.     strcat(dialog, "{FFFFFF}..::  "COLOR_LIME"Round stats{FFFFFF} ::..\n");
  3890.     strcat(dialog, "\n");
  3891.     format(stats, sizeof stats, "Players killed: "COLOR_GREEN"%d"COLOR_WHITE"\n", RoundInfo[playerid][Kills]);
  3892.     strcat(dialog, stats);
  3893.     format(stats, sizeof stats, "Damage done: "COLOR_RED"%.2f"COLOR_WHITE"\n", RoundInfo[playerid][Damage]);
  3894.     strcat(dialog, stats);
  3895.     format(stats, sizeof stats, "Zones captured: "COLOR_GREEN"%d"COLOR_WHITE"\n", RoundInfo[playerid][Zones]);
  3896.     strcat(dialog, stats);
  3897.     strcat(dialog, "\n");
  3898.     strcat(dialog, "Please type /roundstats to enable/disable this box!");
  3899.  
  3900.     ShowPlayerDialog(playerid, D_ROUNDSTATS, DIALOG_STYLE_MSGBOX, "  ", dialog, "Close", "");
  3901.  
  3902.     RoundInfo[playerid][Kills] = 0;
  3903.     RoundInfo[playerid][Damage] = 0.00;
  3904.     RoundInfo[playerid][Zones] = 0;
  3905. }
  3906.  
  3907. stock IsPlayerCloseToEnemy(playerid)
  3908. {
  3909.     new bool:IsClose = false, Float:Pos[3];
  3910.     GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  3911.     foreach(Player, i)
  3912.     {
  3913.         if(IsPlayerInRangeOfPoint(i, 60.0, Pos[0], Pos[1], Pos[2]) && gTeam[i] != gTeam[playerid])
  3914.         {
  3915.             if(gTeam[playerid] != gTeam[i])
  3916.             {
  3917.                 IsClose = true;
  3918.             }
  3919.         }
  3920.     }
  3921.  
  3922.     return IsClose;
  3923. }
  3924.  
  3925. stock UpdatePlayerTeam(playerid)
  3926. {
  3927.     new team = gTeam[playerid];
  3928.     switch(team)
  3929.     {
  3930.         case T_ENGLAND:
  3931.         {
  3932.             SetPlayerTeam(playerid, T_ENGLAND);
  3933.         }
  3934.         case T_RUSSIA:
  3935.         {
  3936.             SetPlayerTeam(playerid, T_RUSSIA);
  3937.         }
  3938.         case T_IRAQ:
  3939.         {
  3940.             SetPlayerTeam(playerid, T_IRAQ);
  3941.         }
  3942.         case T_MEXICO:
  3943.         {
  3944.             SetPlayerTeam(playerid, T_MEXICO);
  3945.         }
  3946.     }
  3947. }
  3948.  
  3949. stock Rank(playerid)
  3950. {
  3951.     new rank;
  3952.     if     (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < RANK2) rank = 1;
  3953.     else if(GetPlayerScore(playerid) >= RANK2 && GetPlayerScore(playerid) < RANK3) rank = 2;
  3954.     else if(GetPlayerScore(playerid) >= RANK3 && GetPlayerScore(playerid) < RANK4) rank = 3;
  3955.     else if(GetPlayerScore(playerid) >= RANK4 && GetPlayerScore(playerid) < RANK5) rank = 4;
  3956.     else if(GetPlayerScore(playerid) >= RANK5 && GetPlayerScore(playerid) < RANK6) rank = 5;
  3957.     else if(GetPlayerScore(playerid) >= RANK6 && GetPlayerScore(playerid) < RANK7) rank = 6;
  3958.     else if(GetPlayerScore(playerid) >= RANK7 && GetPlayerScore(playerid) < RANK8) rank = 7;
  3959.     else if(GetPlayerScore(playerid) >= RANK8) rank = 8;
  3960.     return rank;
  3961. }
  3962.  
  3963. stock ClassName(playerid)
  3964. {
  3965.     new classname[32];
  3966.     if     (gClass[playerid] == ASSAULT) classname = ("Assault");
  3967.     else if(gClass[playerid] == MEDIC) classname = ("Medic");
  3968.     else if(gClass[playerid] == ANTI-TANK) classname = ("Anti-Tank");
  3969.     else if(gClass[playerid] == ENGINEER) classname = ("Engineer");
  3970.     else if(gClass[playerid] == AIRFORCE) classname = ("Airforce");
  3971.     else if(gClass[playerid] == SPEC-OPS) classname = ("Spec-Ops");
  3972.     return classname;
  3973. }
  3974.  
  3975. stock PlayerTeamName(playerid)
  3976. {
  3977.     new team[32];
  3978.     if     (gTeam[playerid] == T_ENGLAND) team = ("England");
  3979.     else if(gTeam[playerid] == T_RUSSIA) team = ("Russia");
  3980.     else if(gTeam[playerid] == T_IRAQ) team = ("Iraq");
  3981.     else if(gTeam[playerid] == T_MEXICO) team = ("Mexico");
  3982.     return team;
  3983. }
  3984.  
  3985. stock TeamName(teamid)
  3986. {
  3987.     new team[32];
  3988.     if(teamid == T_ENGLAND) team = ("England");
  3989.     if(teamid == T_RUSSIA) team = ("Russia");
  3990.     if(teamid == T_IRAQ) team = ("Iraq");
  3991.     if(teamid == T_MEXICO) team = ("Mexico");
  3992.     return team;
  3993. }
  3994.  
  3995. stock TeamColor(playerid)
  3996. {
  3997.     new color;
  3998.     if     (gTeam[playerid] == T_ENGLAND) color = C_DGREEN;
  3999.     else if(gTeam[playerid] == T_RUSSIA) color = C_RED;
  4000.     else if(gTeam[playerid] == T_IRAQ) color = C_PURPLE;
  4001.     else if(gTeam[playerid] == T_MEXICO) color = C_YELLOW;
  4002.     return color;
  4003. }
  4004.  
  4005. stock TeamSkin(playerid)
  4006. {
  4007.     new skin;
  4008.     if     (gTeam[playerid] == T_ENGLAND) skin = T_ENGLAND_SKIN;
  4009.     else if(gTeam[playerid] == T_RUSSIA) skin = T_RUSSIA_SKIN;
  4010.     else if(gTeam[playerid] == T_IRAQ) skin = T_IRAQ_SKIN;
  4011.     else if(gTeam[playerid] == T_MEXICO) skin = T_MEXICO_SKIN;
  4012.     return skin;
  4013. }
  4014.  
  4015. stock RankName(playerid)
  4016. {
  4017.     new rank = Rank(playerid);
  4018.     new rankname[24];
  4019.     if(rank == 1) rankname = RANK1NAME;
  4020.     if(rank == 2) rankname = RANK2NAME;
  4021.     if(rank == 3) rankname = RANK3NAME;
  4022.     if(rank == 4) rankname = RANK4NAME;
  4023.     if(rank == 5) rankname = RANK5NAME;
  4024.     if(rank == 6) rankname = RANK6NAME;
  4025.     if(rank == 7) rankname = RANK7NAME;
  4026.     if(rank == 8) rankname = RANK8NAME;
  4027.     if(rank == 9) rankname = RANK9NAME;
  4028.     return rankname;
  4029. }
  4030.  
  4031. stock AdminLevelName(playerid)
  4032. {
  4033.     new str[32];
  4034.     if      (PlayerInfo[playerid][pAdmin] == 1) str = (ADMINRANK1);
  4035.     else if (PlayerInfo[playerid][pAdmin] == 2) str = (ADMINRANK2);
  4036.     else if (PlayerInfo[playerid][pAdmin] == 3) str = (ADMINRANK3);
  4037.     else if (PlayerInfo[playerid][pAdmin] == 4) str = (ADMINRANK4);
  4038.     else if (PlayerInfo[playerid][pAdmin] == 5) str = (ADMINRANK5);
  4039.     else if (PlayerInfo[playerid][pAdmin] == 6) str = (ADMINRANK6);
  4040.     return str;
  4041. }
  4042.  
  4043. stock ZoneName(checkpointid)
  4044. {
  4045.     new str[32];
  4046.     if     (checkpointid == BigEarCP) str = ("Big Ear");
  4047.     else if(checkpointid == SnakeCP) str = ("Snake's Farm");
  4048.     else if(checkpointid == TeeMotelCP) str = ("Tee Pee Motel");
  4049.     else if(checkpointid == OilCP) str = ("Oil Factory");
  4050.     else if(checkpointid == SeaCP) str = ("Sun Beach");
  4051.     else if(checkpointid == HillCP) str = ("Desert Hill");
  4052.     else if(checkpointid == DamCP) str = ("The Mighty Dam");
  4053.     return str;
  4054. }
  4055.  
  4056. stock PlayerGangColor(playerid)
  4057. {
  4058.     new str;
  4059.     if     (gTeam[playerid] == T_ENGLAND) str =(C_GANG_GREEN);
  4060.     else if(gTeam[playerid] == T_RUSSIA) str =(C_GANG_RED);
  4061.     else if(gTeam[playerid] == T_IRAQ) str =(C_GANG_PURPLE);
  4062.     else if(gTeam[playerid] == T_MEXICO) str =(C_GANG_YELLOW);
  4063.     return str;
  4064. }
  4065.  
  4066. stock PlayerArea(playerid)
  4067. {
  4068.     new pZone;
  4069.     if(IsPlayerInDynamicArea(playerid, BigEarArea))
  4070.     {
  4071.         GangZoneFlashForAll(BigEarZone, PlayerGangColor(playerid));
  4072.         pZone = BigEarZone;
  4073.     }
  4074.     else if(IsPlayerInDynamicArea(playerid, SnakeArea))
  4075.     {
  4076.         GangZoneFlashForAll(SnakeZone, PlayerGangColor(playerid));
  4077.         pZone = SnakeZone;
  4078.     }
  4079.     else if(IsPlayerInDynamicArea(playerid, TeeMotelArea))
  4080.     {
  4081.         GangZoneFlashForAll(TeeMotelZone, PlayerGangColor(playerid));
  4082.         pZone = TeeMotelZone;
  4083.     }
  4084.     else if(IsPlayerInDynamicArea(playerid, OilArea))
  4085.     {
  4086.         GangZoneFlashForAll(OilZone, PlayerGangColor(playerid));
  4087.         pZone = OilZone;
  4088.     }
  4089.     else if(IsPlayerInDynamicArea(playerid, SeaArea))
  4090.     {
  4091.         GangZoneFlashForAll(SeaZone, PlayerGangColor(playerid));
  4092.         pZone = SeaZone;
  4093.     }
  4094.     else if(IsPlayerInDynamicArea(playerid, HillArea))
  4095.     {
  4096.         GangZoneFlashForAll(HillZone, PlayerGangColor(playerid));
  4097.         pZone = HillZone;
  4098.     }
  4099.     else if(IsPlayerInDynamicArea(playerid, DamArea))
  4100.     {
  4101.         GangZoneFlashForAll(DamZone, PlayerGangColor(playerid));
  4102.         pZone = DamZone;
  4103.     }
  4104.  
  4105.     return pZone;
  4106. }
  4107.  
  4108. stock SetZoneColor(zonename, playerid)
  4109. {
  4110.     if(zonename == BigEarZone)
  4111.     {
  4112.         BigEarColor = PlayerGangColor(playerid);
  4113.     }
  4114.     if(zonename == SnakeZone)
  4115.     {
  4116.         SnakeColor = PlayerGangColor(playerid);
  4117.     }
  4118.     if(zonename == TeeMotelZone)
  4119.     {
  4120.         TeeMotelColor = PlayerGangColor(playerid);
  4121.     }
  4122.     if(zonename == OilZone)
  4123.     {
  4124.         OilColor = PlayerGangColor(playerid);
  4125.     }
  4126.     if(zonename == SeaZone)
  4127.     {
  4128.         SeaColor = PlayerGangColor(playerid);
  4129.     }
  4130.     if(zonename == HillZone)
  4131.     {
  4132.         HillColor = PlayerGangColor(playerid);
  4133.     }
  4134.     if(zonename == DamZone)
  4135.     {
  4136.         DamColor = PlayerGangColor(playerid);
  4137.     }
  4138. }
  4139.  
  4140.  
  4141. stock SetRank3DText(playerid)
  4142. {
  4143.     new text[128], Float: XYZ[3];
  4144.     GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
  4145.     Delete3DTextLabel(RankLabel[playerid]);
  4146.  
  4147.     if(aDuty[playerid] == 1 && AFK[playerid] == 1)
  4148.     {
  4149.         format(text, sizeof(text), "Administrator on duty and AFK\nDo not damage!");
  4150.         RankLabel[playerid] = Create3DTextLabel(text, 0x15FF00AA, XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
  4151.     }
  4152.     else if(aDuty[playerid] == 1)
  4153.     {
  4154.         format(text, sizeof(text), "Administrator on duty\nDo not damage!");
  4155.         RankLabel[playerid] = Create3DTextLabel(text, 0x15FF00AA, XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
  4156.     }
  4157.     else if(AFK[playerid] == 1)
  4158.     {
  4159.         format(text, sizeof(text), "AFK");
  4160.         RankLabel[playerid] = Create3DTextLabel(text, 0x2143DBFF, XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
  4161.     }
  4162.     else
  4163.     {
  4164.         format(text, sizeof(text), "%s\n%s", RankName(playerid), ClassName(playerid));
  4165.         RankLabel[playerid] = Create3DTextLabel(text, TeamColor(playerid), XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
  4166.     }
  4167.  
  4168.     Attach3DTextLabelToPlayer(RankLabel[playerid], playerid, 0.0, 0.0, 0.5);
  4169.     return 1;
  4170. }
  4171.  
  4172. //====================================================
  4173. //====================================================
Add Comment
Please, Sign In to add comment