Guest User

Untitled

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