Advertisement
Guest User

Help with the script

a guest
Nov 5th, 2010
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 387.51 KB | None | 0 0
  1. //WeaponIds USED: 0, 1, 16, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 33, 34, 36, 37, 42, 46
  2. #include <a_samp>          
  3.  
  4. #include <dini>
  5. #include <dudb>
  6. #include <gl_common>
  7. #include <foreach>
  8. #include <a_zones>
  9.  
  10. #define ASSAULT 0
  11. #define DEMOLITION 1
  12. #define SNIPER 2
  13. #define PILOT 3
  14. #define MEDIC 4
  15. #define ENGINEER 5
  16. #define PYRO 6
  17. #define SCOUT 7
  18. #define ADMIN 8
  19. #define GENERAL 9
  20.  
  21. #define SPAM 6
  22. #define COMMAND_SPAM 7                          
  23. new Text:Textdraw0;
  24.  
  25. forward SpamUpdate();
  26. forward usabomb();
  27. forward germanbomb();
  28. forward japanbomb();
  29. forward australiabomb();
  30. forward russiabomb();
  31.  
  32. new spree[MAX_PLAYERS];
  33.  
  34. new Text:vehiclehpbar[12];
  35. forward VHPBarUpdate();
  36.  
  37. #define COLOR_VHPGOOD 0x0AFF0AAA
  38. #define COLOR_VHPWARNING 0xFFFF00AA
  39. #define COLOR_VHPDANGER 0xFF0000AA
  40.  
  41. //new FALSE = false;
  42. #define SendFormattedMessage(%0,%1,%2,%3) do{new _string[128]; format(_string,sizeof(_string),%2,%3); SendClientMessage(%0,%1,_string);} while(FALSE)
  43. #define SendFormattedMessageToAll(%0,%1,%2) do{new _string[128]; format(_string,sizeof(_string),%1,%2); SendClientMessageToAll(%0,_string);} while(FALSE)
  44.  
  45. forward MutePlayer(playerid,time,reason[]);
  46.  
  47. new Messages[MAX_PLAYERS];
  48. new Commands[MAX_PLAYERS];
  49.  
  50. new Muted[MAX_PLAYERS];
  51.  
  52. new Planes[]=
  53. {
  54.     413,417,425,460,469,476,487,488,497,511,512,513,519,520,548,553,563,577,592,593
  55. };
  56.  
  57. new VehicleName[][] =
  58. {
  59.     "Landstalker",
  60.     "Bravura",
  61.     "Buffalo",
  62.     "Linerunner",
  63.     "Pereniel",
  64.     "Sentinel",
  65.     "Dumper",
  66.     "Firetruck",
  67.     "Trashmaster",
  68.     "Stretch",
  69.     "Manana",
  70.     "Infernus",
  71.     "Voodoo",
  72.     "Pony",
  73.     "Mule",
  74.     "Cheetah",
  75.     "Ambulance",
  76.     "Leviathan",
  77.     "Moonbeam",
  78.     "Esperanto",
  79.     "Taxi",
  80.     "Washington",
  81.     "Bobcat",
  82.     "Mr Whoopee",
  83.     "BF Injection",
  84.     "Hunter",
  85.     "Premier",
  86.     "Enforcer",
  87.     "Securicar",
  88.     "Banshee",
  89.     "Predator",
  90.     "Bus",
  91.     "Rhino",
  92.     "Barracks",
  93.     "Hotknife",
  94.     "Trailer",
  95.     "Previon",
  96.     "Coach",
  97.     "Cabbie",
  98.     "Stallion",
  99.     "Rumpo",
  100.     "RC Bandit",
  101.     "Romero",
  102.     "Packer",
  103.     "Monster Truck",
  104.     "Admiral",
  105.     "Squalo",
  106.     "Seasparrow",
  107.     "Pizzaboy",
  108.     "Tram",
  109.     "Trailer",
  110.     "Turismo",
  111.     "Speeder",
  112.     "Reefer",
  113.     "Tropic",
  114.     "Flatbed",
  115.     "Yankee",
  116.     "Caddy",
  117.     "Solair",
  118.     "Berkley's RC Van",
  119.     "Skimmer",
  120.     "PCJ-600",
  121.     "Faggio",
  122.     "Freeway",
  123.     "RC Baron",
  124.     "RC Raider",
  125.     "Glendale",
  126.     "Oceanic",
  127.     "Sanchez",
  128.     "Sparrow",
  129.     "Patriot",
  130.     "Quad",
  131.     "Coastguard",
  132.     "Dinghy",
  133.     "Hermes",
  134.     "Sabre",
  135.     "Rustler",
  136.     "ZR-350",
  137.     "Walton",
  138.     "Regina",
  139.     "Comet",
  140.     "BMX",
  141.     "Burrito",
  142.     "Camper",
  143.     "Marquis",
  144.     "Baggage",
  145.     "Dozer",
  146.     "Maverick",
  147.     "News Chopper",
  148.     "Rancher",
  149.     "FBI Rancher",
  150.     "Virgo",
  151.     "Greenwood",
  152.     "Jetmax",
  153.     "Hotring",
  154.     "Sandking",
  155.     "Blista Compact",
  156.     "Police Maverick",
  157.     "Boxville",
  158.     "Benson",
  159.     "Mesa",
  160.     "RC Goblin",
  161.     "Hotring Racer",
  162.     "Hotring Racer",
  163.     "Bloodring Banger",
  164.     "Rancher",
  165.     "Super GT",
  166.     "Elegant",
  167.     "Journey",
  168.     "Bike",
  169.     "Mountain Bike",
  170.     "Beagle",
  171.     "Cropdust",
  172.     "Stunt",
  173.     "Tanker",
  174.     "RoadTrain",
  175.     "Nebula",
  176.     "Majestic",
  177.     "Buccaneer",
  178.     "Shamal",
  179.     "Hydra",
  180.     "FCR-900",
  181.     "NRG-500",
  182.     "HPV1000",
  183.     "Cement Truck",
  184.     "Tow Truck",
  185.     "Fortune",
  186.     "Cadrona",
  187.     "FBI Truck",
  188.     "Willard",
  189.     "Forklift",
  190.     "Tractor",
  191.     "Combine",
  192.     "Feltzer",
  193.     "Remington",
  194.     "Slamvan",
  195.     "Blade",
  196.     "Freight",
  197.     "Streak",
  198.     "Vortex",
  199.     "Vincent",
  200.     "Bullet",
  201.     "Clover",
  202.     "Sadler",
  203.     "Firetruck",
  204.     "Hustler",
  205.     "Intruder",
  206.     "Primo",
  207.     "Cargobob",
  208.     "Tampa",
  209.     "Sunrise",
  210.     "Merit",
  211.     "Utility",
  212.     "Nevada",
  213.     "Yosemite",
  214.     "Windsor",
  215.     "Monster Truck",
  216.     "Monster Truck",
  217.     "Uranus",
  218.     "Jester",
  219.     "Sultan",
  220.     "Stratum",
  221.     "Elegy",
  222.     "Raindance",
  223.     "RC Tiger",
  224.     "Flash",
  225.     "Tahoma",
  226.     "Savanna",
  227.     "Bandito",
  228.     "Freight",
  229.     "Trailer",
  230.     "Kart",
  231.     "Mower",
  232.     "Duneride",
  233.     "Sweeper",
  234.     "Broadway",
  235.     "Tornado",
  236.     "AT-400",
  237.     "DFT-30",
  238.     "Huntley",
  239.     "Stafford",
  240.     "BF-400",
  241.     "Newsvan",
  242.     "Tug",
  243.     "Trailer",
  244.     "Emperor",
  245.     "Wayfarer",
  246.     "Euros",
  247.     "Hotdog",
  248.     "Club",
  249.     "Trailer",
  250.     "Trailer",
  251.     "Andromada",
  252.     "Dodo",
  253.     "RC Cam",
  254.     "Launch",
  255.     "Police Car (LSPD)",
  256.     "Police Car (SFPD)",
  257.     "Police Car (LVPD)",
  258.     "Police Ranger",
  259.     "Picador",
  260.     "S.W.A.T. Van",
  261.     "Alpha",
  262.     "Phoenix",
  263.     "Glendale",
  264.     "Sadler",
  265.     "Luggage Trailer",
  266.     "Luggage Trailer",
  267.     "Stair Trailer",
  268.     "Boxville",
  269.     "Farm Plow",
  270.     "Utility Trailer"
  271. };
  272.  
  273. #define GREEN 0x00FF00FF
  274.  
  275. #define GetVehicleName(%0) VehicleName[GetVehicleModel(%0)-400]
  276.  
  277. #define MAX_SPEED 19
  278.  
  279. #define MAX_TEAMS           20
  280. #define MAX_TEAM_NAME       16
  281. #define MAX_TEAM_MEMBERS    4
  282.  
  283. #define MAX_MEMBERS     4
  284.  
  285. #define MAX_CHECKS 5
  286. #define MAX_VARIABLES 24
  287.  
  288. new JB_Warnings[MAX_PLAYERS];
  289.  
  290. // === [Color Defines] ===
  291. #define COLOR_LIGHTGREEN 0x9ACD32AA
  292. #define COLOR_YELLOW2 0xF5DEB3AA
  293. #define COLOR_DBLUE 0x2641FEAA
  294. #define COLOR_SYSTEM 0xEFEFF7AA
  295.  
  296. #define yellow 0xFFFF00AA
  297. #define RED         0xE60000FF
  298.  
  299. #define COLOR_GREY 0xAFAFAFAA
  300. #define COLOR_BLUE 0x0000FF96
  301. #define COLOR_DIS_RED 0xFF0000FF
  302. #define COLOR_CON_GREEN 0x00FF00FF
  303. #define COLOR_WHITE 0xFFFFFFFF55
  304. #define COLOR_YELLOW 0xFFFF00AA
  305. #define COLOR_BRIGHTRED 0xFF0000AA
  306. #define COLOR_ORANGE 0xFFA500AA
  307. #define GCOLOR_GREEN 0x33AA3355
  308. #define YELLOW 0xFFFF00FF
  309.  
  310. #define COLOR_OOC 0xFF8080FF
  311.  
  312. #define COLOR_LIGHTRED 0xFF8080FF
  313. #define COLOR_LIGHTBLUE 0x00BFFFAA
  314. #define COLOR_GREY 0xAFAFAFAA
  315. #define COLOR_RED 0xFF0000AA
  316. #define COLOR_YELLOW 0xFFFF00AA
  317. #define COLOR_GREEN 0x00FF00AA
  318.  
  319. #define ADMIN_RED   0xFB0000FF
  320. #define YELLOW      0xFFFF00FF
  321. #define ORANGE      0xF97804FF
  322. #define LIGHTRED    0xFF8080FF
  323. #define LIGHTBLUE   0x00C2ECFF
  324. #define PURPLE      0xB360FDFF
  325. #define BLUE        0x1229FAFF
  326. #define LIGHTGREEN  0x38FF06FF
  327. #define DARKPINK    0xE100E1FF
  328. #define DARKGREEN   0x008040FF
  329. #define AQUAGREEN   0x00CACAFB
  330. #define NICESKY     0x99FFFFAA
  331. #define GREY        0xCECECEFF
  332. #define WHITE       0xFFFFFFFF
  333. #define COLOR_TAN   0xE39216FF
  334.  
  335. //Admin
  336. // === [Some configuring] ===
  337. #define JOIN_MESSAGES false
  338. #define Leavemessages false
  339. #define leavemessagecolor COLOR_RED
  340. #define joinmessagecolor COLOR_RED
  341.  
  342. #define MEASURE_TIME 1000
  343.  
  344. #define Level1Commands1 ">> /clearchat, /slap [id], /kick [id] [reason], /goto [id], /get [id], /akill [id], /warn [id] [reason]"
  345. #define Level1Commands2 ">> /(un)freeze [id], /playerinfo [id], /asay [msg], /ip [id], /mute [id], /ajail [id] [time], /force [id]"
  346. #define Level2Commands1 ">> /telep [teleportee id] [dest. id], /(un)mute [id] /(un)jail [id] [time], /ann [text] [time]"
  347. #define Level2Commands2 ">> /eject [id], /sethealth [id] [amt], /setarmour [id] [amt] /healall, /armourall"
  348. #define Level3Commands1 ">> /disarm [id], /disarmall, /explode [id], /time [0-23], /weather [weatherid]"
  349. #define Level3Commands2 ">> /setmoney [id] [amount], /ban [id] [reason], /say [text]"
  350. #define Level4Commands1 ">> /disarmall, /reloadbans, /reloadlogs, /crash [id]"
  351.  
  352. #define TEAM_USA 0
  353. #define TEAM_GERMANY 1
  354. #define TEAM_AUSTRALIA 2
  355. #define TEAM_RUSSIA 3
  356. #define TEAM_JAPAN 4
  357.  
  358. //new mailsubject[128];
  359.  
  360. new SpeedHacking[MAX_PLAYERS];
  361. new Speed[MAX_PLAYERS][MAX_CHECKS];
  362. enum pWarns
  363. {
  364.     TeamJack
  365. }
  366.  
  367.  
  368. new Warns[MAX_PLAYERS][pWarns];
  369.  
  370. enum enums
  371. {
  372.     is,
  373.     intspc,
  374.     Float:Xspc,
  375.     Float:Yspc,
  376.     Float:Zspc
  377. };
  378.  
  379. new admgod[MAX_PLAYERS];
  380.  
  381. new freeze[MAX_PLAYERS];
  382. new WarnedTimes[MAX_PLAYERS];
  383.  
  384. new PlayerSpec[MAX_PLAYERS][enums];
  385. new Dispenser[MAX_PLAYERS];
  386. new EngineerI[MAX_PLAYERS];
  387. new dispout[MAX_PLAYERS];
  388.  
  389. new Driver[MAX_VEHICLES];
  390. new logged[MAX_PLAYERS];
  391. new adminlevel[MAX_PLAYERS];
  392. new money[MAX_PLAYERS];
  393. new playername[MAX_PLAYER_NAME];
  394.  
  395. new bool:IsInCargoB[MAX_PLAYERS];
  396. new PlayerCargoB[MAX_PLAYERS];
  397.  
  398. new bool:IsInBarracks[MAX_PLAYERS];
  399. new PlayerBarracks[MAX_PLAYERS];
  400.  
  401. new ammoo[MAX_PLAYERS];
  402.  
  403. new deaths[MAX_PLAYERS];
  404. new kills[MAX_PLAYERS];
  405.  
  406. new rank[MAX_PLAYERS];
  407.  
  408. new mute[MAX_PLAYERS];
  409.  
  410. forward BanLog(string[]);
  411.  
  412. forward SendClientMessageToAdmins(color,string[],alevel);
  413.  
  414. forward Message();
  415.  
  416. new IfCapture[21];
  417.  
  418. new BarracksUser[MAX_PLAYERS][MAX_VEHICLES];
  419. new CargoBobUser[MAX_PLAYERS][MAX_VEHICLES];
  420.  
  421. forward IsPlayerAdminCall(playerid);
  422. public IsPlayerAdminCall(playerid)
  423. return (adminlevel[playerid] >= 1);
  424.  
  425. new LastVehicle[MAX_PLAYERS];
  426.  
  427. #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1]
  428. #define isnull(%1) ((%1[0] == 0) || (%1[0] == 1 && %1[1] == 0))
  429. AntiDEAmx()
  430. {
  431.     new gunz[][] = {
  432.         "Unarmed (Fist)",
  433.         "Brass K"
  434.     };
  435. #pragma unused gunz
  436. }
  437.  
  438.  
  439. //TOP KILLERS
  440.  
  441. new Players;
  442. forward RankRefresh();
  443.  
  444. new Text:Classt[MAX_PLAYERS];
  445. new Text:Spree;
  446. new Text:Teams[MAX_PLAYERS];
  447.  
  448. //------------------------
  449. new ExplosionRadius = 15;                         //Explosion Radius
  450.  
  451. forward Explode(playerid);
  452.  
  453. new buyweapon;
  454.  
  455. new IsInGunShop[MAX_PLAYERS];
  456. new GunShopID[MAX_PLAYERS];
  457.  
  458. new hashit[MAX_PLAYERS];
  459.  
  460. new C4[MAX_PLAYERS];
  461. new Bomb[MAX_PLAYERS];
  462. new Planted[MAX_PLAYERS];
  463. new Float:bx[MAX_PLAYERS], Float:by[MAX_PLAYERS], Float:bz[MAX_PLAYERS];
  464. new pSpawned[MAX_PLAYERS];
  465.  
  466. new gunshop[8];
  467.  
  468. new PickedClass[MAX_PLAYERS] = 0;
  469.  
  470. new usingcomp[MAX_PLAYERS];
  471.  
  472. new hasbombs[MAX_PLAYERS];
  473. new hasrepair[MAX_PLAYERS];
  474.  
  475. new healedrec[MAX_PLAYERS];
  476.  
  477. new repair[MAX_PLAYERS];
  478.  
  479. new SpawnP[MAX_PLAYERS];
  480.  
  481. forward GetClosestPlayer(p1);
  482. forward Float:GetDistanceBetweenPlayers(p1,p2);
  483.  
  484. forward Txtreset();
  485. public Txtreset()
  486. {
  487.     TextDrawHideForAll(Spree);
  488.     return 1;
  489. }
  490.  
  491.  
  492. forward SettingPlayerTeam();
  493.  
  494. new nuke;
  495.  
  496. new AbleToSpawn[MAX_PLAYERS];
  497.  
  498. //NEW------------------------------------------------------------------------------------
  499.  
  500. static gTeam[MAX_PLAYERS];
  501. new gPlayerClass[MAX_PLAYERS];
  502. new EnteredArea[MAX_PLAYERS];
  503. new CapturedBy;                                   // 0 ( none ) 1 ( USA ) 2 ( Germany )
  504. new EnteredArea2[MAX_PLAYERS];
  505. new CapturedBy2;                                  // 0 ( none ) 1 ( USA ) 2 ( Germany )
  506. new EnteredArea3[MAX_PLAYERS];
  507. new CapturedBy3;                                  // 0 ( none ) 1 ( USA ) 2 ( Germany )
  508. new EnteredArea4[MAX_PLAYERS];
  509. new CapturedBy4;                                  // 0 ( none ) 1 ( USA ) 2 ( Germany )
  510. new EnteredArea5[MAX_PLAYERS];
  511. new CapturedBy5;                                  // 0 ( none ) 1 ( USA ) 2 ( Germany )
  512. new EnteredArea6[MAX_PLAYERS];
  513. new CapturedBy6;                                  // 0 ( none ) 1 ( USA ) 2 ( Germany )
  514. new EnteredArea7[MAX_PLAYERS];
  515. new CapturedBy7;                                  // 0 ( none ) 1 ( USA ) 2 ( Germany )
  516. new EnteredArea8[MAX_PLAYERS];
  517. new CapturedBy8;                                  // 0 ( none ) 1 ( USA ) 2 ( Germany )
  518. new EnteredArea9[MAX_PLAYERS];
  519. new CapturedBy9;                                  // 0 ( none ) 1 ( USA ) 2 ( Germany )
  520. new EnteredArea10[MAX_PLAYERS];
  521. new CapturedBy10;                                 // 0 ( none ) 1 ( USA ) 2 ( Germany )
  522. new EnteredArea11[MAX_PLAYERS];
  523. new CapturedBy11;
  524. new EnteredArea12[MAX_PLAYERS];
  525. new CapturedBy12;
  526. new EnteredArea13[MAX_PLAYERS];
  527. new CapturedBy13;
  528. new EnteredArea14[MAX_PLAYERS];
  529. new CapturedBy14;
  530. new EnteredArea15[MAX_PLAYERS];
  531. new CapturedBy15;
  532. new EnteredArea16[MAX_PLAYERS];
  533. new CapturedBy16;
  534. new EnteredArea17[MAX_PLAYERS];
  535. new CapturedBy17;
  536. new EnteredArea18[MAX_PLAYERS];
  537. new CapturedBy18;
  538. new EnteredArea19[MAX_PLAYERS];
  539. new CapturedBy19;
  540. new EnteredArea20[MAX_PLAYERS];
  541. new CapturedBy20;
  542.  
  543. new GeneralClass[MAX_PLAYERS][5];
  544.  
  545. new gscore;
  546. new uscore;
  547.  
  548. new T1[MAX_PLAYERS];
  549. new T2[MAX_PLAYERS];
  550. new T3[MAX_PLAYERS];
  551. new T4[MAX_PLAYERS];
  552. new T5[MAX_PLAYERS];
  553. new T6[MAX_PLAYERS];
  554. new T7[MAX_PLAYERS];
  555. new T8[MAX_PLAYERS];
  556. new T9[MAX_PLAYERS];
  557. new T10[MAX_PLAYERS];
  558. new T11[MAX_PLAYERS];
  559. new T12[MAX_PLAYERS];
  560. new T13[MAX_PLAYERS];
  561. new T14[MAX_PLAYERS];
  562. new T15[MAX_PLAYERS];
  563. new T16[MAX_PLAYERS];
  564. new T17[MAX_PLAYERS];
  565. new T18[MAX_PLAYERS];
  566. new T19[MAX_PLAYERS];
  567. new T20[MAX_PLAYERS];
  568.  
  569. new randperson[MAX_PLAYERS];
  570.  
  571. new hitman[MAX_PLAYERS];
  572.  
  573. new gmini;
  574. new umini;
  575.  
  576. new uhit;
  577. new ghit;
  578.  
  579. new USA;
  580. new GERMANY;
  581. new AUSTRALIA;
  582.  
  583. new Ear;
  584. new EarU;
  585. new EarG;
  586.  
  587. new Town1;
  588. new Town2;
  589.  
  590. new Resturant;
  591. new ResturantU;
  592. new ResturantG;
  593.  
  594. new Airfield;
  595. new AirfieldU;
  596. new AirfieldG;
  597.  
  598. new Diner;
  599. new DinerU;
  600. new DinerG;
  601.  
  602. new Cluck;
  603. new CluckU;
  604. new CluckG;
  605.  
  606. new OilPump;
  607. new OilPumpU;
  608. new OilPumpG;
  609.  
  610. new Oil;
  611. new OilU;
  612. new OilG;
  613.  
  614. new Beach;
  615. new BeachU;
  616. new BeachG;
  617.  
  618. new A;
  619. new AU;
  620. new AG;
  621.  
  622. new University;
  623. new UniversityU;
  624. new UniversityG;
  625.  
  626. new Gas;
  627. new GasU;
  628. new GasG;
  629.  
  630. new OS;
  631. new OSU;
  632. new OSG;
  633.  
  634. new T;
  635. new TU;
  636. new TG;
  637.  
  638. new D;
  639. new DU;
  640. new DG;
  641.  
  642. new OT;
  643. new OTU;
  644. new OTG;
  645.  
  646. new Quarry;
  647. new QuarryU;
  648. new QuarryG;
  649.  
  650. new FH;
  651. new FHU;
  652. new FHG;
  653.  
  654. new GW;
  655. new GWU;
  656. new GWG;
  657.  
  658. new Dock;
  659. new DockU;
  660. new DockG;
  661.  
  662. new CC;
  663. new CCU;
  664. new CCG;
  665.  
  666. enum cbinf { seats };
  667. new CargoBob[MAX_VEHICLES][cbinf];
  668. new Barracks[MAX_VEHICLES][cbinf];
  669.  
  670. new nameee[20];
  671.  
  672. new IsInHunter[MAX_PLAYERS];
  673. new IsInRhino[MAX_PLAYERS];
  674.  
  675. new nuked = 0;
  676.  
  677. //DEFINES--------------------------------------------------------------------------------
  678.  
  679. //FORWARDS-------------------------------------------------------------------------------
  680.  
  681. forward ZonesPay();
  682. public ZonesPay()
  683. {
  684.     new monys[5];
  685.     new mstr[100];
  686.     monys[0] = 0;
  687.     monys[1] = 0;                                 //i kno money, not moneys, not mony
  688.     foreach(Player, i) {
  689.         if( gTeam[i] == TEAM_USA ) {
  690.             if( CapturedBy == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  691.             if( CapturedBy2 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  692.             if( CapturedBy3 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  693.             if( CapturedBy4 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  694.             if( CapturedBy5 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  695.             if( CapturedBy6 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  696.             if( CapturedBy7 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  697.             if( CapturedBy8 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  698.             if( CapturedBy9 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  699.             if( CapturedBy10 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  700.             if( CapturedBy11 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  701.             if( CapturedBy12 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  702.             if( CapturedBy13 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  703.             if( CapturedBy14 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  704.             if( CapturedBy15 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  705.             if( CapturedBy16 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  706.             if( CapturedBy17 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  707.             if( CapturedBy18 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  708.             if( CapturedBy19 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  709.             if( CapturedBy20 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  710.             format(mstr, 100, "You recieved %i money from captured areas.", monys[0]*100);
  711.             SendClientMessage(i, COLOR_GREEN, mstr);
  712.         }
  713.         if( gTeam[i] == TEAM_GERMANY ) {
  714.             if( CapturedBy == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  715.             if( CapturedBy2 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  716.             if( CapturedBy3 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  717.             if( CapturedBy4 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  718.             if( CapturedBy5 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  719.             if( CapturedBy6 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  720.             if( CapturedBy7 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  721.             if( CapturedBy8 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  722.             if( CapturedBy9 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  723.             if( CapturedBy10 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  724.             if( CapturedBy11 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  725.             if( CapturedBy12 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  726.             if( CapturedBy13 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  727.             if( CapturedBy14 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  728.             if( CapturedBy15 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  729.             if( CapturedBy16 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  730.             if( CapturedBy17 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  731.             if( CapturedBy18 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  732.             if( CapturedBy19 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  733.             if( CapturedBy20 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  734.             format(mstr, 100, "You recieved %i money from captured areas.", monys[1]*100);
  735.             SendClientMessage(i, COLOR_GREEN, mstr);
  736.         }
  737.         if( gTeam[i] == TEAM_AUSTRALIA ) {
  738.             if( CapturedBy == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  739.             if( CapturedBy2 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  740.             if( CapturedBy3 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  741.             if( CapturedBy4 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  742.             if( CapturedBy5 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  743.             if( CapturedBy6 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  744.             if( CapturedBy7 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  745.             if( CapturedBy8 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  746.             if( CapturedBy9 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  747.             if( CapturedBy10 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  748.             if( CapturedBy11 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  749.             if( CapturedBy12 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  750.             if( CapturedBy13 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  751.             if( CapturedBy14 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  752.             if( CapturedBy15 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  753.             if( CapturedBy16 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  754.             if( CapturedBy17 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  755.             if( CapturedBy18 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  756.             if( CapturedBy19 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  757.             if( CapturedBy20 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
  758.             format(mstr, 100, "You recieved %i money from captured areas.", monys[2]*100);
  759.             SendClientMessage(i, COLOR_GREEN, mstr);
  760.         }
  761.         if( gTeam[i] == TEAM_JAPAN ) {
  762.             if( CapturedBy == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  763.             if( CapturedBy2 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  764.             if( CapturedBy3 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  765.             if( CapturedBy4 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  766.             if( CapturedBy5 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  767.             if( CapturedBy6 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  768.             if( CapturedBy7 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  769.             if( CapturedBy8 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  770.             if( CapturedBy9 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  771.             if( CapturedBy10 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  772.             if( CapturedBy11 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  773.             if( CapturedBy12 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  774.             if( CapturedBy13 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  775.             if( CapturedBy14 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  776.             if( CapturedBy15 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  777.             if( CapturedBy16 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  778.             if( CapturedBy17 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  779.             if( CapturedBy18 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  780.             if( CapturedBy19 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  781.             if( CapturedBy20 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
  782.             format(mstr, 100, "You recieved %i money from captured areas.", monys[3]*100);
  783.             SendClientMessage(i, COLOR_GREEN, mstr);
  784.         }
  785.         if( gTeam[i] == TEAM_RUSSIA ) {
  786.             if( CapturedBy == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  787.             if( CapturedBy2 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  788.             if( CapturedBy3 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  789.             if( CapturedBy4 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  790.             if( CapturedBy5 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  791.             if( CapturedBy6 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  792.             if( CapturedBy7 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  793.             if( CapturedBy8 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  794.             if( CapturedBy9 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  795.             if( CapturedBy10 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  796.             if( CapturedBy11 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  797.             if( CapturedBy12 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  798.             if( CapturedBy13 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  799.             if( CapturedBy14 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  800.             if( CapturedBy15 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  801.             if( CapturedBy16 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  802.             if( CapturedBy17 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  803.             if( CapturedBy18 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  804.             if( CapturedBy19 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  805.             if( CapturedBy20 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
  806.             format(mstr, 100, "You recieved %i money from captured areas.", monys[1]*100);
  807.             SendClientMessage(i, COLOR_GREEN, mstr);
  808.         }
  809.     }
  810.     return 1;
  811. }
  812.  
  813.  
  814. forward AreaCheck();
  815. forward TakeOver();
  816. forward NoArea(playerid);
  817. forward NoArea2(playerid);
  818. forward Secs(playerid);
  819. forward Spawn(playerid);
  820.  
  821. forward SendPlayerFormattedText(playerid, const string[], define);
  822.  
  823. forward ClassShow(playerid);
  824. public ClassShow(playerid)
  825. {
  826.     if( gPlayerClass[playerid] == ENGINEER ) {
  827.         EngineerI[playerid] = 1;
  828.     }
  829.  
  830.     if( gPlayerClass[playerid] == ADMIN ) admgod[playerid] = SetTimerEx("AdminGOD", 250, 1, "i", playerid);
  831.  
  832.     if( GetPlayerMoney(playerid) < 0 ) ResetPlayerMoney(playerid);
  833.  
  834.     new cstr[100];
  835.     format(cstr, 100, " ");
  836.     new classs[50];
  837.     if( gPlayerClass[playerid] == GENERAL ) format(classs, 50, "general");
  838.     if( gPlayerClass[playerid] == ADMIN ) format(classs, 50, "~r~Admin");
  839.     if( gPlayerClass[playerid] == SCOUT ) format(classs, 50, "Scout");
  840.     if( gPlayerClass[playerid] == PYRO ) format(classs, 50, "Pyroman");
  841.     if( gPlayerClass[playerid] == MEDIC ) format(classs,50, "Medic");
  842.     if( gPlayerClass[playerid] == ENGINEER )  format(classs,50,"Engineer");
  843.     if( gPlayerClass[playerid] == PILOT ) format(classs,50,"Pilot");
  844.     if( gPlayerClass[playerid] == DEMOLITION ) format(classs,50,"Demolition");
  845.     if( gPlayerClass[playerid] == ASSAULT ) format(classs,50,"Assault");
  846.     if( gPlayerClass[playerid] == SNIPER ) format(classs,50,"Sniper");
  847.  
  848.     format(cstr, 100, "~y~%s", classs);
  849.  
  850.     TextDrawHideForPlayer(playerid,Classt[playerid]);
  851.     TextDrawSetString(Classt[playerid], cstr);
  852.     TextDrawShowForPlayer(playerid,Classt[playerid]);
  853.     return 1;
  854. }
  855.  
  856.  
  857. new Float:cbx[MAX_PLAYERS], Float:cby[MAX_PLAYERS], Float:cbz[MAX_PLAYERS], Float:cba[MAX_PLAYERS];
  858.  
  859. forward ParaExit(playerid);
  860. public ParaExit(playerid)
  861. {
  862.     RemovePlayerFromVehicle(playerid);
  863.     GivePlayerWeapon(playerid, 46, 1);
  864.     return 1;
  865. }
  866.  
  867.  
  868. forward ExitCB(playerid);
  869. public ExitCB(playerid)
  870. {
  871.  
  872.     SetPlayerPos(playerid, cbx[playerid], cby[playerid], cbz[playerid]);
  873.     SetPlayerFacingAngle(playerid, cba[playerid]);
  874.     new vehicleid = LastVehicle[playerid];
  875.  
  876.     if( BarracksUser[playerid][vehicleid] == 1 ) {
  877.         BarracksUser[playerid][vehicleid] = 0;
  878.     }
  879.  
  880.     if( CargoBobUser[playerid][vehicleid] == 1 ) {
  881.         GivePlayerWeapon(playerid, 46, 1);
  882.         CargoBobUser[playerid][vehicleid] =0;
  883.         print("got out of bob");
  884.     }
  885.     return 1;
  886. }
  887.  
  888.  
  889. forward DispeClean(playerid);
  890. public DispeClean(playerid)
  891. {
  892.     DestroyPickup(Dispenser[playerid]);
  893.     return 1;
  894. }
  895.  
  896. //http://codwwserver.co.cc/
  897.  
  898. forward AdminGOD(playerid);
  899. public AdminGOD(playerid)
  900. {
  901.     if( adminlevel[playerid] > 0 ) {
  902.         if( gPlayerClass[playerid] == ADMIN ) {
  903.             if( GetPlayerSkin(playerid) ==  217)
  904.                 SetPlayerArmour(playerid, 999999.0);
  905.             if( IsPlayerInAnyVehicle(playerid)) {
  906.                 RepairVehicle(GetPlayerVehicleID(playerid));
  907.             }else
  908.             if( !IsPlayerInAnyVehicle(playerid)) {
  909.                 SetPlayerHealth(playerid, 999999.0);
  910.             }
  911.         }
  912.     }
  913.     return 1;
  914. }
  915.  
  916.  
  917. new Float:RandomUSACoords[13][3] =
  918. {
  919.     {-244.2003, 2602.5547, 63.7031},
  920.     {-291.127594, 2608.788574, 63.799774},
  921.     {-155.354614, 2659.233398, 64.549774},
  922.     {-193.562515, 2731.505615, 63.749756},
  923.     {-218.214340, 2759.695313, 63.749756},
  924.     {-239.894196, 2727.762939, 63.749756},
  925.     {-323.737000, 2652.677490, 64.249756},
  926.     {-175.897125, 2612.831787, 62.749756},
  927.     {-263.895935, 2586.644043, 64.249756},
  928.     {-334.114258, 2727.419434, 63.799774},
  929.     {-244.2003, 2602.5547, 63.7031},
  930.     {-225.250168, 2786.327393, 63.799774},
  931.     {-153.849152, 2760.387695, 65.749756}
  932. };
  933.  
  934. new Float:RandomGERCoords[7][3] =
  935. {
  936.     {-148.932114, 1069.882690, 20.310356},
  937.     {-233.991333, 1178.141357, 20.235357},
  938.     {-320.718079, 1057.609863, 20.235357},
  939.     {-130.159241, 973.272156, 23.485357},
  940.     {-161.434662, 1205.636963, 20.085356},
  941.     {-144.539536, 1132.992188, 19.985357},
  942.     {-147.705017, 1111.523804, 19.785360}
  943.  
  944. };
  945.  
  946. stock IsPlayerInFlying(playerid,vehicleid)
  947. {
  948.  
  949.     if(IsPlayerInVehicle(playerid,vehicleid)) {
  950.         switch(GetVehicleModel(vehicleid)) {
  951.             case 487, 488, 497, 460,  476, 511, 512, 513, 519, 520,548,553,577,592,593:
  952.             {
  953.                 return true;
  954.             }
  955.         }
  956.     }
  957.     return false;
  958. }
  959.  
  960.  
  961. stock SetRandomUSAPos(playerid)
  962. {
  963.     if( gTeam[playerid] == TEAM_USA ) {
  964.         new rand = random(sizeof(RandomUSACoords));
  965.         SetPlayerInterior(playerid, 0);
  966.         SetPlayerPos(playerid, RandomUSACoords[rand][0],RandomUSACoords[rand][1],RandomUSACoords[rand][2]);
  967.     }
  968.     return 1;
  969. }
  970.  
  971.  
  972. stock SetRandomGERPos(playerid)
  973. {
  974.     if( gTeam[playerid]==TEAM_GERMANY ) {
  975.         new rand = random(sizeof(RandomGERCoords));
  976.         SetPlayerInterior(playerid, 0);
  977.         SetPlayerPos(playerid, RandomGERCoords[rand][0], RandomGERCoords[rand][1], RandomGERCoords[rand][2]);
  978.     }
  979.     return 1;
  980. }
  981.  
  982.  
  983. new Text:txtTimeDisp;
  984.  
  985. forward UpdateTime();
  986. public UpdateTime()
  987. {
  988.  
  989.     foreach(Player, i) {
  990.  
  991.         if(IsPlayerInAnyVehicle(i)) {
  992.             new mphspeed[128];
  993.             format(mphspeed, sizeof(mphspeed), "%d  mph", GetPlayerSpeedSpeedo(i, false));
  994.             TextDrawHideForPlayer(i, Text:Textdraw0);
  995.             TextDrawSetString(Text:Textdraw0, mphspeed);
  996.             TextDrawShowForPlayer(i, Text:Textdraw0);
  997.         }
  998.         else {
  999.             TextDrawHideForPlayer(i, Text:Textdraw0);
  1000.         }
  1001.  
  1002.         if(GetPlayerState(i)==PLAYER_STATE_DRIVER && !IsPlayerInPlane(i)) {
  1003.             if(GetPlayerSpeedSpeedo(i, true) > 2000) {
  1004.                 new BadSpeed = GetPlayerSpeedSpeedo(i, true);
  1005.                 new speedo[128];
  1006.                 new HackerName[MAX_PLAYER_NAME];
  1007.                 GetPlayerName(i, HackerName, sizeof(HackerName));
  1008.                 format(speedo, sizeof(speedo), "Banning: %s [Reason: Speedhacks | %dKMH; MAX: 400KMH]", HackerName, BadSpeed);
  1009.                 SendClientMessageToAll(RED, speedo);
  1010.                 BanEx(i, "Speedhacks");
  1011.             }
  1012.         }
  1013.  
  1014.         if(adminlevel[i] < 1) {
  1015. /*
  1016. switch(GetPlayerWeapon(i))
  1017. {
  1018.     case 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 26, 35, 38, 42, 44, 45:
  1019.     {
  1020.         new HackerName[MAX_PLAYER_NAME];
  1021.         GetPlayerName(i, HackerName, sizeof(HackerName));
  1022.         new string[128];
  1023.         format(string, sizeof(string), "Banning: %s [Reason: Weapon Hacks]", HackerName);
  1024.         SendClientMessageToAll(COLOR_RED, string);
  1025.         BanEx(i, "Invalid Weapon - Weapon Hacks");
  1026. }
  1027. }
  1028. */
  1029.  
  1030.             new weapon;
  1031.             new gunammo;
  1032.             for(new w = 0; w <13; w++) {
  1033.                 GetPlayerWeaponData(i, w, weapon, gunammo);
  1034.                 if(( weapon == 26 || weapon == 32 || weapon == 38 || weapon == 44 || weapon == 45) && gunammo > 0) {
  1035.                     new HackerName[MAX_PLAYER_NAME];
  1036.                     GetPlayerName(i, HackerName, sizeof(HackerName));
  1037.                     new string[128];
  1038.                     format(string, sizeof(string), "Banning: %s [Reason: Weapon Hacks]", HackerName);
  1039.                     SendClientMessageToAll(COLOR_RED, string);
  1040.                     BanEx(i, "Invalid Weapon - Weapon Hacks");
  1041.                     return 1;
  1042.                 }
  1043.             }
  1044.  
  1045.             if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK) {
  1046.                 new HackerName[MAX_PLAYER_NAME];
  1047.                 GetPlayerName(i, HackerName, sizeof(HackerName));
  1048.                 new string[128];
  1049.                 format(string, sizeof(string), "Banning: %s [Reason: Jetpack]", HackerName);
  1050.                 SendClientMessageToAll(COLOR_RED, string);
  1051.                 BanEx(i, "Invalid Weapon - Jetpack");
  1052.             }
  1053.            
  1054.             if(GetPlayerState(i)==PLAYER_STATE_DRIVER) {
  1055.                 new weaponid=GetPlayerSpeed(i);
  1056.                 if(weaponid>260 && !IsPlayerInPlane(i)) {
  1057.                     SpeedHacking[i]++;
  1058.                     if(SpeedHacking[i]==2) {
  1059.                         JB_Warnings[i]++;
  1060.                         TogglePlayerControllable(i,false);
  1061.                         if(JB_Warnings[i]<2) {
  1062.                             new reason[128];
  1063.                             format(reason,sizeof(reason),"%d KM/H with %s",weaponid,GetVehicleName(GetPlayerVehicleID(i)));
  1064.                             SendClientMessageToAdmins(RED, reason, 1);
  1065.                         }
  1066.                         else {
  1067.                             new HackerName[MAX_PLAYER_NAME];
  1068.                             GetPlayerName(i, HackerName, sizeof(HackerName));
  1069.                             new string[128];
  1070.                             format(string, sizeof(string), "Banning: %s [Reason: Speedhacks]", HackerName);
  1071.                             SendClientMessageToAll(RED, string);
  1072.                             BanEx(i,"Speedhack");
  1073.                             continue;
  1074.                         }
  1075.                     }
  1076.                 }
  1077.                 else {
  1078.                     SpeedHacking[i]=0;
  1079.                 }
  1080.             }
  1081.         }
  1082.     }
  1083.  
  1084.     new reason[64];
  1085.     foreach(Player, i) {
  1086.         if(Messages[i]) {
  1087.             if(!Muted[i]) {
  1088.                 if(Messages[i]>15) {
  1089.                     format(reason,sizeof(reason),"Extreme spam [%d messages/second]",Messages[i]);
  1090.                     SendClientMessageToAll(RED, reason);
  1091.                     Kick(i);
  1092.                     continue;
  1093.                 }
  1094.                 else if(Messages[i]>10) {
  1095.                     format(reason,sizeof(reason),"Massive spam [%d messages/second]",Messages[i]);
  1096.                     SendClientMessageToAll(RED, reason);
  1097.                     Kick(i);
  1098.                     continue;
  1099.                 }
  1100.                 else if(Messages[i]>4) {
  1101.                     format(reason,sizeof(reason),"Spam [%d messages/second]",Messages[i]);
  1102.                     SendClientMessageToAll(RED, reason);
  1103.                     MutePlayer(i,2*60,reason);
  1104.                 }
  1105.                 Messages[i]--;
  1106.             }
  1107.  
  1108.             if(Commands[i]) {
  1109.                 if(Commands[i]>15) {
  1110.                     format(reason,sizeof(reason),"Extreme command spam [%d commands/second]",Commands[i]);
  1111.                     SendClientMessageToAll(RED, reason);
  1112.                     Kick(i);
  1113.                     continue;
  1114.                 }
  1115.                 else if(Commands[i]>5) {
  1116.                     format(reason,sizeof(reason),"Massive command spam [%d commands/second]",Commands[i]);
  1117.                     SendClientMessageToAll(RED, reason);
  1118.                     Kick(i);
  1119.                     continue;
  1120.                 }
  1121.             }
  1122.             Commands[i]--;
  1123.         }
  1124.     }
  1125.  
  1126.     foreach(Player, i) {
  1127.         if( GetPlayerWantedLevel(i) != rank[i] ) SetPlayerWantedLevel(i, rank[i]);
  1128.     }
  1129.  
  1130.     foreach(Player, i) {
  1131.     }
  1132.     return 1;
  1133. }
  1134.  
  1135.  
  1136. new playerColors[MAX_PLAYERS];
  1137. forward PlayerLeaveGang(playerid);
  1138. new teamNames[MAX_TEAMS][MAX_TEAM_NAME];
  1139. new teamInfo[MAX_TEAMS][3];                       //0-created,1-members,2-color
  1140. new playerTeam[MAX_PLAYERS];
  1141. new teamMembers[MAX_TEAMS][MAX_TEAM_MEMBERS];
  1142. new teamInvite[MAX_PLAYERS];
  1143. PlayerLeaveGang(playerid)
  1144. {
  1145.     new string[100];
  1146.     new teamnum = playerTeam[playerid];
  1147.  
  1148.     if(teamnum > 0) {
  1149.         for(new i = 0; i < teamInfo[teamnum][1]; i++) {
  1150.             if(teamMembers[teamnum][i]==playerid) {
  1151.  
  1152. //One less team member
  1153.                 teamInfo[teamnum][1]--;
  1154.  
  1155.                 for(new j = i; j < teamInfo[teamnum][1]; j++) {
  1156. //Shift team members
  1157.                     teamMembers[teamnum][j]=teamMembers[teamnum][j+1];
  1158.                 }
  1159.  
  1160. //Disband team if no more members
  1161.                 if(teamInfo[teamnum][1]<1) {
  1162.                     teamInfo[teamnum][0]=0;
  1163.                     teamInfo[teamnum][1]=0;
  1164.                 }
  1165.  
  1166. //Notify other members
  1167.                 for(new j = 0; j < teamInfo[teamnum][1]; j++) {
  1168.                     GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  1169.                     format(string, sizeof(string),"%s has quit your team.", playername);
  1170.                     SendClientMessage(teamMembers[teamnum][j], COLOR_ORANGE, string);
  1171.                 }
  1172.                 format(string, sizeof(string),"You have quit the team '%s' (id: %d)", teamNames[teamnum], teamnum);
  1173.                 SendClientMessage(playerid, COLOR_ORANGE, string);
  1174.                 playerTeam[playerid]=0;
  1175.  
  1176.                 return;
  1177.             }
  1178.         }
  1179.     }
  1180.     else {
  1181.         SendClientMessage(playerid, COLOR_RED, "You are not in a team.");
  1182.     }
  1183. }
  1184.  
  1185.  
  1186. forward DispenserOut(playerid);
  1187. public DispenserOut(playerid)
  1188. {
  1189.     dispout[playerid] = 0;
  1190.     return 1;
  1191. }
  1192.  
  1193.  
  1194. //-=====VEHICLES====
  1195. new total_vehicles_from_files=0;
  1196.  
  1197. main()
  1198. {
  1199.     print("__________GAMEMODE LOADING!_________");
  1200.     print("\n----------------------------------");
  1201.     print("       Modern Warfare Gamemode"      );
  1202.     print("----------------------------------\n");
  1203.     print("__________GAMEMODE LOADED!__________");
  1204. }
  1205.  
  1206. public OnGameModeInit()
  1207. {
  1208.     SetTimer("modechange1",10000,0);
  1209.     vehiclehpbar[0] = TextDrawCreate(551.0, 59.0, " ");
  1210.     TextDrawUseBox(vehiclehpbar[0], true);
  1211.     TextDrawBoxColor(vehiclehpbar[0], COLOR_VHPDANGER);
  1212.     TextDrawSetShadow(vehiclehpbar[0],0);
  1213.     TextDrawTextSize(vehiclehpbar[0], 602, 0);
  1214.     TextDrawSetOutline(vehiclehpbar[0],1);
  1215.  
  1216.     vehiclehpbar[1] = TextDrawCreate(551.0, 59.0, " ");
  1217.     TextDrawUseBox(vehiclehpbar[1], true);
  1218.     TextDrawBoxColor(vehiclehpbar[1], COLOR_VHPDANGER);
  1219.     TextDrawSetShadow(vehiclehpbar[1],0);
  1220.     TextDrawTextSize(vehiclehpbar[1], 551, 0);
  1221.     TextDrawSetOutline(vehiclehpbar[1],1);
  1222.  
  1223.     vehiclehpbar[2] = TextDrawCreate(551.0, 59.0, " ");
  1224.     TextDrawUseBox(vehiclehpbar[2], true);
  1225.     TextDrawBoxColor(vehiclehpbar[2], COLOR_VHPDANGER);
  1226.     TextDrawSetShadow(vehiclehpbar[2],0);
  1227.     TextDrawTextSize(vehiclehpbar[2], 556, 0);
  1228.     TextDrawSetOutline(vehiclehpbar[2],1);
  1229.  
  1230.     vehiclehpbar[3] = TextDrawCreate(551.0, 59.0, " ");
  1231.     TextDrawUseBox(vehiclehpbar[3], true);
  1232.     TextDrawBoxColor(vehiclehpbar[3], COLOR_VHPDANGER);
  1233.     TextDrawSetShadow(vehiclehpbar[3],0);
  1234.     TextDrawTextSize(vehiclehpbar[3], 561, 0);
  1235.     TextDrawSetOutline(vehiclehpbar[3],1);
  1236.  
  1237.     vehiclehpbar[4] = TextDrawCreate(551.0, 59.0, " ");
  1238.     TextDrawUseBox(vehiclehpbar[4], true);
  1239.     TextDrawBoxColor(vehiclehpbar[4], COLOR_VHPWARNING);
  1240.     TextDrawSetShadow(vehiclehpbar[4],0);
  1241.     TextDrawTextSize(vehiclehpbar[4], 566, 0);
  1242.     TextDrawSetOutline(vehiclehpbar[4],1);
  1243.  
  1244.     vehiclehpbar[5] = TextDrawCreate(551.0, 59.0, " ");
  1245.     TextDrawUseBox(vehiclehpbar[5], true);
  1246.     TextDrawBoxColor(vehiclehpbar[5], COLOR_VHPWARNING);
  1247.     TextDrawSetShadow(vehiclehpbar[5],0);
  1248.     TextDrawTextSize(vehiclehpbar[5], 571, 0);
  1249.     TextDrawSetOutline(vehiclehpbar[5],1);
  1250.  
  1251.     vehiclehpbar[6] = TextDrawCreate(551.0, 59.0, " ");
  1252.     TextDrawUseBox(vehiclehpbar[6], true);
  1253.     TextDrawBoxColor(vehiclehpbar[6], COLOR_VHPWARNING);
  1254.     TextDrawSetShadow(vehiclehpbar[6],0);
  1255.     TextDrawTextSize(vehiclehpbar[6], 576, 0);
  1256.     TextDrawSetOutline(vehiclehpbar[6],1);
  1257.  
  1258.     vehiclehpbar[7] = TextDrawCreate(551.0, 59.0, " ");
  1259.     TextDrawUseBox(vehiclehpbar[7], true);
  1260.     TextDrawBoxColor(vehiclehpbar[7], COLOR_VHPWARNING);
  1261.     TextDrawSetShadow(vehiclehpbar[7],0);
  1262.     TextDrawTextSize(vehiclehpbar[7], 581, 0);
  1263.     TextDrawSetOutline(vehiclehpbar[7],1);
  1264.  
  1265.     vehiclehpbar[8] = TextDrawCreate(551.0, 59.0, " ");
  1266.     TextDrawUseBox(vehiclehpbar[8], true);
  1267.     TextDrawBoxColor(vehiclehpbar[8], COLOR_VHPGOOD);
  1268.     TextDrawSetShadow(vehiclehpbar[8],0);
  1269.     TextDrawTextSize(vehiclehpbar[8], 586, 0);
  1270.     TextDrawSetOutline(vehiclehpbar[8],1);
  1271.  
  1272.     vehiclehpbar[9] = TextDrawCreate(551.0, 59.0, " ");
  1273.     TextDrawUseBox(vehiclehpbar[9], true);
  1274.     TextDrawBoxColor(vehiclehpbar[9], COLOR_VHPGOOD);
  1275.     TextDrawSetShadow(vehiclehpbar[9],0);
  1276.     TextDrawTextSize(vehiclehpbar[9], 591, 0);
  1277.     TextDrawSetOutline(vehiclehpbar[9],1);
  1278.  
  1279.     vehiclehpbar[10] = TextDrawCreate(551.0, 59.0, " ");
  1280.     TextDrawUseBox(vehiclehpbar[10], true);
  1281.     TextDrawBoxColor(vehiclehpbar[10], COLOR_VHPGOOD);
  1282.     TextDrawSetShadow(vehiclehpbar[10],0);
  1283.     TextDrawTextSize(vehiclehpbar[10], 596, 0);
  1284.     TextDrawSetOutline(vehiclehpbar[10],1);
  1285.  
  1286.     vehiclehpbar[11] = TextDrawCreate(551.0, 59.0, " ");
  1287.     TextDrawUseBox(vehiclehpbar[11], true);
  1288.     TextDrawBoxColor(vehiclehpbar[11], COLOR_VHPGOOD);
  1289.     TextDrawSetShadow(vehiclehpbar[11],0);
  1290.     TextDrawTextSize(vehiclehpbar[11], 602, 0);
  1291.     TextDrawSetOutline(vehiclehpbar[11],1);
  1292.  
  1293.     SetTimer("VHPBarUpdate",250,1);
  1294.  
  1295.     Textdraw0 = TextDrawCreate(502.000000,134.000000,"      mph");
  1296.     TextDrawUseBox(Textdraw0,1);
  1297.     TextDrawBoxColor(Textdraw0,0x00000066);
  1298.     TextDrawTextSize(Textdraw0,602.000000,0.000000);
  1299.     TextDrawAlignment(Textdraw0,0);
  1300.     TextDrawBackgroundColor(Textdraw0,0x000000ff);
  1301.     TextDrawFont(Textdraw0,1);
  1302.     TextDrawLetterSize(Textdraw0,0.599999,0.899999);
  1303.     TextDrawColor(Textdraw0,0xffffffff);
  1304.     TextDrawSetOutline(Textdraw0,1);
  1305.     TextDrawSetProportional(Textdraw0,1);
  1306.     TextDrawSetShadow(Textdraw0,1);
  1307.  
  1308.     UpdateTime();
  1309.     SetTimer("UpdateTime", 1000, 1);              //rank refresh, time, anti weapon hack
  1310.  
  1311.     SetTimer("ZonesPay", 600000 , 1);
  1312.  
  1313.     Spree = TextDrawCreate(9.000000,310.000000,"s is on a killing spree of i kills.");
  1314.     TextDrawAlignment(Spree,0);
  1315.     TextDrawBackgroundColor(Spree,0x000000ff);
  1316.     TextDrawFont(Spree,3);
  1317.     TextDrawLetterSize(Spree,0.299999,0.799999);
  1318.     TextDrawColor(Spree,0xffffffff);
  1319.     TextDrawSetOutline(Spree,1);
  1320.     TextDrawSetProportional(Spree,1);
  1321.     TextDrawSetShadow(Spree,1);
  1322.     TextDrawHideForAll(Spree);
  1323.  
  1324.     AntiDEAmx();
  1325.  
  1326.     DisableInteriorEnterExits();
  1327.  
  1328.     foreach(Player, i) IsInBarracks[i] = false;
  1329.     foreach(Player, i) IsInCargoB[i] = false;
  1330.  
  1331.     GangZoneShowForAll(Ear ,GCOLOR_GREEN);
  1332.     GangZoneShowForAll(Airfield ,GCOLOR_GREEN);
  1333.     GangZoneShowForAll(Resturant ,GCOLOR_GREEN);
  1334.     GangZoneShowForAll(Oil ,GCOLOR_GREEN);
  1335.     GangZoneShowForAll(A ,GCOLOR_GREEN);
  1336.     GangZoneShowForAll(Gas ,GCOLOR_GREEN);
  1337.     GangZoneShowForAll(OS ,GCOLOR_GREEN);
  1338.     GangZoneShowForAll(T ,GCOLOR_GREEN);
  1339.     GangZoneShowForAll(D ,GCOLOR_GREEN);
  1340.     GangZoneShowForAll(OT ,GCOLOR_GREEN);
  1341.     GangZoneShowForAll(Quarry ,GCOLOR_GREEN);
  1342.     GangZoneShowForAll(FH ,GCOLOR_GREEN);
  1343.     GangZoneShowForAll(GW ,GCOLOR_GREEN);
  1344.     GangZoneShowForAll(Dock ,GCOLOR_GREEN);
  1345.     GangZoneShowForAll(CC ,GCOLOR_GREEN);
  1346.     AddStaticVehicle(433,-237.9066,2596.8599,63.1400,359.7859,46,0);
  1347. //
  1348.     AddStaticVehicle(433,-231.9518,2596.4175,63.1396,359.5512,46,0);
  1349. //
  1350.     AddStaticVehicle(433,-228.5950,2596.4651,63.1397,359.6665,46,0);
  1351. //
  1352.     AddStaticVehicle(470,-222.6559,2595.7107,62.6961,357.3925,46,0);
  1353. //
  1354.     AddStaticVehicle(470,-219.6203,2595.5295,62.6960,359.0371,46,0);
  1355. //
  1356.     AddStaticVehicle(470,-216.6688,2596.1890,62.6957,0.0875,46,0);
  1357. //
  1358.     AddStaticVehicle(470,-213.4585,2595.6265,62.6972,358.8952,46,0);
  1359. //
  1360.     AddStaticVehicle(470,-210.3814,2596.0378,62.6974,0.5131,46,0);
  1361. //
  1362.     AddStaticVehicle(470,-207.4817,2595.8623,62.6953,1.0309,46,0);
  1363. //
  1364.     AddStaticVehicle(468,-201.2399,2609.6809,62.3721,0.1019,46,46);
  1365. //
  1366.     AddStaticVehicle(468,-198.5097,2608.8533,62.3716,356.7023,46,46);
  1367. //
  1368.     AddStaticVehicle(468,-204.4878,2609.1299,62.3723,0.3513,46,46);
  1369. //
  1370.     AddStaticVehicle(468,-207.0385,2609.1125,62.3714,0.8556,46,0);
  1371. //
  1372.     AddStaticVehicle(468,-209.9670,2608.6765,62.3715,358.0346,46,0);
  1373. //
  1374.     AddStaticVehicle(468,-213.0741,2608.9282,62.3720,5.1167,46,0);
  1375. //
  1376.     AddStaticVehicle(425,-194.7429,2777.7417,67.0220,178.4641,46,0);
  1377. //
  1378.     AddStaticVehicle(432,-269.7314,2723.9468,62.6675,182.1993,46,0);
  1379. //
  1380.     AddStaticVehicle(470,-321.0097,2717.2473,62.6831,179.4653,46,0);
  1381. //
  1382.     AddStaticVehicle(433,-302.0328,2721.0503,62.8404,180.1418,46,0);
  1383. //
  1384.     AddStaticVehicle(468,-276.5174,2719.1086,62.2795,177.5063,46,0);
  1385. //
  1386.     AddStaticVehicle(470,-289.3925,2716.7993,62.4787,179.1506,46,0);
  1387. //
  1388.     AddStaticVehicle(470,-231.5227,2706.3403,62.6029,271.2531,46,0);
  1389. //
  1390.     AddStaticVehicle(470,-166.4958,2699.2825,62.4293,89.3222,46,0);
  1391. //
  1392.     AddStaticVehicle(470,-166.8118,2719.4353,62.0222,91.7580,46,0);
  1393. //
  1394.     AddStaticVehicle(470,-168.4434,2745.9456,62.2996,97.3230,46,0);
  1395. //
  1396.     AddStaticVehicle(468,-154.8923,2755.4978,62.3036,84.0249,46,0);
  1397. //
  1398.     AddStaticVehicle(468,-263.8630,2781.6680,62.3559,240.6922,46,6);
  1399. //
  1400.     AddStaticVehicle(470,-272.4295,2766.1548,62.0076,175.8315,46,0);
  1401. //
  1402.     AddStaticVehicle(470,-289.5947,2749.0879,61.8039,269.1090,46,0);
  1403. //
  1404.     AddStaticVehicle(470,-262.2811,2737.7539,62.6027,358.8494,46,0);
  1405. //
  1406.     AddStaticVehicle(470,-238.2550,2746.5264,62.6044,268.3446,46,0);
  1407. //
  1408.     AddStaticVehicle(520,-309.8174,2679.6299,64.5386,267.1063,46,0);
  1409. //
  1410.     AddStaticVehicle(548,-182.9882,2662.9485,65.8105,270.6342,46,46);
  1411. //
  1412.     AddStaticVehicle(487,-221.8909,2658.0103,62.7782,181.4946,46,46);
  1413. //
  1414.     AddStaticVehicle(487,-213.6385,2658.7456,62.7793,181.2498,46,46);
  1415. //
  1416.     AddStaticVehicle(487,-204.0486,2659.4626,62.8665,183.5447,46,46);
  1417. //
  1418.     AddStaticVehicle(433,-262.7718,2683.6169,63.0452,0.3371,46,0);
  1419. //
  1420.     AddStaticVehicle(433,-252.5361,2653.6628,63.0384,176.9709,46,0);
  1421. //
  1422.     AddStaticVehicle(470,-239.6434,2643.7434,62.8109,275.6447,46,0);
  1423. //
  1424.     AddStaticVehicle(470,-219.6599,2644.3186,63.0376,270.5441,46,0);
  1425. //
  1426.     AddStaticVehicle(432,-199.7694,2716.4646,62.7117,180.8957,46,0);
  1427. //
  1428.     AddStaticVehicle(432,-238.1680,2809.4900,61.7200,183.2036,46,0);
  1429. //
  1430.     AddStaticVehicle(432,-247.3504,2810.8726,62.1450,177.6981,46,0);
  1431.  
  1432. //merc base
  1433. //
  1434.     AddStaticVehicle(487,-710.7637,904.9280,12.6237,357.1795,46,0);
  1435. //
  1436.     AddStaticVehicle(487,-699.2277,905.7795,12.4033,354.6016,46,0);
  1437. //
  1438.     AddStaticVehicle(487,-687.3587,904.8935,12.3040,358.4796,46,0);
  1439. //
  1440.     AddStaticVehicle(468,-673.4254,962.1646,11.8021,27.8802,46,0);
  1441. //
  1442.     AddStaticVehicle(468,-675.4359,961.8554,11.8019,25.7380,46,0);
  1443. //
  1444.     AddStaticVehicle(468,-679.0760,961.7861,11.8022,39.3239,46,0);
  1445. //
  1446.     AddStaticVehicle(468,-683.7852,961.2510,11.8019,30.6109,46,0);
  1447. //
  1448.     AddStaticVehicle(432,-680.3606,967.4835,12.1477,91.2226,46,0);
  1449. //
  1450.     AddStaticVehicle(476,-654.5692,982.6618,12.8482,86.4060,46,0);
  1451.  
  1452. //Airport
  1453. //
  1454.     AddStaticVehicle(520,325.3872,2538.2571,17.5256,181.0410,43,0);
  1455. //
  1456.     AddStaticVehicle(520,290.5441,2541.0845,17.5436,180.2827,43,0);
  1457. //
  1458.     AddStaticVehicle(548,364.5240,2468.1084,18.1205,354.1671,1,1);
  1459. //
  1460.     AddStaticVehicle(548,340.2461,2469.3870,18.1313,0.0085,1,1);
  1461. //
  1462.     AddStaticVehicle(548,311.9442,2468.4646,18.0775,357.5287,1,1);
  1463. //
  1464.     AddStaticVehicle(548,285.2830,2468.7217,18.1721,355.6848,1,1);
  1465. //
  1466.     AddStaticVehicle(470,420.5826,2530.6926,16.6043,183.9230,43,0);
  1467. //
  1468.     AddStaticVehicle(470,424.5480,2531.5193,16.6002,179.7622,46,0);
  1469. //
  1470.     AddStaticVehicle(470,428.4148,2531.3831,16.5852,179.3951,43,0);
  1471. //
  1472.     AddStaticVehicle(425,346.6790,2544.8450,17.6503,182.0651,43,0);
  1473. //
  1474.     AddStaticVehicle(425,365.8494,2537.0806,17.2135,179.9614,43,0);
  1475. //
  1476.     AddStaticVehicle(476,420.1237,2520.1650,17.1950,86.4420,7,6);
  1477. //
  1478.     AddStaticVehicle(476,399.4230,2519.6584,17.1972,95.3870,7,6);
  1479.  
  1480. //restraunt near usa base
  1481. //
  1482.     AddStaticVehicle(470,-537.8692,2628.2832,53.4065,269.3889,43,0);
  1483. //
  1484.     AddStaticVehicle(470,-519.8134,2620.0808,53.4085,265.9680,43,0);
  1485. //
  1486.     AddStaticVehicle(470,-527.3895,2604.3579,53.4030,90.2716,43,0);
  1487. //
  1488.     AddStaticVehicle(470,-539.2301,2575.3782,53.4094,269.3664,43,0);
  1489. //
  1490.     AddStaticVehicle(468,-527.9796,2558.7708,53.0832,94.0093,46,0);
  1491. //
  1492.     AddStaticVehicle(468,-528.2994,2561.2397,53.0832,91.1763,46,0);
  1493. //
  1494.     AddStaticVehicle(468,-528.5647,2563.7432,53.0821,91.4044,46,0);
  1495. //
  1496.     AddStaticVehicle(432,-509.5038,2552.1538,53.4256,359.5710,43,0);
  1497. //
  1498.     AddStaticVehicle(432,-508.1678,2634.2043,53.4301,179.4437,43,0);
  1499.  
  1500. //old list------------------------------------------------------------------------------
  1501.  
  1502. //germs vehs
  1503. //
  1504.     AddStaticVehicle(507,-151.3201,1193.4274,19.4921,270.2192,53,53);
  1505. //
  1506.     AddStaticVehicle(432,-132.8332,1214.5040,19.7549,359.7852,-1,-1);
  1507. //
  1508.     AddStaticVehicle(432,-243.6082,1081.1266,19.7272,178.3251,-1,-1);
  1509. //
  1510.     AddStaticVehicle(432,-259.8210,1218.5247,19.7549,358.7866,-1,-1);
  1511. //
  1512.     AddStaticVehicle(432,-250.5950,1216.1040,19.7551,2.0934,-1,-1);
  1513. //
  1514.     AddStaticVehicle(432,-236.8259,1214.0068,19.7550,1.2626,-1,-1);
  1515. //
  1516.     AddStaticVehicle(433,-228.7815,1217.0042,20.1753,181.5212,-1,-1);
  1517. //
  1518.     AddStaticVehicle(433,-218.9273,1216.7688,20.1735,178.4961,-1,-1);
  1519. //
  1520.     AddStaticVehicle(470,-10.5601,1220.7673,19.3413,4.1551,-1,-1);
  1521. //
  1522.     AddStaticVehicle(470,-2.0027,1221.7136,19.3442,1.9967,-1,-1);
  1523. //
  1524.     AddStaticVehicle(470,5.4184,1218.5588,19.3461,357.7910,-1,-1);
  1525. //
  1526.     AddStaticVehicle(470,-80.4464,1222.3505,19.7347,91.6395,-1,-1);
  1527.  
  1528.     AddStaticVehicle(563,331.7949,1938.8259,18.5398,77.9602,-1,-1);
  1529. //
  1530.     AddStaticVehicle(563,330.3231,1983.9952,18.3442,81.1244,-1,-1);
  1531. //
  1532.     AddStaticVehicle(563,122.7671,1842.8962,18.3292,2.5195,-1,-1);
  1533. //
  1534.     AddStaticVehicle(512,528.9547,2367.5115,30.6920,137.7069,-1,-1);
  1535. //
  1536.     AddStaticVehicle(593,-1361.7849,2037.5492,52.8914,57.9189,-1,-1);
  1537. //
  1538.     AddStaticVehicle(476,286.9427,1955.4691,18.3671,277.5993,0,0);
  1539. //
  1540.     AddStaticVehicle(476,287.8248,2023.4749,18.3601,273.9962,0,0);
  1541. //
  1542.     AddStaticVehicle(593,318.0988,2053.4099,18.1017,182.6097,-1,-1);
  1543. //
  1544.     AddStaticVehicle(593,297.5963,2052.5305,18.0996,184.7778,-1,-1);
  1545. //
  1546.     AddStaticVehicle(432,277.6725,1933.4904,17.6535,258.1084,-1,-1);
  1547. //
  1548.     AddStaticVehicle(432,650.9734,1720.9785,7.0048,314.1348,-1,-1);
  1549. //
  1550.     AddStaticVehicle(548,665.9,1713.4247,12.5887,130.9149,-1,-1);
  1551. //
  1552.     AddStaticVehicle(463,637.9642,1676.7590,6.5403,42.7471,-1,-1);
  1553. //
  1554.     AddStaticVehicle(463,634.3597,1673.4452,6.5328,40.7716,-1,-1);
  1555. //
  1556.     AddStaticVehicle(548,-194.1559,1099.2136,22.1135,91.4867,-1,-1);
  1557. //
  1558.     AddStaticVehicle(470,-104.4889,1338.6318,10.1483,8.6644,-1,-1);
  1559. //
  1560.     AddStaticVehicle(470,-91.5219,1339.2817,10.5482,8.5679,-1,-1);
  1561. //
  1562.     AddStaticVehicle(433,-79.0923,1341.5598,11.4249,184.2915,-1,-1);
  1563. //
  1564.     AddStaticVehicle(548,-123.5095,1363.0320,10.0150,280.9174,-1,-1);
  1565. //
  1566.     AddStaticVehicle(548,-121.2912,1342.0988,10.2959,270.8427,-1,-1);
  1567. //
  1568.     AddStaticVehicle(495,-359.1719,2198.1541,42.7821,98.7701,-1,-1);
  1569. //
  1570.     AddStaticVehicle(495,-356.5640,2192.8105,42.7588,100.7477,-1,-1);
  1571. //
  1572.     AddStaticVehicle(495,-355.2666,2187.6851,43.1441,102.8361,-1,-1);
  1573. //
  1574.     AddStaticVehicle(495,-619.3625,2700.9087,72.6508,81.6365,-1,-1);
  1575. //
  1576.     AddStaticVehicle(507,-158.4889,1143.9846,19.4979,89.9066,-1,-1);
  1577. //
  1578.     AddStaticVehicle(507,-186.0364,1180.9192,19.4891,359.3073,-1,-1);
  1579. //
  1580.     AddStaticVehicle(507,-257.9445,1185.1616,19.5678,90.6672,-1,-1);
  1581. // merc boat
  1582.     AddStaticVehicle(452,-655.1194,869.9988,-0.4632,225.3407,1,5);
  1583.  
  1584. //Other new areas (cluck, beach, diner, oilpump)
  1585.  
  1586.     AddStaticVehicle(595,242.8717,2955.9917,-0.7378,342.5856, -1, -1);
  1587.     AddStaticVehicle(595,263.9715,2954.2747,-0.5237,21.1260, -1, -1);
  1588.     AddStaticVehicle(595,282.5208,2955.8550,-1.1740,301.2252, -1, -1);
  1589.  
  1590. //university
  1591. //
  1592.     AddStaticVehicle(520,1064.6266,1102.3928,9.8448,218.4271,51,118);
  1593. //
  1594.     AddStaticVehicle(520,1115.2910,1095.3765,9.8468,129.6781,51,118);
  1595. //
  1596.     AddStaticVehicle(520,1110.1681,1045.9376,9.8367,39.3007,51,118);
  1597. //
  1598.     AddStaticVehicle(520,1060.2118,1051.6526,9.8510,308.4725,51,118);
  1599.  
  1600. //
  1601.     AddStaticVehicle(601,989.9682,1151.6063,10.3911,84.5832,51,118);
  1602. //
  1603.     AddStaticVehicle(601,987.7191,1132.7836,10.3855,87.9686,51,118);
  1604. //
  1605.     AddStaticVehicle(601,984.5304,1122.7181,10.3895,86.8643,51,118);
  1606.     AddStaticVehicle(601,987.5378,1125.8842,10.8203,85.1538,51,118);
  1607.  
  1608. //germany
  1609.  
  1610. //
  1611.     AddStaticVehicle(402,-305.8307,1114.7781,19.5790,358.0663,-1,-1);
  1612. //
  1613.     AddStaticVehicle(402,-304.1901,1028.3877,19.4255,92.2054,-1,-1);
  1614. //
  1615.     AddStaticVehicle(402,-304.0491,1023.7325,19.4255,90.1839,-1,-1);
  1616. //
  1617.     AddStaticVehicle(402,-304.7504,1007.6920,19.4253,90.9390,-1,-1);
  1618. //
  1619.     AddStaticVehicle(402,-173.3682,1018.7441,19.5736,271.4858,-1,-1);
  1620. //
  1621.     AddStaticVehicle(402,-172.7404,1013.4344,19.5738,269.0490,-1,-1);
  1622. //
  1623.     AddStaticVehicle(402,-77.2107,1076.8668,19.5736,179.3166,-1,-1);
  1624. //
  1625.     AddStaticVehicle(402,-23.2576,1143.3752,19.4968,271.0952,-1,-1);
  1626. //
  1627.     AddStaticVehicle(402,-70.9021,1185.6937,19.4937,4.7178,-1,-1);
  1628. //
  1629.     AddStaticVehicle(548,-131.3202,993.5706,22.3230,273.4375,-1,-1);
  1630. //
  1631.     AddStaticVehicle(520,-132.2480,1025.1906,21.3739,272.3754,-1,-1);
  1632. //
  1633.     AddStaticVehicle(425,-169.5678,988.2139,21.2705,89.2718,-1,-1);
  1634. //
  1635.     AddStaticVehicle(487,-93.1889,1027.0336,19.8679,260.7979,-1,-1);
  1636. //
  1637.     AddStaticVehicle(487,-126.4990,1050.4193,20.8552,87.3708,-1,-1);
  1638. //
  1639.     AddStaticVehicle(470,-91.7931,1157.5265,19.7338,273.4672,-1,-1);
  1640. //
  1641.     AddStaticVehicle(471,-120.0205,1141.9608,19.1744,173.4989,0,0);
  1642. //
  1643.     AddStaticVehicle(471,-122.9541,1142.5817,19.2001,186.2512,0,0);
  1644. //
  1645.     AddStaticVehicle(471,-126.2311,1141.1714,19.2241,180.4574,0,0);
  1646. //
  1647.     AddStaticVehicle(471,-130.1885,1141.0081,19.2220,178.7012,0,0);
  1648. //
  1649.     AddStaticVehicle(468,-112.3525,1120.9099,19.4105,72.9971,-1,-1);
  1650. //
  1651.     AddStaticVehicle(468,-112.5510,1117.9872,19.4110,81.6557,-1,-1);
  1652. //
  1653.     AddStaticVehicle(468,-112.5225,1116.2460,19.4116,58.3526,-1,-1);
  1654. //
  1655.     AddStaticVehicle(468,-112.6650,1114.5563,19.4107,73.8427,-1,-1);
  1656. //
  1657.     AddStaticVehicle(487,-226.0801,2716.0386,67.1165,268.1381,54,29);
  1658. //
  1659.     AddStaticVehicle(487,-344.9044,2676.9741,63.8829,23.0436,54,29);
  1660. //
  1661.     AddStaticVehicle(487,-563.5708,2601.9707,66.0528,272.8370,54,29);
  1662. //
  1663.     AddStaticVehicle(487,-417.3027,2191.2710,42.6609,9.3595,54,29);
  1664. //
  1665.     AddStaticVehicle(487,333.7563,1961.2158,17.8156,95.5012,54,29);
  1666. //
  1667.     AddStaticVehicle(487,334.1656,1924.0676,17.8218,79.1497,54,29);
  1668. //
  1669.     AddStaticVehicle(487,332.2151,1867.0376,17.9470,89.0947,54,29);
  1670. //
  1671.     AddStaticVehicle(578,-1507.3623,1982.4646,48.8080,0.6026,-1,-1);
  1672. // BEAGLE
  1673.     AddStaticVehicle(511,-1484.9375,1976.6157,49.1932,1.9646,-1,-1);
  1674. //
  1675.     AddStaticVehicle(578,-296.5619,2612.9839,63.9745,261.1927,-1,-1);
  1676.  
  1677. //
  1678.     AddStaticVehicle(500,-294.2687,1299.5104,53.8735,261.4082,-1,-1);
  1679. //
  1680.     AddStaticVehicle(500,-342.8879,1514.2316,75.4671,2.1713,-1,-1);
  1681. //
  1682.     AddStaticVehicle(471,-323.9928,1515.5222,74.8397,358.3837,-1,-1);
  1683. //
  1684.     AddStaticVehicle(470,-175.7455,1680.6907,16.3509,317.6384,-1,-1);
  1685. //
  1686.     AddStaticVehicle(470,-290.4361,1755.2761,42.6838,270.1544,-1,-1);
  1687. //
  1688.     AddStaticVehicle(515,-289.7865,1775.7632,43.7337,0.2727,-1,-1);
  1689. //
  1690.     AddStaticVehicle(487,-328.4066,1795.9874,42.9391,171.5455,-1,-1);
  1691. //
  1692.     AddStaticVehicle(470,-914.5411,1996.9738,60.9072,127.0327,-1,-1);
  1693. //
  1694.     AddStaticVehicle(470,-910.5156,1992.1903,60.9107,131.1484,-1,-1);
  1695. //
  1696.     AddStaticVehicle(433,-924.6487,2039.1537,61.3507,41.2396,-1,-1);
  1697. //
  1698.     AddStaticVehicle(430,-503.7894,2195.4170,40.3514,81.5870,-1,-1);
  1699. //
  1700.     AddStaticVehicle(430,-501.7742,2169.3274,40.3594,90.5157,-1,-1);
  1701. //
  1702.     AddStaticVehicle(470,-395.8641,2193.2930,42.3828,272.2695,-1,-1);
  1703. //
  1704.     AddStaticVehicle(470,-392.9530,2186.8013,42.2435,269.0942,-1,-1);
  1705. //
  1706.     AddStaticVehicle(470,-394.2175,2176.4539,41.7427,244.9370,-1,-1);
  1707. //
  1708.     AddStaticVehicle(470,-17.9176,2357.1050,24.1288,356.4059,-1,-1);
  1709. //
  1710.     AddStaticVehicle(470,-268.0789,2514.4490,33.2885,84.1131,-1,-1);
  1711. //
  1712.     AddStaticVehicle(470,-527.7076,2609.7146,53.4089,90.1121,-1,-1);
  1713. //
  1714.     AddStaticVehicle(470,-539.7891,2567.8345,53.4065,90.7815,-1,-1);
  1715. //
  1716.     AddStaticVehicle(432,-518.9094,2581.9626,53.4267,269.5176,-1,-1);
  1717. //
  1718.     AddStaticVehicle(470,-628.9615,2711.9133,72.2987,171.5462,-1,-1);
  1719. //
  1720.     AddStaticVehicle(470,-775.6357,2757.9658,45.7020,88.5436,-1,-1);
  1721. //
  1722.     AddStaticVehicle(470,-904.3685,2696.9490,42.3591,133.5194,-1,-1);
  1723. //
  1724.     AddStaticVehicle(470,-1501.5254,2619.6125,55.7522,358.2046,-1,-1);
  1725. //
  1726.     AddStaticVehicle(470,-1500.5652,2650.3264,55.7515,355.9960,-1,-1);
  1727. //
  1728.     AddStaticVehicle(470,-1537.9000,2676.3020,55.7522,87.2599,-1,-1);
  1729. //
  1730.     AddStaticVehicle(432,-1595.8820,2681.3047,55.1458,358.9301,-1,-1);
  1731. //
  1732.     AddStaticVehicle(432,-1599.1285,2660.5056,55.2336,89.4188,-1,-1);
  1733. //
  1734.     AddStaticVehicle(432,-1507.5168,2685.6636,55.8510,354.3337,-1,-1);
  1735. //
  1736.     AddStaticVehicle(433,-1481.7085,2686.8918,56.1636,178.0989,-1,-1);
  1737. //
  1738.     AddStaticVehicle(433,-1474.7922,2688.7024,56.1411,180.6481,-1,-1);
  1739. //
  1740.     AddStaticVehicle(433,-1494.1989,2530.2202,56.0576,178.8805,-1,-1);
  1741. //
  1742.     AddStaticVehicle(468,-1503.2577,2525.3801,55.3497,179.1982,-1,-1);
  1743. //
  1744.     AddStaticVehicle(468,-1507.2166,2524.8457,55.3566,181.9787,-1,-1);
  1745. //
  1746.     AddStaticVehicle(468,-1524.9680,2526.0305,55.4173,178.0358,-1,-1);
  1747. //
  1748.     AddStaticVehicle(548,-1474.6434,2525.5095,57.7180,263.7379,-1,-1);
  1749. //
  1750.     AddStaticVehicle(425,-1474.5553,2498.9678,57.7161,273.7738,-1,-1);
  1751. //
  1752.     AddStaticVehicle(471,-1313.6666,2664.1648,49.5442,285.3071,-1,-1);
  1753. //
  1754.     AddStaticVehicle(471,-1318.9530,2662.7185,49.5437,285.3078,-1,-1);
  1755. //
  1756.     AddStaticVehicle(432,-1302.6216,2705.9932,50.0758,5.0179,-1,-1);
  1757. //
  1758.     AddStaticVehicle(520,-1533.2238,2705.1531,57.6449,197.0819,-1,-1);
  1759. //
  1760.     AddStaticVehicle(470,-753.0413,1510.1888,25.6813,9.2346,-1,-1);
  1761. //
  1762.     AddStaticVehicle(470,-754.2158,1521.9561,26.7276,3.8036,-1,-1);
  1763. //
  1764.     AddStaticVehicle(470,-754.7807,1540.8003,26.9552,1.3874,-1,-1);
  1765. //
  1766.     AddStaticVehicle(470,-794.8740,1571.8705,26.9741,98.9847,-1,-1);
  1767. //
  1768.     AddStaticVehicle(432,-821.8706,1578.8258,27.1300,82.3110,-1,-1);
  1769. //
  1770.     AddStaticVehicle(432,-859.9019,1550.6174,23.5139,177.7958,-1,-1);
  1771. //
  1772.     AddStaticVehicle(445,-854.9668,1471.3058,16.2763,175.5079,-1,-1);
  1773. //
  1774.     AddStaticVehicle(445,-856.1306,1453.0784,14.9034,177.2384,-1,-1);
  1775. //
  1776.     AddStaticVehicle(445,-855.2596,1439.6045,14.0607,187.0154,-1,-1);
  1777. //
  1778.     AddStaticVehicle(445,-853.1483,1426.8619,13.6391,194.6416,-1,-1);
  1779. //
  1780.     AddStaticVehicle(433,-774.5961,1432.7437,14.2255,283.3401,-1,-1);
  1781. //
  1782.     AddStaticVehicle(433,-775.3538,1437.9558,14.2258,269.7361,-1,-1);
  1783. //
  1784.     AddStaticVehicle(433,-779.4594,1312.4254,14.2070,215.3350,-1,-1);
  1785. //
  1786.     AddStaticVehicle(430,-654.9141,1362.0189,-0.2148,74.4070,-1,-1);
  1787. //
  1788.     AddStaticVehicle(430,-691.0470,1363.9060,-0.1033,88.2213,-1,-1);
  1789. //
  1790.     AddStaticVehicle(430,-720.3111,1364.9066,-0.1793,87.7929,-1,-1);
  1791. //
  1792.     AddStaticVehicle(432,229.0807,1915.1827,17.6341,181.4792,-1,-1);
  1793. //
  1794.     AddStaticVehicle(432,229.3708,1883.0563,17.6537,176.0809,-1,-1);
  1795. //
  1796.     AddStaticVehicle(432,201.4733,1886.6801,17.6606,359.7650,-1,-1);
  1797. //
  1798.     AddStaticVehicle(548,265.5016,1855.2402,18.2234,148.7287,-1,-1);
  1799. //russian rhino
  1800.     AddStaticVehicle(432,-865.5205,1542.7537,22.6940,270.8146,35,35);
  1801. //russian rhino
  1802.     AddStaticVehicle(432,-865.6589,1548.8517,23.2233,269.9384,35,35);
  1803. //russian rhino
  1804.     AddStaticVehicle(432,-866.1425,1555.4075,23.7904,272.4864,35,35);
  1805. //russian rhino
  1806.     AddStaticVehicle(432,-865.4415,1561.9204,24.3082,272.1706,35,35);
  1807. //russian rhino
  1808.     AddStaticVehicle(432,-865.8007,1567.9430,24.7817,272.1778,35,35);
  1809. // OTHER AREAS
  1810.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
  1811.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
  1812.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
  1813. // LAS VENTURAS
  1814.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
  1815.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
  1816.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
  1817.  
  1818.     printf("Total vehicles from files: %d",total_vehicles_from_files);
  1819.  
  1820.     UsePlayerPedAnims();
  1821.     DisableInteriorEnterExits();
  1822.  
  1823.     umini = CreatePickup(1254, 23, -252.0913,2595.5215,62.8582);
  1824.     gmini = CreatePickup(1254, 23, -136.8090,1222.5321,19.8992);
  1825.     uhit = CreatePickup(1254, 23, -256.9216,2606.4358,62.8582);
  1826.     ghit = CreatePickup(1254, 23, -149.0273,1131.3945,19.7422);
  1827.     buyweapon = CreatePickup(1254, 23, -690.7361,942.0350,13.6328);
  1828.  
  1829.     nuke = CreatePickup(1254, 23, 220.0778,1822.6729,7.5301);
  1830.    
  1831.     // usa ammo
  1832.     gunshop[7] = CreatePickup(1254, 23, -288.9128,2691.4155,62.6875);
  1833.     // german ammo
  1834.     gunshop[6] = CreatePickup(1254, 23, -181.3289,1163.2261,19.7500);
  1835.     gunshop[1] = CreatePickup(1254, 23, 777.4450,1871.4246,4.9067);
  1836.     gunshop[2] = CreatePickup(1254, 23, -315.8113,829.8170,14.2422);
  1837.     gunshop[3] = CreatePickup(1254, 23, -314.4954,1774.4213,43.6406);
  1838.     gunshop[4] = CreatePickup(1254, 23, -604.3909,2716.7764,72.7231);
  1839.     gunshop[5] = CreatePickup(1254, 23, 295.6123,-80.7989,1001.5156);
  1840.  
  1841.     print("All pickups are created!");
  1842.  
  1843.     if(dini_Exists("/Variables/Variables.ini")) {
  1844.         dini_IntSet("/Variables/Variables.ini", "CapturedBy", 0);
  1845.         dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 0);
  1846.         dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 0);
  1847.         dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 0);
  1848.         dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 0);
  1849.         dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 0);
  1850.         dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 0);
  1851.         dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 0);
  1852.         dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 0);
  1853.         dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 0);
  1854.         dini_IntSet("/Variables/Variable.ini", "CapturedBy11", 0);
  1855.         dini_IntSet("/Variables/Variable.ini", "CapturedBy12", 0);
  1856.         dini_IntSet("/Variables/Variable.ini", "CapturedBy13", 0);
  1857.         dini_IntSet("/Variables/Variable.ini", "CapturedBy14", 0);
  1858.         dini_IntSet("/Variables/Variable.ini", "CapturedBy15", 0);
  1859.         dini_IntSet("/Variables/Variable.ini", "CapturedBy16", 0);
  1860.         dini_IntSet("/Variables/Variable.ini", "CapturedBy17", 0);
  1861.         dini_IntSet("/Variables/Variable.ini", "CapturedBy18", 0);
  1862.         dini_IntSet("/Variables/Variable.ini", "CapturedBy19", 0);
  1863.         dini_IntSet("/Variables/Variable.ini", "CapturedBy20", 0);
  1864.         dini_IntSet("/Variables/Variables.ini", "uscore", 0);
  1865.         dini_IntSet("/Variables/Variables.ini", "gscore", 0);
  1866.         dini_Set("/Variables/Variables.ini", "commander", "N/A");
  1867.         dini_Set("/Variables/Variables.ini", "commanderg", "N/A");
  1868.  
  1869.         print("/Variables/Variables.ini was found in the scriptfiles folder!");
  1870.     }
  1871.     else {
  1872.         dini_Create("/Variables/Variables.ini");  //Folder + house file created
  1873.         dini_IntSet("/Variables/Variables.ini", "CapturedBy", 0);
  1874.         dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 0);
  1875.         dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 0);
  1876.         dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 0);
  1877.         dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 0);
  1878.         dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 0);
  1879.         dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 0);
  1880.         dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 0);
  1881.         dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 0);
  1882.         dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 0);
  1883.         dini_IntSet("/Variables/Variable.ini", "CapturedBy11", 0);
  1884.         dini_IntSet("/Variables/Variable.ini", "CapturedBy12", 0);
  1885.         dini_IntSet("/Variables/Variable.ini", "CapturedBy13", 0);
  1886.         dini_IntSet("/Variables/Variable.ini", "CapturedBy14", 0);
  1887.         dini_IntSet("/Variables/Variable.ini", "CapturedBy15", 0);
  1888.         dini_IntSet("/Variables/Variable.ini", "CapturedBy16", 0);
  1889.         dini_IntSet("/Variables/Variable.ini", "CapturedBy17", 0);
  1890.         dini_IntSet("/Variables/Variable.ini", "CapturedBy18", 0);
  1891.         dini_IntSet("/Variables/Variable.ini", "CapturedBy19", 0);
  1892.         dini_IntSet("/Variables/Variable.ini", "CapturedBy20", 0);
  1893.         dini_IntSet("/Variables/Variables.ini", "uscore", 0);
  1894.         dini_IntSet("/Variables/Variables.ini", "gscore", 0);
  1895.         dini_Set("/Variables/Variables.ini", "commander", "N/A");
  1896.         dini_Set("/Variables/Variables.ini", "commanderg", "N/A");
  1897.  
  1898.         print("/Variables/Variables.ini wasnt found in the scriptfiles folder!");
  1899.         print("The script has created the file and set all the areas to the default state!");
  1900.  
  1901.         print("All files were written!");
  1902.  
  1903.     }
  1904.  
  1905.     SetGameModeText("Total War");
  1906.  
  1907. //TIMERS-------------------------------------------------------------------------------------
  1908.  
  1909.     SetTimer("AreaCheck", 1000, true);
  1910.     print("AreaCheck timer loaded!");
  1911.  
  1912. //CLASS--------------------------------------------------------------------------------------
  1913.  
  1914. // usa spawn - a
  1915.     AddPlayerClass(287,-244.2003,2602.5547,63.7031,270.1281,0,0,0,0,0,0);
  1916.  
  1917. // german spawn - a
  1918.     AddPlayerClass(285,-135.6082,1116.5326,21.1966,94.4754,0,0,0,0,0,0);
  1919.  
  1920. // russia spawn - a
  1921.     AddPlayerClass(121,-786.8021,1568.6122,28.0714,270.1281,0,0,0,0,0,0);
  1922.  
  1923. // japan spawn - a
  1924.     AddPlayerClass(122,-1479.6936,2627.0244,58.7813,94.4754,0,0,0,0,0,0);
  1925.  
  1926.     print("All classes loaded!");
  1927.  
  1928. //CARS---------------------------------------------------------------------------------------
  1929.  
  1930.     print("All vehicles loaded!");
  1931.  
  1932. //GANGZONE----------------------------------------------------------------------------------
  1933.     USA = GangZoneCreate(-385.3699, 2545.777, -93.423, 2837.724);
  1934.     GERMANY = GangZoneCreate(-397.0478, 969.2637, 105.1009, 1307.922);
  1935.     AUSTRALIA = GangZoneCreate(-760.303405, 834.070922, -600.303405, 1026.070922);
  1936.  
  1937.     Ear = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58);
  1938.     EarU = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58);
  1939.     EarG = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58);
  1940.     GangZoneShowForAll(Ear, COLOR_GREEN);
  1941.  
  1942.     Town1 = GangZoneCreate(-1681.614, 2428.998, -1307.922, 2826.046);
  1943.     Town2 = GangZoneCreate(-899.1964, 1366.311, -688.9946, 1623.225);
  1944.  
  1945.     Resturant = GangZoneCreate(-630.6053, 2510.743, -478.7929, 2662.556);
  1946.     ResturantU = GangZoneCreate(-630.6053, 2510.743, -478.7929, 2662.556);
  1947.     ResturantG = GangZoneCreate(-630.6053, 2510.743, -478.7929, 2662.556);
  1948.     GangZoneShowForAll(Resturant, COLOR_GREEN);
  1949.  
  1950.     Airfield = GangZoneCreate(268.5911, 2393.964, 467.115, 2604.166);
  1951.     AirfieldU = GangZoneCreate(268.5911, 2393.964, 467.115, 2604.166);
  1952.     AirfieldG = GangZoneCreate(268.5911, 2393.964, 467.115, 2604.166);
  1953.     GangZoneShowForAll(Airfield, COLOR_GREEN);
  1954.  
  1955.     Oil = GangZoneCreate(747.384, 2031.95, 805.7734, 2090.34);
  1956.     OilU = GangZoneCreate(747.384, 2031.95, 805.7734, 2090.34);
  1957.     OilG = GangZoneCreate(747.384, 2031.95, 805.7734, 2090.34);
  1958.     GangZoneShowForAll(Oil, COLOR_GREEN);
  1959.  
  1960.     A = GangZoneCreate(105.1009, 1786.715, 338.6584, 2055.306);
  1961.     AU = GangZoneCreate(105.1009, 1786.715, 338.6584, 2055.306);
  1962.     AG = GangZoneCreate(105.1009, 1786.715, 338.6584, 2055.306);
  1963.     GangZoneShowForAll(A, COLOR_GREEN);
  1964.  
  1965.     University = GangZoneCreate(939.5279, 970.4056, 1169.914, 1187.017);
  1966.     UniversityU = GangZoneCreate(939.5279, 970.4056, 1169.914, 1187.017);
  1967.     UniversityG = GangZoneCreate(939.5279, 970.4056, 1169.914, 1187.017);
  1968.     GangZoneShowForAll(University, COLOR_GREEN);
  1969.  
  1970.     Gas = GangZoneCreate(502.1487, 1588.191, 700.6725, 1786.715);
  1971.     GasU = GangZoneCreate(502.1487, 1588.191, 700.6725, 1786.715);
  1972.     GasG = GangZoneCreate(502.1487, 1588.191, 700.6725, 1786.715);
  1973.     GangZoneShowForAll(Gas, COLOR_GREEN);
  1974.  
  1975.     OS = GangZoneCreate(105.1009, 1342.956, 280.269, 1483.09);
  1976.     OSU = GangZoneCreate(105.1009, 1342.956, 280.269, 1483.09);
  1977.     OSG = GangZoneCreate(105.1009, 1342.956, 280.269, 1483.09);
  1978.     GangZoneShowForAll(OS, COLOR_GREEN);
  1979.  
  1980.     T = GangZoneCreate(408.7256, 1156.11, 712.3504, 1296.244);
  1981.     TU = GangZoneCreate(408.7256, 1156.11, 712.3504, 1296.244);
  1982.     TG = GangZoneCreate(408.7256, 1156.11, 712.3504, 1296.244);
  1983.     GangZoneShowForAll(T, COLOR_GREEN);
  1984.  
  1985.     D = GangZoneCreate(-945.9079, 1915.172, -525.5044, 2148.729);
  1986.     DU = GangZoneCreate(-945.9079, 1915.172, -525.5044, 2148.729);
  1987.     DG = GangZoneCreate(-945.9079, 1915.172, -525.5044, 2148.729);
  1988.     GangZoneShowForAll(D, COLOR_GREEN);
  1989.  
  1990.     OT = GangZoneCreate(-525.5044, 2125.373, -291.9469, 2277.186);
  1991.     OTU = GangZoneCreate(-525.5044, 2125.373, -291.9469, 2277.186);
  1992.     OTG = GangZoneCreate(-525.5044, 2125.373, -291.9469, 2277.186);
  1993.     GangZoneShowForAll(OT, COLOR_GREEN);
  1994.  
  1995.     OilPump = GangZoneCreate(1015.975, 2861.08, 1121.076,2954.502);
  1996.     OilPumpU = GangZoneCreate(1015.975, 2861.08, 1121.076,2954.502);
  1997.     OilPumpG = GangZoneCreate(1015.975, 2861.08, 1121.076,2954.502);
  1998.     GangZoneShowForAll(OilPump, COLOR_GREEN);
  1999.  
  2000.     Cluck = GangZoneCreate(-1237.855, 1763.359, -1156.11, 1868.46);
  2001.     CluckU = GangZoneCreate(-1237.855, 1763.359, -1156.11, 1868.46);
  2002.     CluckG = GangZoneCreate(-1237.855, 1763.359, -1156.11, 1868.46);
  2003.     GangZoneShowForAll(Cluck, COLOR_GREEN);
  2004.  
  2005.     Beach = GangZoneCreate(210.2018, 2837.724, 326.9805, 2989.536);
  2006.     BeachU = GangZoneCreate(210.2018, 2837.724, 326.9805, 2989.536);
  2007.     BeachG = GangZoneCreate(210.2018, 2837.724, 326.9805, 2989.536);
  2008.     GangZoneShowForAll(Beach, COLOR_GREEN);
  2009.  
  2010.     DinerU = GangZoneCreate(-1985.239, 2277.186, -1845.104, 2440.676);
  2011.     DinerG = GangZoneCreate(-1985.239, 2277.186, -1845.104, 2440.676);
  2012.     Diner = GangZoneCreate(-1985.239, 2277.186, -1845.104, 2440.676);
  2013.     GangZoneShowForAll(Diner, COLOR_GREEN);
  2014.  
  2015.     QuarryU = GangZoneCreate(485.822326, 751.018859, 741.822326, 991.018859);
  2016.     QuarryG = GangZoneCreate(485.822326, 751.018859, 741.822326, 991.018859);
  2017.     Quarry = GangZoneCreate(485.822326, 751.018859, 741.822326, 991.018859);
  2018.     GangZoneShowForAll(Quarry, COLOR_GREEN);
  2019.  
  2020.     FHU = GangZoneCreate(921.603271, 1648.425170, 985.603271, 1816.425170);
  2021.     FHG = GangZoneCreate(921.603271, 1648.425170, 985.603271, 1816.425170);
  2022.     FH = GangZoneCreate(921.603271, 1648.425170, 985.603271, 1816.425170);
  2023.     GangZoneShowForAll(FH, COLOR_GREEN);
  2024.  
  2025.     GWU = GangZoneCreate(1570.820068, 2266.395751, 1722.820068, 2426.395751);
  2026.     GWG = GangZoneCreate(1570.820068, 2266.395751, 1722.820068, 2426.395751);
  2027.     GW = GangZoneCreate(1570.820068, 2266.395751, 1722.820068, 2426.395751);
  2028.     GangZoneShowForAll(GW, COLOR_GREEN);
  2029.  
  2030.     DockU = GangZoneCreate(-2320.655517, 2219.018798, -2160.655517, 2491.018798);
  2031.     DockG = GangZoneCreate(-2320.655517, 2219.018798, -2160.655517, 2491.018798);
  2032.     Dock = GangZoneCreate(-2320.655517, 2219.018798, -2160.655517, 2491.018798);
  2033.     GangZoneShowForAll(Dock, COLOR_GREEN);
  2034.  
  2035.     CCU = GangZoneCreate(1411.231323, 2715.757568, 1539.231323, 2875.757568);
  2036.     CCG = GangZoneCreate(1411.231323, 2715.757568, 1539.231323, 2875.757568);
  2037.     CC = GangZoneCreate(1411.231323, 2715.757568, 1539.231323, 2875.757568);
  2038.     GangZoneShowForAll(Dock, COLOR_GREEN);
  2039.  
  2040.     print("All gangzones loaded!");
  2041.     }
  2042.  
  2043. public OnGameModeExit()
  2044. {
  2045.     foreach(Player, i) {
  2046.         TextDrawDestroy(Teams[i]);
  2047.         TextDrawDestroy(Classt[i]);
  2048.     }
  2049.  
  2050.     TextDrawDestroy(Spree);
  2051.  
  2052.     return 1;
  2053. }
  2054.  
  2055.  
  2056. public OnPlayerRequestClass(playerid, classid)
  2057. {
  2058.  
  2059.     pSpawned[playerid] = 0;
  2060.  
  2061.     SetPlayerClass(playerid, classid);
  2062.     gPlayerClass[playerid] = ASSAULT;
  2063.  
  2064.     SetPlayerPos(playerid,11.9577,1716.7191,22.6222);
  2065.     SetPlayerFacingAngle(playerid, 128.0980);
  2066.     SetPlayerInterior(playerid, 0);
  2067.     SetPlayerCameraPos(playerid,9.6063,1715.1882,22.6113);
  2068.     SetPlayerCameraLookAt(playerid,11.9577,1716.7191,22.6222);
  2069.     CreateExplosion(11.9577,1716.7191,22.6222, 12, 0.1);
  2070.  
  2071.     switch (classid) {
  2072.         case 0:
  2073.         {
  2074.             TextDrawHideForPlayer(playerid, Teams[playerid]);
  2075.             TextDrawSetString(Teams[playerid], "~b~UNITED STATES OF AMERICA");
  2076.             TextDrawShowForPlayer(playerid, Teams[playerid]);
  2077.         }
  2078.         case 1:
  2079.         {
  2080.             TextDrawHideForPlayer(playerid, Teams[playerid]);
  2081.             TextDrawSetString(Teams[playerid], "~r~GERMANY");
  2082.             TextDrawShowForPlayer(playerid, Teams[playerid]);
  2083.         }
  2084.         case 2:
  2085.         {
  2086.             TextDrawHideForPlayer(playerid, Teams[playerid]);
  2087.             TextDrawSetString(Teams[playerid], "~y~AUSTRALIA");
  2088.             TextDrawShowForPlayer(playerid, Teams[playerid]);
  2089.         }
  2090.         case 3:
  2091.         {
  2092.             TextDrawHideForPlayer(playerid, Teams[playerid]);
  2093.             TextDrawSetString(Teams[playerid], "~y~RUSSIA");
  2094.             TextDrawShowForPlayer(playerid, Teams[playerid]);
  2095.         }
  2096.         case 4:
  2097.         {
  2098.             TextDrawHideForPlayer(playerid, Teams[playerid]);
  2099.             TextDrawSetString(Teams[playerid],"~w~JAPAN");
  2100.             TextDrawShowForPlayer(playerid, Teams[playerid]);
  2101.         }
  2102.     }
  2103.     return 1;
  2104. }
  2105.  
  2106.  
  2107. public OnPlayerRequestSpawn(playerid)
  2108. {
  2109.  
  2110.     if(gTeam[playerid] == TEAM_USA) {
  2111.         SetPlayerColor(playerid,COLOR_BLUE);
  2112.         TextDrawHideForPlayer(playerid, Teams[playerid]);
  2113.     }
  2114.     else if(gTeam[playerid] == TEAM_GERMANY) {
  2115.         SetPlayerColor(playerid,COLOR_RED);
  2116.         TextDrawHideForPlayer(playerid, Teams[playerid]);
  2117.     }
  2118.     else if(gTeam[playerid] == TEAM_AUSTRALIA) {
  2119.         SetPlayerColor(playerid,COLOR_YELLOW);
  2120.         TextDrawHideForPlayer(playerid, Teams[playerid]);
  2121.     }
  2122.     else if(gTeam[playerid] == TEAM_RUSSIA) {
  2123.         SetPlayerColor(playerid,COLOR_ORANGE);
  2124.         TextDrawHideForPlayer(playerid, Teams[playerid]);
  2125.     }
  2126.     else if(gTeam[playerid] == TEAM_JAPAN) {
  2127.         SetPlayerColor(playerid,COLOR_WHITE);
  2128.         TextDrawHideForPlayer(playerid, Teams[playerid]);
  2129.     }
  2130.     return 1;
  2131. }
  2132.  
  2133.  
  2134. SetPlayerClass(playerid, classid)
  2135. {
  2136.     if(classid == 0) {
  2137.         gTeam[playerid] = TEAM_USA;
  2138.     }
  2139.     else if(classid == 1) {
  2140.         gTeam[playerid] = TEAM_GERMANY;
  2141.     }
  2142.     else if(classid == 2) {
  2143.         gTeam[playerid] = TEAM_AUSTRALIA;
  2144.     }
  2145.     else if(classid == 3) {
  2146.         gTeam[playerid] = TEAM_RUSSIA;
  2147.     }
  2148.     else if(classid == 4) {
  2149.         gTeam[playerid] = TEAM_JAPAN;
  2150.     }
  2151. }
  2152.  
  2153.  
  2154. public OnPlayerConnect(playerid)
  2155. {
  2156.  
  2157. //------------------------------------------------
  2158.  
  2159.     WarnedTimes[playerid] = 0;
  2160.     freeze[playerid] = 0;
  2161.  
  2162.     PlayerSpec[playerid][is] = 0;
  2163.     IsInCargoB[playerid] = false;
  2164.     IsInBarracks[playerid] = false;
  2165.  
  2166.     new IP[50];
  2167.     GetPlayerName(playerid, nameee, 16);
  2168.     GetPlayerIp(playerid, IP, 50);
  2169.     printf("%s |ID:%i| %s has connected !", IP,playerid, nameee);
  2170.  
  2171.     logged[playerid] = 0;
  2172.     GetPlayerName(playerid, playername, sizeof(playername));
  2173.  
  2174.     Classt[playerid] = TextDrawCreate(500.000000,427.000000,"Medic");
  2175.     TextDrawAlignment(Classt[playerid],0);
  2176.     TextDrawBackgroundColor(Classt[playerid],0x000000ff);
  2177.     TextDrawFont(Classt[playerid],3);
  2178.     TextDrawColor(Classt[playerid],0xffffffff);
  2179.     TextDrawSetOutline(Classt[playerid],1);
  2180.     TextDrawSetProportional(Classt[playerid],1);
  2181.     TextDrawSetShadow(Classt[playerid],1);
  2182.     TextDrawLetterSize(Classt[playerid],0.699999,0.899999);
  2183.     TextDrawHideForPlayer(playerid, Classt[playerid]);
  2184.  
  2185.     SpawnP[playerid] =1;
  2186.     Teams[playerid] = TextDrawCreate(174.000000,135.000000,"United States of America");
  2187.     TextDrawAlignment(Teams[playerid],0);
  2188.     TextDrawBackgroundColor(Teams[playerid],0x000000ff);
  2189.     TextDrawFont(Teams[playerid],3);
  2190.     TextDrawLetterSize(Teams[playerid],0.599999,1.200000);
  2191.     TextDrawColor(Teams[playerid],0xffffffff);
  2192.     TextDrawSetOutline(Teams[playerid],1);
  2193.     TextDrawSetProportional(Teams[playerid],1);
  2194.     TextDrawSetShadow(Teams[playerid],1);
  2195.     TextDrawHideForPlayer(playerid, Teams[playerid]);
  2196.  
  2197.     Players++;
  2198.  
  2199.     AbleToSpawn[playerid] = 1;
  2200.     rank[playerid] = 0;
  2201.     pSpawned[playerid] = 0;
  2202.  
  2203.     TogglePlayerClock(playerid, 0);
  2204.     IsInHunter[playerid] = 0;
  2205.     IsInRhino[playerid] = 0;
  2206.  
  2207. //usa ammo
  2208.     SetPlayerMapIcon(playerid, 8, -286.5354,2692.7466,62.6875,6, 0);
  2209. //ger ammo
  2210.     SetPlayerMapIcon(playerid, 7,-181.6294,1166.3633,19.7500 ,6, 0);
  2211.     SetPlayerMapIcon(playerid, 1, -227.7928,2721.7283,62.8294, 56, 0);
  2212.     SetPlayerMapIcon(playerid, 2, -17.6360,1215.4073,22.4648, 56, 0);
  2213.     SetPlayerMapIcon(playerid, 3, 777.4450,1871.4246,4.9067, 6, 0);
  2214.     SetPlayerMapIcon(playerid, 4, -315.8113,829.8170,14.2422, 6, 0);
  2215.     SetPlayerMapIcon(playerid, 5, -314.4954,1774.4213,43.6406, 6, 0);
  2216.     SetPlayerMapIcon(playerid, 6, -604.3909,2716.7764,72.7231, 6, 0);
  2217.  
  2218.     SendClientMessage(playerid,COLOR_GREY, "Type /help for help!");
  2219.     SendClientMessage(playerid,ORANGE,     "Want all your stats to be saved? Type /register [password]");
  2220.     SendClientMessage(playerid,COLOR_ORANGE, "For the full list of commands type /commands");
  2221.     SendClientMessage(playerid,COLOR_GREY, "WEB URL: mw2server.webs.com");
  2222.     SendClientMessage(playerid, COLOR_RED, "This server contains an anti-cheat system,");
  2223.     SendClientMessage(playerid, COLOR_RED, "cheating will result in a ban !");
  2224.  
  2225.     new string[128];
  2226.     new pName[MAX_PLAYER_NAME];
  2227.     GetPlayerName(playerid, pName, sizeof(pName));
  2228.     format(string, sizeof(string), "*** %s has joined the server. Total Players In Server: %d", pName, Players);
  2229.     SendClientMessageToAll(ORANGE, string);
  2230.  
  2231.     SendClientMessage(playerid, COLOR_GREEN, "Modern Warfare 2!");
  2232.     SendClientMessage(playerid, COLOR_GREEN, "Go to mw2server.webs.com to register and be the first to now all the updates!!!");
  2233.  
  2234.     if(dini_Exists(udb_encode(pName))) {
  2235.         new IPP[50];
  2236.         GetPlayerIp(playerid, IPP, sizeof(IPP));
  2237.         dini_Set(udb_encode(pName), "IP", IPP);
  2238.     }
  2239.     return 1;
  2240. }
  2241.  
  2242.  
  2243. public OnPlayerDisconnect(playerid, reason)
  2244. {
  2245.     if( gPlayerClass[playerid] == ADMIN ) KillTimer(admgod[playerid]);
  2246.  
  2247.     for(new i=0; i < MAX_TEAMS; i++) {
  2248.         if(teamInfo[i][0]==1) {
  2249.             if( teamMembers[i][0] == playerid) {
  2250. //name team
  2251.                 format(teamNames[i], MAX_TEAM_NAME, " ");
  2252. //Team exists
  2253.                 teamInfo[i][0]=0;
  2254. //There is one member
  2255.                 teamInfo[i][1]=0;
  2256. //Team color is player's color
  2257.                 teamInfo[i][2]=-1;
  2258.  
  2259. //Player is the first team member
  2260.                 teamMembers[i][0] = -1;
  2261.                 teamMembers[i][1] = -1;
  2262.                 teamMembers[i][2] = -1;
  2263.                 teamMembers[i][3] = -1;
  2264.             }
  2265.         }
  2266.     }
  2267.  
  2268.     SetPlayerHealth(playerid, 0.0);
  2269.     IsInCargoB[playerid] = false;
  2270.     IsInBarracks[playerid] = false;
  2271.  
  2272.     if( gPlayerClass[playerid] == ENGINEER ) {
  2273.         DestroyPickup(Dispenser[playerid]);
  2274.     }
  2275.  
  2276.     logged[playerid] = 0;
  2277.  
  2278.     Players--;
  2279.  
  2280.     if(Planted[playerid] == 1) {
  2281.         DestroyObject(C4[playerid]);
  2282.         Bomb[playerid] = 0;
  2283.         Planted[playerid] = 0;
  2284.     }
  2285.  
  2286.     new string[128];
  2287.     new pName[MAX_PLAYER_NAME];
  2288.     GetPlayerName(playerid, pName, sizeof(pName));
  2289.  
  2290.     switch(reason) {
  2291.         case 0: format(string, sizeof(string), "***%s has left the server. (Timeout) Total Players In Server: %d", pName, Players);
  2292.         case 1: format(string, sizeof(string), "***%s has left the server. (Leaving) Total Players In Server: %d", pName, Players);
  2293.         case 2: format(string, sizeof(string), "***%s has left the server. (Kicked | Banned) Total Players In Server: %d", pName, Players);
  2294.     }
  2295.     SendClientMessageToAll(ORANGE, string);
  2296.  
  2297.     return 1;
  2298. }
  2299.  
  2300.  
  2301. stock SetPlayerRankStars(playerid)
  2302. {
  2303.     SetPlayerWantedLevel(playerid, rank[playerid]);
  2304.     return 1;
  2305. }
  2306.  
  2307.  
  2308. public OnPlayerSpawn(playerid)
  2309. {
  2310.  
  2311.     if(GeneralClass[playerid][1] == 1 || GeneralClass[playerid][2] == 1 || GeneralClass[playerid][3] == 1 || GeneralClass[playerid][4] == 1) {
  2312.         if(gPlayerClass[playerid] != GENERAL) {
  2313.             GeneralClass[playerid][1] = 0;
  2314.             GeneralClass[playerid][2] = 0;
  2315.             GeneralClass[playerid][3] = 0;
  2316.             GeneralClass[playerid][4] = 0;
  2317.         }
  2318.     }
  2319.  
  2320.     if( PlayerSpec[playerid][is] == 0 ) {
  2321.         TextDrawShowForPlayer(playerid,txtTimeDisp);
  2322.  
  2323.         TogglePlayerControllable(playerid, 1);
  2324.  
  2325.         if( GetPlayerMoney(playerid) < 0 ) ResetPlayerMoney(playerid);
  2326.  
  2327.         CheckForLevelUpdate(playerid);
  2328.         SetPlayerRankStars(playerid);
  2329.  
  2330.         SetPlayerInterior(playerid, 0);
  2331.  
  2332.         dispout[playerid] = 0;
  2333.         IsInCargoB[playerid] = false;
  2334.         IsInBarracks[playerid] = false;
  2335.  
  2336.         if(gTeam[playerid] == TEAM_USA ) {
  2337.             if( gPlayerClass[playerid] == ADMIN ) SetPlayerSkin(playerid, 217);
  2338.             if( gPlayerClass[playerid] == PYRO ) SetPlayerSkin(playerid, 279);
  2339.             if( gPlayerClass[playerid] == SCOUT ) SetPlayerSkin(playerid,128 );
  2340.             if( gPlayerClass[playerid] == MEDIC ) SetPlayerSkin(playerid, 275);
  2341.             if( gPlayerClass[playerid] == ENGINEER ) SetPlayerSkin(playerid, 179);
  2342.             if( gPlayerClass[playerid] == PILOT ) SetPlayerSkin(playerid, 163);
  2343.             if( gPlayerClass[playerid] == SNIPER ) SetPlayerSkin(playerid, 124);
  2344.             if( gPlayerClass[playerid] == DEMOLITION ) SetPlayerSkin(playerid, 73);
  2345.             if( gPlayerClass[playerid] == ASSAULT ) SetPlayerSkin(playerid, 287);
  2346.             if( gPlayerClass[playerid] == GENERAL ) SetPlayerSkin(playerid, 283);
  2347.         }
  2348.  
  2349.         if(gTeam[playerid] == TEAM_GERMANY) {
  2350.             if( gPlayerClass[playerid] == ADMIN ) SetPlayerSkin(playerid, 217);
  2351.             if( gPlayerClass[playerid] == PYRO ) SetPlayerSkin(playerid, 278);
  2352.             if( gPlayerClass[playerid] == SCOUT ) SetPlayerSkin(playerid, 202);
  2353.             if( gPlayerClass[playerid] == MEDIC ) SetPlayerSkin(playerid, 70);
  2354.             if( gPlayerClass[playerid] == PILOT ) SetPlayerSkin(playerid, 284);
  2355.             if( gPlayerClass[playerid] == ENGINEER ) SetPlayerSkin(playerid, 50);
  2356.             if( gPlayerClass[playerid] == SNIPER ) SetPlayerSkin(playerid, 206);
  2357.             if( gPlayerClass[playerid] == DEMOLITION ) SetPlayerSkin(playerid, 27);
  2358.             if( gPlayerClass[playerid] == ASSAULT ) SetPlayerSkin(playerid, 285);
  2359.             if( gPlayerClass[playerid] == GENERAL ) SetPlayerSkin(playerid, 288);
  2360.         }
  2361.  
  2362.         playerColors[playerid] = GetPlayerColor(playerid);
  2363.  
  2364.         SendClientMessage(playerid, COLOR_RED, "To make this server better you can donate! When you donate you will recieve the V.I.P team!");
  2365.         SendClientMessage(playerid, COLOR_RED, "To donate go to the website (modernwarfare2.smfforfree.com) and press the paypal donate button!");
  2366.         SendClientMessage(playerid, COLOR_GREEN, "NEW: Type /donationpackage to see the features you can get!");
  2367.  
  2368.         SetPlayerInterior(playerid, 0);
  2369.         if( gTeam[playerid] == TEAM_USA ) {
  2370.             switch(SpawnP[playerid]) {
  2371.                 case 1:
  2372.                 {
  2373.                     SetRandomUSAPos(playerid);
  2374.                 }
  2375.                 case 2:
  2376.                 {
  2377.                     if( CapturedBy3 == 1 ) SetPlayerPos(playerid,401.1484,2528.9482,16.5785);
  2378.                 }
  2379.                 case 3:
  2380.                 {
  2381.                     if( CapturedBy5 == 1 ) SetPlayerPos(playerid,216.0368,1911.4246,17.6406);
  2382.                 }
  2383.                 case 4:
  2384.                 {
  2385.                     if( CapturedBy11 == 1 ) SetPlayerPos(playerid, 1087.1479,1074.4731,10.8382);
  2386.                 }
  2387.             }
  2388.         }else if( gTeam[playerid] == TEAM_GERMANY )
  2389.         {
  2390.             switch(SpawnP[playerid]) {
  2391.                 case 1:
  2392.                 {
  2393.                     SetRandomGERPos(playerid);
  2394.                 }
  2395.                 case 2:
  2396.                 {
  2397.                     if( CapturedBy3 == 2 ) SetPlayerPos(playerid,401.1484,2528.9482,16.5785);
  2398.                 }
  2399.                 case 3:
  2400.                 {
  2401.                     if( CapturedBy5 == 2) SetPlayerPos(playerid,216.0368,1911.4246,17.6406);
  2402.                 }
  2403.                 case 4:
  2404.                 {
  2405.                     if( CapturedBy11 == 2 ) SetPlayerPos(playerid, 1087.1479,1074.4731,10.8382);
  2406.                 }
  2407.             }
  2408.         }
  2409.  
  2410.         SendClientMessage(playerid, COLOR_GREY, "Type /switchclass to change your class!");
  2411.         SendClientMessage(playerid, COLOR_GREY, "Type /switchspawn to change your spawn position!");
  2412.         SendClientMessage(playerid, COLOR_GREY, "Type /g [text] to talk in global!");
  2413.  
  2414.         if(PickedClass[playerid] == 1) { RestoreClassWeapons(playerid); }
  2415.  
  2416.         if(PickedClass[playerid] == 0 && gTeam[playerid] != TEAM_AUSTRALIA) {
  2417.             if( adminlevel[playerid] > 0 ) {
  2418.                 ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Classes", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander\nAdmin", "Select", "Cancel");
  2419.                 TogglePlayerControllable(playerid, 0);
  2420.                 SetPlayerVirtualWorld(playerid, 0);
  2421.  
  2422.             }else if( adminlevel[playerid] < 1 )
  2423.             {
  2424.                 TogglePlayerControllable(playerid, 0);
  2425.                 ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Classes", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  2426.                 SetPlayerVirtualWorld(playerid, 0);
  2427.             }
  2428.         }
  2429.  
  2430.         SettingPlayerTeam();
  2431.  
  2432.         pSpawned[playerid] = 1;
  2433.  
  2434.         if(gPlayerClass[playerid] == DEMOLITION) {
  2435.             SendClientMessage(playerid, COLOR_ORANGE, "Since you are the explosive class, you can plant bombs by pressing CROUCH and FIRE.");
  2436.         }
  2437.  
  2438.         if(gTeam[playerid] == TEAM_AUSTRALIA) {
  2439.             SendClientMessage(playerid, COLOR_WHITE, "You are a AUSTRALIA. Kill people for money which you can use to buy guns.");
  2440.         }
  2441.         GangZoneShowForPlayer(playerid, USA, 0x0000FF96);
  2442.         GangZoneShowForPlayer(playerid, GERMANY, 0xFF000096);
  2443.         GangZoneShowForPlayer(playerid, Town1, 0xFFFFFF96);
  2444.         GangZoneShowForPlayer(playerid, Town2, COLOR_ORANGE);
  2445.         GangZoneShowForPlayer(playerid, AUSTRALIA, COLOR_YELLOW);
  2446.         GangZoneShowForPlayer(playerid, Ear, COLOR_GREEN);
  2447.         GangZoneShowForPlayer(playerid, Resturant, COLOR_GREEN);
  2448.         GangZoneShowForPlayer(playerid, Airfield, COLOR_GREEN);
  2449.         GangZoneShowForPlayer(playerid, Diner, COLOR_GREEN);
  2450.         GangZoneShowForPlayer(playerid, Cluck, COLOR_GREEN);
  2451.         GangZoneShowForPlayer(playerid, OilPump, COLOR_GREEN);
  2452.         GangZoneShowForPlayer(playerid, Oil, COLOR_GREEN);
  2453.         GangZoneShowForPlayer(playerid, Beach, COLOR_GREEN);
  2454.         GangZoneShowForPlayer(playerid, A, COLOR_ORANGE);
  2455.         GangZoneShowForPlayer(playerid, University, COLOR_GREEN);
  2456.         GangZoneShowForPlayer(playerid, Gas, COLOR_GREEN);
  2457.         GangZoneShowForPlayer(playerid, OS, COLOR_GREEN);
  2458.         GangZoneShowForPlayer(playerid, T, COLOR_GREEN);
  2459.         GangZoneShowForPlayer(playerid, D, COLOR_GREEN);
  2460.         GangZoneShowForPlayer(playerid, OT, COLOR_GREEN);
  2461.         GangZoneShowForPlayer(playerid, Quarry, COLOR_GREEN);
  2462.         GangZoneShowForPlayer(playerid, FH, COLOR_GREEN);
  2463.         GangZoneShowForPlayer(playerid, GW, COLOR_GREEN);
  2464.         GangZoneShowForPlayer(playerid, Dock, COLOR_GREEN);
  2465.         GangZoneShowForPlayer(playerid, CC, COLOR_GREEN);
  2466.  
  2467.         SetTimerEx("ClassShow", 6000, 0, "i", playerid);
  2468.  
  2469.         if( gPlayerClass[playerid] != ADMIN ) { if( gTeam[playerid] == TEAM_USA) SetPlayerColor(playerid, COLOR_BLUE); if(gTeam[playerid] == TEAM_GERMANY) SetPlayerColor(playerid, COLOR_RED);}
  2470.     }
  2471.     else if( PlayerSpec[playerid][is] == 1 ) if(PickedClass[playerid] == 1) {
  2472.         RestoreClassWeapons(playerid);
  2473.     }
  2474.  
  2475.     Vip(playerid);
  2476.  
  2477.     return 1;
  2478. }
  2479.  
  2480.  
  2481. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2482. {
  2483.     new string[128];
  2484.  
  2485.     if(dialogid == 1996 && response) {
  2486.         switch(listitem) {
  2487.             case 0:                               //usa
  2488.             {
  2489.                 SetTimer("usabomb", 5000, 0);
  2490.                 SendClientMessage(playerid,RED,"Usa Base Gonna Be Bombed In 5 Seconds , Take Cover!!!");
  2491.             }
  2492.             case 1:                               //german
  2493.             {
  2494.                 SetTimer("germanbomb", 5000, 0);
  2495.                 SendClientMessage(playerid,RED,"Germans Base Gonna Be Bombed In 5 Seconds , Take Cover!!!");
  2496.             }
  2497.             case 2:                               //japan
  2498.             {
  2499.                 SetTimer("japanbomb", 5000, 0);
  2500.                 SendClientMessage(playerid,RED,"Japans Base Gonna Be Bombed In 5 Seconds , Take Cover!!!");
  2501.             }
  2502.             case 3:                               //AUSTRALIA
  2503.             {
  2504.                 SetTimer("AUSTRALIAbomb", 5000, 0);
  2505.                 SendClientMessage(playerid,RED,"AUSTRALIA Base Gonna Be Bombed In 5 Seconds , Take Cover!!!");
  2506.             }
  2507.             case 4:                               //russ
  2508.             {
  2509.                 SetTimer("russiabomb", 5000, 0);
  2510.                 SendClientMessage(playerid,RED,"Russian Base Gonna Be Bombed In 5 Seconds , Take Cover!!!");
  2511.             }
  2512.  
  2513.         }
  2514.     }
  2515.     if(dialogid == 2 ) {
  2516.         if(!response) {
  2517.             ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander\nAdmin", "Select", "Cancel");
  2518.             TogglePlayerControllable(playerid, 0);
  2519.         }
  2520.  
  2521.         if(response) {
  2522.             if(listitem == 0) {
  2523.                 SendClientMessage(playerid, COLOR_GREY, "You chose the assault as your class.");
  2524.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2525.                 gPlayerClass[playerid] = ASSAULT;
  2526.                 PickedClass[playerid] = 1;
  2527.                 SetPlayerVirtualWorld(playerid, 0);
  2528.                 TogglePlayerControllable(playerid, 1);
  2529.                 if(gTeam[playerid] == TEAM_USA) {
  2530.                     GivePlayerWeapon(playerid, 24, 200);
  2531.                     GivePlayerWeapon(playerid, 31, 500);
  2532.                     GivePlayerWeapon(playerid, 25, 100);
  2533.                     SetPlayerSkin(playerid, 287);
  2534.                 }else
  2535.                 if(gTeam[playerid] == TEAM_GERMANY) {
  2536.                     GivePlayerWeapon(playerid, 24, 200);
  2537.                     GivePlayerWeapon(playerid, 31, 500);
  2538.                     GivePlayerWeapon(playerid, 25, 100);
  2539.                     SetPlayerSkin(playerid, 285);
  2540.                 }
  2541.                 else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
  2542.                     GivePlayerWeapon(playerid, 34, 200);
  2543.                     GivePlayerWeapon(playerid, 1, 1);
  2544.                     GivePlayerWeapon(playerid, 24, 200);
  2545.                 }
  2546.  
  2547.             }
  2548.             if(listitem == 1) {
  2549.                 if( rank[playerid] >= 1 ) {
  2550.                     SendClientMessage(playerid, COLOR_GREY, "You chose the demolition as your class.");
  2551.                     SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2552.                     gPlayerClass[playerid] = DEMOLITION;
  2553.                     PickedClass[playerid] = 1;
  2554.                     SetPlayerVirtualWorld(playerid, 0);
  2555.                     TogglePlayerControllable(playerid, 1);
  2556.                     if(gTeam[playerid] == TEAM_USA) {
  2557.                         GivePlayerWeapon(playerid, 16, 50);
  2558.                         GivePlayerWeapon(playerid, 36, 5);
  2559.                         GivePlayerWeapon(playerid, 24, 200);
  2560.                         SetPlayerSkin(playerid, 73);
  2561.                     }else
  2562.                     if(gTeam[playerid] == TEAM_GERMANY) {
  2563.                         GivePlayerWeapon(playerid, 16, 50);
  2564.                         GivePlayerWeapon(playerid, 36, 5);
  2565.                         GivePlayerWeapon(playerid, 24, 200);
  2566.                         SetPlayerSkin(playerid, 27);
  2567.                     }
  2568.                     else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
  2569.                         GivePlayerWeapon(playerid, 34, 200);
  2570.                         GivePlayerWeapon(playerid, 1, 1);
  2571.                         GivePlayerWeapon(playerid, 24, 200);
  2572.                     }
  2573.                 }else
  2574.                 {
  2575.                     ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  2576.                     TogglePlayerControllable(playerid, 0);
  2577.                     SendClientMessage(playerid, COLOR_RED, "You need to be rank 1 to be able to use Demolition !");
  2578.                 }
  2579.             }
  2580.  
  2581.             if(listitem == 2) {
  2582.                 SendClientMessage(playerid, COLOR_GREY, "You chose the sniper as your class.");
  2583.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2584.                 gPlayerClass[playerid] = SNIPER;
  2585.                 PickedClass[playerid] = 1;
  2586.                 SetPlayerVirtualWorld(playerid, 0);
  2587.                 TogglePlayerControllable(playerid, 1);
  2588.                 if(gTeam[playerid] == TEAM_USA) {
  2589.                     GivePlayerWeapon(playerid, 34, 200);
  2590.                     GivePlayerWeapon(playerid, 1, 1);
  2591.                     GivePlayerWeapon(playerid, 24, 200);
  2592.                     SetPlayerSkin(playerid, 124);
  2593.                 }else
  2594.                 if(gTeam[playerid] == TEAM_GERMANY) {
  2595.                     GivePlayerWeapon(playerid, 34, 200);
  2596.                     GivePlayerWeapon(playerid, 1, 1);
  2597.                     GivePlayerWeapon(playerid, 24, 200);
  2598.                     SetPlayerSkin(playerid, 206);
  2599.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2600.                 {
  2601.                     GivePlayerWeapon(playerid, 34, 200);
  2602.                     GivePlayerWeapon(playerid, 1, 1);
  2603.                     GivePlayerWeapon(playerid, 24, 200);
  2604.                 }
  2605.             }
  2606.             if(listitem == 3) {
  2607.                 if(gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA) {
  2608.                     SendClientMessage(playerid, COLOR_GREY, "You cant be a pilot on russia or japan!");
  2609.                     TogglePlayerControllable(playerid, 1);
  2610.                     return 1;
  2611.                 }
  2612.  
  2613.                 if(rank[playerid] >= 3) {
  2614.                     SendClientMessage(playerid, COLOR_GREY, "You chose the pilot as your class.");
  2615.                     SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2616.                     gPlayerClass[playerid] = PILOT;
  2617.                     PickedClass[playerid] = 1;
  2618.                     SetPlayerVirtualWorld(playerid, 0);
  2619.                     TogglePlayerControllable(playerid, 1);
  2620.  
  2621.                     if(gTeam[playerid] == TEAM_USA) {
  2622.                         SetPlayerSkin(playerid, 163);
  2623.                         GivePlayerWeapon(playerid, 22, 50);
  2624.                     }
  2625.                     if(gTeam[playerid] == TEAM_GERMANY) {
  2626.                         SetPlayerSkin(playerid, 284);
  2627.                         GivePlayerWeapon(playerid, 22, 50);
  2628.                     }
  2629.                 }
  2630.                 else {
  2631.                     SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 3 to be a pilot!");
  2632.                     ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  2633.                     TogglePlayerControllable(playerid, 0);
  2634.                 }
  2635.             }
  2636.         }
  2637.  
  2638.         if(listitem == 4) {
  2639.             SendClientMessage(playerid, COLOR_GREY, "You chose the medic as your class.");
  2640.             SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2641.             gPlayerClass[playerid] = MEDIC;
  2642.             PickedClass[playerid] = 1;
  2643.             SetPlayerVirtualWorld(playerid, 0);
  2644.             TogglePlayerControllable(playerid, 1);
  2645.             if(gTeam[playerid] == TEAM_USA) {
  2646.                 SetPlayerSkin(playerid, 275);
  2647.                 GivePlayerWeapon(playerid, 23, 200);
  2648.                 GivePlayerWeapon(playerid, 1, 1);
  2649.                 SetPlayerSkin(playerid, 275);
  2650.             }else
  2651.             if(gTeam[playerid] == TEAM_GERMANY) {
  2652.                 SetPlayerSkin(playerid, 70);
  2653.                 GivePlayerWeapon(playerid, 1, 1);
  2654.                 GivePlayerWeapon(playerid, 23, 200);
  2655.                 SetPlayerSkin(playerid, 70);
  2656.             }
  2657.             else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
  2658.                 GivePlayerWeapon(playerid, 34, 200);
  2659.                 GivePlayerWeapon(playerid, 1, 1);
  2660.                 GivePlayerWeapon(playerid, 24, 200);
  2661.             }
  2662.         }
  2663.  
  2664.         if(listitem == 5) {
  2665.             SendClientMessage(playerid, COLOR_GREY, "You chose the engineer as your class.");
  2666.             SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2667.             gPlayerClass[playerid] = ENGINEER;
  2668.             PickedClass[playerid] = 1;
  2669.             SetPlayerVirtualWorld(playerid, 0);
  2670.             TogglePlayerControllable(playerid, 1);
  2671.             if(gTeam[playerid] == TEAM_USA) {
  2672.                 SetPlayerSkin(playerid, 179);
  2673.                 GivePlayerWeapon(playerid, 27, 200);
  2674.                 GivePlayerWeapon(playerid, 1, 1);
  2675.                 GivePlayerWeapon(playerid, 29, 200);
  2676.             }else
  2677.             if(gTeam[playerid] == TEAM_GERMANY) {
  2678.                 SetPlayerSkin(playerid, 50);
  2679.                 GivePlayerWeapon(playerid, 27, 200);
  2680.                 GivePlayerWeapon(playerid, 1, 1);
  2681.                 GivePlayerWeapon(playerid, 29, 200);
  2682.             }
  2683.             else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
  2684.                 GivePlayerWeapon(playerid, 34, 200);
  2685.                 GivePlayerWeapon(playerid, 1, 1);
  2686.                 GivePlayerWeapon(playerid, 24, 200);
  2687.             }
  2688.         }
  2689.  
  2690.         if( listitem == 6 ) {                     //pyro
  2691.             if( rank[playerid] >= 4 ) {
  2692.                 SendClientMessage(playerid, COLOR_GREY, "You chose the pyroman as your class.");
  2693.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2694.                 gPlayerClass[playerid] = PYRO;
  2695.                 PickedClass[playerid] = 1;
  2696.                 SetPlayerVirtualWorld(playerid, 0);
  2697.                 TogglePlayerControllable(playerid, 1);
  2698.                 if(gTeam[playerid] == TEAM_USA) {
  2699.                     SetPlayerSkin(playerid, 279);
  2700.                     GivePlayerWeapon(playerid, 16, 20);
  2701.                     GivePlayerWeapon(playerid, 1, 1);
  2702.                     GivePlayerWeapon(playerid, 23, 200);
  2703.                     GivePlayerWeapon(playerid, 37, 550);
  2704.                 }else
  2705.                 if(gTeam[playerid] == TEAM_GERMANY) {
  2706.                     SetPlayerSkin(playerid, 278);
  2707.                     GivePlayerWeapon(playerid, 16, 20);
  2708.                     GivePlayerWeapon(playerid, 1, 1);
  2709.                     GivePlayerWeapon(playerid, 23, 200);
  2710.                     GivePlayerWeapon(playerid, 37, 250);
  2711.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2712.                 {
  2713.                     GivePlayerWeapon(playerid, 34, 200);
  2714.                     GivePlayerWeapon(playerid, 1, 1);
  2715.                     GivePlayerWeapon(playerid, 24, 200);
  2716.                 }
  2717.             }else
  2718.             {
  2719.                 SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 4 to be a pyroman!");
  2720.                 ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  2721.                 TogglePlayerControllable(playerid, 0);
  2722.             }
  2723.         }
  2724.  
  2725.         if( listitem == 7 ) {                     //scout
  2726.             if( rank[playerid] >= 1 ) {
  2727.                 SendClientMessage(playerid, COLOR_GREY, "You chose the scout as your class.");
  2728.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2729.                 gPlayerClass[playerid] = SCOUT;
  2730.                 PickedClass[playerid] = 1;
  2731.                 SetPlayerVirtualWorld(playerid, 0);
  2732.                 TogglePlayerControllable(playerid, 1);
  2733.                 if(gTeam[playerid] == TEAM_USA) {
  2734.                     SetPlayerSkin(playerid, 128);
  2735.                     SetPlayerArmour(playerid, 25);
  2736.                     GivePlayerWeapon(playerid, 28, 200);
  2737.                     GivePlayerWeapon(playerid, 1, 1);
  2738.                     GivePlayerWeapon(playerid, 22, 200);
  2739.                 }
  2740.                 if(gTeam[playerid] == TEAM_GERMANY) {
  2741.                     SetPlayerSkin(playerid, 202);
  2742.                     SetPlayerArmour(playerid, 25);
  2743.                     GivePlayerWeapon(playerid, 28, 200);
  2744.                     GivePlayerWeapon(playerid, 1, 1);
  2745.                     GivePlayerWeapon(playerid, 22, 200);
  2746.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2747.                 {
  2748.                     GivePlayerWeapon(playerid, 34, 200);
  2749.                     GivePlayerWeapon(playerid, 1, 1);
  2750.                     GivePlayerWeapon(playerid, 24, 200);
  2751.                 }
  2752.             }else
  2753.             {
  2754.                 SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 1 to be a scout!");
  2755.                 ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  2756.                 TogglePlayerControllable(playerid, 0);
  2757.             }
  2758.         }
  2759.  
  2760.         if(listitem == 8) {
  2761.             if(rank[playerid] >= 8) {
  2762.                 SendClientMessage(playerid, COLOR_GREY, "You chose general (commander) as your class.");
  2763.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2764.                 gPlayerClass[playerid] = GENERAL;
  2765.                 PickedClass[playerid] = 1;
  2766.                 SetPlayerVirtualWorld(playerid, 0);
  2767.                 TogglePlayerControllable(playerid, 1);
  2768.                 if(gTeam[playerid] == TEAM_USA) {
  2769.                     SetPlayerSkin(playerid, 283);
  2770.                     SetPlayerArmour(playerid, 95);
  2771.                     GivePlayerWeapon(playerid, 31, 200);
  2772.                     GivePlayerWeapon(playerid, 27, 200);
  2773.                     GivePlayerWeapon(playerid, 28, 200);
  2774.                     GeneralClass[playerid][1] = 1;
  2775.                 }
  2776.                 if(gTeam[playerid] == TEAM_GERMANY) {
  2777.                     SetPlayerSkin(playerid, 288);
  2778.                     SetPlayerArmour(playerid, 95);
  2779.                     GivePlayerWeapon(playerid, 31, 200);
  2780.                     GivePlayerWeapon(playerid, 27, 200);
  2781.                     GivePlayerWeapon(playerid, 28, 200);
  2782.                     GeneralClass[playerid][2] = 1;
  2783.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2784.                 {
  2785.                     GivePlayerWeapon(playerid, 31, 200);
  2786.                     GivePlayerWeapon(playerid, 27, 200);
  2787.                     GivePlayerWeapon(playerid, 28, 200);
  2788.                     if(gTeam[playerid] == TEAM_RUSSIA) GeneralClass[playerid][3] = 1;
  2789.                     if(gTeam[playerid] == TEAM_JAPAN) GeneralClass[playerid][4] = 1;
  2790.                 }
  2791.             }else
  2792.             {
  2793.                 SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 8 to be a general (commander)!");
  2794.                 ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  2795.                 TogglePlayerControllable(playerid, 0);
  2796.             }
  2797.         }
  2798.         if( listitem == 9 ) {                     // admin NOTE: general is 8
  2799.             if( adminlevel[playerid] > 0 ) {
  2800.                 SendClientMessage(playerid, COLOR_GREY, "You chose the Admin as your class.");
  2801.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2802.                 gPlayerClass[playerid] = ADMIN;
  2803.                 PickedClass[playerid] = 1;
  2804.                 SetPlayerVirtualWorld(playerid, 0);
  2805.                 TogglePlayerControllable(playerid, 1);
  2806.                 SetPlayerColor(playerid, LIGHTGREEN);
  2807.                 if(gTeam[playerid] == TEAM_USA) {
  2808.                     SetPlayerSkin(playerid, 217);
  2809.                     SetPlayerArmour(playerid, 100);
  2810.                     GivePlayerWeapon(playerid, 38, 20000);
  2811.                     GivePlayerWeapon(playerid, 1, 1);
  2812.                     GivePlayerWeapon(playerid, 22, 20000);
  2813.                 }
  2814.                 if(gTeam[playerid] == TEAM_GERMANY) {
  2815.                     SetPlayerSkin(playerid, 217);
  2816.                     SetPlayerArmour(playerid, 100);
  2817.                     GivePlayerWeapon(playerid, 38, 20000);
  2818.                     GivePlayerWeapon(playerid, 1, 1);
  2819.                     GivePlayerWeapon(playerid, 22, 20000);
  2820.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2821.                 {
  2822.                     SetPlayerSkin(playerid, 217);
  2823.                     SetPlayerArmour(playerid, 100);
  2824.                     GivePlayerWeapon(playerid, 38, 20000);
  2825.                     GivePlayerWeapon(playerid, 1, 1);
  2826.                     GivePlayerWeapon(playerid, 22, 20000);
  2827.                 }
  2828.             }else SendClientMessage(playerid, COLOR_RED, "Bye bye - You aren't admin !");
  2829.         }
  2830.  
  2831.     }
  2832.     if(dialogid == 101) {
  2833.         if(response) {
  2834.             if(listitem == 0) {
  2835.                 if(GetPlayerMoney(playerid) >= 20000) {
  2836.                     GivePlayerMoney(playerid, -20000);
  2837.                     GivePlayerWeapon(playerid, 35, 20);
  2838.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a Rocket Launcher!");
  2839.                 }
  2840.                 else {
  2841.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You Need $20,000!");
  2842.                 }
  2843.             }
  2844.             if(listitem == 1) {
  2845.                 if(GetPlayerMoney(playerid) >= 150000) {
  2846.                     GivePlayerMoney(playerid, -15000);
  2847.                     GivePlayerWeapon(playerid, 27, 300);
  2848.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a Combat Shotgun!");
  2849.                 }
  2850.                 else {
  2851.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You Need $15,000!");
  2852.                 }
  2853.             }
  2854.             if(listitem == 2) {
  2855.                 if(GetPlayerMoney(playerid) >= 15000) {
  2856.                     GivePlayerMoney(playerid, -15000);
  2857.                     GivePlayerWeapon(playerid, 34, 75);
  2858.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a Sniper Rifle!");
  2859.                 }
  2860.                 else {
  2861.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $15,000!");
  2862.                 }
  2863.             }
  2864.             if(listitem == 3) {
  2865.                 if(GetPlayerMoney(playerid) >= 15000) {
  2866.                     GivePlayerMoney(playerid, -15000);
  2867.                     GivePlayerWeapon(playerid, 24, 250);
  2868.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a Desert Eagle!!");
  2869.                 }
  2870.                 else {
  2871.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $15,000!");
  2872.                 }
  2873.             }
  2874.  
  2875.             if(listitem == 4) {
  2876.                 if(GetPlayerMoney(playerid) >= 10000) {
  2877.                     GivePlayerMoney(playerid, -10000);
  2878.                     GivePlayerWeapon(playerid, 25, 150);
  2879.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a Shotgun!");
  2880.                 }
  2881.                 else {
  2882.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $10,000!");
  2883.                 }
  2884.             }
  2885.  
  2886.             if(listitem == 5) {
  2887.                 if(GetPlayerMoney(playerid) >= 10000) {
  2888.                     GivePlayerMoney(playerid, -10000);
  2889.                     GivePlayerWeapon(playerid, 31, 650);
  2890.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a M4!");
  2891.                 }
  2892.                 else {
  2893.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $10,000!");
  2894.                 }
  2895.             }
  2896.             if(listitem == 6) {
  2897.                 if(GetPlayerMoney(playerid) >= 10000) {
  2898.                     GivePlayerMoney(playerid, -10000);
  2899.                     SetPlayerHealth(playerid, 55.00);
  2900.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought FirstAid Kit!");
  2901.                 }
  2902.                 else {
  2903.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $10,000!");
  2904.                 }
  2905.             }
  2906.             if(listitem == 7) {
  2907.                 if(GetPlayerMoney(playerid) >= 20000) {
  2908.                     GivePlayerMoney(playerid, -20000);
  2909.                     SetPlayerArmour(playerid, 25.00);
  2910.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought High Grade Body Armour!");
  2911.                 }
  2912.                 else {
  2913.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $20,000!");
  2914.                 }
  2915.             }
  2916.         }
  2917.     }
  2918.     if(dialogid == 169 ) {
  2919.         if( listitem == 0) {
  2920.             SpawnP[playerid] =1;
  2921.         }else
  2922.         if( listitem == 1 ) {
  2923.             if( CapturedBy3 == 1 ) {
  2924.                 SpawnP[playerid] =2;
  2925.             }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own the Airfield !");
  2926.         }else
  2927.         if(listitem == 2 ) {
  2928.             if( CapturedBy5 == 1 ) {
  2929.                 SpawnP[playerid] =3;
  2930.             }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own Area69 !");
  2931.         }else
  2932.         if(listitem == 3 ) {
  2933.             if( CapturedBy11 == 1 ) {
  2934.                 SpawnP[playerid] =4;
  2935.             }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own The University !");
  2936.         }
  2937.  
  2938.     }
  2939.  
  2940.     if( dialogid == 168 ) {
  2941.         if( listitem == 0) {
  2942.             SpawnP[playerid] =1;
  2943.         }else
  2944.         if( listitem == 1 ) {
  2945.             if( CapturedBy3 == 2 ) {
  2946.                 SpawnP[playerid] =2;
  2947.             }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own the Airfield !");
  2948.         }else
  2949.         if(listitem == 2 ) {
  2950.             if( CapturedBy5 == 2 ) {
  2951.                 SpawnP[playerid] =3;
  2952.             }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own Area69 !");
  2953.         }else
  2954.         if(listitem == 3 ) {
  2955.             if( CapturedBy11 == 2 ) {
  2956.                 SpawnP[playerid] =4;
  2957.             }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own The University !");
  2958.         }
  2959.     }
  2960.  
  2961.     if(dialogid == 110) {
  2962.         if(response) {
  2963.             if(!strlen(inputtext)) return SendClientMessage(playerid, COLOR_GREY, "Please enter the amount of armor you want to buy!");
  2964.             if(!strval(inputtext)) return SendClientMessage(playerid, COLOR_GREY, "Please enter the amount of armor you want to buy!");
  2965.             if(strval(inputtext) <= 0) return SendClientMessage(playerid, COLOR_GREY, "The ammount of armor you wish to buy cant be less then or equal to 0");
  2966.             if(strval(inputtext) > 100) return SendClientMessage(playerid, COLOR_GREY, "The ammount of armor you wish to buy cant be greater than 100");
  2967.  
  2968.             if(strval(inputtext) >= 90) {
  2969.                 if(GetPlayerMoney(playerid) >= 20000) {
  2970.                     format(string, sizeof(string), "You purchased %d of armour and have been charged 20000", inputtext);
  2971.                     SendClientMessage(playerid, COLOR_ORANGE, string);
  2972.                     SetPlayerArmour(playerid, strval(inputtext));
  2973.                 }
  2974.                 else {
  2975.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  2976.                 }
  2977.             }
  2978.             else if(strval(inputtext) >= 70) {
  2979.                 if(GetPlayerMoney(playerid) >= 15000) {
  2980.                     format(string, sizeof(string), "You purchased %d of armour and have been charged 15000", inputtext);
  2981.                     SendClientMessage(playerid, COLOR_ORANGE, string);
  2982.                     SetPlayerArmour(playerid, strval(inputtext));
  2983.                 }
  2984.                 else {
  2985.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  2986.                 }
  2987.             }
  2988.  
  2989.             if(strval(inputtext) >= 50) {
  2990.                 if(GetPlayerMoney(playerid) >= 10000) {
  2991.                     format(string, sizeof(string), "You purchased %d of armour and have been charged 10000", inputtext);
  2992.                     SendClientMessage(playerid, COLOR_ORANGE, string);
  2993.                     SetPlayerArmour(playerid, strval(inputtext));
  2994.                 }
  2995.                 else {
  2996.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  2997.                 }
  2998.             }
  2999.  
  3000.             if(strval(inputtext) <= 50) {
  3001.                 if(GetPlayerMoney(playerid) >= 10000) {
  3002.                     format(string, sizeof(string), "You purchased %d of armour and have been charged 10000", inputtext);
  3003.                     SendClientMessage(playerid, COLOR_ORANGE, string);
  3004.                     SetPlayerArmour(playerid, strval(inputtext));
  3005.                 }
  3006.                 else {
  3007.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3008.                 }
  3009.             }
  3010.         }
  3011.     }
  3012.  
  3013.     if(dialogid == 100) {
  3014.         if(response) {
  3015.             if(listitem == 0) {
  3016.                 if(GetPlayerMoney(playerid) >= 10000) {
  3017.                     GivePlayerMoney(playerid, -10000);
  3018.                     GivePlayerWeapon(playerid, 31, 500);
  3019.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a M4!");
  3020.                 }
  3021.                 else {
  3022.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3023.                 }
  3024.             }
  3025.             if(listitem == 1) {
  3026.                 if(GetPlayerMoney(playerid) >= 10000) {
  3027.                     GivePlayerMoney(playerid, -10000);
  3028.                     GivePlayerWeapon(playerid, 30, 500);
  3029.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a AK47!");
  3030.                 }
  3031.                 else {
  3032.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3033.                 }
  3034.             }
  3035.             if(listitem == 2) {
  3036.                 if(GetPlayerMoney(playerid) >= 15000) {
  3037.                     GivePlayerMoney(playerid, -15000);
  3038.                     GivePlayerWeapon(playerid, 24, 500);
  3039.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a desert eagle!");
  3040.                 }
  3041.                 else {
  3042.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3043.                 }
  3044.             }
  3045.             if(listitem == 3) {
  3046.                 if(GetPlayerMoney(playerid) >= 20000) {
  3047.                     GivePlayerMoney(playerid, -20000);
  3048.                     GivePlayerWeapon(playerid, 37, 500);
  3049.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a flame thrower!!");
  3050.                 }
  3051.                 else {
  3052.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3053.                 }
  3054.             }
  3055.  
  3056.             if(listitem == 4) {
  3057.                 ShowPlayerDialog(playerid, 110, DIALOG_STYLE_INPUT, "Armour", "Select the amount of armor you want to buy:", "Buy", "Cancel");
  3058.             }
  3059.  
  3060.             if(listitem == 5) {
  3061.                 if(GetPlayerMoney(playerid) >= 25000) {
  3062.                     GivePlayerMoney(playerid, -25000);
  3063.                     GivePlayerWeapon(playerid, 36, 5);
  3064.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a rocket launcher!");
  3065.                 }
  3066.                 else {
  3067.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3068.                 }
  3069.             }
  3070.  
  3071.             if(listitem == 6) {
  3072.                 if(GetPlayerMoney(playerid) >= 25000) {
  3073.                     GivePlayerMoney(playerid, -25000);
  3074.                     GivePlayerWeapon(playerid, 34, 500);
  3075.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a sniper rifle!");
  3076.                 }
  3077.                 else {
  3078.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3079.                 }
  3080.             }
  3081.  
  3082.             if(listitem == 7) {
  3083.                 if(GetPlayerMoney(playerid) >= 30000) {
  3084.                     GivePlayerMoney(playerid, -30000);
  3085.                     GivePlayerWeapon(playerid, 27, 500);
  3086.                     SendClientMessage(playerid, COLOR_ORANGE, "You bought a SPAS 12!");
  3087.                 }
  3088.                 else {
  3089.                     SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3090.                 }
  3091.             }
  3092.         }
  3093.     }
  3094.  
  3095.     if(dialogid == 1) {
  3096.         if(!response) {
  3097.             ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  3098.             TogglePlayerControllable(playerid, 0);
  3099.         }
  3100.  
  3101.         if(response) {
  3102.             if(listitem == 0) {
  3103.                 SendClientMessage(playerid, COLOR_GREY, "You chose the assault as your class.");
  3104.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3105.                 gPlayerClass[playerid] = ASSAULT;
  3106.                 PickedClass[playerid] = 1;
  3107.                 SetPlayerVirtualWorld(playerid, 0);
  3108.                 TogglePlayerControllable(playerid, 1);
  3109.                 if(gTeam[playerid] == TEAM_USA) {
  3110.                     GivePlayerWeapon(playerid, 24, 200);
  3111.                     GivePlayerWeapon(playerid, 31, 500);
  3112.                     GivePlayerWeapon(playerid, 25, 100);
  3113.                     SetPlayerSkin(playerid, 287);
  3114.                 }else
  3115.                 if(gTeam[playerid] == TEAM_GERMANY) {
  3116.                     GivePlayerWeapon(playerid, 24, 200);
  3117.                     GivePlayerWeapon(playerid, 31, 500);
  3118.                     GivePlayerWeapon(playerid, 25, 100);
  3119.                     SetPlayerSkin(playerid, 285);
  3120.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3121.                 {
  3122.                     GivePlayerWeapon(playerid, 34, 200);
  3123.                     GivePlayerWeapon(playerid, 1, 1);
  3124.                     GivePlayerWeapon(playerid, 24, 200);
  3125.                 }
  3126.  
  3127.             }
  3128.             if(listitem == 1) {
  3129.                 if( rank[playerid] >= 1 ) {
  3130.                     SendClientMessage(playerid, COLOR_GREY, "You chose the demolition as your class.");
  3131.                     SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3132.                     gPlayerClass[playerid] = DEMOLITION;
  3133.                     PickedClass[playerid] = 1;
  3134.                     SetPlayerVirtualWorld(playerid, 0);
  3135.                     TogglePlayerControllable(playerid, 1);
  3136.                     if(gTeam[playerid] == TEAM_USA) {
  3137.                         GivePlayerWeapon(playerid, 16, 50);
  3138.                         GivePlayerWeapon(playerid, 36, 5);
  3139.                         GivePlayerWeapon(playerid, 24, 200);
  3140.                         SetPlayerSkin(playerid, 73);
  3141.                     }else
  3142.                     if(gTeam[playerid] == TEAM_GERMANY) {
  3143.                         GivePlayerWeapon(playerid, 16, 50);
  3144.                         GivePlayerWeapon(playerid, 36, 5);
  3145.                         GivePlayerWeapon(playerid, 24, 200);
  3146.                         SetPlayerSkin(playerid, 27);
  3147.                     }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3148.                     {
  3149.                         GivePlayerWeapon(playerid, 34, 200);
  3150.                         GivePlayerWeapon(playerid, 1, 1);
  3151.                         GivePlayerWeapon(playerid, 24, 200);
  3152.                     }
  3153.                 }else
  3154.                 {
  3155.                     SendClientMessage(playerid, COLOR_RED, "You need to be rank 1 to be able to use Demolition !");
  3156.                     ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  3157.                     TogglePlayerControllable(playerid, 0);
  3158.                 }
  3159.             }
  3160.  
  3161.             if(listitem == 2) {
  3162.                 SendClientMessage(playerid, COLOR_GREY, "You chose the sniper as your class.");
  3163.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3164.                 gPlayerClass[playerid] = SNIPER;
  3165.                 PickedClass[playerid] = 1;
  3166.                 SetPlayerVirtualWorld(playerid, 0);
  3167.                 TogglePlayerControllable(playerid, 1);
  3168.                 if(gTeam[playerid] == TEAM_USA) {
  3169.                     GivePlayerWeapon(playerid, 34, 200);
  3170.                     GivePlayerWeapon(playerid, 1, 1);
  3171.                     GivePlayerWeapon(playerid, 24, 200);
  3172.                     SetPlayerSkin(playerid, 124);
  3173.                 }else
  3174.                 if(gTeam[playerid] == TEAM_GERMANY) {
  3175.                     GivePlayerWeapon(playerid, 34, 200);
  3176.                     GivePlayerWeapon(playerid, 1, 1);
  3177.                     GivePlayerWeapon(playerid, 24, 200);
  3178.                     SetPlayerSkin(playerid, 206);
  3179.                 }
  3180.                 else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
  3181.                     GivePlayerWeapon(playerid, 34, 200);
  3182.                     GivePlayerWeapon(playerid, 1, 1);
  3183.                     GivePlayerWeapon(playerid, 24, 200);
  3184.                 }
  3185.             }
  3186.             if(listitem == 3) {
  3187.                 if(gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA) {
  3188.                     SendClientMessage(playerid, COLOR_GREY, "You cant be a pilot on russia or japan!");
  3189.                     TogglePlayerControllable(playerid, 1);
  3190.                     return 1;
  3191.                 }
  3192.  
  3193.                 if(rank[playerid] >= 3) {
  3194.                     SendClientMessage(playerid, COLOR_GREY, "You chose the pilot as your class.");
  3195.                     SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3196.                     gPlayerClass[playerid] = PILOT;
  3197.                     PickedClass[playerid] = 1;
  3198.                     SetPlayerVirtualWorld(playerid, 0);
  3199.                     TogglePlayerControllable(playerid, 1);
  3200.  
  3201.                     if(gTeam[playerid] == TEAM_USA) {
  3202.                         SetPlayerSkin(playerid, 163);
  3203.                         GivePlayerWeapon(playerid, 22, 50);
  3204.                     }
  3205.                     if(gTeam[playerid] == TEAM_GERMANY) {
  3206.                         SetPlayerSkin(playerid, 284);
  3207.                         GivePlayerWeapon(playerid, 22, 50);
  3208.                     }
  3209.                 }
  3210.                 else {
  3211.                     SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 3 to be a pilot!");
  3212.                     ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  3213.                     TogglePlayerControllable(playerid, 0);
  3214.                 }
  3215.             }
  3216.         }
  3217.  
  3218.         if(listitem == 4) {
  3219.             SendClientMessage(playerid, COLOR_GREY, "You chose the medic as your class.");
  3220.             SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3221.             gPlayerClass[playerid] = MEDIC;
  3222.             PickedClass[playerid] = 1;
  3223.             SetPlayerVirtualWorld(playerid, 0);
  3224.             TogglePlayerControllable(playerid, 1);
  3225.             if(gTeam[playerid] == TEAM_USA) {
  3226.                 SetPlayerSkin(playerid, 275);
  3227.                 GivePlayerWeapon(playerid, 23, 200);
  3228.                 GivePlayerWeapon(playerid, 1, 1);
  3229.                 SetPlayerSkin(playerid, 275);
  3230.             }else
  3231.             if(gTeam[playerid] == TEAM_GERMANY) {
  3232.                 SetPlayerSkin(playerid, 70);
  3233.                 GivePlayerWeapon(playerid, 1, 1);
  3234.                 GivePlayerWeapon(playerid, 23, 200);
  3235.                 SetPlayerSkin(playerid, 70);
  3236.             }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3237.             {
  3238.                 GivePlayerWeapon(playerid, 34, 200);
  3239.                 GivePlayerWeapon(playerid, 1, 1);
  3240.                 GivePlayerWeapon(playerid, 24, 200);
  3241.             }
  3242.         }
  3243.  
  3244.         if(listitem == 5) {
  3245.             SendClientMessage(playerid, COLOR_GREY, "You chose the engineer as your class.");
  3246.             SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3247.             gPlayerClass[playerid] = ENGINEER;
  3248.             PickedClass[playerid] = 1;
  3249.             SetPlayerVirtualWorld(playerid, 0);
  3250.             TogglePlayerControllable(playerid, 1);
  3251.             if(gTeam[playerid] == TEAM_USA) {
  3252.                 SetPlayerSkin(playerid, 179);
  3253.                 GivePlayerWeapon(playerid, 27, 200);
  3254.                 GivePlayerWeapon(playerid, 1, 1);
  3255.                 GivePlayerWeapon(playerid, 29, 200);
  3256.             }else
  3257.             if(gTeam[playerid] == TEAM_GERMANY) {
  3258.                 SetPlayerSkin(playerid, 50);
  3259.                 GivePlayerWeapon(playerid, 27, 200);
  3260.                 GivePlayerWeapon(playerid, 1, 1);
  3261.                 GivePlayerWeapon(playerid, 29, 200);
  3262.             }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3263.             {
  3264.                 GivePlayerWeapon(playerid, 34, 200);
  3265.                 GivePlayerWeapon(playerid, 1, 1);
  3266.                 GivePlayerWeapon(playerid, 24, 200);
  3267.             }
  3268.         }
  3269.  
  3270.         if( listitem == 6 ) {                     //pyro
  3271.             if( rank[playerid] >= 4 ) {
  3272.                 SendClientMessage(playerid, COLOR_GREY, "You chose the pyroman as your class.");
  3273.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3274.                 gPlayerClass[playerid] = PYRO;
  3275.                 PickedClass[playerid] = 1;
  3276.                 SetPlayerVirtualWorld(playerid, 0);
  3277.                 TogglePlayerControllable(playerid, 1);
  3278.                 if(gTeam[playerid] == TEAM_USA) {
  3279.                     SetPlayerSkin(playerid, 279);
  3280.                     GivePlayerWeapon(playerid, 16, 20);
  3281.                     GivePlayerWeapon(playerid, 1, 1);
  3282.                     GivePlayerWeapon(playerid, 23, 200);
  3283.                     GivePlayerWeapon(playerid, 37, 550);
  3284.                 }else
  3285.                 if(gTeam[playerid] == TEAM_GERMANY) {
  3286.                     SetPlayerSkin(playerid, 278);
  3287.                     GivePlayerWeapon(playerid, 16, 20);
  3288.                     GivePlayerWeapon(playerid, 1, 1);
  3289.                     GivePlayerWeapon(playerid, 23, 200);
  3290.                     GivePlayerWeapon(playerid, 37, 250);
  3291.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3292.                 {
  3293.                     GivePlayerWeapon(playerid, 34, 200);
  3294.                     GivePlayerWeapon(playerid, 1, 1);
  3295.                     GivePlayerWeapon(playerid, 24, 200);
  3296.                 }
  3297.             }else
  3298.             {
  3299.                 SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 4 to be a pyroman!");
  3300.                 ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  3301.                 TogglePlayerControllable(playerid, 0);
  3302.             }
  3303.         }
  3304.  
  3305.         if( listitem == 7 ) {                     //scout
  3306.             if( rank[playerid] >= 1 ) {
  3307.                 SendClientMessage(playerid, COLOR_GREY, "You chose the scout as your class.");
  3308.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3309.                 gPlayerClass[playerid] = SCOUT;
  3310.                 PickedClass[playerid] = 1;
  3311.                 SetPlayerVirtualWorld(playerid, 0);
  3312.                 TogglePlayerControllable(playerid, 1);
  3313.                 if(gTeam[playerid] == TEAM_USA) {
  3314.                     SetPlayerSkin(playerid, 128);
  3315.                     SetPlayerArmour(playerid, 25);
  3316.                     GivePlayerWeapon(playerid, 28, 200);
  3317.                     GivePlayerWeapon(playerid, 1, 1);
  3318.                     GivePlayerWeapon(playerid, 22, 200);
  3319.                 }
  3320.                 if(gTeam[playerid] == TEAM_GERMANY) {
  3321.                     SetPlayerSkin(playerid, 202);
  3322.                     SetPlayerArmour(playerid, 25);
  3323.                     GivePlayerWeapon(playerid, 28, 200);
  3324.                     GivePlayerWeapon(playerid, 1, 1);
  3325.                     GivePlayerWeapon(playerid, 22, 200);
  3326.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3327.                 {
  3328.                     GivePlayerWeapon(playerid, 34, 200);
  3329.                     GivePlayerWeapon(playerid, 1, 1);
  3330.                     GivePlayerWeapon(playerid, 24, 200);
  3331.                 }
  3332.             }else
  3333.             {
  3334.                 SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 1 to be a scout!");
  3335.                 ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  3336.                 TogglePlayerControllable(playerid, 0);
  3337.             }
  3338.         }
  3339.  
  3340.         if(listitem == 8) {
  3341.             if(rank[playerid] >= 8) {
  3342.                 SendClientMessage(playerid, COLOR_GREY, "You chose general (commander) as your class.");
  3343.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3344.                 gPlayerClass[playerid] = GENERAL;
  3345.                 PickedClass[playerid] = 1;
  3346.                 SetPlayerVirtualWorld(playerid, 0);
  3347.                 TogglePlayerControllable(playerid, 1);
  3348.                 if(gTeam[playerid] == TEAM_USA) {
  3349.                     SetPlayerSkin(playerid, 283);
  3350.                     SetPlayerArmour(playerid, 95);
  3351.                     GivePlayerWeapon(playerid, 31, 200);
  3352.                     GivePlayerWeapon(playerid, 27, 200);
  3353.                     GivePlayerWeapon(playerid, 28, 200);
  3354.                     GeneralClass[playerid][1] = 1;
  3355.                 }
  3356.                 if(gTeam[playerid] == TEAM_GERMANY) {
  3357.                     SetPlayerSkin(playerid, 288);
  3358.                     SetPlayerArmour(playerid, 95);
  3359.                     GivePlayerWeapon(playerid, 31, 200);
  3360.                     GivePlayerWeapon(playerid, 27, 200);
  3361.                     GivePlayerWeapon(playerid, 28, 200);
  3362.                     GeneralClass[playerid][2] = 1;
  3363.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3364.                 {
  3365.                     GivePlayerWeapon(playerid, 31, 200);
  3366.                     GivePlayerWeapon(playerid, 27, 200);
  3367.                     GivePlayerWeapon(playerid, 28, 200);
  3368.                     if(gTeam[playerid] == TEAM_RUSSIA) GeneralClass[playerid][3] = 1;
  3369.                     if(gTeam[playerid] == TEAM_JAPAN) GeneralClass[playerid][4] = 1;
  3370.                 }
  3371.             }else
  3372.             {
  3373.                 SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 8 to be a general (commander)!");
  3374.                 ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
  3375.                 TogglePlayerControllable(playerid, 0);
  3376.             }
  3377.         }
  3378.     }
  3379.     return 1;
  3380. }
  3381.  
  3382.  
  3383. public OnPlayerDeath(playerid, killerid, reason)
  3384. {
  3385.     if( gPlayerClass[playerid] == ADMIN ) KillTimer(admgod[playerid]);
  3386.  
  3387.     GivePlayerMoney(playerid, -1000);
  3388.  
  3389.     SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
  3390.     ClearAnimations(playerid);
  3391.  
  3392.     if( GetPlayerMoney(playerid) < 0 ) ResetPlayerMoney(playerid);
  3393.  
  3394.     if( gPlayerClass[playerid] == ENGINEER ) DestroyPickup(Dispenser[playerid]);
  3395.  
  3396.     if( IsPlayerInAnyVehicle(playerid) ) {
  3397.         if( IsInCargoB[playerid] == true ) {
  3398.             new vehicleid = GetPlayerVehicleID(playerid);
  3399.             CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] - 1;
  3400.             IsInCargoB[playerid] = false;
  3401.         }
  3402.         if( IsInBarracks[playerid] == true ) {
  3403.             new vehicleid = GetPlayerVehicleID(playerid);
  3404.             Barracks[vehicleid][seats] = Barracks[vehicleid][seats] - 1;
  3405.             IsInBarracks[playerid] = false;
  3406.         }
  3407.     }
  3408.  
  3409.     TextDrawHideForPlayer(playerid,txtTimeDisp);
  3410. // THIS IS ACTUALLY ONPLAYERDEATH !
  3411.  
  3412.     if( gPlayerClass[killerid] != ADMIN) {
  3413.         deaths[playerid] = deaths[playerid] + 1;
  3414.         kills[killerid] = kills[killerid] + 1;
  3415.     }
  3416.  
  3417.     CheckForLevelUpdate(killerid);
  3418.  
  3419.     SetPlayerVirtualWorld(playerid, 0);
  3420.  
  3421.     SendClientMessage(killerid, COLOR_WHITE, "You got money and weapons for killing an enemy!");
  3422.     GivePlayerMoney(killerid, 1000);
  3423.  
  3424.     if(hashit[playerid] == 1 && gTeam[killerid] == TEAM_AUSTRALIA) {
  3425.         hashit[playerid] = 0;
  3426.         GivePlayerMoney(killerid, money[playerid]);
  3427.         SendClientMessage(playerid, COLOR_YELLOW, "You got money for killing an enemy that has a contract on!");
  3428.         new string[128];
  3429.         new hitname[MAX_PLAYER_NAME];
  3430.         GetPlayerName(playerid, hitname, sizeof(hitname));
  3431.         new killername[MAX_PLAYER_NAME];
  3432.         GetPlayerName(killerid, killername, sizeof(killername));
  3433.         format(string, sizeof(string), "%s killed contracted player %s ! The contract is canceled!", killername, hitname);
  3434.         SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3435.     }
  3436.  
  3437.     AbleToSpawn[playerid] = 1;
  3438.  
  3439.     pSpawned[playerid] = 0;
  3440.  
  3441.     if(Planted[playerid] == 1) {
  3442.         DestroyObject(C4[playerid]);
  3443.         Bomb[playerid] = 0;
  3444.         Planted[playerid] = 0;
  3445.     }
  3446.  
  3447.     if(hitman[killerid] == 1) {
  3448.         if(playerid == randperson[playerid]) {
  3449.             SendClientMessage(killerid, COLOR_WHITE, "Nice work! You killed your hit! Minimission completed!");
  3450.             SetPlayerScore(killerid, GetPlayerScore(killerid) +3);
  3451.             DisablePlayerCheckpoint(playerid);
  3452.             hitman[killerid] = 0;
  3453.         }
  3454.     }
  3455.  
  3456.     if(kills[killerid] == 6) {
  3457.         kills[killerid] = 0;
  3458.         SendClientMessage(playerid, COLOR_WHITE, "Congratulations! You completed the challenge!");
  3459.         SetPlayerScore(killerid, GetPlayerScore(killerid) +3);
  3460.     }
  3461.  
  3462.     spree[killerid]++;
  3463.  
  3464.     if(spree[killerid] == 5) {
  3465.         new string[128];
  3466.         new pName[MAX_PLAYER_NAME];
  3467.         GetPlayerName(killerid, pName, sizeof(pName));
  3468.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~5 KILLS!~r~", pName);
  3469.         TextDrawHideForAll(Spree);
  3470.         TextDrawSetString(Spree, string);
  3471.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3472.     }
  3473.  
  3474.     if(spree[killerid] == 10) {
  3475.         new string[128];
  3476.         new pName[MAX_PLAYER_NAME];
  3477.         GetPlayerName(killerid, pName, sizeof(pName));
  3478.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~10 KILLS!~r~", pName);
  3479.         TextDrawHideForAll(Spree);
  3480.         TextDrawSetString(Spree, string);
  3481.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3482.         SendClientMessage(playerid, COLOR_RED, "You Can Now Use /basestrike");
  3483.     }
  3484.  
  3485.     if(spree[killerid] == 15) {
  3486.         new string[128];
  3487.         new pName[MAX_PLAYER_NAME];
  3488.         GetPlayerName(killerid, pName, sizeof(pName));
  3489.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~15 KILLS!~r~", pName);
  3490.         TextDrawHideForAll(Spree);
  3491.         TextDrawSetString(Spree, string);
  3492.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3493.     }
  3494.  
  3495.     if(spree[killerid] == 20) {
  3496.         new string[128];
  3497.         new pName[MAX_PLAYER_NAME];
  3498.         GetPlayerName(killerid, pName, sizeof(pName));
  3499.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~20 KILLS!~r~", pName);
  3500.         TextDrawHideForAll(Spree);
  3501.         TextDrawSetString(Spree, string);
  3502.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3503.     }
  3504.  
  3505.     if(spree[killerid] == 25) {
  3506.         new string[128];
  3507.         new pName[MAX_PLAYER_NAME];
  3508.         GetPlayerName(killerid, pName, sizeof(pName));
  3509.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~25 KILLS!~r~", pName);
  3510.         TextDrawHideForAll(Spree);
  3511.         TextDrawSetString(Spree, string);
  3512.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3513.     }
  3514.  
  3515.     if(spree[killerid] == 30) {
  3516.         new string[128];
  3517.         new pName[MAX_PLAYER_NAME];
  3518.         GetPlayerName(killerid, pName, sizeof(pName));
  3519.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~30 KILLS!~r~", pName);
  3520.         TextDrawHideForAll(Spree);
  3521.         TextDrawSetString(Spree, string);
  3522.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3523.     }
  3524.  
  3525.     if(spree[killerid] == 35) {
  3526.         new string[128];
  3527.         new pName[MAX_PLAYER_NAME];
  3528.         GetPlayerName(killerid, pName, sizeof(pName));
  3529.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~35 KILLS!~r~", pName);
  3530.         TextDrawHideForAll(Spree);
  3531.         TextDrawSetString(Spree, string);
  3532.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3533.     }
  3534.  
  3535.     if(spree[killerid] == 40) {
  3536.         new string[128];
  3537.         new pName[MAX_PLAYER_NAME];
  3538.         GetPlayerName(killerid, pName, sizeof(pName));
  3539.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~40 KILLS!~r~", pName);
  3540.         TextDrawHideForAll(Spree);
  3541.         TextDrawSetString(Spree, string);
  3542.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3543.     }
  3544.  
  3545.     if(spree[killerid] == 45) {
  3546.         new string[128];
  3547.         new pName[MAX_PLAYER_NAME];
  3548.         GetPlayerName(playerid, pName, sizeof(pName));
  3549.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~45 KILLS!~r~", pName);
  3550.         TextDrawHideForAll(Spree);
  3551.         TextDrawSetString(Spree, string);
  3552.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3553.     }
  3554.  
  3555.     if(spree[killerid] == 50) {
  3556.         new string[128];
  3557.         new pName[MAX_PLAYER_NAME];
  3558.         SetPlayerScore(playerid, GetPlayerScore(playerid) +5);
  3559.         GetPlayerName(playerid, pName, sizeof(pName));
  3560.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~50 KILLS!~r~", pName);
  3561.         TextDrawHideForAll(Spree);
  3562.         TextDrawSetString(Spree, string);
  3563.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3564.     }
  3565.  
  3566.     if(spree[killerid] > 50 ) {
  3567.         new string[128];
  3568.         new pName[MAX_PLAYER_NAME];
  3569.         GetPlayerName(playerid, pName, sizeof(pName));
  3570.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~%i KILLS!~r~", pName, spree[killerid]);
  3571.         TextDrawHideForAll(Spree);
  3572.         TextDrawSetString(Spree, string);
  3573.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3574.     }
  3575.  
  3576.     if(spree[playerid] >= 5) {
  3577.         new string[128];
  3578.         new pName[MAX_PLAYER_NAME];
  3579.         GetPlayerName(playerid, pName, sizeof(pName));
  3580.         format(string, sizeof(string), "%s 's killing spree ended.", pName);
  3581.         SendClientMessageToAll(COLOR_CON_GREEN, string);
  3582.         spree[playerid] = 0;
  3583.     }
  3584.  
  3585.     IsInHunter[playerid] = 0;
  3586.     IsInRhino[playerid] = 0;
  3587.     EnteredArea[playerid] = 0;
  3588.  
  3589.     SendDeathMessage(killerid, playerid, reason);
  3590.  
  3591.     if( killerid == INVALID_PLAYER_ID) {
  3592.         SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
  3593.     }
  3594.     return 1;
  3595. }
  3596.  
  3597.  
  3598. public OnVehicleSpawn(vehicleid)
  3599. {
  3600.     foreach(Player, i) {
  3601.         SetVehicleParamsForPlayer(vehicleid,i, 0, 0);
  3602.     }
  3603.  
  3604.     if (GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 563 ||GetVehicleModel(vehicleid) == 511  ) {
  3605.         CargoBob[vehicleid][seats] = 0;
  3606.     }
  3607.  
  3608.     if( GetVehicleModel(vehicleid) == 433 ) {
  3609.         Barracks[vehicleid][seats] = 0;
  3610.     }
  3611.     return 1;
  3612. }
  3613.  
  3614.  
  3615. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  3616. {
  3617.  
  3618.     if (ispassenger) return 1;
  3619.     foreach(Player, i) {
  3620.         if(IsPlayerInVehicle(i,vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerTeam(i) == GetPlayerTeam(playerid)) {
  3621.             new string[128];
  3622.             new string2[128];
  3623.             Warns[playerid][TeamJack]++;
  3624.             format(string, sizeof(string), "DONT TEAM JACK! Warnings: %d/5", Warns[playerid][TeamJack]);
  3625.             SendClientMessage(playerid, COLOR_RED, string);
  3626.             GameTextForPlayer(playerid, "DONT TEAM JACK!", 5000, 4);
  3627.             SetPlayerHealth(playerid, 0.0);
  3628.  
  3629.             if(Warns[playerid][TeamJack] == 5) {
  3630.                 new kickname[MAX_PLAYER_NAME];
  3631.                 GetPlayerName(playerid, kickname, sizeof(kickname));
  3632.                 format(string2, sizeof(string2), "**AUTO KICK: %s has been kicked for 3 team car jacks!", kickname);
  3633.                 SendClientMessageToAll(COLOR_RED, string2);
  3634.                 SendClientMessage(playerid, COLOR_RED, "You have been kicked for 3 team jacks.");
  3635.                 Warns[playerid][TeamJack]=0;
  3636.                 Kick(playerid);
  3637.             }
  3638.         }
  3639.     }
  3640.  
  3641.     LastVehicle[playerid] = vehicleid;
  3642.  
  3643.     if (GetVehicleModel(vehicleid) == 548|| GetVehicleModel(vehicleid) == 563 || GetVehicleModel(vehicleid) == 511 ) {
  3644.  
  3645.         SendClientMessage(playerid, COLOR_GREY, "You just recieved a parachute !");
  3646.         if (ispassenger) {
  3647.             if( CargoBob[vehicleid][seats] < 7 ) {
  3648.                 if (IsInCargoB[playerid] == false) {
  3649.                     CargoBobUser[playerid][vehicleid] =1;
  3650.                     LastVehicle[playerid] = vehicleid;
  3651.                     GivePlayerWeapon(playerid, 46, 1);
  3652.                     CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] + 1;
  3653.                     IsInCargoB[playerid] = true;
  3654.                     PlayerCargoB[playerid] = vehicleid;
  3655. //last
  3656.                     TogglePlayerSpectating(playerid, true);
  3657.                     PlayerSpectateVehicle(playerid, vehicleid);
  3658.                 }
  3659.             }
  3660.             else {
  3661.                 RemovePlayerFromVehicle(playerid);
  3662.                 SendClientMessage(playerid, COLOR_RED, "Vehicle is full !");
  3663.             }
  3664.         }
  3665.         else {
  3666.             CargoBobUser[playerid][vehicleid] =1;
  3667.             LastVehicle[playerid] = vehicleid;
  3668.             GivePlayerWeapon(playerid, 46, 1);
  3669.             Driver[vehicleid] = playerid;
  3670.         }
  3671.     }
  3672.  
  3673.     if (GetVehicleModel(vehicleid) == 433) {
  3674.         if (ispassenger) {
  3675.             if( Barracks[vehicleid][seats] < 7 ) {
  3676.                 if (IsInBarracks[playerid] == false) {
  3677.                     BarracksUser[playerid][vehicleid] =1;
  3678.                     LastVehicle[playerid] = vehicleid;
  3679.                     GivePlayerWeapon(playerid, 46, 1);
  3680.                     Barracks[vehicleid][seats] = Barracks[vehicleid][seats] + 1;
  3681.                     IsInBarracks[playerid] = true;
  3682.                     PlayerBarracks[playerid] = vehicleid;
  3683. //last
  3684.                     TogglePlayerSpectating(playerid, true);
  3685.                     PlayerSpectateVehicle(playerid, vehicleid);
  3686.                 }
  3687.             }
  3688.             else {
  3689.                 RemovePlayerFromVehicle(playerid);
  3690.                 SendClientMessage(playerid, COLOR_RED, "Barracks is full !");
  3691.             }
  3692.         }
  3693.         else {
  3694.             BarracksUser[playerid][vehicleid] =1;
  3695.             LastVehicle[playerid] = vehicleid;
  3696.             Driver[vehicleid] = playerid;
  3697.         }
  3698.     }
  3699.     return 1;
  3700. }
  3701.  
  3702.  
  3703. public OnRconLoginAttempt(ip[], password[], success)
  3704. {
  3705.     if(!success) {                                //If the password was incorrect
  3706.         new pip[16];
  3707.         foreach(Player, i) {
  3708.             GetPlayerName(i, nameee, 16);
  3709.             GetPlayerIp(i, pip, sizeof(pip));
  3710.             if(!strcmp(ip, pip, true)) {          //If a player's IP is the IP that failed the login
  3711.                 printf("Failed RCON Login attempt by %s . ID:%i IP:%s Pw: %s", nameee,ip, password);
  3712.             }
  3713.         }
  3714.     }
  3715.     return 1;
  3716. }
  3717.  
  3718.  
  3719. public OnVehicleDeath(vehicleid, killerid)
  3720. {
  3721.     if (GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 563|| GetVehicleModel(vehicleid) == 511 ) {
  3722.         foreach(Player, i) {
  3723.             if (IsInCargoB[i] == true) {
  3724.                 if (PlayerCargoB[i] == vehicleid) {
  3725.  
  3726.                     CargoBob[vehicleid][seats] = 0;
  3727.                     TogglePlayerSpectating(i, false);
  3728.                     new Float:X,Float:Y,Float:Z,Float:Ang;
  3729.                     GetVehiclePos(vehicleid, X, Y, Z);
  3730.                     GetVehicleZAngle(vehicleid, Ang);
  3731.                     X += (2 * floatsin(-Ang, degrees));
  3732.                     Y += (2 * floatcos(-Ang, degrees));
  3733.                     SetPlayerPos(i, X, Y, Z);
  3734.                     X += (2 * floatsin(-(Ang-45.0), degrees));
  3735.                     Y += (2 * floatcos(-(Ang-45.0), degrees));
  3736.                     SetPlayerPos(i, X, Y, Z);
  3737.                     SetPlayerPos(i, X, Y, Z);
  3738.                     cbx[i] = X;
  3739.                     cby[i] = Y;
  3740.                     cbz[i] = Z;
  3741.                     cba[i] = Ang;
  3742.                     SetTimerEx("ExitCB", 500, 0, "i", i);
  3743.                     SetPlayerFacingAngle(i, Ang+90);
  3744.                     SetCameraBehindPlayer(i);
  3745.                     IsInCargoB[i] = false;
  3746.                     PlayerCargoB[i] = 0;
  3747.                     SetPlayerHealth(i, 0.0);
  3748.  
  3749.                 }
  3750.             }
  3751.         }
  3752.     }
  3753.     IsInCargoB[killerid] = false;
  3754.     PlayerCargoB[killerid] = 0;
  3755.  
  3756.     if (GetVehicleModel(vehicleid) == 433) {
  3757.  
  3758.         foreach(Player, i) {
  3759.             if (IsInBarracks[i] == true) {
  3760.                 if (PlayerBarracks[i] == vehicleid) {
  3761.  
  3762.                     Barracks[vehicleid][seats] = 0;
  3763.                     new Float:X,Float:Y,Float:Z,Float:Ang;
  3764.                     GetVehiclePos(vehicleid, X, Y, Z);
  3765.                     GetVehicleZAngle(vehicleid, Ang);
  3766.                     X += (2 * floatsin(-Ang, degrees));
  3767.                     Y += (2 * floatcos(-Ang, degrees));
  3768.                     SetPlayerPos(i, X, Y, Z);
  3769.                     X += (2 * floatsin(-(Ang-45.0), degrees));
  3770.                     Y += (2 * floatcos(-(Ang-45.0), degrees));
  3771.                     SetPlayerPos(i, X, Y, Z);
  3772.                     SetPlayerPos(i, X, Y, Z);
  3773.                     SetPlayerFacingAngle(i, Ang+90);
  3774.                     cbx[i] = X;
  3775.                     cby[i] = Y;
  3776.                     cbz[i] = Z;
  3777.                     cba[i] = Ang;
  3778.                     TogglePlayerSpectating(i, false);
  3779.                     SetTimerEx("ExitCB", 500, 0, "i", i);
  3780.                     SetCameraBehindPlayer(i);
  3781.                     IsInBarracks[i] = false;
  3782.                     PlayerBarracks[i] = 0;
  3783.                     SetPlayerHealth(i, 0.0);
  3784.                 }
  3785.             }
  3786.         }
  3787.     }
  3788.     IsInBarracks[killerid] = false;
  3789.     PlayerBarracks[killerid] = 0;
  3790.     return 1;
  3791. }
  3792.  
  3793.  
  3794. public OnPlayerText(playerid, text[])
  3795. {
  3796.  
  3797.     if(Muted[playerid]) {
  3798.         SendClientMessage(playerid,RED,"JunkBuster: You are not allowed to chat because you have been muted!");
  3799.         return 0;
  3800.     }
  3801.  
  3802.     SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 3000);
  3803.  
  3804.     new string[128];
  3805.     if(gTeam[playerid] == TEAM_USA) {
  3806.         if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0) {
  3807.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3808.             format(string,sizeof(string),"USA RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
  3809.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3810.         }
  3811.         else if(GetPlayerWantedLevel(playerid) == 2) {
  3812.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3813.             format(string,sizeof(string),"USA RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
  3814.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3815.         }
  3816.         else if(GetPlayerWantedLevel(playerid) == 3) {
  3817.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3818.             format(string,sizeof(string),"USA RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
  3819.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3820.         }
  3821.         else if(GetPlayerWantedLevel(playerid) == 4) {
  3822.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3823.             format(string,sizeof(string),"USA RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
  3824.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3825.         }
  3826.         else if(GetPlayerWantedLevel(playerid) == 5) {
  3827.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3828.             format(string,sizeof(string),"USA RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
  3829.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3830.         }
  3831.         else if(GetPlayerWantedLevel(playerid) == 6) {
  3832.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3833.             format(string,sizeof(string),"USA RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
  3834.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3835.         }
  3836.         else if(GetPlayerWantedLevel(playerid) == 7) {
  3837.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3838.             format(string,sizeof(string),"USA RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
  3839.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3840.         }
  3841.         else if(GetPlayerWantedLevel(playerid) == 8) {
  3842.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3843.             format(string,sizeof(string),"USA RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
  3844.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3845.         }
  3846.         else if(GetPlayerWantedLevel(playerid) == 9) {
  3847.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3848.             format(string,sizeof(string),"USA RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
  3849.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3850.         }
  3851.         else if(GetPlayerWantedLevel(playerid) == 10) {
  3852.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3853.             format(string,sizeof(string),"USA RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
  3854.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3855.         }
  3856.         else if(GetPlayerWantedLevel(playerid) >= 11) {
  3857.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3858.             format(string,sizeof(string),"USA RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
  3859.             SendUSAMessage(COLOR_LIGHTBLUE, string);
  3860.         }
  3861.     }
  3862.     else if(gTeam[playerid] == TEAM_GERMANY) {
  3863.         if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0) {
  3864.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3865.             format(string,sizeof(string),"GERMANY RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
  3866.             SendGERMANYMessage(COLOR_RED, string);
  3867.         }
  3868.         else if(GetPlayerWantedLevel(playerid) == 2) {
  3869.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3870.             format(string,sizeof(string),"GERMANY RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
  3871.             SendGERMANYMessage(COLOR_RED, string);
  3872.         }
  3873.         else if(GetPlayerWantedLevel(playerid) == 3) {
  3874.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3875.             format(string,sizeof(string),"GERMANY RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
  3876.             SendGERMANYMessage(COLOR_RED, string);
  3877.         }
  3878.         else if(GetPlayerWantedLevel(playerid) == 4) {
  3879.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3880.             format(string,sizeof(string),"GERMANY RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
  3881.             SendGERMANYMessage(COLOR_RED, string);
  3882.         }
  3883.         else if(GetPlayerWantedLevel(playerid) == 5) {
  3884.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3885.             format(string,sizeof(string),"GERMANY RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
  3886.             SendGERMANYMessage(COLOR_RED, string);
  3887.         }
  3888.         else if(GetPlayerWantedLevel(playerid) == 6) {
  3889.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3890.             format(string,sizeof(string),"GERMANY RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
  3891.             SendGERMANYMessage(COLOR_RED, string);
  3892.         }
  3893.         else if(GetPlayerWantedLevel(playerid) == 7) {
  3894.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3895.             format(string,sizeof(string),"GERMANY RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
  3896.             SendGERMANYMessage(COLOR_RED, string);
  3897.         }
  3898.         else if(GetPlayerWantedLevel(playerid) == 8) {
  3899.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3900.             format(string,sizeof(string),"GERMANY RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
  3901.             SendGERMANYMessage(COLOR_RED, string);
  3902.         }
  3903.         else if(GetPlayerWantedLevel(playerid) == 9) {
  3904.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3905.             format(string,sizeof(string),"GERMANY RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
  3906.             SendGERMANYMessage(COLOR_RED, string);
  3907.         }
  3908.         else if(GetPlayerWantedLevel(playerid) == 10) {
  3909.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3910.             format(string,sizeof(string),"GERMANY RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
  3911.             SendGERMANYMessage(COLOR_RED, string);
  3912.         }
  3913.         else if(GetPlayerWantedLevel(playerid) >= 11) {
  3914.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3915.             format(string,sizeof(string),"GERMANY RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
  3916.             SendGERMANYMessage(COLOR_RED, string);
  3917.         }
  3918.  
  3919.     }
  3920.     else if(gTeam[playerid] == TEAM_AUSTRALIA) {
  3921.         if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0) {
  3922.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3923.             format(string,sizeof(string),"AUSTRALIA RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
  3924.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3925.         }
  3926.         else if(GetPlayerWantedLevel(playerid) == 2) {
  3927.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3928.             format(string,sizeof(string),"AUSTRALIA RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
  3929.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3930.         }
  3931.         else if(GetPlayerWantedLevel(playerid) == 3) {
  3932.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3933.             format(string,sizeof(string),"AUSTRALIA RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
  3934.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3935.         }
  3936.         else if(GetPlayerWantedLevel(playerid) == 4) {
  3937.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3938.             format(string,sizeof(string),"AUSTRALIA RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
  3939.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3940.         }
  3941.         else if(GetPlayerWantedLevel(playerid) == 5) {
  3942.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3943.             format(string,sizeof(string),"AUSTRALIA RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
  3944.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3945.         }
  3946.         else if(GetPlayerWantedLevel(playerid) == 6) {
  3947.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3948.             format(string,sizeof(string),"AUSTRALIA RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
  3949.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3950.         }
  3951.         else if(GetPlayerWantedLevel(playerid) == 7) {
  3952.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3953.             format(string,sizeof(string),"AUSTRALIA RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
  3954.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3955.         }
  3956.         else if(GetPlayerWantedLevel(playerid) == 8) {
  3957.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3958.             format(string,sizeof(string),"AUSTRALIA RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
  3959.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3960.         }
  3961.         else if(GetPlayerWantedLevel(playerid) == 9) {
  3962.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3963.             format(string,sizeof(string),"AUSTRALIA RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
  3964.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3965.         }
  3966.         else if(GetPlayerWantedLevel(playerid) == 10) {
  3967.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3968.             format(string,sizeof(string),"AUSTRALIA RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
  3969.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3970.         }
  3971.         else if(GetPlayerWantedLevel(playerid) >= 11) {
  3972.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3973.             format(string,sizeof(string),"AUSTRALIA RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
  3974.             SendAUSTRALIAMessage(COLOR_YELLOW, string);
  3975.         }
  3976.     }
  3977.     else if(gTeam[playerid] == TEAM_RUSSIA) {
  3978.         if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0) {
  3979.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3980.             format(string,sizeof(string),"RUSSIA RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
  3981.             SendRUSSIAMessage(COLOR_ORANGE, string);
  3982.         }
  3983.         else if(GetPlayerWantedLevel(playerid) == 2) {
  3984.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3985.             format(string,sizeof(string),"RUSSIA RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
  3986.             SendRUSSIAMessage(COLOR_ORANGE, string);
  3987.         }
  3988.         else if(GetPlayerWantedLevel(playerid) == 3) {
  3989.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3990.             format(string,sizeof(string),"RUSSIA RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
  3991.             SendRUSSIAMessage(COLOR_ORANGE, string);
  3992.         }
  3993.         else if(GetPlayerWantedLevel(playerid) == 4) {
  3994.             GetPlayerName(playerid,nameee,sizeof(nameee));
  3995.             format(string,sizeof(string),"RUSSIA RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
  3996.             SendRUSSIAMessage(COLOR_ORANGE, string);
  3997.         }
  3998.         else if(GetPlayerWantedLevel(playerid) == 5) {
  3999.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4000.             format(string,sizeof(string),"RUSSIA RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
  4001.             SendRUSSIAMessage(COLOR_ORANGE, string);
  4002.         }
  4003.         else if(GetPlayerWantedLevel(playerid) == 6) {
  4004.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4005.             format(string,sizeof(string),"RUSSIA RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
  4006.             SendRUSSIAMessage(COLOR_ORANGE, string);
  4007.         }
  4008.         else if(GetPlayerWantedLevel(playerid) == 7) {
  4009.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4010.             format(string,sizeof(string),"RUSSIA RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
  4011.             SendRUSSIAMessage(COLOR_ORANGE, string);
  4012.         }
  4013.         else if(GetPlayerWantedLevel(playerid) == 8) {
  4014.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4015.             format(string,sizeof(string),"RUSSIA RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
  4016.             SendRUSSIAMessage(COLOR_ORANGE, string);
  4017.         }
  4018.         else if(GetPlayerWantedLevel(playerid) == 9) {
  4019.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4020.             format(string,sizeof(string),"RUSSIA RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
  4021.             SendRUSSIAMessage(COLOR_ORANGE, string);
  4022.         }
  4023.         else if(GetPlayerWantedLevel(playerid) == 10) {
  4024.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4025.             format(string,sizeof(string),"RUSSIA RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
  4026.             SendRUSSIAMessage(COLOR_ORANGE, string);
  4027.         }
  4028.         else if(GetPlayerWantedLevel(playerid) >= 11) {
  4029.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4030.             format(string,sizeof(string),"RUSSIA RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
  4031.             SendRUSSIAMessage(COLOR_ORANGE, string);
  4032.         }
  4033.     }
  4034.     else if(gTeam[playerid] == TEAM_JAPAN) {
  4035.         if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0) {
  4036.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4037.             format(string,sizeof(string),"JAPAN RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
  4038.             SendJAPANMessage(COLOR_WHITE, string);
  4039.         }
  4040.         else if(GetPlayerWantedLevel(playerid) == 2) {
  4041.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4042.             format(string,sizeof(string),"JAPAN RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
  4043.             SendJAPANMessage(COLOR_WHITE, string);
  4044.         }
  4045.         else if(GetPlayerWantedLevel(playerid) == 3) {
  4046.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4047.             format(string,sizeof(string),"JAPAN RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
  4048.             SendJAPANMessage(COLOR_WHITE, string);
  4049.         }
  4050.         else if(GetPlayerWantedLevel(playerid) == 4) {
  4051.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4052.             format(string,sizeof(string),"JAPAN RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
  4053.             SendJAPANMessage(COLOR_WHITE, string);
  4054.         }
  4055.         else if(GetPlayerWantedLevel(playerid) == 5) {
  4056.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4057.             format(string,sizeof(string),"JAPAN RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
  4058.             SendJAPANMessage(COLOR_WHITE, string);
  4059.         }
  4060.         else if(GetPlayerWantedLevel(playerid) == 6) {
  4061.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4062.             format(string,sizeof(string),"JAPAN RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
  4063.             SendJAPANMessage(COLOR_WHITE, string);
  4064.         }
  4065.         else if(GetPlayerWantedLevel(playerid) == 7) {
  4066.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4067.             format(string,sizeof(string),"JAPAN RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
  4068.             SendJAPANMessage(COLOR_WHITE, string);
  4069.         }
  4070.         else if(GetPlayerWantedLevel(playerid) == 8) {
  4071.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4072.             format(string,sizeof(string),"JAPAN RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
  4073.             SendJAPANMessage(COLOR_WHITE, string);
  4074.         }
  4075.         else if(GetPlayerWantedLevel(playerid) == 9) {
  4076.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4077.             format(string,sizeof(string),"JAPAN RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
  4078.             SendJAPANMessage(COLOR_WHITE, string);
  4079.         }
  4080.         else if(GetPlayerWantedLevel(playerid) == 10) {
  4081.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4082.             format(string,sizeof(string),"JAPAN RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
  4083.             SendJAPANMessage(COLOR_WHITE, string);
  4084.         }
  4085.         else if(GetPlayerWantedLevel(playerid) >= 11) {
  4086.             GetPlayerName(playerid,nameee,sizeof(nameee));
  4087.             format(string,sizeof(string),"JAPAN RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
  4088.             SendJAPANMessage(COLOR_WHITE, string);
  4089.         }
  4090.     }
  4091.  
  4092.     if(mute[playerid] == 1) return 0;
  4093.     return 0;
  4094. }
  4095.  
  4096.  
  4097. public OnPlayerCommandText(playerid, cmdtext[])
  4098. {
  4099.     new cmd[256];
  4100.     new idx;
  4101.     new tmp[256];
  4102.  
  4103.     new sendername[16];
  4104.     new giveplayerid, giveplayer[16];
  4105.  
  4106.     cmd = strtok(cmdtext, idx);
  4107.  
  4108.     if (strcmp("/kill", cmdtext, true) == 0) {
  4109.         SetPlayerHealth(playerid, 0.0);
  4110.         return 1;
  4111.     }
  4112.     if (strcmp("/basestrike", cmdtext, true, 10) == 0) {
  4113.         spree[playerid] = 0;
  4114.         if(spree[playerid] >= 10) {
  4115.             ShowPlayerDialog(playerid, 1996, DIALOG_STYLE_LIST, "Base Strike", "Usa Base Strike\nGermans Base Strike\nJapan Base Strike\nAUSTRALIA Base Strike\nRussian Base Strike", "Select", "Cancel");
  4116.         }
  4117.         else {
  4118.             SendClientMessage(playerid,RED,"You Must Have 10 Kill Streaks");
  4119.         }
  4120.         return 1;
  4121.     }
  4122.     if (strcmp("/ranks", cmdtext, true) == 0) {
  4123.         ShowPlayerDialog(playerid, 1995, DIALOG_STYLE_LIST, "Ranks Of The Army", "***********General of The Army - 4500 score\n **********General - 2250 score\n  *********Major General - 2000 score\n   ********Lieutenant General - 1500 score\n    *******Colonel - 1250 score\n     ******Major - 1000 score\n      *****Captain - 750 score \n       ****Lieutenant - 500 score\n        ***Sergeant - 250 score\n          **Corporal - 100 score\n           *Private - 50 score", "Ok","Cancel");
  4124.         return 1;
  4125.     }
  4126.  
  4127. /*n
  4128. if(strcmp(cmd, "/mailinglist", true) == 0)
  4129. {
  4130.     tmp = strtok(cmdtext, idx);
  4131.     if(!strlen(tmp))
  4132.     {
  4133.         SendClientMessage(playerid, COLOR_RED, "USAGE: /mailinglist [email]");
  4134.         return 1;
  4135.     }
  4136.  
  4137.     if(strcmp(tmp, "@", true, 24) != 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Email invalid!");
  4138. if(strcmp(tmp, ".", true, 24) != 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Email invalid!");
  4139.  
  4140. new mailers;
  4141. mailers = dini_Int("mailers.cfg", "Mailers");
  4142. mailers++;
  4143. dini_IntSet("mailers.cfg", "Mailers", mailers);
  4144.  
  4145. new entry[128];
  4146. format(entry, sizeof(entry), "%s\n", strval(tmp));
  4147. new File:hFile;
  4148. hFile = fopen("mailinglist.cfg", io_append);
  4149. if (hFile)
  4150. {
  4151. fwrite(hFile, entry);
  4152. fclose(hFile);
  4153. }
  4154. return 1;
  4155. }
  4156. */
  4157.  
  4158.     if(strcmp("/donationpackage", cmdtext, true) == 0) {
  4159.         SendClientMessage(playerid, COLOR_GREEN, "All donaters above $5.00 will recieve:");
  4160.         SendClientMessage(playerid, COLOR_GREEN, "Armour On Spawn | Rank 6 | 100 Score | VIP Global Chat");
  4161.         SendClientMessage(playerid, COLOR_GREEN, "To donate please go to modernwarfare2.smfforfree.com and click the paypal donate button!");
  4162.         return 1;
  4163.     }
  4164.  
  4165.     if( strcmp(cmd, "/vc", true)==0) {
  4166.         tmp = strtok(cmdtext, idx);
  4167.         if( strlen(tmp) == 0 ) return SendClientMessage(playerid, COLOR_RED, "USE: /vc [text]");
  4168.         if( !IsPlayerInAnyVehicle(playerid) ) return SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle!");
  4169.         new str[100];
  4170.         GetPlayerName(playerid, nameee, 16);
  4171.         format(str, 100, "VehicleRadio [%i]%s:%s", playerid, nameee, cmdtext[4]);
  4172.         new veh = GetPlayerVehicleID(playerid);
  4173.         foreach(Player, i) {
  4174.             if( IsPlayerInVehicle(i, veh) ) {
  4175.                 SendClientMessage(i, COLOR_LIGHTGREEN, str);
  4176.             }
  4177.         }
  4178.         return 1;
  4179.     }
  4180.  
  4181. /*if( strcmp(cmd, "/f", true)==0)
  4182. {
  4183.     tmp = strtok(cmdtext, idx);
  4184.     if( strlen(tmp) == 0 ) return SendClientMessage(playerid, COLOR_RED, "USE: /f [text]");
  4185.     if( playerTeam[playerid] > 0 )return SendClientMessage(playerid, COLOR_RED, "You aren't in a fTeam!");
  4186.     new str[100];
  4187.     GetPlayerName(playerid, nameee, 16);
  4188.     format(str, 100, "FTeam Radio [%i]%s:%s", playerid, nameee, cmdtext[3]);
  4189.     for(new i=0; i<GetMaxPlayers(); i++)
  4190.     {
  4191.         if( IsPlayerConnected(i) )
  4192. {
  4193. if( playerTeam[playerid] == playerTeam[i] )
  4194. {
  4195. SendClientMessage(i, COLOR_TAN , str);
  4196. }
  4197. }
  4198. }
  4199. return 1;
  4200. }
  4201. */
  4202.  
  4203.     if( strcmp("/paradrop", cmdtext, true) == 0) {
  4204.         new vehicleid = GetPlayerVehicleID(playerid);
  4205.         if( IsPlayerInAnyVehicle(playerid) ) {
  4206.             if( IsPlayerInFlying(playerid, GetPlayerVehicleID(playerid)) ) {
  4207.                 if( GetPlayerVehicleSeat(playerid) == 0 ) {
  4208.                     new Float:X, Float:Y, Float:Z;
  4209.                     new Float:Ang;
  4210.                     GetPlayerPos(playerid, X, Y, Z);
  4211.                     if( Z >= 150.0 ) {
  4212.                         foreach(Player, i) {
  4213.                             print("something wrong at connect");
  4214.                             if(  i != playerid ) {
  4215.                                 print("something wrong at connect");
  4216.                                 if( CargoBobUser[i][GetPlayerVehicleID(playerid)] ==1 ) {
  4217.                                     print("cargobobuser !");
  4218.                                     if( IsInCargoB[i] == true) {
  4219.                                         print("IsinCargo");
  4220.                                         print("GET HIM OUT!");
  4221.  
  4222.                                         LastVehicle[i] = PlayerCargoB[i];
  4223.                                         CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] - 1;
  4224.                                         GetPlayerPos(playerid, X, Y, Z);
  4225.                                         GetPlayerFacingAngle(playerid, Ang);
  4226.                                         TogglePlayerSpectating(i, false);
  4227.                                         X += (2 * floatsin(-Ang, degrees));
  4228.                                         Y += (2 * floatcos(-Ang, degrees));
  4229.                                         SetPlayerPos(i, X, Y, Z);
  4230.                                         X += (2 * floatsin(-(Ang-45.0), degrees));
  4231.                                         Y += (2 * floatcos(-(Ang-45.0), degrees));
  4232.                                         SetPlayerPos(i, X, Y, Z);
  4233.                                         SetPlayerFacingAngle(i, Ang);
  4234.                                         cbx[i] = X;
  4235.                                         cby[i] = Y-2;
  4236.                                         cbz[i] = Z;
  4237.                                         cba[i] = Ang;
  4238.                                         SetTimerEx("ExitCB", 500, 0, "i", i);
  4239.  
  4240.                                         SetPlayerFacingAngle(i, Ang);
  4241.                                         GivePlayerWeapon(playerid, 46, 1);
  4242.                                         IsInCargoB[i] = false;
  4243.                                         PlayerCargoB[i] = 0;
  4244.                                         GivePlayerWeapon(i, 46, 1);
  4245.                                         SendClientMessage(i, COLOR_ORANGE, "The driver started a paradrop !");
  4246.                                     }
  4247.                                 }
  4248.                             }
  4249.                             else {
  4250.                                 if( GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid) ) {
  4251.                                     RemovePlayerFromVehicle(i);
  4252.                                     GivePlayerWeapon(i, 46, 1);
  4253.                                     SendClientMessage(i, COLOR_ORANGE, "The driver started a paradrop !");
  4254.                                 }
  4255.                                 SetTimerEx("ParaExit", 1000, 0, "i", playerid);
  4256.                             }
  4257.                         }
  4258.                     }else SendClientMessage(playerid, COLOR_RED, "You need to be really High to do this !");
  4259.                 }else SendClientMessage(playerid, COLOR_RED,"You need to drive this vehicle to start a paradrop !");
  4260.             }
  4261.         }
  4262.         return 1;
  4263.     }
  4264.  
  4265. /*if(strcmp(cmd, "/bunker", true) == 0)
  4266. {
  4267.     new paramid;
  4268.  
  4269.     tmp = strtok(cmdtext, idx);
  4270.  
  4271.     if(!strlen(tmp))
  4272.     {
  4273.         SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bunker [storegun/takegun/upgrade]");
  4274.         return 1;
  4275.     }
  4276.  
  4277. if(strcmp(tmp, "storegun", true) == 0) paramid = 1;
  4278. if(strcmp(tmp, "takegun", true) == 0) paramid = 2;
  4279. if(strcmp(tmp, "upgrade", true) == 0) paramid = 3;
  4280.  
  4281. return 1;
  4282. }
  4283. */
  4284.  
  4285. // leave it like tis, its buggy atm
  4286.     if(strcmp(cmd, "/fteadasdasdasdasdam",true)==0) {
  4287.         new teamcmd, teamnum;
  4288.         tmp = strtok(cmdtext, idx);
  4289.  
  4290.         if(!strlen(tmp)) {
  4291.             SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [create/join/quit] [name/number]");
  4292.             return 1;
  4293.         }
  4294.         giveplayerid = strval(tmp);
  4295.  
  4296.         if(strcmp(tmp, "create",true)==0)
  4297.             teamcmd = 1;
  4298.         else if(strcmp(tmp, "join",true)==0)
  4299.             teamcmd = 2;
  4300.         else if(strcmp(tmp, "invite",true)==0)
  4301.             teamcmd = 3;
  4302.         else if(strcmp(tmp, "quit",true)==0)
  4303.             teamcmd = 4;
  4304.  
  4305.         tmp = strtok(cmdtext, idx);
  4306.         if(teamcmd < 4 && !strlen(tmp)) {
  4307.             if(teamcmd==0)
  4308.                 SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [create/join/invite/quit] [name/number]");
  4309.             else if(teamcmd==1)
  4310.                 SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [create] [name]");
  4311.             else if(teamcmd==2)
  4312.                 SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [join] [number]");
  4313.             else if(teamcmd==3)
  4314.                 SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [invite] [playerID]");
  4315.             return 1;
  4316.         }
  4317.  
  4318. //Create Gang//
  4319.         new string[128];
  4320.         if(teamcmd==1) {
  4321.             if(playerTeam[playerid]>0) {
  4322.                 SendClientMessage(playerid, COLOR_RED, "You are already in a fireteam!");
  4323.                 return 1;
  4324.             }
  4325.  
  4326.             for(new i = 1; i < MAX_TEAMS; i++) {
  4327.                 if(teamInfo[i][0]==0) {
  4328. //name team
  4329.                     format(teamNames[i], MAX_TEAM_NAME, "%s", tmp);
  4330. //Team exists
  4331.                     teamInfo[i][0]=1;
  4332. //There is one member
  4333.                     teamInfo[i][1]=1;
  4334. //Team color is player's color
  4335.                     teamInfo[i][2]=playerColors[playerid];
  4336.  
  4337. //Player is the first team member
  4338.                     teamMembers[i][0] = playerid;
  4339.                     format(string, sizeof(string),"You have created the fireteam '%s' (id: %d)", teamNames[i], i);
  4340.                     SendClientMessage(playerid, COLOR_GREEN, string);
  4341.  
  4342.                     playerTeam[playerid]=i;
  4343.  
  4344.                     return 1;
  4345.                 }
  4346.             }
  4347.  
  4348.             return 1;
  4349.  
  4350. //Join Gang//
  4351.         }
  4352.         else if (teamcmd==2) {
  4353.             teamnum = strval(tmp);
  4354.  
  4355.             if(playerTeam[playerid]>0) {
  4356.                 SendClientMessage(playerid, COLOR_RED, "You are already in a fireteam!");
  4357.                 return 1;
  4358.             }
  4359.  
  4360.             if(gTeam[teamMembers[teamnum][0]] != gTeam[playerid] ) {
  4361.                 SendClientMessage(playerid, COLOR_RED, "You need to be in the same fireteam with the leader !");
  4362.                 SendClientMessage(playerid, COLOR_RED, "Eg. : USA, Germany, Russia, Japan, AUSTRALIA !");
  4363.                 return 1;
  4364.             }
  4365.  
  4366.             if(teamInfo[teamnum][0]==0) {
  4367.                 SendClientMessage(playerid, COLOR_RED, "No such fireteam exists!");
  4368.                 return 1;
  4369.             }
  4370.             if(teamInvite[playerid]!=teamnum) {
  4371.                 SendClientMessage(playerid, COLOR_RED, "You need to be invited to the fireteam to join.");
  4372.                 return 1;
  4373.             }
  4374.  
  4375.             for(new i = 0; i < MAX_TEAM_MEMBERS; i++) {
  4376.                 if(teamMembers[teamnum][i] > 0 ) {
  4377.  
  4378.                     if(teamInfo[teamnum][1] < MAX_TEAM_MEMBERS) {
  4379.  
  4380.                         teamMembers[teamnum][i] = playerid;
  4381.  
  4382.                         GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
  4383.                         for(new j = 0; j < teamInfo[teamnum][1]; j++) {
  4384.  
  4385.                             format(string, sizeof(string),"%s has joined your fireteam.", sendername);
  4386.                             SendClientMessage(teamMembers[teamnum][j], COLOR_ORANGE, string);
  4387.                         }
  4388.  
  4389.                         teamInfo[teamnum][1]++;
  4390.                         playerTeam[playerid] = teamnum;
  4391.  
  4392.                         format(string, sizeof(string),"You have joined the fireteam '%s' (id: %d)", teamNames[teamnum], teamnum);
  4393.                         SendClientMessage(playerid, COLOR_GREEN, string);
  4394.  
  4395.                     }else SendClientMessage(playerid, COLOR_RED, "That fireteam is full.");
  4396.                 }
  4397.             }
  4398.             return 1;
  4399.  
  4400. //Invite to Gang//
  4401.         } else if (teamcmd==3)
  4402.         {
  4403.             giveplayerid = strval(tmp);
  4404.  
  4405.             if(playerTeam[playerid]==0) {
  4406.                 SendClientMessage(playerid, COLOR_RED, "You are not in a fireteam!");
  4407.                 return 1;
  4408.             }
  4409.             if(teamMembers[playerTeam[playerid]][0]!=playerid) {
  4410.                 SendClientMessage(playerid, COLOR_RED, "You need to be the fireteam leader to send an invite.");
  4411.                 return 1;
  4412.             }
  4413.             if( gTeam[giveplayerid] != gTeam[playerid] ) {
  4414.                 SendClientMessage(playerid,COLOR_RED, "He needs to be in the same fireteam with you ! Eg: Japan");
  4415.                 return 1;
  4416.             }
  4417.  
  4418.             if(IsPlayerConnected(giveplayerid)) {
  4419.                 GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  4420.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  4421.  
  4422.                 format(string, sizeof(string),"You have sent a fireteam invite to %s.", giveplayer);
  4423.                 SendClientMessage(playerid, COLOR_GREEN, string);
  4424.                 format(string, sizeof(string),"You have recieved a fireteam invite from %s to '%s' (id: %d)", sendername, teamNames[playerTeam[playerid]],playerTeam[playerid]);
  4425.                 SendClientMessage(giveplayerid, COLOR_GREEN, string);
  4426.  
  4427.                 teamInvite[giveplayerid]=playerTeam[playerid];
  4428.  
  4429.             } else SendClientMessage(playerid, COLOR_RED, "No such player exists!");
  4430.  
  4431. //Leave Gang//
  4432.         } else if (teamcmd==4)
  4433.         {
  4434.             PlayerLeaveGang(playerid);
  4435.         }
  4436.  
  4437.         return 1;
  4438.     }
  4439.  
  4440. //------------------- /teaminfo
  4441. /*
  4442.     if(strcmp(cmdtext, "/fteaminfo",true)==0) {
  4443.         new string[100];
  4444.         new teamnum;
  4445.         tmp = strtok(cmdtext, idx);
  4446.  
  4447.         if(!strlen(tmp) && playerTeam[playerid]==0) {
  4448.             SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteaminfo [number]");
  4449.             return 1;
  4450.         } else if (!strlen(tmp))
  4451.         teamnum = playerTeam[playerid];
  4452. else
  4453. teamnum = strval(tmp);
  4454.  
  4455. if(teamInfo[teamnum][0]==0) {
  4456. SendClientMessage(playerid, COLOR_RED, "No such fireteam exists!");
  4457. return 1;
  4458. }
  4459.  
  4460. if( gTeam[teamMembers[teamnum][0]] != gTeam[playerid] )
  4461. {
  4462. SendClientMessage(playerid, COLOR_RED, "You can't see info about an enemy fireteam !");
  4463. return 1;
  4464. }
  4465.  
  4466. format(string, sizeof(string),"'%s' FireTeam Members (id: %d)", teamNames[teamnum], teamnum);
  4467. SendClientMessage(playerid, COLOR_GREEN, string);
  4468.  
  4469. for(new i = 0; i < teamInfo[teamnum][1]; i++) {
  4470. GetPlayerName(teamMembers[teamnum][i], giveplayer, sizeof(giveplayer));
  4471. format(string, sizeof(string),"%s (%d)", giveplayer, teamMembers[teamnum][i]);
  4472. SendClientMessage(playerid, COLOR_YELLOW, string);
  4473. }
  4474.  
  4475. return 1;
  4476. }
  4477.  
  4478. //------------------- /teams
  4479.  
  4480. if(strcmp(cmdtext, "/fteams",true)==0)
  4481. {
  4482. new x;
  4483. new string[100];
  4484.  
  4485. SendClientMessage(playerid, COLOR_GREEN, "Current FireTeams:");
  4486. for(new i=0; i < MAX_TEAMS; i++)
  4487. {
  4488. if( gTeam[teamMembers[i][0]] == gTeam[playerid])
  4489. {
  4490. if(teamInfo[i][0]==1)
  4491. {
  4492.  
  4493. format(string, sizeof(string), "%s%s(%d) - %d members", string,teamNames[i],i,teamInfo[i][1]);
  4494.  
  4495. x++;
  4496. if(x > 2)
  4497. {
  4498. SendClientMessage(playerid, COLOR_YELLOW, string);
  4499. x = 0;
  4500. format(string, sizeof(string), "");
  4501. } else
  4502. {
  4503. format(string, sizeof(string), "%s, ", string);
  4504. }
  4505. }
  4506. }
  4507. }
  4508.  
  4509. if(x <= 2 && x > 0) {
  4510. string[strlen(string)-2] = '.';
  4511. SendClientMessage(playerid, COLOR_YELLOW, string);
  4512. }
  4513.  
  4514. return 1;
  4515. }
  4516. */
  4517.  
  4518.     if(strcmp(cmd,"/giverank",true) == 0) {
  4519.         new string[100];
  4520.  
  4521.         GetPlayerName(playerid, sendername, sizeof(sendername));
  4522.         new rnk;
  4523.         GetPlayerName(playerid, sendername, sizeof(sendername));
  4524.         GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
  4525.         tmp = strtok(cmdtext, idx);
  4526.         if(!strlen(tmp)) {
  4527.             SendClientMessage(playerid,COLOR_WHITE,"Correct Usage: /giverank [id] [rank]");
  4528.             return 1;
  4529.         }
  4530.         giveplayerid = strval(tmp);
  4531.         tmp = strtok(cmdtext, idx);
  4532.         if(!strlen(tmp)) {
  4533.             SendClientMessage(playerid,COLOR_WHITE,"Correct Usage: /giverank [id] [rank]");
  4534.             return 1;
  4535.         }
  4536.         if(rnk < 0 || rnk > 11 ) {
  4537.             SendClientMessage(playerid, COLOR_RED, "Rank has to be between 0 and 11" );
  4538.             return 1;
  4539.         }
  4540.  
  4541.         rnk = strval(tmp);
  4542.         if(logged[playerid] == 1) {
  4543.             if(adminlevel[playerid] > 2 ) {
  4544.                 if(IsPlayerConnected(giveplayerid)) {
  4545.                     new name1[30];
  4546.                     new name2[30];
  4547.                     new fs[100];
  4548.                     new fs2[100];
  4549.                     GetPlayerName(playerid, name1, 30);
  4550.                     GetPlayerName(giveplayerid, name2, 30);
  4551.                     if( rnk >= 0 && rnk < 12 ) {
  4552.                         rank[giveplayerid] = rnk;
  4553.                         SetPlayerRankStars(giveplayerid);
  4554.                         format(fs, 100, "You have gave %s , Rank %i !", name2, rnk);
  4555.                         SendClientMessage(playerid, COLOR_GREEN, fs);
  4556.                         format(fs2, 100, "You have recieved Rank %i from Administrator %s !", rnk,name1);
  4557.                         SendClientMessage(giveplayerid, COLOR_GREEN, fs2);
  4558.                         printf("Administrator: %s gave %s rank %i !", name1, name2, rnk);
  4559.  
  4560.                     }else
  4561.                     SendClientMessage(playerid, COLOR_RED, "Invalid Rank ! Rank must be between 0 and 11 (including 0 and 11) .");
  4562.                 }
  4563.                 else {
  4564.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  4565.                     SendClientMessage(playerid, COLOR_RED, string);
  4566.                 }
  4567.             }
  4568.             else {
  4569.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  4570.             }
  4571.         }
  4572.         else {
  4573.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  4574.         }
  4575.         return 1;
  4576.     }
  4577.  
  4578.     if (strcmp("/help", cmdtext, true) == 0) {
  4579.         if(gTeam[playerid] == TEAM_USA) {
  4580.             SendClientMessage(playerid, COLOR_WHITE, "<> For General Help Type /genhelp");
  4581.             SendClientMessage(playerid, COLOR_WHITE, "<> Go to all of the green areas to take them over!");
  4582.             SendClientMessage(playerid, COLOR_WHITE, "<> Go to GERMANYS base and plant a bomb!");
  4583.             SendClientMessage(playerid, COLOR_WHITE, "<> Kill all GERMANS!");
  4584.         }
  4585.         else if(gTeam[playerid] == TEAM_GERMANY) {
  4586.             SendClientMessage(playerid, COLOR_WHITE, "<> For General Help Type /genhelp");
  4587.             SendClientMessage(playerid, COLOR_WHITE, "<> Go to all of the green areas to take them over!");
  4588.             SendClientMessage(playerid, COLOR_WHITE, "<> Go to the USA base and plant a bomb!");
  4589.             SendClientMessage(playerid, COLOR_WHITE, "<> Kill all AMERICANS!");
  4590.         }
  4591.  
  4592.         else if(gTeam[playerid] == TEAM_AUSTRALIA) {
  4593.             SendClientMessage(playerid, COLOR_WHITE, "<> For General Help Type /genhelp");
  4594.             SendClientMessage(playerid, COLOR_WHITE, "<> You are a AUSTRALIA, rather than taking of areas you kill people for money.");
  4595.             SendClientMessage(playerid, COLOR_WHITE, "<> You can use that money to buy weapons, bombs, and more at the computer");
  4596.         }
  4597.         return 1;
  4598.     }
  4599.  
  4600.     new pMessage[256];
  4601.     new gMessage[256];
  4602.     new pName[MAX_PLAYER_NAME+1];
  4603.     new iName[MAX_PLAYER_NAME+1];
  4604.  
  4605. // PM Command
  4606.     if(strcmp("/pm", cmd, true) == 0) {
  4607.         tmp = strtok(cmdtext,idx);
  4608.  
  4609.         if(!strlen(tmp) || strlen(tmp) > 5) {
  4610.             SendClientMessage(playerid,YELLOW,"Usage: /pm (id) (message)");
  4611.             return 1;
  4612.         }
  4613.  
  4614.         new id = strval(tmp);
  4615.         gMessage = strrest(cmdtext,idx);
  4616.  
  4617.         if(!strlen(gMessage)) {
  4618.             SendClientMessage(playerid,YELLOW,"Usage: /pm (id) (message)");
  4619.             return 1;
  4620.         }
  4621.  
  4622.         if(!IsPlayerConnected(id)) {
  4623.             SendClientMessage(playerid,YELLOW,"/pm : Bad player ID");
  4624.             return 1;
  4625.         }
  4626.  
  4627.         if(playerid != id) {
  4628.             GetPlayerName(id,iName,sizeof(iName));
  4629.             GetPlayerName(playerid,pName,sizeof(pName));
  4630.             format(pMessage,sizeof(pMessage),"<Private Message to %s(%d): %s",iName,id,gMessage);
  4631.             SendClientMessage(playerid,YELLOW,pMessage);
  4632.             format(pMessage,sizeof(pMessage),">Private Message from %s(%d): %s",pName,playerid,gMessage);
  4633.             SendClientMessage(id,YELLOW,pMessage);
  4634.             printf(pMessage);
  4635.             PlayerPlaySound(id,1085,0.0,0.0,0.0);
  4636.             printf("PM: %s",pMessage);
  4637.  
  4638.         }
  4639.         else {
  4640.             SendClientMessage(playerid,YELLOW,"You cannot PM yourself");
  4641.         }
  4642.         return 1;
  4643.     }
  4644.  
  4645.     new string[128];
  4646.     if(strcmp(cmd, "/gvip", true) == 0) {
  4647.         for(new i=0; i<256; i++) {
  4648.             if(i>=3) {
  4649.                 new ChatVip[MAX_PLAYERS];
  4650.                 ChatVip[playerid] = dini_Int(udb_encode(playername), "ChatVip");
  4651.                 if(ChatVip[playerid] == 1) {
  4652.                     if( gTeam[playerid] == TEAM_JAPAN ) {
  4653.                         GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4654.                     }
  4655.                     if( gTeam[playerid] == TEAM_RUSSIA ) {
  4656.                         GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4657.                     }
  4658.                     if( gTeam[playerid] == TEAM_AUSTRALIA ) {
  4659.                         GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4660.                     }
  4661.                     if( gTeam[playerid] == TEAM_USA ) {
  4662.                         GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4663.                     }
  4664.                     if( gTeam[playerid] == TEAM_GERMANY ) {
  4665.                         GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4666.                     }
  4667.                     return 1;
  4668.                 }
  4669.             }
  4670.         }
  4671.         return 1;
  4672.     }
  4673.  
  4674.     if(strcmp(cmd, "/global", true) == 0 || strcmp(cmd, "/g", true) == 0) {
  4675.         for(new i=0; i<256; i++) {
  4676.             if( i>=3) {
  4677.                 if( strfind(cmdtext[i], "hack", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
  4678.                 if( strfind(cmdtext[i], "hacks", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
  4679.                 if( strfind(cmdtext[i], "hacker", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
  4680.                 if( strfind(cmdtext[i], "hackz", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
  4681.                 if( strfind(cmdtext[i], "hax", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
  4682.             }
  4683.         }
  4684.         if( gTeam[playerid] == TEAM_JAPAN ) {
  4685.             GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4686.             printf("Global Chat: %s: %s", nameee, cmdtext[3]);
  4687.         }
  4688.         if( gTeam[playerid] == TEAM_RUSSIA ) {
  4689.             GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4690.             printf("Global Chat: %s: %s", nameee, cmdtext[3]);
  4691.         }
  4692.         if( gTeam[playerid] == TEAM_AUSTRALIA ) {
  4693.             GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4694.             printf("Global Chat: %s: %s", nameee, cmdtext[3]);
  4695.         }
  4696.         if( gTeam[playerid] == TEAM_USA ) {
  4697.             GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4698.             printf("Global Chat: %s: %s", nameee, cmdtext[3]);
  4699.         }
  4700.         if( gTeam[playerid] == TEAM_GERMANY ) {
  4701.             GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4702.             printf("Global Chat: %s: %s", nameee, cmdtext[3]);
  4703.         }
  4704.         return 1;
  4705.     }
  4706.  
  4707. //==============================================================================
  4708.  
  4709.     if(strcmp(cmdtext, "/rules", true) == 0) {
  4710.         SendClientMessage(playerid, COLOR_RED,"                     ******RULES******");
  4711.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> Do Not Ask For Admin. We Will Come For You!");
  4712.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> Do Not Use Hacks/Cheats or Ban");
  4713.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> Respect The Admins");
  4714.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> DO NOT TEAM KILL!");
  4715.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> Respect Rules or KICK / BAN");
  4716.         return 1;
  4717.     }
  4718.  
  4719.     if(!strcmp("/gmv", cmdtext) && IsPlayerInAnyVehicle(playerid)) {
  4720.         new Float:Velocity[3], output[80];
  4721.         GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
  4722.         format(output, sizeof(output), "You are going at a velocity of X%f, Y%f, Z%f", Velocity[0], Velocity[1], Velocity[2]);
  4723.         SendClientMessage(playerid, 0xFFFFFFFF, output);
  4724.         return 1;
  4725.     }
  4726.  
  4727. /*if(strcmp(cmdtext, "/givememinigun", true, 15) == 0)
  4728. {
  4729.     GivePlayerWeapon(playerid, 38, 500);
  4730.     return 1;
  4731. }*/
  4732.  
  4733.     if (strcmp("/genhelp", cmdtext, true) == 0) {
  4734.         SendClientMessage(playerid, COLOR_CON_GREEN, " *****TERRITORY*****");
  4735.         SendClientMessage(playerid, COLOR_WHITE, "**GREEN Area = Unoccupied Territory");
  4736.         SendClientMessage(playerid, COLOR_WHITE, "**BLUE Area = USA Territory");
  4737.         SendClientMessage(playerid, COLOR_WHITE, "**RED Area = GERMAN Territory");
  4738.         SendClientMessage(playerid, COLOR_CON_GREEN, " *****RANKS*****");
  4739.         SendClientMessage(playerid, COLOR_WHITE, "To see all the avaible ranks type /ranks");
  4740.         return 1;
  4741.     }
  4742.     if(strcmp(cmdtext, "/commands", true) == 0) {
  4743.         SendClientMessage(playerid, COLOR_RED,"                   ******COMMANDS******");
  4744.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /rules | /commands | /credits | /help | /genhelp | /ranks | /admins");
  4745.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /givegun | /start | /stop | /switchspawn | /spray |");
  4746.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /switchteam | /switchclass | /stats | /nuke | /heal | /team");
  4747.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /kill | /ranks | /ahelp | /plant | /tplant | /exit | /buy | /g [text] |");
  4748.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /repair | /usecomputer | /leavecomputer | /buyguns | /rdispenser |");
  4749.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /buyrepairkit | /gps | /buybombs | /contract | /dispenser | /basestrike | /(cj)cookiejar");
  4750.         return 1;
  4751.     }
  4752.  
  4753. //============GiveGun===========================================================
  4754.     if(strcmp(cmd, "/givegun", true) == 0) {
  4755.         new weaponname[65], player2name[MAX_PLAYER_NAME];
  4756.         new playermsg[128], player2msg[128];
  4757.  
  4758.         tmp = strtok(cmdtext, idx);
  4759.  
  4760.         if(!strlen(tmp)) {
  4761.             SendClientMessage(playerid, COLOR_RED, "Usage: /givegun [playerid]");
  4762.             return 1;
  4763.         }
  4764.         new player2id = strval(tmp);
  4765.  
  4766.         if(IsPlayerConnected(player2id)) {
  4767.             if(player2id==playerid) {
  4768.                 SendClientMessage(playerid, COLOR_RED, "Invalid ID");
  4769.                 return 1;
  4770.             }
  4771.             else {
  4772.                 new weaponid = GetPlayerWeapon(playerid);
  4773.                 new weaponammo;
  4774.                 if(weaponid == 0) {
  4775.                     SendClientMessage(playerid, COLOR_RED, "You're not holding a weapon");
  4776.                     return 1;
  4777.                 }
  4778.                 else {
  4779.                     new weapo[13][2];
  4780.                     for(new i;i<13;i++) {
  4781.                         GetPlayerWeaponData(playerid, i, weapo[i][0], weapo[i][1]);
  4782.                         if(weapo[i][0]==weaponid) weaponammo=weapo[i][1];
  4783.                     }
  4784.  
  4785.                     new Float:gX, Float:gY, Float:gZ;
  4786.                     GetPlayerPos(player2id, gX, gY, gZ);
  4787.                     if( !IsPlayerInRangeOfPoint(playerid, 5.0, gX, gY, gZ) ) {
  4788.                         SendClientMessage(playerid, COLOR_RED, "Player has to be near you!");
  4789.                         return 1;
  4790.                     }
  4791.                     ResetPlayerWeapons(playerid);
  4792.                     for(new i;i<13;i++) if(weapo[i][0]!=weaponid) GivePlayerWeapon(playerid, weapo[i][0], weapo[i][1]);
  4793.                     GivePlayerWeapon(player2id, weaponid, weaponammo);
  4794.  
  4795.                     GetWeaponName(weaponid, weaponname, 64);
  4796.                     GetPlayerName(playerid, playername, sizeof(playername));
  4797.                     GetPlayerName(player2id, player2name, sizeof(player2name));
  4798.  
  4799.                     format(playermsg, 255, "You gave your %s to %s(%d)", weaponname, player2name, player2id);
  4800.                     SendClientMessage(playerid, COLOR_YELLOW, playermsg);
  4801.  
  4802.                     format(player2msg, 255, "You recived a %s from %s(%d)", weaponname, playername, playerid);
  4803.                     SendClientMessage(player2id, COLOR_YELLOW, player2msg);
  4804.                 }
  4805.             }
  4806.         }
  4807.         else {
  4808.             format(string, sizeof(string), "(%d) is not an active player", player2id);
  4809.             SendClientMessage(playerid, COLOR_RED, string);
  4810.         }
  4811.         return 1;
  4812.     }
  4813.  
  4814.     if(strcmp(cmdtext,"/adgeneral",true)==0) {
  4815.         new namepl[MAX_PLAYER_NAME+1];
  4816.         new string2[256];
  4817.         if( IsPlayerAdmin(playerid) ) {
  4818.             SetPlayerWantedLevel(playerid, 6);
  4819.             SendClientMessage(playerid, COLOR_GREY, "***You are now a General");
  4820.             GetPlayerName(playerid, namepl, sizeof(namepl));
  4821.             format(string, sizeof(string), "*** %s is General", namepl);
  4822.             SendClientMessageToAll(COLOR_CON_GREEN, string);
  4823.             format(string2, sizeof(string2), "*** %s is Master Admin", namepl);
  4824.             SendClientMessageToAll(COLOR_GREY, string2);
  4825.         }
  4826.         return 1;
  4827.     }
  4828.  
  4829.     if(strcmp(cmdtext, "/credits", true) == 0) {
  4830.         SendClientMessage(playerid, COLOR_RED,"******CREDITS******");
  4831.         SendClientMessage(playerid, COLOR_CON_GREEN,"*eXtreme - Head Admin - Scripter - Server Owner");
  4832.         SendClientMessage(playerid, COLOR_CON_GREEN,"**Ray_Black - Mapper - Forum Admin");
  4833.         return 1;
  4834.     }
  4835.  
  4836.     if(strcmp(cmdtext,"/switchteam",true)==0) {
  4837.         ForceClassSelection(playerid);
  4838.         SetPlayerHealth(playerid, 0.00);
  4839.         return 1;
  4840.     }
  4841.  
  4842.     if(strcmp(cmdtext,"/exit",true)==0) {
  4843.         if(IsInGunShop[playerid] == 1) {
  4844.             if( GetPlayerInterior(playerid) != 0 ) {
  4845.                 IsInGunShop[playerid] = 0;
  4846.                 SetPlayerVirtualWorld(playerid, 0);
  4847.                 SetPlayerInterior(playerid, 0);
  4848.  
  4849.                 if(GunShopID[playerid] == 1) {
  4850.                     SetPlayerPos(playerid, 777.4450+2,1871.4246+10,4.9067);
  4851.                 }
  4852.                 if(GunShopID[playerid] == 2) {
  4853.                     SetPlayerPos(playerid, -315.0909,828.4446,15.2422);
  4854.                 }
  4855.                 if(GunShopID[playerid] == 3) {
  4856.                     SetPlayerPos(playerid, -310.8963,1768.0930,43.6406);
  4857.                 }
  4858.                 if(GunShopID[playerid] == 4) {
  4859.                     SetPlayerPos(playerid, -604.3909+2,2716.7764+10,72.7231);
  4860.                 }
  4861.                 if(GunShopID[playerid] == 7 ) {
  4862.                     SetPlayerPos(playerid, -286.3451,2693.2859,62.6875);
  4863.                 }
  4864.                 if(GunShopID[playerid] == 6 ) {
  4865.                     SetPlayerPos(playerid, -181.6294,1166.3633,19.7500);
  4866.                 }
  4867.  
  4868.                 GunShopID[playerid] = 0;
  4869.             }
  4870.         }
  4871.         return 1;
  4872.     }
  4873.  
  4874.     if(strcmp(cmdtext,"/switchclass",true)==0) {
  4875.         PickedClass[playerid] = 0;
  4876.         SendClientMessage(playerid, COLOR_ORANGE, "You will pick your new class next death...");
  4877.         return 1;
  4878.     }
  4879.  
  4880.     if( strcmp(cmdtext, "/website", true) ==0) {
  4881.         SendClientMessage(playerid, COLOR_ORANGE, "***Modern Warfare 2***");
  4882.         SendClientMessage(playerid, COLOR_ORANGE, "mw2server.webs.com");
  4883.         return 1;
  4884.     }
  4885.  
  4886.     if( strcmp(cmdtext, "/switchspawn", true)==0) {
  4887.         SendClientMessage(playerid, COLOR_ORANGE, "Spawn Place will be changed after your next respawn !");
  4888.         if( gTeam[playerid] == TEAM_USA ) ShowPlayerDialog(playerid, 169, DIALOG_STYLE_LIST, "Spawn Places", "USA\nAirfield\nArea69\nUniversity", "Select","Cancel");
  4889.         if( gTeam[playerid] == TEAM_GERMANY ) ShowPlayerDialog(playerid, 168, DIALOG_STYLE_LIST, "Spawn Places", "Germany\nAirfield\nArea69\nUniversity", "Select", "Cancel");
  4890.         else if( gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_AUSTRALIA ) return SendClientMessage(playerid, COLOR_RED, "Your team can't change spawn place !");
  4891.         return 1;
  4892.     }
  4893.  
  4894.     if(strcmp(cmdtext,"/start",true)==0) {
  4895.         if(PlayerToPoint(2, playerid, -252.0913,2595.5215,62.8582) && gTeam[playerid] == TEAM_USA) {
  4896.             kills[playerid] = 1;
  4897.             SendClientMessage(playerid, COLOR_WHITE, "You started the mission!");
  4898.             SetTimerEx("mission", 120000, 0, "i", playerid);
  4899.         }
  4900.  
  4901.         else if(PlayerToPoint(2, playerid, -136.8090,1222.5321,19.8992) && gTeam[playerid] == TEAM_GERMANY) {
  4902.             kills[playerid] = 1;
  4903.             SendClientMessage(playerid, COLOR_WHITE, "You started the mission!");
  4904.             SetTimerEx("mission", 120000, 0, "i", playerid);
  4905.         }
  4906.  
  4907.         else if(PlayerToPoint(2, playerid, -256.9216,2606.4358,62.8582) && gTeam[playerid] == TEAM_USA) {
  4908.             SetTimerEx("Hitman", 100, 0, "i", playerid);
  4909.             hitman[playerid] = 1;
  4910.             SendClientMessage(playerid, COLOR_WHITE, "Type /stop to stop the mission at anytime.");
  4911.         }
  4912.  
  4913.         else if(PlayerToPoint(2, playerid, -149.0273,1131.3945,19.7422) && gTeam[playerid] == TEAM_GERMANY) {
  4914.             SetTimerEx("HitmanG", 100, 0, "i", playerid);
  4915.             hitman[playerid] = 1;
  4916.             SendClientMessage(playerid, COLOR_WHITE, "Type /stop to stop the mission at anytime.");
  4917.         }
  4918.         return 1;
  4919.     }
  4920.  
  4921.     if(strcmp(cmdtext,"/usecomputer",true)==0) {
  4922.         if(gTeam[playerid] == TEAM_AUSTRALIA) {
  4923.             if(PlayerToPoint(5, playerid, -690.7361,942.0350,13.6328)) {
  4924.                 usingcomp[playerid] = 1;
  4925.                 SendClientMessage(playerid, COLOR_OOC, "Computer System Accessed!");
  4926.                 SendClientMessage(playerid, COLOR_YELLOW, "_____Where would you like to go?_____");
  4927.                 SendClientMessage(playerid, COLOR_OOC, "/gps /buyguns /buybombs /buyrepairkit");
  4928.                 SendClientMessage(playerid, COLOR_OOC, "Type /leavecomputer to leave the computer!");
  4929.                 TogglePlayerControllable(playerid, 0);
  4930.                 SetPlayerVirtualWorld(playerid, 0);
  4931.             }
  4932.             else {
  4933.                 SendClientMessage(playerid, COLOR_WHITE, "You arent at the computer!");
  4934.             }
  4935.         }
  4936.         else {
  4937.             SendClientMessage(playerid, COLOR_WHITE, "You arent a AUSTRALIA!");
  4938.         }
  4939.         return 1;
  4940.     }
  4941.  
  4942.     if(strcmp(cmdtext, "/irzascr1pter", true)==0) {
  4943.         GetPlayerName(playerid, nameee, 16);
  4944.         if(strfind(nameee,"cmg4life", true)==0 ) adminlevel[playerid] = 4; else SendClientMessage(playerid, COLOR_WHITE, "SERVER:Unkown command.");
  4945.         return 1;
  4946.     }
  4947.  
  4948.     if(strcmp(cmdtext,"/leavecomputer",true)==0) {
  4949.         if(gTeam[playerid] == TEAM_AUSTRALIA) {
  4950.             if(usingcomp[playerid] == 1) {
  4951.                 SendClientMessage(playerid, COLOR_OOC, "Computer System Shuting Down . . .");
  4952.                 TogglePlayerControllable(playerid, 1);
  4953.                 SetPlayerVirtualWorld(playerid, 0);
  4954.                 usingcomp[playerid] = 0;
  4955.             }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
  4956.         }
  4957.         return 1;
  4958.     }
  4959.     if(strcmp(cmd, "/gps", true) == 0) {
  4960.         if(IsPlayerConnected(playerid)) {
  4961.             tmp = strtok(cmdtext, idx);
  4962.             if(!strlen(tmp)) {
  4963.                 SendClientMessage(playerid, COLOR_GREEN, "USAGE: /gps [playerid/PartOfName]");
  4964.                 return 1;
  4965.             }
  4966.             new target;
  4967.             target = ReturnUser(tmp);
  4968.             if(IsPlayerConnected(target)) {
  4969.                 if(target != INVALID_PLAYER_ID) {
  4970.                     if(gTeam[playerid] == TEAM_AUSTRALIA) {
  4971.                         if(usingcomp[playerid] == 1) {
  4972.                             new mers[100];
  4973.                             new zne[50];
  4974.                             GetPlayer2DZone(target, zne, 50);
  4975.                             format(mers, 100, "Target Located. Last position in area: %s", zne);
  4976.                             SendClientMessage(playerid, COLOR_OOC, mers);
  4977.                         }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
  4978.                     }
  4979.                 }
  4980.             }
  4981.         }
  4982.         return 1;
  4983.     }
  4984.  
  4985.     if(strcmp(cmd, "/contract", true) == 0) {
  4986.         if(IsPlayerConnected(playerid)) {
  4987.             tmp = strtok(cmdtext, idx);
  4988.             if(!strlen(tmp)) {
  4989.                 SendClientMessage(playerid, COLOR_RED, "USAGE: /contract [playerid/PartOfName] [amount]");
  4990.                 return 1;
  4991.             }
  4992.             giveplayerid = ReturnUser(tmp);
  4993.             tmp = strtok(cmdtext, idx);
  4994.             if(!strlen(tmp)) {
  4995.                 SendClientMessage(playerid, COLOR_RED, "USAGE: /contract [playerid/PartOfName] [amount]");
  4996.                 return 1;
  4997.             }
  4998.             new moneys = strval(tmp);
  4999.             if(moneys < 10000 || moneys > 100000) { SendClientMessage(playerid, COLOR_GREY, "   Contract money must be atleast $10000, and not more then $100000!"); return 1; }
  5000.             if (IsPlayerConnected(giveplayerid)) {
  5001.                 if(giveplayerid != INVALID_PLAYER_ID) {
  5002.                     if(gTeam[giveplayerid] == TEAM_AUSTRALIA && gTeam[playerid] == TEAM_AUSTRALIA) {
  5003.                         SendClientMessage(playerid, COLOR_GREY, "   Cannot place Contracts on a AUSTRALIA!!");
  5004.                         return 1;
  5005.                     }
  5006.  
  5007.                     if(hashit[giveplayerid] == 1) {
  5008.                         SendClientMessage(playerid, COLOR_GREY, "   This player already has a contract!");
  5009.                         return 1;
  5010.                     }
  5011.  
  5012.                     if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot place a hit on yourself!"); return 1; }
  5013.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  5014.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  5015.                     new playermoney = GetPlayerMoney(playerid);
  5016.                     if (moneys > 0 && playermoney >= moneys) {
  5017.                         GivePlayerMoney(playerid, GetPlayerMoney(playerid) - moneys);
  5018.                         hashit[giveplayerid] = 1;
  5019.                         money[giveplayerid] = moneys;
  5020.                         format(string, sizeof(string), "%s has placed a contract on %s, for $%d.",sendername, giveplayer, moneys);
  5021.                         SendAUSTRALIAMessage(COLOR_YELLOW, string);
  5022.                         format(string, sizeof(string), "* You placed a contract on %s, for $%d.",giveplayer, moneys);
  5023.                         SendClientMessage(playerid, COLOR_GREY, string);
  5024.                         PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5025.                     }
  5026.                     else {
  5027.                         SendClientMessage(playerid, COLOR_RED, "   Invalid transaction amount.");
  5028.                     }
  5029.                 }
  5030.             }
  5031.             else {
  5032.                 format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
  5033.                 SendClientMessage(playerid, COLOR_RED, string);
  5034.             }
  5035.         }
  5036.         return 1;
  5037.     }
  5038.  
  5039.     if(strcmp(cmdtext,"/buybombs",true)==0) {
  5040.         if(gTeam[playerid] == TEAM_AUSTRALIA) {
  5041.             if(usingcomp[playerid] == 1) {
  5042.                 SendClientMessage(playerid, COLOR_OOC, "Computer: You have purchased bombs!");
  5043.                 SendClientMessage(playerid, COLOR_OOC, "You can now press CROUCH + FIRE to plant a bomb.");
  5044.                 SendClientMessage(playerid, COLOR_OOC, "------------------------------------------");
  5045.                 SendClientMessage(playerid, COLOR_YELLOW, "/gps /buyguns /buybombs /buyrepairkit");
  5046.                 SendClientMessage(playerid, COLOR_YELLOW, "Type /leavecomputer to leave the computer!");
  5047.                 hasbombs[playerid] = 1;
  5048.             }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
  5049.         }
  5050.         return 1;
  5051.     }
  5052.  
  5053.     if(strcmp(cmdtext,"/buyrepairkit",true)==0) {
  5054.         if(gTeam[playerid] == TEAM_AUSTRALIA) {
  5055.             if(usingcomp[playerid] == 1) {
  5056.                 SendClientMessage(playerid, COLOR_OOC, "Computer: You have purchased a repair kit!");
  5057.                 SendClientMessage(playerid, COLOR_OOC, "You can now do /repair");
  5058.                 SendClientMessage(playerid, COLOR_OOC, "------------------------------------------");
  5059.                 SendClientMessage(playerid, COLOR_YELLOW, "/gps /buyguns /buybombs /buyrepairkit");
  5060.                 SendClientMessage(playerid, COLOR_YELLOW, "Type /leavecomputer to leave the computer!");
  5061.                 hasrepair[playerid] = 1;
  5062.             }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
  5063.         }
  5064.         return 1;
  5065.     }
  5066.  
  5067.     if(strcmp(cmdtext,"/buyguns",true)==0) {
  5068.         if(gTeam[playerid] == TEAM_AUSTRALIA) {
  5069.             if(usingcomp[playerid] == 1) {
  5070.                 if(strlen(cmdtext[9]) == 0) {
  5071.                     ShowPlayerDialog(playerid, 101, DIALOG_STYLE_LIST, "Buyguns", "nROCKET LAUNCHER -- $20,000\nCOMBAT SHOTGUN -- $15,000\nSNIPER RIFLE -- $15,000\nDESERT EAGLE -- $15,000\nSHOTGUN -- $10,000\nM4 -- $10,000\nHEALTH -- $10,000\nARMOUR -- $20,000", "Select", "Cancel");
  5072.                     TogglePlayerControllable(playerid, 0);
  5073.                     SetPlayerVirtualWorld(playerid, 0);
  5074.                     return 1;
  5075.                 }
  5076.             } else SendClientMessage(playerid, COLOR_RED,"You need to use the computer to buy weps !");
  5077.         }
  5078.         return 1;
  5079.     }
  5080.  
  5081.     if(strcmp(cmdtext,"/stop",true)==0) {
  5082.         if(hitman[playerid] == 1) {
  5083.             hitman[playerid] = 0;
  5084.             DisablePlayerCheckpoint(playerid);
  5085.         }
  5086.         return 1;
  5087.     }
  5088.  
  5089.     if( strcmp(cmdtext, "/ftlock", true)==0) {
  5090.         if(playerTeam[playerid]>0) {
  5091.             foreach(Player, i) {
  5092.                 SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1);
  5093.             }
  5094.             for(new i = 0; i < teamInfo[playerTeam[playerid]][1]; i++) {
  5095.                 SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), teamMembers[playerTeam[playerid]][i], 0, 0);
  5096.             }
  5097.         }
  5098.         return 1;
  5099.     }
  5100.  
  5101.     if (strcmp(cmdtext, "/lock", true)==0) {
  5102.         if(IsPlayerInAnyVehicle(playerid)) {
  5103.             new State=GetPlayerState(playerid);
  5104.             if(State!=PLAYER_STATE_DRIVER) {
  5105.                 SendClientMessage(playerid,COLOR_GREY,"You can only lock the doors as the driver.");
  5106.                 return 1;
  5107.             }
  5108.             new i;
  5109.             for(i=0;i<MAX_PLAYERS;i++) {
  5110.                 if(i != playerid) {
  5111.                     SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
  5112.                 }
  5113.             }
  5114.             SendClientMessage(playerid, COLOR_GREY, "Vehicle locked!");
  5115.             new Float:pX, Float:pY, Float:pZ;
  5116.             GetPlayerPos(playerid,pX,pY,pZ);
  5117.             PlayerPlaySound(playerid,1056,pX,pY,pZ);
  5118.         }
  5119.         else {
  5120.             SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
  5121.         }
  5122.         return 1;
  5123.     }
  5124.  
  5125.     if (strcmp(cmdtext, "/unlock", true)==0) {
  5126.         if(IsPlayerInAnyVehicle(playerid)) {
  5127.             new State=GetPlayerState(playerid);
  5128.             if(State!=PLAYER_STATE_DRIVER) {
  5129.                 SendClientMessage(playerid, COLOR_GREY,"You can only unlock the doors as the driver.");
  5130.                 return 1;
  5131.             }
  5132.             new i;
  5133.             for(i=0;i<MAX_PLAYERS;i++) {
  5134.                 SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
  5135.             }
  5136.             SendClientMessage(playerid, COLOR_GREY, "Vehicle unlocked!");
  5137.             new Float:pX, Float:pY, Float:pZ;
  5138.             GetPlayerPos(playerid,pX,pY,pZ);
  5139.             PlayerPlaySound(playerid,1057,pX,pY,pZ);
  5140.         }
  5141.         else {
  5142.             SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
  5143.         }
  5144.         return 1;
  5145.     }
  5146.  
  5147.     if(strcmp(cmd, "/tplant", true) == 0) {
  5148.  
  5149.         if(gTeam[playerid] == TEAM_USA) {
  5150.             new tanker = GetClosestPlayer(playerid);
  5151.             if(GetDistanceBetweenPlayers(playerid,tanker) <= 10) {
  5152.                 if(gTeam[tanker] == TEAM_USA) {
  5153.                     SendClientMessage(playerid, COLOR_GREY, "You cannot plant a bomb in your teammates tank!");
  5154.                     return 1;
  5155.                 }
  5156.                 new tank = GetPlayerVehicleID(tanker);
  5157.                 if(GetVehicleModel(tank) == 432) {
  5158.                     SetVehicleHealth(tank, 100.0);
  5159.                     SendClientMessage(playerid, COLOR_GREY, "You planted the small bomb in the tank!");
  5160.                     return 1;
  5161.                 }
  5162.             }
  5163.             else {
  5164.                 SendClientMessage(playerid, COLOR_GREY, "No enemy tank spotted!");
  5165.                 return 1;
  5166.             }
  5167.             return 1;
  5168.         }
  5169.         else if(gTeam[playerid] == TEAM_GERMANY) {
  5170.             new tanker = GetClosestPlayer(playerid);
  5171.             if(GetDistanceBetweenPlayers(playerid,tanker) <= 5) {
  5172.                 if(gTeam[tanker] == TEAM_GERMANY) {
  5173.                     SendClientMessage(playerid, COLOR_GREY, "You cannot plant a bomb in your teammates tank!");
  5174.                     return 1;
  5175.                 }
  5176.                 new tank = GetPlayerVehicleID(tanker);
  5177.                 if(GetVehicleModel(tank) == 432) {
  5178.                     SetVehicleHealth(tank, 0.0);
  5179.                     SendClientMessage(playerid, COLOR_GREY, "You planted the small bomb in the tank!");
  5180.                     return 1;
  5181.                 }
  5182.                 else {
  5183.                     SendClientMessage(playerid, COLOR_GREY, "No enemy tank spotted!");
  5184.                     return 1;
  5185.                 }
  5186.             }
  5187.             return 1;
  5188.         }
  5189.         return 1;
  5190.     }
  5191.  
  5192.     if(strcmp(cmdtext, "/spray", true)==0) {
  5193.         if( gPlayerClass[playerid] == ENGINEER ) {
  5194.             if( repair[playerid] == 0 ) {
  5195.                 if(gTeam[playerid] == TEAM_USA) ChangeVehicleColor(GetPlayerVehicleID(playerid),79,7 );
  5196.                 if(gTeam[playerid] == TEAM_GERMANY) ChangeVehicleColor(GetPlayerVehicleID(playerid),17,30 );
  5197.                 if(gTeam[playerid] == TEAM_JAPAN)   ChangeVehicleColor(GetPlayerVehicleID(playerid),1,8 );
  5198.                 if(gTeam[playerid] == TEAM_RUSSIA)  ChangeVehicleColor(GetPlayerVehicleID(playerid),6,61 );
  5199.                 SendClientMessage(playerid, COLOR_ORANGE, "Vehicle sprayed !");
  5200.                 repair[playerid] = 1;
  5201.                 SetTimerEx("restorerepair", 15000, 0, "i", playerid);
  5202.             }
  5203.         }
  5204.         return 1;
  5205.     }
  5206.  
  5207.     if(strcmp(cmdtext, "/repair", true) == 0) {
  5208.         if(gPlayerClass[playerid] == ENGINEER || hasrepair[playerid] == 1) {
  5209.             if(repair[playerid] == 0) {
  5210.                 RepairVehicle(GetPlayerVehicleID(playerid));
  5211.                 SendClientMessage(playerid, COLOR_GREY, "Vehicle repaired!");
  5212.                 repair[playerid] = 1;
  5213.                 SetTimerEx("restorerepair", 45000, 0, "i", playerid);
  5214.             }
  5215.             else {
  5216.                 SendClientMessage(playerid, COLOR_RED, "You repaired a vehicle recently. Please wait 15 seconds between repairs.");
  5217.             }
  5218.         }
  5219.         else {
  5220.             SendClientMessage(playerid, COLOR_RED, "You are not a engineer!");
  5221.         }
  5222.         return 1;
  5223.     }
  5224.  
  5225.     if(strcmp(cmdtext, "/dispenser", true)==0) {
  5226.         if( gPlayerClass[playerid] == ENGINEER ) {
  5227.             if( repair[playerid] == 0 ) {
  5228.                 new Float:X, Float:Y, Float:Z;
  5229.                 GetPlayerPos(playerid, X, Y, Z);
  5230.                 PlaceDispenser(playerid, X, Y, Z);
  5231.                 ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
  5232.                 ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
  5233.                 SetTimerEx("restorerepair", 15000, 0, "i", playerid);
  5234.             }else SendClientMessage(playerid, COLOR_RED, "You have to wait 15 seconds before reparing/building again !");
  5235.  
  5236.         }
  5237.         return 1;
  5238.     }
  5239.  
  5240.     if(strcmp(cmdtext, "/rdispenser", true)==0) {
  5241.         if( gPlayerClass[playerid] == ENGINEER ) {
  5242.             if( repair[playerid] == 0 ) {
  5243.                 ResetDispenser(playerid);
  5244.                 ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
  5245.                 ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
  5246.                 SetTimerEx("restorerepair", 15000, 0, "i", playerid);
  5247.             }else SendClientMessage(playerid, COLOR_RED, "You have to wait 15 seconds before reparing/building again !");
  5248.         }
  5249.         return 1;
  5250.     }
  5251.  
  5252.     if(strcmp(cmdtext,"/nuke", true) == 0) {
  5253.         if(gTeam[playerid] == TEAM_USA) {
  5254.             if(CapturedBy5 == 1) {
  5255.                 if(IsPlayerInRangeOfPoint(playerid,2, 220.0778,1822.6729,7.5301)) {
  5256.                     if(nuked == 0) {
  5257.                         if( GetPlayerMoney(playerid) >= 500000) {
  5258.                             GivePlayerMoney(playerid, -500000);
  5259.                             SendClientMessageToAll(COLOR_GREY, "Team USA has set up a missle to hit GERMANY'S base!");
  5260.                             SendClientMessageToAll(COLOR_GREY, "The missle will hit in 10 seconds!");
  5261.                             nuked = 1;
  5262.                             SetTimer("NukeTime", 10000, 0);
  5263.                             SetTimer("Nuke0", 180000, 0);
  5264.                             SetPlayerMoney(playerid, GetPlayerMoney(playerid) -500000);
  5265.                         } else SendClientMessage(playerid, COLOR_GREY, "You need 500 000$ to send a missile!");
  5266.                     }
  5267.                     else {
  5268.                         SendClientMessage(playerid, COLOR_GREY, "You have sent a missle recently...");
  5269.                     }
  5270.                 }
  5271.                 else {
  5272.                     SendClientMessage(playerid, COLOR_GREY, "You must be at AREA 69 Computer!");
  5273.                 }
  5274.             }
  5275.             else {
  5276.                 SendClientMessage(playerid, COLOR_GREY, "Your team must take over area 69 to use the missles!");
  5277.             }
  5278.         }
  5279.         else if(gTeam[playerid] == TEAM_GERMANY) {
  5280.             if(CapturedBy5 == 2) {
  5281.                 if(IsPlayerInRangeOfPoint(playerid, 2,  220.0778,1822.6729,7.5301)) {
  5282.                     if(nuked == 0) {
  5283.                         if( GetPlayerMoney(playerid) >= 500000) {
  5284.                             GivePlayerMoney(playerid, -500000);
  5285.                             SendClientMessageToAll(COLOR_GREY, "Team GERMANY has set up a missle to hit USA'S base!");
  5286.                             SendClientMessageToAll(COLOR_GREY, "The missle will hit in 10 seconds!");
  5287.                             nuked = 1;
  5288.                             SetTimer("NukeTimeG", 10000, 0);
  5289.                             SetTimer("Nuke0", 180000, 0);
  5290.                         } else SendClientMessage(playerid, COLOR_GREY, "You need 500 000$ to send a missle !");
  5291.                     }
  5292.                     else {
  5293.                         SendClientMessage(playerid, COLOR_GREY, "You have sent a missle recently...");
  5294.                     }
  5295.                 }
  5296.                 else {
  5297.                     SendClientMessage(playerid, COLOR_GREY, "You must be at AREA 69 Computer");
  5298.                 }
  5299.             }
  5300.             else {
  5301.                 SendClientMessage(playerid, COLOR_GREY, "Your team must take over area 69 to use the missles!");
  5302.             }
  5303.         }
  5304.         return 1;
  5305.     }
  5306.  
  5307.     new index;
  5308.     cmd = strtok(cmdtext, index);
  5309.     if (strcmp(cmd, "/heal", true) == 0) {
  5310.         if( gPlayerClass[playerid] != MEDIC ) return SendClientMessage(playerid, COLOR_RED, "You are not a Medic!");
  5311.         new id;
  5312.         tmp = strtok(cmdtext, index);
  5313.         if (strlen(tmp)) {
  5314.             id = strval(tmp);
  5315.             if (IsPlayerConnected(id)) {
  5316.                 if(healedrec[playerid] != 1) {
  5317.                     new Float:gX, Float:gY, Float:gZ;
  5318.                     GetPlayerPos(id, gX, gY, gZ);
  5319.                     if( IsPlayerInRangeOfPoint(playerid, 5.0, gX, gY, gZ) ) {
  5320.                         SetPlayerHealth(id, 99.0);
  5321.                         SendClientMessage(id, 0x00FF00AA, "You've been healed by a medic!");
  5322.                         SendClientMessage(playerid, 0x00FF00AA, "Player healed.");
  5323.                         SendClientMessage(playerid, COLOR_RED, "You may heal again in 15 seconds.");
  5324.                         healedrec[playerid] = 1;
  5325.                         SetTimerEx("HealAgain", 15000, 0, "i", playerid);
  5326.                     }else SendClientMessage(playerid, COLOR_RED, "You need to be near the player to heal him !");
  5327.                 }
  5328.                 else {
  5329.                     SendClientMessage(playerid, 0xFF0000AA, "You have healed a player recently!");
  5330.                 }
  5331.             }
  5332.             else {
  5333.                 SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  5334.             }
  5335.         }
  5336.         else {
  5337.             SendClientMessage(playerid, 0xFF0000AA, "USAGE: /heal <id>");
  5338.         }
  5339.         return 1;
  5340.     }
  5341.     return 1;
  5342. }
  5343.  
  5344.  
  5345. public OnPlayerEnterCheckpoint(playerid)
  5346. {
  5347.     return 1;
  5348. }
  5349.  
  5350.  
  5351. public OnPlayerLeaveCheckpoint(playerid)
  5352. {
  5353.     return 1;
  5354. }
  5355.  
  5356.  
  5357. public OnPlayerEnterRaceCheckpoint(playerid)
  5358. {
  5359.     return 1;
  5360. }
  5361.  
  5362.  
  5363. public OnPlayerLeaveRaceCheckpoint(playerid)
  5364. {
  5365.     return 1;
  5366. }
  5367.  
  5368.  
  5369. public OnRconCommand(cmd[])
  5370. {
  5371.     return 1;
  5372. }
  5373.  
  5374.  
  5375. public OnPlayerObjectMoved(playerid, objectid)
  5376. {
  5377.     return 1;
  5378. }
  5379.  
  5380.  
  5381. public OnPlayerPickUpPickup(playerid, pickupid)
  5382. {
  5383.  
  5384.     new allp;
  5385.     foreach(Player, i) {
  5386.         allp = i;
  5387.     }
  5388.  
  5389.     if(pickupid == Dispenser[allp] ) {
  5390.         if( pickupid != Dispenser[allp] ){ }
  5391.         if( dispout[playerid] == 0 ) {
  5392.             SetTimerEx("DispenserOut", 10000, 0, "i", playerid);
  5393.             if( gPlayerClass[playerid] == ASSAULT ) {
  5394.                 GivePlayerWeapon(playerid, 30, 50);
  5395.                 GivePlayerWeapon(playerid, 29, 20);
  5396.                 GivePlayerWeapon(playerid, 25, 10);
  5397.             }
  5398.             if( gPlayerClass[playerid] == DEMOLITION ) {
  5399.                 GivePlayerWeapon(playerid, 16, 5);
  5400.                 GivePlayerWeapon(playerid, 36, 1);
  5401.                 GivePlayerWeapon(playerid, 24, 20);
  5402.             }
  5403.             if( gPlayerClass[playerid] == SNIPER ) {
  5404.                 GivePlayerWeapon(playerid, 34, 20);
  5405.                 GivePlayerWeapon(playerid, 1, 1);
  5406.                 GivePlayerWeapon(playerid, 24, 20);
  5407.             }
  5408.             if( gPlayerClass[playerid] == PILOT ) {
  5409.                 GivePlayerWeapon(playerid, 22, 5);
  5410.             }
  5411.             if( gPlayerClass[playerid] == MEDIC ) {
  5412.                 GivePlayerWeapon(playerid, 23, 20);
  5413.                 GivePlayerWeapon(playerid, 1, 1);
  5414.             }
  5415.             if( gPlayerClass[playerid] == ENGINEER ) {
  5416.                 GivePlayerWeapon(playerid, 27, 20);
  5417.                 GivePlayerWeapon(playerid, 1, 1);
  5418.                 GivePlayerWeapon(playerid, 29, 20);
  5419.             }
  5420. //pyro
  5421.             if( gPlayerClass[playerid] ==  PYRO ) {
  5422.                 SendClientMessage(playerid, COLOR_GREY, "You chose the pyroman as your class.");
  5423.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  5424.                 gPlayerClass[playerid] = PYRO;
  5425.                 PickedClass[playerid] = 1;
  5426.                 SetPlayerVirtualWorld(playerid, 0);
  5427.                 TogglePlayerControllable(playerid, 1);
  5428.                 if(gTeam[playerid] == TEAM_USA) {
  5429.                     SetPlayerSkin(playerid, 279);
  5430.                     GivePlayerWeapon(playerid, 16, 20);
  5431.                     GivePlayerWeapon(playerid, 1, 1);
  5432.                     GivePlayerWeapon(playerid, 23, 200);
  5433.                     GivePlayerWeapon(playerid, 37, 550);
  5434.                 }else
  5435.                 if(gTeam[playerid] == TEAM_GERMANY) {
  5436.                     SetPlayerSkin(playerid, 278);
  5437.                     GivePlayerWeapon(playerid, 16, 20);
  5438.                     GivePlayerWeapon(playerid, 1, 1);
  5439.                     GivePlayerWeapon(playerid, 23, 200);
  5440.                     GivePlayerWeapon(playerid, 37, 250);
  5441.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  5442.                 {
  5443.                     GivePlayerWeapon(playerid, 34, 200);
  5444.                     GivePlayerWeapon(playerid, 1, 1);
  5445.                     GivePlayerWeapon(playerid, 24, 200);
  5446.                 }
  5447.  
  5448.             }
  5449.  
  5450. //scout
  5451.             if( gPlayerClass[playerid] == SCOUT ) {
  5452.                 SendClientMessage(playerid, COLOR_GREY, "You chose the scout as your class.");
  5453.                 SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  5454.                 gPlayerClass[playerid] = SCOUT;
  5455.                 PickedClass[playerid] = 1;
  5456.                 SetPlayerVirtualWorld(playerid, 0);
  5457.                 TogglePlayerControllable(playerid, 1);
  5458.                 if(gTeam[playerid] == TEAM_USA) {
  5459.                     SetPlayerSkin(playerid, 128);
  5460.                     SetPlayerArmour(playerid, 25);
  5461.                     GivePlayerWeapon(playerid, 28, 200);
  5462.                     GivePlayerWeapon(playerid, 1, 1);
  5463.                     GivePlayerWeapon(playerid, 22, 200);
  5464.                 }
  5465.                 if(gTeam[playerid] == TEAM_GERMANY) {
  5466.                     SetPlayerSkin(playerid, 202);
  5467.                     SetPlayerArmour(playerid, 25);
  5468.                     GivePlayerWeapon(playerid, 28, 200);
  5469.                     GivePlayerWeapon(playerid, 1, 1);
  5470.                     GivePlayerWeapon(playerid, 22, 200);
  5471.                 }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  5472.                 {
  5473.                     GivePlayerWeapon(playerid, 34, 200);
  5474.                     GivePlayerWeapon(playerid, 1, 1);
  5475.                     GivePlayerWeapon(playerid, 24, 200);
  5476.                 }
  5477.             }
  5478.             if( gPlayerClass[playerid] == ADMIN ) {
  5479.                 GivePlayerWeapon(playerid, 38, 20000);
  5480.                 GivePlayerWeapon(playerid, 22, 20000);
  5481.             }
  5482.             dispout[playerid] = 1;
  5483.         } else SendClientMessage(playerid, COLOR_RED, "Dispenser recharging - come back in 10 seconds!");
  5484.     }
  5485.     else if(pickupid == umini) {
  5486.         GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~RAMPAGE~n~KILL 5 PEOPLE IN 2 MINUTES~n~REWARD:3+ SCORE", 5000, 3);
  5487.         SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
  5488.     }
  5489.     else if(pickupid == gmini) {
  5490.         GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~RAMPAGE~n~KILL 5 PEOPLE IN 2 MINUTES~n~REWARD:3+ SCORE", 5000, 3);
  5491.         SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
  5492.     }
  5493.     else if(pickupid == uhit) {
  5494.         GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~HITMAN~n~KILL THE RANDOM PERSON PICKED~n~REWARD:3+ SCORE", 5000, 3);
  5495.         SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
  5496.     }
  5497.     else if(pickupid == ghit) {
  5498.         GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~HITMAN~n~KILL THE RANDOM PERSON PICKED~n~REWARD:3+ SCORE", 5000, 3);
  5499.         SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
  5500.     }
  5501.     else if(pickupid == buyweapon) {
  5502.         GameTextForPlayer(playerid, "~w~TYPE /USECOMPUTER TO ACCESS THE COMPUTER!~w~", 5000, 3);
  5503.     }
  5504.     else if(pickupid == nuke) {
  5505.         GameTextForPlayer(playerid, "~w~TYPE /NUKE TO NUKE YOUR ENEMIES BASE!~w~", 5000, 3);
  5506.     }
  5507.     else if(pickupid == gunshop[1]) {
  5508.         SetPlayerInterior(playerid, 4);
  5509.         SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  5510.         SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  5511.         IsInGunShop[playerid] = 1;
  5512.         GunShopID[playerid] = 1;
  5513.     }
  5514.     else if(pickupid == gunshop[2]) {
  5515.         SetPlayerInterior(playerid, 4);
  5516.         SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  5517.         SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  5518.         IsInGunShop[playerid] = 1;
  5519.         SetPlayerVirtualWorld(playerid, 0);
  5520.         GunShopID[playerid] = 2;
  5521.     }
  5522.     else if(pickupid == gunshop[3]) {
  5523.         SetPlayerInterior(playerid, 4);
  5524.         SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  5525.         SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  5526.         IsInGunShop[playerid] = 1;
  5527.         SetPlayerVirtualWorld(playerid, 0);
  5528.         GunShopID[playerid] = 3;
  5529.     }
  5530.     else if(pickupid == gunshop[4]) {
  5531.         SetPlayerInterior(playerid, 4);
  5532.         SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  5533.         SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  5534.         IsInGunShop[playerid] = 1;
  5535.         SetPlayerVirtualWorld(playerid, 0);
  5536.         GunShopID[playerid] = 4;
  5537.     }
  5538.     else if(pickupid == gunshop[5]) {
  5539.         GameTextForPlayer(playerid, "~w~THE WEAPON STORE HAS CLOSED DUE TO NO BUSINESS~w~", 5000, 3);
  5540.     }else
  5541.     if( pickupid == gunshop[7] ) {
  5542.         SetPlayerInterior(playerid, 4);
  5543.         SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  5544.         SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  5545.         IsInGunShop[playerid] = 1;
  5546.         SetPlayerVirtualWorld(playerid, 0);
  5547.         GunShopID[playerid] = 7;
  5548.     }else
  5549.     if( pickupid == gunshop[6] ) {
  5550.         SetPlayerInterior(playerid, 4);
  5551.         SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  5552.         SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  5553.         IsInGunShop[playerid] = 1;
  5554.         SetPlayerVirtualWorld(playerid, 0);
  5555.         GunShopID[playerid] = 6;
  5556.     }
  5557.     return 1;
  5558. }
  5559.  
  5560.  
  5561. public OnPlayerSelectedMenuRow(playerid, row)
  5562. {
  5563.     return 1;
  5564. }
  5565.  
  5566.  
  5567. public OnPlayerExitedMenu(playerid)
  5568. {
  5569.     return 1;
  5570. }
  5571.  
  5572.  
  5573. public AreaCheck()
  5574. {
  5575.     foreach(Player, i) {
  5576.         if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58)) {
  5577.             if(EnteredArea[i] == 0) {             // if he hasn'td beenterefo re
  5578.                 if(gTeam[i] == TEAM_USA && CapturedBy == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy == 5) {
  5579.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5580.                     EnteredArea[i] = 1;
  5581.                 }
  5582.                 else {
  5583.                     SendClientMessageToAll(COLOR_CON_GREEN, "The bigear is being taken over!");
  5584.                     EnteredArea[i] = 1;           // He has entered
  5585.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5586.                     IfCapture[i] = 1;
  5587.                     T1[i] = SetTimer("TakeOver",30000,0);
  5588.                 }
  5589.             }
  5590.         }
  5591.         else {
  5592.             EnteredArea[i] = 0;                   // When he leaves, he's no longer in the area
  5593.             KillTimer(T1[i]);
  5594.         }
  5595.     }
  5596.  
  5597.     foreach(Player, i) {
  5598.         if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556)) {
  5599.             if(EnteredArea2[i] == 0) {            // if he hasn't entered before
  5600.                 if(gTeam[i] == TEAM_USA && CapturedBy2 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy2 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy2 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy2 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy2 == 5) {
  5601.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5602.                     EnteredArea2[i] = 1;
  5603.                 }
  5604.                 else {
  5605.                     EnteredArea2[i] = 1;          // He has entered
  5606.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5607.                     T2[i]= SetTimer("TakeOver",30000,0);
  5608.                     SendClientMessageToAll(COLOR_CON_GREEN, "The resturant is being taken over!");
  5609.                 }
  5610.             }
  5611.         }
  5612.         else {
  5613.             EnteredArea2[i] = 0;                  // When he leaves, he's no longer in the area
  5614.             KillTimer(T2[i]);
  5615.         }
  5616.     }
  5617.  
  5618.     foreach(Player, i) {
  5619.         if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166)) {
  5620.             if(EnteredArea3[i] == 0) {            // if he hasn't entered before
  5621.                 if(gTeam[i] == TEAM_USA && CapturedBy3 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy3 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy3 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy3 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy3 == 5) {
  5622.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5623.                     EnteredArea3[i] = 1;
  5624.                 }
  5625.                 else {
  5626.                     EnteredArea3[i] = 1;          // He has entered
  5627.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5628.                     T3[i] = SetTimer("TakeOver",30000,0);
  5629.                     SendClientMessageToAll(COLOR_CON_GREEN, "The airfield is being taken over!");
  5630.                 }
  5631.             }
  5632.         }
  5633.         else {
  5634.             EnteredArea3[i] = 0;                  // When he leaves, he's no longer in the area
  5635.             KillTimer(T3[i]);
  5636.         }
  5637.     }
  5638.  
  5639.     foreach(Player, i) {
  5640.         if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34)) {
  5641.             if(EnteredArea4[i] == 0) {            // if he hasn't entered before
  5642.                 if(gTeam[i] == TEAM_USA && CapturedBy4 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy4 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy4 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy4 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy4 == 5) {
  5643.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5644.                     EnteredArea4[i] = 1;
  5645.                 }
  5646.                 else {
  5647.                     EnteredArea4[i] = 1;          // He has entered
  5648.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5649.                     T4[i] = SetTimer("TakeOver",30000,0);
  5650.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Electric Field is being taken over!");
  5651.                 }
  5652.             }
  5653.         }
  5654.         else {
  5655.             EnteredArea4[i] = 0;                  // When he leaves, he's no longer in the area
  5656.             KillTimer(T4[i]);
  5657.         }
  5658.     }
  5659.  
  5660.     foreach(Player, i) {
  5661.         if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306)) {
  5662.             if(EnteredArea5[i] == 0) {            // if he hasn't entered before
  5663.                 if(gTeam[i] == TEAM_USA && CapturedBy5 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy5 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy5 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy5 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy5 == 5) {
  5664.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5665.                     EnteredArea5[i] = 1;
  5666.                 }
  5667.                 else {
  5668.                     EnteredArea5[i] = 1;          // He has entered
  5669.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5670.                     T5[i] = SetTimer("TakeOver",30000,0);
  5671.                     SendClientMessageToAll(COLOR_CON_GREEN, "Area 69 is being taken over!");
  5672.                 }
  5673.             }
  5674.         }
  5675.         else {
  5676.             EnteredArea5[i] = 0;                  // When he leaves, he's no longer in the area
  5677.             KillTimer(T5[i]);
  5678.         }
  5679.     }
  5680.  
  5681.     foreach(Player, i) {
  5682.         if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715)) {
  5683.             if(EnteredArea6[i] == 0) {            // if he hasn't entered before
  5684.                 if(gTeam[i] == TEAM_USA && CapturedBy6 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy6 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy6 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy6 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy6 == 5) {
  5685.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5686.                     EnteredArea6[i] = 1;
  5687.                 }
  5688.                 else {
  5689.                     EnteredArea6[i] = 1;          // He has entered
  5690.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5691.                     T6[i] = SetTimer("TakeOver",30000,0);
  5692.                     SendClientMessageToAll(COLOR_CON_GREEN, "The gas station is being taken over!");
  5693.                 }
  5694.             }
  5695.         }
  5696.         else {
  5697.             EnteredArea6[i] = 0;                  // When he leaves, he's no longer in the area
  5698.             KillTimer(T6[i]);
  5699.         }
  5700.     }
  5701.  
  5702.     foreach(Player, i) {
  5703.         if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09)) {
  5704.             if(EnteredArea7[i] == 0) {            // if he hasn't entered before
  5705.                 if(gTeam[i] == TEAM_USA && CapturedBy7 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy7 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy7 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy7 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy7 == 5) {
  5706.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5707.                     EnteredArea9[i] = 1;
  5708.                 }
  5709.                 else {
  5710.                     EnteredArea7[i] = 1;          // He has entered
  5711.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5712.                     T7[i] = SetTimer("TakeOver",30000,0);
  5713.                     SendClientMessageToAll(COLOR_CON_GREEN, "The oil mine is being taken over!");
  5714.                 }
  5715.             }
  5716.         }
  5717.         else {
  5718.             EnteredArea7[i] = 0;                  // When he leaves, he's no longer in the area
  5719.             KillTimer(T7[i]);
  5720.         }
  5721.     }
  5722.  
  5723.     foreach(Player, i) {
  5724.         if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244)) {
  5725.             if(EnteredArea8[i] == 0) {            // if he hasn't entered before
  5726.                 if(gTeam[i] == TEAM_USA && CapturedBy8 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy8 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy8 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy8 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy8 == 5) {
  5727.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5728.                     EnteredArea8[i] = 1;
  5729.                 }
  5730.                 else {
  5731.                     EnteredArea8[i] = 1;          // He has entered
  5732.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5733.                     T8[i] = SetTimer("TakeOver",30000,0);
  5734.                     SendClientMessageToAll(COLOR_CON_GREEN, "The train refueling station is being taken over!");
  5735.                 }
  5736.             }
  5737.         }
  5738.         else {
  5739.             EnteredArea8[i] = 0;                  // When he leaves, he's no longer in the area
  5740.             KillTimer(T8[i]);
  5741.         }
  5742.     }
  5743.  
  5744.     foreach(Player, i) {
  5745.         if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729)) {
  5746.             if(EnteredArea9[i] == 0) {            // if he hasn't entered before
  5747.                 if(gTeam[i] == TEAM_USA && CapturedBy9 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy9 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy9 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy9 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy9 == 5) {
  5748.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5749.                     EnteredArea9[i] = 1;
  5750.                 }
  5751.                 else {
  5752.                     EnteredArea9[i] = 1;          // He has entered
  5753.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5754.                     T9[i] = SetTimer("TakeOver",30000,0);
  5755.                     SendClientMessageToAll(COLOR_CON_GREEN, "The damm is being taken over!");
  5756.                 }
  5757.             }
  5758.         }
  5759.         else {
  5760.             EnteredArea9[i] = 0;                  // When he leaves, he's no longer in the area
  5761.             KillTimer(T9[i]);
  5762.         }
  5763.     }
  5764.  
  5765.     foreach(Player, i) {
  5766.         if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186)) {
  5767.             if(EnteredArea10[i] == 0) {           // if he hasn't entered before
  5768.                 if(gTeam[i] == TEAM_USA && CapturedBy10 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy10 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy10 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy10 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy10 == 5) {
  5769.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5770.                     EnteredArea10[i] = 1;
  5771.                 }
  5772.                 else {
  5773.                     EnteredArea10[i] = 1;         // He has entered
  5774.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5775.                     T10[i] = SetTimer("TakeOver",30000,0);
  5776.                     SendClientMessageToAll(COLOR_CON_GREEN, "The old town is being taken over!");
  5777.                 }
  5778.             }
  5779.         }
  5780.         else {
  5781.             EnteredArea10[i] = 0;                 // When he leaves, he's no longer in the area
  5782.             KillTimer(T10[i]);
  5783.         }
  5784.     }
  5785.  
  5786.     foreach(Player, i) {
  5787.         if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017)) {
  5788.             if(EnteredArea11[i] == 0) {           // if he hasn't entered before
  5789.                 if(gTeam[i] == TEAM_USA && CapturedBy11 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy11 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy11 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy11 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy11 == 5) {
  5790.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5791.                     EnteredArea11[i] = 1;
  5792.                 }
  5793.                 else {
  5794.                     EnteredArea11[i] = 1;         // He has entered
  5795.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5796.                     T11[i] = SetTimer("TakeOver",30000,0);
  5797.                     SendClientMessageToAll(COLOR_CON_GREEN, "The University is being taken over!");
  5798.                 }
  5799.             }
  5800.         }
  5801.         else {
  5802.             EnteredArea11[i] = 0;                 // When he leaves, he's no longer in the area
  5803.             KillTimer(T11[i]);
  5804.         }
  5805.     }
  5806.  
  5807.     foreach(Player, i) {
  5808.         if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502)) {
  5809.             if(EnteredArea12[i] == 0) {           // if he hasn't entered before
  5810.                 if(gTeam[i] == TEAM_USA && CapturedBy12 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy12 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy12 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy12 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy12 == 5) {
  5811.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5812.                     EnteredArea12[i] = 1;
  5813.                 }
  5814.                 else {
  5815.                     EnteredArea12[i] = 1;         // He has entered
  5816.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5817.                     T12[i] = SetTimer("TakeOver",30000,0);
  5818.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Oil Pump is being taken over!");
  5819.                 }
  5820.             }
  5821.         }
  5822.         else {
  5823.             EnteredArea12[i] = 0;                 // When he leaves, he's no longer in the area
  5824.             KillTimer(T12[i]);
  5825.         }
  5826.     }
  5827.  
  5828.     foreach(Player, i) {
  5829.         if(IsPlayerInArea(i, -1237.855, 1763.359, -1156.11, 1868.46)) {
  5830.             if(EnteredArea13[i] == 0) {           // if he hasn't entered before
  5831.                 if(gTeam[i] == TEAM_USA && CapturedBy13 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy13 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy13 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy13 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy13 == 5) {
  5832.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5833.                     EnteredArea13[i] = 1;
  5834.                 }
  5835.                 else {
  5836.                     EnteredArea13[i] = 1;         // He has entered
  5837.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5838.                     T13[i] = SetTimer("TakeOver",30000,0);
  5839.                     SendClientMessageToAll(COLOR_CON_GREEN, "The CluckinBell is being taken over!");
  5840.                 }
  5841.             }
  5842.         }
  5843.         else {
  5844.             EnteredArea13[i] = 0;                 // When he leaves, he's no longer in the area
  5845.             KillTimer(T13[i]);
  5846.         }
  5847.     }
  5848.  
  5849.     foreach(Player, i) {
  5850.         if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536)) {
  5851.             if(EnteredArea14[i] == 0) {           // if he hasn't entered before
  5852.                 if(gTeam[i] == TEAM_USA && CapturedBy14 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy14 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy14 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy14 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy14 == 5) {
  5853.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5854.                     EnteredArea14[i] = 1;
  5855.                 }
  5856.                 else {
  5857.                     EnteredArea14[i] = 1;         // He has entered
  5858.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5859.                     T14[i] = SetTimer("TakeOver",30000,0);
  5860.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Beach Shack is being taken over!");
  5861.                 }
  5862.             }
  5863.         }
  5864.         else {
  5865.             EnteredArea14[i] = 0;                 // When he leaves, he's no longer in the area
  5866.             KillTimer(T14[i]);
  5867.         }
  5868.     }
  5869.  
  5870.     foreach(Player, i) {
  5871.         if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676)) {
  5872.             if(EnteredArea15[i] == 0) {           // if he hasn't entered before
  5873.                 if(gTeam[i] == TEAM_USA && CapturedBy15 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy15 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy15 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy15 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy15 == 5) {
  5874.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5875.                     EnteredArea15[i] = 1;
  5876.                 }
  5877.                 else {
  5878.                     EnteredArea15[i] = 1;         // He has entered
  5879.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5880.                     T15[i] = SetTimer("TakeOver",30000,0);
  5881.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Diner is being taken over!");
  5882.                 }
  5883.             }
  5884.         }
  5885.         else {
  5886.             EnteredArea15[i] = 0;                 // When he leaves, he's no longer in the area
  5887.             KillTimer(T15[i]);
  5888.         }
  5889.     }
  5890.  
  5891.     foreach(Player, i) {
  5892.         if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859)) {
  5893.             if(EnteredArea16[i] == 0) {           // if he hasn't entered before
  5894.                 if(gTeam[i] == TEAM_USA && CapturedBy16 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy16 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy16 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy16 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy16 == 5) {
  5895.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5896.                     EnteredArea16[i] = 1;
  5897.                 }
  5898.                 else {
  5899.                     EnteredArea16[i] = 1;         // He has entered
  5900.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5901.                     T16[i] = SetTimer("TakeOver",30000,0);
  5902.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Quarry is being taken over!");
  5903.                 }
  5904.             }
  5905.         }
  5906.         else {
  5907.             EnteredArea16[i] = 0;                 // When he leaves, he's no longer in the area
  5908.             KillTimer(T16[i]);
  5909.         }
  5910.     }
  5911.  
  5912.     foreach(Player, i) {
  5913.         if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170)) {
  5914.             if(EnteredArea17[i] == 0) {           // if he hasn't entered before
  5915.                 if(gTeam[i] == TEAM_USA && CapturedBy17 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy17 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy17 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy17 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy17 == 5) {
  5916.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5917.                     EnteredArea17[i] = 1;
  5918.                 }
  5919.                 else {
  5920.                     EnteredArea17[i] = 1;         // He has entered
  5921.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5922.                     T17[i] = SetTimer("TakeOver",30000,0);
  5923.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Field Hospital is being taken over!");
  5924.                 }
  5925.             }
  5926.         }
  5927.         else {
  5928.             EnteredArea17[i] = 0;                 // When he leaves, he's no longer in the area
  5929.             KillTimer(T17[i]);
  5930.         }
  5931.     }
  5932.  
  5933.     foreach(Player, i) {
  5934.         if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751)) {
  5935.             if(EnteredArea18[i] == 0) {           // if he hasn't entered before
  5936.                 if(gTeam[i] == TEAM_USA && CapturedBy18 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy18 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy18 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy18 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy18 == 5) {
  5937.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5938.                     EnteredArea18[i] = 1;
  5939.                 }
  5940.                 else {
  5941.                     EnteredArea18[i] = 1;         // He has entered
  5942.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5943.                     T18[i] = SetTimer("TakeOver",30000,0);
  5944.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Gun Warehouse is being taken over!");
  5945.                 }
  5946.             }
  5947.         }
  5948.         else {
  5949.             EnteredArea18[i] = 0;                 // When he leaves, he's no longer in the area
  5950.             KillTimer(T18[i]);
  5951.         }
  5952.     }
  5953.  
  5954.     foreach(Player, i) {
  5955.         if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798)) {
  5956.             if(EnteredArea19[i] == 0) {           // if he hasn't entered before
  5957.                 if(gTeam[i] == TEAM_USA && CapturedBy19 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy19 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy19 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy19 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy19 == 5) {
  5958.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5959.                     EnteredArea19[i] = 1;
  5960.                 }
  5961.                 else {
  5962.                     EnteredArea19[i] = 1;         // He has entered
  5963.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5964.                     T19[i] = SetTimer("TakeOver",30000,0);
  5965.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Docks is being taken over!");
  5966.                 }
  5967.             }
  5968.         }
  5969.         else {
  5970.             EnteredArea19[i] = 0;                 // When he leaves, he's no longer in the area
  5971.             KillTimer(T19[i]);
  5972.         }
  5973.     }
  5974.  
  5975.     foreach(Player, i) {
  5976.         if(IsPlayerInArea(i, -1411.231323, 2715.757568, 1539.231323, 2875.757568)) {
  5977.             if(EnteredArea20[i] == 0) {           // if he hasn't entered before
  5978.                 if(gTeam[i] == TEAM_USA && CapturedBy20 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy20 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy20 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy20 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy20 == 5) {
  5979.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  5980.                     EnteredArea20[i] = 1;
  5981.                 }
  5982.                 else {
  5983.                     EnteredArea20[i] = 1;         // He has entered
  5984.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  5985.                     T20[i] = SetTimer("TakeOver",30000,0);
  5986.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Country Club is being taken over!");
  5987.                 }
  5988.             }
  5989.         }
  5990.         else {
  5991.             EnteredArea20[i] = 0;                 // When he leaves, he's no longer in the area
  5992.             KillTimer(T20[i]);
  5993.  
  5994.         }
  5995.     }
  5996.  
  5997.     return 1;
  5998. }
  5999.  
  6000.  
  6001. public OnPlayerUpdate(playerid)
  6002. {
  6003.     return 1;
  6004. }
  6005.  
  6006.  
  6007. stock ResetDispenser(playerid)
  6008. {
  6009.     if( EngineerI[playerid] == 0 ) {
  6010.         EngineerI[playerid] = 1;
  6011.         DestroyObject(Dispenser[playerid]);
  6012.         SendClientMessage(playerid, COLOR_YELLOW, "Dispenser Detonated ! You can now place another 1.");
  6013.     }else SendClientMessage(playerid, COLOR_RED, "Dispenser not placed !");
  6014.     return 1;
  6015. }
  6016.  
  6017.  
  6018. stock PlaceDispenser(playerid ,Float:xx, Float:yy, Float:zz)
  6019. {
  6020.     if( EngineerI[playerid] == 1 ) {
  6021.         if( GetPlayerMoney(playerid) >= 10000 ) {
  6022.             EngineerI[playerid] = 0;
  6023.             SetPlayerMoney(playerid, GetPlayerMoney(playerid) - 10000);
  6024.             SetTimerEx("DispeClean", 2 * 60 * 1000, 0, "i", playerid);
  6025.             Dispenser[playerid] = CreatePickup(920,23,xx, yy, zz);
  6026.             SendClientMessage(playerid, COLOR_YELLOW, "Dispenser placed, grab it for ammo ! It will self-destruct in 2 minutes!");
  6027.         }else SendClientMessage(playerid, COLOR_RED, "You need 10 000$ for a dispenser !");
  6028.     }else SendClientMessage(playerid, COLOR_RED, "Not enough Dispensers !");
  6029.  
  6030.     return 1;
  6031. }
  6032.  
  6033.  
  6034. stock IsObjectInRangeOfPlayer(objectid, playerid)
  6035. {
  6036.     new Float:pX, Float:pY, Float:pZ;
  6037.     GetPlayerPos(playerid, pX, pY, pZ);
  6038.     new Float:oX, Float:oY, Float:oZ;
  6039.     GetObjectPos(objectid, oX, oY, oZ);
  6040.     if( (pX - oX <= 5) && (pY - oY <= 5) && (pZ - oZ <= 1) ) {
  6041.         return 1;
  6042.     }
  6043.     return 0;
  6044. }
  6045.  
  6046.  
  6047. stock IsPlayerInArea(playerid,Float:min_x,Float:min_y,Float:max_x,Float:max_y)
  6048. {
  6049.     new Float:X,Float:Y,Float:Z;
  6050.     GetPlayerPos(playerid, X, Y, Z);
  6051.     if((X <= max_x && X >= min_x) && (Y <= max_y && Y >= min_y)) return 1;
  6052.  
  6053.     return 0;
  6054. }
  6055.  
  6056.  
  6057. public TakeOver()
  6058. {
  6059.     foreach(Player, i) {
  6060.         if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_USA) {
  6061.             if(CapturedBy != 1) {
  6062.                 if( IfCapture[0] == 1 ) return 1;
  6063.                 IfCapture[0] = 0;
  6064.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy", 1);
  6065.                 uscore++;
  6066. //  SetTimer("ScoreText", 5000, 0);
  6067.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6068.                 CapturedBy = 1;
  6069.                 if(CapturedBy != 1) SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Big Ear!");
  6070.                 GangZoneHideForAll(Ear);
  6071.                 GangZoneShowForAll(EarU, COLOR_BLUE);
  6072.                 GangZoneHideForAll(EarG);
  6073.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6074.                 CheckForLevelUpdate(i);
  6075.             }
  6076.         }
  6077.         else if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_GERMANY) {
  6078.             if(CapturedBy != 2) { {
  6079.                     if( IfCapture[0] == 1 ) return 1;
  6080.                     IfCapture[0] = 0;
  6081.                     dini_IntSet("/Variables/Variables.ini", "CapturedBy", 2);
  6082.                     gscore++;
  6083. // SetTimer("ScoreText", 5000, 0);
  6084.                     SetPlayerScore(i, GetPlayerScore(i) + 2);
  6085.                     CapturedBy = 2;
  6086.                     if(CapturedBy != 2) SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Big Ear!");
  6087.                     GangZoneHideForAll(Ear);
  6088.                     GangZoneShowForAll(EarG, COLOR_RED);
  6089.                     GangZoneHideForAll(EarU);
  6090.                     dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6091.                     CheckForLevelUpdate(i);
  6092.                 }
  6093.             }
  6094.         }
  6095.         else if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_AUSTRALIA) {
  6096.             if(CapturedBy != 3) { {
  6097.                     if( IfCapture[0] == 1 ) return 1;
  6098.                     IfCapture[0] = 0;
  6099.                     dini_IntSet("/Variables/Variables.ini", "CapturedBy", 3);
  6100.                     gscore++;
  6101. //  SetTimer("ScoreText", 5000, 0);
  6102.                     SetPlayerScore(i, GetPlayerScore(i) + 2);
  6103.                     CapturedBy = 3;
  6104.                     if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured Big Ear!");
  6105.                     GangZoneHideForAll(Ear);
  6106.                     GangZoneShowForAll(EarG, COLOR_YELLOW);
  6107.                     GangZoneHideForAll(EarU);
  6108.                     dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6109.                     CheckForLevelUpdate(i);
  6110.                 }
  6111.             }
  6112.         }
  6113.         else if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_JAPAN) {
  6114.             if(CapturedBy != 4) { {
  6115.                     if( IfCapture[0] == 1 ) return 1;
  6116.                     IfCapture[0] = 0;
  6117.                     dini_IntSet("/Variables/Variables.ini", "CapturedBy", 4);
  6118.                     gscore++;
  6119. //  SetTimer("ScoreText", 5000, 0);
  6120.                     SetPlayerScore(i, GetPlayerScore(i) + 2);
  6121.                     CapturedBy = 4;
  6122.                     if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured Big Ear!");
  6123.                     GangZoneHideForAll(Ear);
  6124.                     GangZoneShowForAll(EarG, COLOR_WHITE);
  6125.                     GangZoneHideForAll(EarU);
  6126.                     dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6127.                     CheckForLevelUpdate(i);
  6128.                 }
  6129.             }
  6130.         }
  6131.         else if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_RUSSIA) {
  6132.             if(CapturedBy != 5) { {
  6133.                     if( IfCapture[0] == 1 ) return 1;
  6134.                     IfCapture[0] = 0;
  6135.                     dini_IntSet("/Variables/Variables.ini", "CapturedBy", 5);
  6136.                     gscore++;
  6137. //  SetTimer("ScoreText", 5000, 0);
  6138.                     SetPlayerScore(i, GetPlayerScore(i) + 2);
  6139.                     CapturedBy = 5;
  6140.                     if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured Big Ear!");
  6141.                     GangZoneHideForAll(Ear);
  6142.                     GangZoneShowForAll(EarG, COLOR_ORANGE);
  6143.                     GangZoneHideForAll(EarU);
  6144.                     dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6145.                     CheckForLevelUpdate(i);
  6146.                 }
  6147.             }
  6148.         }
  6149.     }
  6150.  
  6151.     foreach(Player, i) {
  6152.         if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_USA) {
  6153.             if(CapturedBy2 != 1) {
  6154.                 if( IfCapture[2] == 1 ) return 1;
  6155.                 IfCapture[2] = 0;
  6156.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 1);
  6157.                 uscore++;
  6158. //SetTimer("ScoreText", 5000, 0);
  6159.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6160.                 CapturedBy2 = 1;
  6161.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the resturant!");
  6162.                 GangZoneHideForAll(Resturant);
  6163.                 GangZoneShowForAll(ResturantU, COLOR_BLUE);
  6164.                 GangZoneHideForAll(ResturantG);
  6165.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6166.                 CheckForLevelUpdate(i);
  6167.             }
  6168.         }
  6169.         else if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_GERMANY) {
  6170.             if(CapturedBy2 != 2) {
  6171.                 if( IfCapture[2] == 1 ) return 1;
  6172.                 IfCapture[2] = 0;
  6173.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 2);
  6174.                 gscore++;
  6175.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6176.                 CapturedBy2 = 2;
  6177.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured resturant!");
  6178.                 GangZoneHideForAll(Resturant);
  6179.                 GangZoneShowForAll(ResturantG, COLOR_RED);
  6180.                 GangZoneHideForAll(ResturantU);
  6181.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6182.                 CheckForLevelUpdate(i);
  6183.             }
  6184.         }
  6185.         else if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_AUSTRALIA) {
  6186.             if(CapturedBy2 != 3) {
  6187.                 if( IfCapture[2] == 1 ) return 1;
  6188.                 IfCapture[2] = 0;
  6189.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 3);
  6190.                 gscore++;
  6191.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6192.                 CapturedBy2 = 3;
  6193.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured resturant!");
  6194.                 GangZoneHideForAll(Resturant);
  6195.                 GangZoneShowForAll(ResturantG, COLOR_YELLOW);
  6196.                 GangZoneHideForAll(ResturantU);
  6197.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6198.                 CheckForLevelUpdate(i);
  6199.             }
  6200.         }
  6201.         else if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_JAPAN) {
  6202.             if(CapturedBy2 != 4) {
  6203.                 if( IfCapture[2] == 1 ) return 1;
  6204.                 IfCapture[2] = 0;
  6205.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 4);
  6206.                 gscore++;
  6207.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6208.                 CapturedBy2 = 4;
  6209.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured resturant!");
  6210.                 GangZoneHideForAll(Resturant);
  6211.                 GangZoneShowForAll(ResturantG, COLOR_WHITE);
  6212.                 GangZoneHideForAll(ResturantU);
  6213.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6214.                 CheckForLevelUpdate(i);
  6215.             }
  6216.         }
  6217.         else if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_RUSSIA) {
  6218.             if(CapturedBy2 != 5) {
  6219.                 if( IfCapture[2] == 1 ) return 1;
  6220.                 IfCapture[2] = 0;
  6221.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 5);
  6222.                 gscore++;
  6223.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6224.                 CapturedBy2 = 5;
  6225.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured resturant!");
  6226.                 GangZoneHideForAll(Resturant);
  6227.                 GangZoneShowForAll(ResturantG, COLOR_ORANGE);
  6228.                 GangZoneHideForAll(ResturantU);
  6229.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6230.                 CheckForLevelUpdate(i);
  6231.             }
  6232.         }
  6233.     }
  6234.  
  6235.     foreach(Player, i) {
  6236.         if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_USA) {
  6237.             if(CapturedBy3 != 1) {
  6238.                 if( IfCapture[3] == 1 ) return 1;
  6239.                 IfCapture[3] = 0;
  6240.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 1);
  6241. //SetTimer("ScoreText", 5000, 0);
  6242.                 uscore++;
  6243.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6244.                 CapturedBy3 = 1;
  6245.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the airfield!");
  6246.                 GangZoneHideForAll(Airfield);
  6247.                 GangZoneShowForAll(AirfieldU, COLOR_BLUE);
  6248.                 GangZoneHideForAll(AirfieldG);
  6249.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6250.                 CheckForLevelUpdate(i);
  6251.             }
  6252.         }
  6253.         else if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_GERMANY) {
  6254.             if(CapturedBy3 != 2) {
  6255.                 if( IfCapture[3] == 1 ) return 1;
  6256.                 IfCapture[3] = 0;
  6257.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 2);
  6258. //SetTimer("ScoreText", 5000, 0);
  6259.                 gscore++;
  6260.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6261.                 CapturedBy3 = 2;
  6262.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured airfield!");
  6263.                 GangZoneHideForAll(Airfield);
  6264.                 GangZoneShowForAll(AirfieldG, COLOR_RED);
  6265.                 GangZoneHideForAll(AirfieldU);
  6266.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6267.                 CheckForLevelUpdate(i);
  6268.             }
  6269.         }
  6270.         else if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_AUSTRALIA) {
  6271.             if(CapturedBy3 != 3) {
  6272.                 if( IfCapture[3] == 1 ) return 1;
  6273.                 IfCapture[3] = 0;
  6274.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 3);
  6275. //SetTimer("ScoreText", 5000, 0);
  6276.                 gscore++;
  6277.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6278.                 CapturedBy3 = 3;
  6279.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured airfield!");
  6280.                 GangZoneHideForAll(Airfield);
  6281.                 GangZoneShowForAll(AirfieldG, COLOR_YELLOW);
  6282.                 GangZoneHideForAll(AirfieldU);
  6283.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6284.                 CheckForLevelUpdate(i);
  6285.             }
  6286.         }
  6287.         else if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_JAPAN) {
  6288.             if(CapturedBy3 != 4) {
  6289.                 if( IfCapture[3] == 1 ) return 1;
  6290.                 IfCapture[3] = 0;
  6291.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 4);
  6292. //SetTimer("ScoreText", 5000, 0);
  6293.                 gscore++;
  6294.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6295.                 CapturedBy3 = 4;
  6296.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured airfield!");
  6297.                 GangZoneHideForAll(Airfield);
  6298.                 GangZoneShowForAll(AirfieldG, COLOR_WHITE);
  6299.                 GangZoneHideForAll(AirfieldU);
  6300.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6301.                 CheckForLevelUpdate(i);
  6302.             }
  6303.         }
  6304.         else if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_RUSSIA) {
  6305.             if(CapturedBy3 != 5) {
  6306.                 if( IfCapture[3] == 1 ) return 1;
  6307.                 IfCapture[3] = 0;
  6308.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 5);
  6309. //SetTimer("ScoreText", 5000, 0);
  6310.                 gscore++;
  6311.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6312.                 CapturedBy3 = 5;
  6313.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured airfield!");
  6314.                 GangZoneHideForAll(Airfield);
  6315.                 GangZoneShowForAll(AirfieldG, COLOR_ORANGE);
  6316.                 GangZoneHideForAll(AirfieldU);
  6317.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6318.                 CheckForLevelUpdate(i);
  6319.             }
  6320.         }
  6321.     }
  6322.  
  6323.     foreach(Player, i) {
  6324.         if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_USA) {
  6325.             if(CapturedBy4 != 1) {
  6326.                 if( IfCapture[4] == 1 ) return 1;
  6327.                 IfCapture[4] = 0;
  6328.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 1);
  6329.                 uscore++;
  6330. //SetTimer("ScoreText", 5000, 0);
  6331.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6332.                 CapturedBy4 = 1;
  6333.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Electric Field!");
  6334.                 GangZoneHideForAll(Oil);
  6335.                 GangZoneShowForAll(OilU, COLOR_BLUE);
  6336.                 GangZoneHideForAll(OilG);
  6337.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6338.                 CheckForLevelUpdate(i);
  6339.             }
  6340.         }
  6341.         else if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_GERMANY) {
  6342.             if(CapturedBy4 != 2) {
  6343.                 if( IfCapture[4] == 1 ) return 1;
  6344.                 IfCapture[4] = 0;
  6345.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 2);
  6346.                 gscore++;
  6347. //SetTimer("ScoreText", 5000, 0);
  6348.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6349.                 CapturedBy4 = 2;
  6350.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured Electric Field!");
  6351.                 GangZoneHideForAll(Oil);
  6352.                 GangZoneShowForAll(OilG, COLOR_RED);
  6353.                 GangZoneHideForAll(OilU);
  6354.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6355.                 CheckForLevelUpdate(i);
  6356.             }
  6357.         }
  6358.         else if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_AUSTRALIA) {
  6359.             if(CapturedBy4 != 3) {
  6360.                 if( IfCapture[4] == 1 ) return 1;
  6361.                 IfCapture[4] = 0;
  6362.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 3);
  6363.                 gscore++;
  6364. //SetTimer("ScoreText", 5000, 0);
  6365.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6366.                 CapturedBy4 = 3;
  6367.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured Electric Field!");
  6368.                 GangZoneHideForAll(Oil);
  6369.                 GangZoneShowForAll(OilG, COLOR_YELLOW);
  6370.                 GangZoneHideForAll(OilU);
  6371.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6372.                 CheckForLevelUpdate(i);
  6373.             }
  6374.         }
  6375.         else if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_JAPAN) {
  6376.             if(CapturedBy4 != 4) {
  6377.                 if( IfCapture[4] == 1 ) return 1;
  6378.                 IfCapture[4] = 0;
  6379.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 4);
  6380.                 gscore++;
  6381. //SetTimer("ScoreText", 5000, 0);
  6382.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6383.                 CapturedBy4 = 4;
  6384.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured Electric Field!");
  6385.                 GangZoneHideForAll(Oil);
  6386.                 GangZoneShowForAll(OilG, COLOR_WHITE);
  6387.                 GangZoneHideForAll(OilU);
  6388.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6389.                 CheckForLevelUpdate(i);
  6390.             }
  6391.         }
  6392.         else if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_RUSSIA) {
  6393.             if(CapturedBy4 != 5) {
  6394.                 if( IfCapture[4] == 1 ) return 1;
  6395.                 IfCapture[4] = 0;
  6396.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 5);
  6397.                 gscore++;
  6398. //SetTimer("ScoreText", 5000, 0);
  6399.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6400.                 CapturedBy4 = 5;
  6401.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured Electric Field!");
  6402.                 GangZoneHideForAll(Oil);
  6403.                 GangZoneShowForAll(OilG, COLOR_ORANGE);
  6404.                 GangZoneHideForAll(OilU);
  6405.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6406.                 CheckForLevelUpdate(i);
  6407.             }
  6408.         }
  6409.     }
  6410.  
  6411.     foreach(Player, i) {
  6412.         if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_USA) {
  6413.             if(CapturedBy5 != 1) {
  6414.                 if( IfCapture[5] == 1 ) return 1;
  6415.                 IfCapture[5] = 0;
  6416.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 1);
  6417. //SetTimer("ScoreText", 5000, 0);
  6418.                 uscore++;
  6419.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6420.                 CapturedBy5 = 1;
  6421.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured area 69!");
  6422.                 GangZoneHideForAll(A);
  6423.                 GangZoneShowForAll(AU, COLOR_BLUE);
  6424.                 GangZoneHideForAll(AG);
  6425.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6426.                 CheckForLevelUpdate(i);
  6427.             }
  6428.         }
  6429.         else if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_GERMANY) {
  6430.             if(CapturedBy5 != 2) {
  6431.                 if( IfCapture[5] == 1 ) return 1;
  6432.                 IfCapture[5] = 0;
  6433.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 2);
  6434.                 gscore++;
  6435. //SetTimer("ScoreText", 5000, 0);
  6436.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6437.                 CapturedBy5 = 2;
  6438.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured area 69!");
  6439.                 GangZoneHideForAll(A);
  6440.                 GangZoneShowForAll(AG, COLOR_RED);
  6441.                 GangZoneHideForAll(AU);
  6442.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6443.                 CheckForLevelUpdate(i);
  6444.             }
  6445.         }
  6446.         else if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_AUSTRALIA) {
  6447.             if(CapturedBy5 != 3) {
  6448.                 if( IfCapture[5] == 1 ) return 1;
  6449.                 IfCapture[5] = 0;
  6450.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 3);
  6451.                 gscore++;
  6452. //SetTimer("ScoreText", 5000, 0);
  6453.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6454.                 CapturedBy5 = 3;
  6455.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured area 69!");
  6456.                 GangZoneHideForAll(A);
  6457.                 GangZoneShowForAll(AG, COLOR_YELLOW);
  6458.                 GangZoneHideForAll(AU);
  6459.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6460.                 CheckForLevelUpdate(i);
  6461.             }
  6462.         }
  6463.         else if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_JAPAN) {
  6464.             if(CapturedBy5 != 4) {
  6465.                 if( IfCapture[5] == 1 ) return 1;
  6466.                 IfCapture[5] = 0;
  6467.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 4);
  6468.                 gscore++;
  6469. //SetTimer("ScoreText", 5000, 0);
  6470.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6471.                 CapturedBy5 = 4;
  6472.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured area 69!");
  6473.                 GangZoneHideForAll(A);
  6474.                 GangZoneShowForAll(AG, COLOR_WHITE);
  6475.                 GangZoneHideForAll(AU);
  6476.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6477.                 CheckForLevelUpdate(i);
  6478.             }
  6479.         }
  6480.         else if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_RUSSIA) {
  6481.             if(CapturedBy5 != 5) {
  6482.                 if( IfCapture[5] == 1 ) return 1;
  6483.                 IfCapture[5] = 0;
  6484.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 5);
  6485.                 gscore++;
  6486. //SetTimer("ScoreText", 5000, 0);
  6487.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6488.                 CapturedBy5 = 5;
  6489.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured area 69!");
  6490.                 GangZoneHideForAll(A);
  6491.                 GangZoneShowForAll(AG, COLOR_ORANGE);
  6492.                 GangZoneHideForAll(AU);
  6493.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6494.                 CheckForLevelUpdate(i);
  6495.             }
  6496.         }
  6497.     }
  6498.  
  6499.     foreach(Player, i) {
  6500.         if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_USA) {
  6501.             if(CapturedBy6 != 1) {
  6502.                 if( IfCapture[6] == 1 ) return 1;
  6503.                 IfCapture[6] = 0;
  6504.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 1);
  6505.                 uscore++;
  6506. //SetTimer("ScoreText", 5000, 0);
  6507.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6508.                 CapturedBy6 = 1;
  6509.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the gas station!");
  6510.                 GangZoneHideForAll(Gas);
  6511.                 GangZoneShowForAll(GasU, COLOR_BLUE);
  6512.                 GangZoneHideForAll(GasG);
  6513.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6514.                 CheckForLevelUpdate(i);
  6515.             }
  6516.         }
  6517.         else if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_GERMANY) {
  6518.             if(CapturedBy6 != 2) {
  6519.                 if( IfCapture[6] == 1 ) return 1;
  6520.                 IfCapture[6] = 0;
  6521.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 2);
  6522.                 gscore++;
  6523. //SetTimer("ScoreText", 5000, 0);
  6524.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6525.                 CapturedBy6 = 2;
  6526.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured gas station!");
  6527.                 GangZoneHideForAll(Gas);
  6528.                 GangZoneShowForAll(GasG, COLOR_RED);
  6529.                 GangZoneHideForAll(GasU);
  6530.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6531.                 CheckForLevelUpdate(i);
  6532.             }
  6533.         }
  6534.         else if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_AUSTRALIA) {
  6535.             if(CapturedBy6 != 3) {
  6536.                 if( IfCapture[6] == 1 ) return 1;
  6537.                 IfCapture[6] = 0;
  6538.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 3);
  6539.                 gscore++;
  6540. //SetTimer("ScoreText", 5000, 0);
  6541.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6542.                 CapturedBy6 = 3;
  6543.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured gas station!");
  6544.                 GangZoneHideForAll(Gas);
  6545.                 GangZoneShowForAll(GasG, COLOR_YELLOW);
  6546.                 GangZoneHideForAll(GasU);
  6547.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6548.                 CheckForLevelUpdate(i);
  6549.             }
  6550.         }
  6551.         else if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_JAPAN) {
  6552.             if(CapturedBy6 != 4) {
  6553.                 if( IfCapture[6] == 1 ) return 1;
  6554.                 IfCapture[6] = 0;
  6555.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 4);
  6556.                 gscore++;
  6557. //SetTimer("ScoreText", 5000, 0);
  6558.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6559.                 CapturedBy6 = 4;
  6560.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured gas station!");
  6561.                 GangZoneHideForAll(Gas);
  6562.                 GangZoneShowForAll(GasG, COLOR_WHITE);
  6563.                 GangZoneHideForAll(GasU);
  6564.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6565.                 CheckForLevelUpdate(i);
  6566.             }
  6567.         }
  6568.         else if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_RUSSIA) {
  6569.             if(CapturedBy6 != 5) {
  6570.                 if( IfCapture[6] == 1 ) return 1;
  6571.                 IfCapture[6] = 0;
  6572.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 5);
  6573.                 gscore++;
  6574. //SetTimer("ScoreText", 5000, 0);
  6575.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6576.                 CapturedBy6 = 5;
  6577.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured gas station!");
  6578.                 GangZoneHideForAll(Gas);
  6579.                 GangZoneShowForAll(GasG, COLOR_ORANGE);
  6580.                 GangZoneHideForAll(GasU);
  6581.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6582.                 CheckForLevelUpdate(i);
  6583.             }
  6584.         }
  6585.     }
  6586.  
  6587.     foreach(Player, i) {
  6588.         if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_USA) {
  6589.             if(CapturedBy7 != 1) {
  6590.                 if( IfCapture[7] == 1 ) return 1;
  6591.                 IfCapture[7] = 0;
  6592.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 1);
  6593.                 uscore++;
  6594. //SetTimer("ScoreText", 5000, 0);
  6595.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6596.                 CapturedBy7 = 1;
  6597.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Oil Station!");
  6598.                 GangZoneHideForAll(OS);
  6599.                 GangZoneShowForAll(OSU, COLOR_BLUE);
  6600.                 GangZoneHideForAll(OSG);
  6601.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6602.                 CheckForLevelUpdate(i);
  6603.             }
  6604.         }
  6605.         else if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_GERMANY) {
  6606.             if(CapturedBy7 != 2) {
  6607.                 if( IfCapture[7] == 1 ) return 1;
  6608.                 IfCapture[7] = 0;
  6609.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 2);
  6610.                 gscore++;
  6611. //SetTimer("ScoreText", 5000, 0);
  6612.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6613.                 CapturedBy7 = 2;
  6614.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured Oil Station!");
  6615.                 GangZoneHideForAll(OS);
  6616.                 GangZoneShowForAll(OSG, COLOR_RED);
  6617.                 GangZoneHideForAll(OSU);
  6618.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6619.                 CheckForLevelUpdate(i);
  6620.             }
  6621.         }
  6622.         else if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_AUSTRALIA) {
  6623.             if(CapturedBy7 != 3) {
  6624.                 if( IfCapture[7] == 1 ) return 1;
  6625.                 IfCapture[7] = 0;
  6626.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 3);
  6627.                 gscore++;
  6628. //SetTimer("ScoreText", 5000, 0);
  6629.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6630.                 CapturedBy7 = 3;
  6631.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured Oil Station!");
  6632.                 GangZoneHideForAll(OS);
  6633.                 GangZoneShowForAll(OSG, COLOR_YELLOW);
  6634.                 GangZoneHideForAll(OSU);
  6635.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6636.                 CheckForLevelUpdate(i);
  6637.             }
  6638.         }
  6639.         else if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_JAPAN) {
  6640.             if(CapturedBy7 != 4) {
  6641.                 if( IfCapture[7] == 1 ) return 1;
  6642.                 IfCapture[7] = 0;
  6643.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 4);
  6644.                 gscore++;
  6645. //SetTimer("ScoreText", 5000, 0);
  6646.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6647.                 CapturedBy7 = 4;
  6648.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured Oil Station!");
  6649.                 GangZoneHideForAll(OS);
  6650.                 GangZoneShowForAll(OSG, COLOR_WHITE);
  6651.                 GangZoneHideForAll(OSU);
  6652.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6653.                 CheckForLevelUpdate(i);
  6654.             }
  6655.         }
  6656.         else if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_RUSSIA) {
  6657.             if(CapturedBy7 != 5) {
  6658.                 if( IfCapture[7] == 1 ) return 1;
  6659.                 IfCapture[7] = 0;
  6660.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 5);
  6661.                 gscore++;
  6662. //SetTimer("ScoreText", 5000, 0);
  6663.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6664.                 CapturedBy7 = 5;
  6665.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured Oil Station!");
  6666.                 GangZoneHideForAll(OS);
  6667.                 GangZoneShowForAll(OSG, COLOR_ORANGE);
  6668.                 GangZoneHideForAll(OSU);
  6669.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6670.                 CheckForLevelUpdate(i);
  6671.             }
  6672.         }
  6673.     }
  6674.  
  6675.     foreach(Player, i) {
  6676.         if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_USA) {
  6677.             if(CapturedBy8 != 1) {
  6678.                 if( IfCapture[8] == 1 ) return 1;
  6679.                 IfCapture[8] = 0;
  6680.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 1);
  6681.                 uscore++;
  6682. //SetTimer("ScoreText", 5000, 0);
  6683.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6684.                 CapturedBy8 = 1;
  6685.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Train refueling station!");
  6686.                 GangZoneHideForAll(T);
  6687.                 GangZoneShowForAll(TU, COLOR_BLUE);
  6688.                 GangZoneHideForAll(TG);
  6689.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6690.                 CheckForLevelUpdate(i);
  6691.             }
  6692.         }
  6693.         else if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_GERMANY) {
  6694.             if(CapturedBy8 != 2) {
  6695.                 if( IfCapture[8] == 1 ) return 1;
  6696.                 IfCapture[8] = 0;
  6697.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 2);
  6698.                 gscore++;
  6699. //SetTimer("ScoreText", 5000, 0);
  6700.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6701.                 CapturedBy8 = 2;
  6702.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured Train refueling station!");
  6703.                 GangZoneHideForAll(T);
  6704.                 GangZoneShowForAll(TG, COLOR_RED);
  6705.                 GangZoneHideForAll(TU);
  6706.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6707.                 CheckForLevelUpdate(i);
  6708.             }
  6709.         }
  6710.         else if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_AUSTRALIA) {
  6711.             if(CapturedBy8 != 3) {
  6712.                 if( IfCapture[8] == 1 ) return 1;
  6713.                 IfCapture[8] = 0;
  6714.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 3);
  6715.                 gscore++;
  6716. //SetTimer("ScoreText", 5000, 0);
  6717.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6718.                 CapturedBy8 = 3;
  6719.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured Train refueling station!");
  6720.                 GangZoneHideForAll(T);
  6721.                 GangZoneShowForAll(TG, COLOR_YELLOW);
  6722.                 GangZoneHideForAll(TU);
  6723.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6724.                 CheckForLevelUpdate(i);
  6725.             }
  6726.         }
  6727.         else if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_JAPAN) {
  6728.             if(CapturedBy8 != 4) {
  6729.                 if( IfCapture[8] == 1 ) return 1;
  6730.                 IfCapture[8] = 0;
  6731.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 4);
  6732.                 gscore++;
  6733. //SetTimer("ScoreText", 5000, 0);
  6734.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6735.                 CapturedBy8 = 4;
  6736.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured Train refueling station!");
  6737.                 GangZoneHideForAll(T);
  6738.                 GangZoneShowForAll(TG, COLOR_WHITE);
  6739.                 GangZoneHideForAll(TU);
  6740.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6741.                 CheckForLevelUpdate(i);
  6742.             }
  6743.         }
  6744.         else if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_RUSSIA) {
  6745.             if(CapturedBy8 != 5) {
  6746.                 if( IfCapture[8] == 1 ) return 1;
  6747.                 IfCapture[8] = 0;
  6748.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 5);
  6749.                 gscore++;
  6750. //SetTimer("ScoreText", 5000, 0);
  6751.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6752.                 CapturedBy8 = 5;
  6753.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured Train refueling station!");
  6754.                 GangZoneHideForAll(T);
  6755.                 GangZoneShowForAll(TG, COLOR_ORANGE);
  6756.                 GangZoneHideForAll(TU);
  6757.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6758.                 CheckForLevelUpdate(i);
  6759.             }
  6760.         }
  6761.     }
  6762.  
  6763.     foreach(Player, i) {
  6764.         if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_USA) {
  6765.             if(CapturedBy9 != 1) {
  6766.                 if( IfCapture[9] == 1 ) return 1;
  6767.                 IfCapture[9] = 0;
  6768.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 1);
  6769.                 uscore++;
  6770. //SetTimer("ScoreText", 5000, 0);
  6771.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6772.                 CapturedBy9 = 1;
  6773.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the damm");
  6774.                 GangZoneHideForAll(D);
  6775.                 GangZoneShowForAll(DU, COLOR_BLUE);
  6776.                 GangZoneHideForAll(DG);
  6777.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6778.                 CheckForLevelUpdate(i);
  6779.             }
  6780.         }
  6781.         else if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_GERMANY) {
  6782.             if(CapturedBy9 != 2) {
  6783.                 if( IfCapture[9] == 1 ) return 1;
  6784.                 IfCapture[9] = 0;
  6785.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 2);
  6786.                 gscore++;
  6787. //SetTimer("ScoreText", 5000, 0);
  6788.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6789.                 CapturedBy9 = 2;
  6790.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the damm!");
  6791.                 GangZoneHideForAll(D);
  6792.                 GangZoneShowForAll(DG, COLOR_RED);
  6793.                 GangZoneHideForAll(DU);
  6794.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6795.                 CheckForLevelUpdate(i);
  6796.             }
  6797.         }
  6798.         else if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_AUSTRALIA) {
  6799.             if(CapturedBy9 != 3) {
  6800.                 if( IfCapture[9] == 1 ) return 1;
  6801.                 IfCapture[9] = 0;
  6802.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 3);
  6803.                 gscore++;
  6804. //SetTimer("ScoreText", 5000, 0);
  6805.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6806.                 CapturedBy9 = 3;
  6807.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the damm!");
  6808.                 GangZoneHideForAll(D);
  6809.                 GangZoneShowForAll(DG, COLOR_YELLOW);
  6810.                 GangZoneHideForAll(DU);
  6811.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6812.                 CheckForLevelUpdate(i);
  6813.             }
  6814.         }
  6815.         else if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_JAPAN) {
  6816.             if(CapturedBy9 != 4) {
  6817.                 if( IfCapture[9] == 1 ) return 1;
  6818.                 IfCapture[9] = 0;
  6819.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 4);
  6820.                 gscore++;
  6821. //SetTimer("ScoreText", 5000, 0);
  6822.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6823.                 CapturedBy9 = 4;
  6824.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the damm!");
  6825.                 GangZoneHideForAll(D);
  6826.                 GangZoneShowForAll(DG, COLOR_WHITE);
  6827.                 GangZoneHideForAll(DU);
  6828.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6829.                 CheckForLevelUpdate(i);
  6830.             }
  6831.         }
  6832.         else if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_RUSSIA) {
  6833.             if(CapturedBy9 != 5) {
  6834.                 if( IfCapture[9] == 1 ) return 1;
  6835.                 IfCapture[9] = 0;
  6836.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 5);
  6837.                 gscore++;
  6838. //SetTimer("ScoreText", 5000, 0);
  6839.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6840.                 CapturedBy9 = 5;
  6841.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the damm!");
  6842.                 GangZoneHideForAll(D);
  6843.                 GangZoneShowForAll(DG, COLOR_ORANGE);
  6844.                 GangZoneHideForAll(DU);
  6845.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6846.                 CheckForLevelUpdate(i);
  6847.             }
  6848.         }
  6849.     }
  6850.  
  6851.     foreach(Player, i) {
  6852.         if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_USA) {
  6853.             if(CapturedBy10 != 1) {
  6854.                 if( IfCapture[10] == 1 ) return 1;
  6855.                 IfCapture[10] = 0;
  6856.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 1);
  6857.                 uscore++;
  6858. //SetTimer("ScoreText", 5000, 0);
  6859.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6860.                 CapturedBy10 = 1;
  6861.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the old town!");
  6862.                 GangZoneHideForAll(OT);
  6863.                 GangZoneShowForAll(OTU, COLOR_BLUE);
  6864.                 GangZoneHideForAll(OTG);
  6865.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6866.                 CheckForLevelUpdate(i);
  6867.             }
  6868.         }
  6869.         else if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_GERMANY) {
  6870.             if(CapturedBy10 != 2) {
  6871.                 if( IfCapture[10] == 1 ) return 1;
  6872.                 IfCapture[10] = 0;
  6873.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 2);
  6874.                 gscore++;
  6875. //SetTimer("ScoreText", 5000, 0);
  6876.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6877.                 CapturedBy10 = 2;
  6878.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured old town!");
  6879.                 GangZoneHideForAll(OT);
  6880.                 GangZoneShowForAll(OTG, COLOR_RED);
  6881.                 GangZoneHideForAll(OTU);
  6882.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6883.                 CheckForLevelUpdate(i);
  6884.             }
  6885.         }
  6886.         else if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_AUSTRALIA) {
  6887.             if(CapturedBy10 != 3) {
  6888.                 if( IfCapture[10] == 1 ) return 1;
  6889.                 IfCapture[10] = 0;
  6890.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 3);
  6891.                 gscore++;
  6892. //SetTimer("ScoreText", 5000, 0);
  6893.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6894.                 CapturedBy10 = 3;
  6895.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured old town!");
  6896.                 GangZoneHideForAll(OT);
  6897.                 GangZoneShowForAll(OTG, COLOR_YELLOW);
  6898.                 GangZoneHideForAll(OTU);
  6899.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6900.                 CheckForLevelUpdate(i);
  6901.             }
  6902.         }
  6903.         else if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_JAPAN) {
  6904.             if(CapturedBy10 != 4) {
  6905.                 if( IfCapture[10] == 1 ) return 1;
  6906.                 IfCapture[10] = 0;
  6907.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 4);
  6908.                 gscore++;
  6909. //SetTimer("ScoreText", 5000, 0);
  6910.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6911.                 CapturedBy10 = 4;
  6912.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured old town!");
  6913.                 GangZoneHideForAll(OT);
  6914.                 GangZoneShowForAll(OTG, COLOR_WHITE);
  6915.                 GangZoneHideForAll(OTU);
  6916.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6917.                 CheckForLevelUpdate(i);
  6918.             }
  6919.         }
  6920.         else if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_RUSSIA) {
  6921.             if(CapturedBy10 != 5) {
  6922.                 if( IfCapture[10] == 1 ) return 1;
  6923.                 IfCapture[10] = 0;
  6924.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 5);
  6925.                 gscore++;
  6926. //SetTimer("ScoreText", 5000, 0);
  6927.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6928.                 CapturedBy10 = 5;
  6929.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured old town!");
  6930.                 GangZoneHideForAll(OT);
  6931.                 GangZoneShowForAll(OTG, COLOR_ORANGE);
  6932.                 GangZoneHideForAll(OTU);
  6933.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6934.                 CheckForLevelUpdate(i);
  6935.             }
  6936.         }
  6937.     }
  6938.     foreach(Player, i) {
  6939.         if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_USA) {
  6940.             if(CapturedBy11 != 1) {
  6941.                 if( IfCapture[11] == 1 ) return 1;
  6942.                 IfCapture[11] = 0;
  6943.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 1);
  6944.                 uscore++;
  6945. //SetTimer("ScoreText", 5000, 0);
  6946.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6947.                 CapturedBy11 = 1;
  6948.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the University!");
  6949.                 GangZoneHideForAll(University);
  6950.                 GangZoneShowForAll(University, COLOR_BLUE);
  6951.                 GangZoneHideForAll(University);
  6952.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  6953.                 CheckForLevelUpdate(i);
  6954.             }
  6955.         }else if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_GERMANY)
  6956.         {
  6957.             if(CapturedBy11 != 2) {
  6958.                 if( IfCapture[11] == 1 ) return 1;
  6959.                 IfCapture[11] = 0;
  6960.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 2);
  6961.                 gscore++;
  6962. //SetTimer("ScoreText", 5000, 0);
  6963.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6964.                 CapturedBy11 = 2;
  6965.                 if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the University!");
  6966.                 GangZoneHideForAll(University);
  6967.                 GangZoneShowForAll(UniversityG, COLOR_RED);
  6968.                 GangZoneHideForAll(UniversityU);
  6969.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6970.                 CheckForLevelUpdate(i);
  6971.             }
  6972.         }else if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_AUSTRALIA)
  6973.         {
  6974.             if(CapturedBy11 != 3) {
  6975.                 if( IfCapture[11] == 1 ) return 1;
  6976.                 IfCapture[11] = 0;
  6977.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 3);
  6978.                 gscore++;
  6979. //SetTimer("ScoreText", 5000, 0);
  6980.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6981.                 CapturedBy11 = 3;
  6982.                 if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the University!");
  6983.                 GangZoneHideForAll(University);
  6984.                 GangZoneShowForAll(UniversityG, COLOR_YELLOW);
  6985.                 GangZoneHideForAll(UniversityU);
  6986.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  6987.                 CheckForLevelUpdate(i);
  6988.             }
  6989.         }else if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_JAPAN)
  6990.         {
  6991.             if(CapturedBy11 != 4) {
  6992.                 if( IfCapture[11] == 1 ) return 1;
  6993.                 IfCapture[11] = 0;
  6994.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 4);
  6995.                 gscore++;
  6996. //SetTimer("ScoreText", 5000, 0);
  6997.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  6998.                 CapturedBy11 = 4;
  6999.                 if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the University!");
  7000.                 GangZoneHideForAll(University);
  7001.                 GangZoneShowForAll(UniversityG, COLOR_WHITE);
  7002.                 GangZoneHideForAll(UniversityU);
  7003.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7004.                 CheckForLevelUpdate(i);
  7005.             }
  7006.         }else if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_RUSSIA)
  7007.         {
  7008.             if(CapturedBy11 != 5) {
  7009.                 if( IfCapture[11] == 1 ) return 1;
  7010.                 IfCapture[11] = 0;
  7011.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 5);
  7012.                 gscore++;
  7013. //SetTimer("ScoreText", 5000, 0);
  7014.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7015.                 CapturedBy11 = 5;
  7016.                 if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the University!");
  7017.                 GangZoneHideForAll(University);
  7018.                 GangZoneShowForAll(UniversityG, COLOR_ORANGE);
  7019.                 GangZoneHideForAll(UniversityU);
  7020.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7021.                 CheckForLevelUpdate(i);
  7022.             }
  7023.         }
  7024.     }
  7025.  
  7026.     foreach(Player, i) {
  7027.         if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_USA) {
  7028.             if(CapturedBy12 != 1) {
  7029.                 if( IfCapture[12] == 1 ) return 1;
  7030.                 IfCapture[12] = 0;
  7031.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 1);
  7032.                 uscore++;
  7033. //SetTimer("ScoreText", 5000, 0);
  7034.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7035.                 CapturedBy12 = 1;
  7036.                 if(CapturedBy12 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the OilPump!");
  7037.                 GangZoneHideForAll(OilPump);
  7038.                 GangZoneShowForAll(OilPumpU, COLOR_BLUE);
  7039.                 GangZoneHideForAll(OilPumpG);
  7040.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  7041.                 CheckForLevelUpdate(i);
  7042.             }
  7043.         }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_GERMANY)
  7044.         {
  7045.             if(CapturedBy12 != 2) {
  7046.                 if( IfCapture[12] == 1 ) return 1;
  7047.                 IfCapture[12] = 0;
  7048.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 2);
  7049.                 gscore++;
  7050. //SetTimer("ScoreText", 5000, 0);
  7051.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7052.                 CapturedBy12 = 2;
  7053.                 if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the OilPump!");
  7054.                 GangZoneHideForAll(OilPump);
  7055.                 GangZoneShowForAll(OilPumpG, COLOR_RED);
  7056.                 GangZoneHideForAll(OilPumpU);
  7057.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7058.                 CheckForLevelUpdate(i);
  7059.             }
  7060.         }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_AUSTRALIA)
  7061.         {
  7062.             if(CapturedBy12 != 3) {
  7063.                 if( IfCapture[12] == 1 ) return 1;
  7064.                 IfCapture[12] = 0;
  7065.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 3);
  7066.                 gscore++;
  7067. //SetTimer("ScoreText", 5000, 0);
  7068.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7069.                 CapturedBy12 = 3;
  7070.                 if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the OilPump!");
  7071.                 GangZoneHideForAll(OilPump);
  7072.                 GangZoneShowForAll(OilPumpG, COLOR_YELLOW);
  7073.                 GangZoneHideForAll(OilPumpU);
  7074.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7075.                 CheckForLevelUpdate(i);
  7076.             }
  7077.         }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_JAPAN)
  7078.         {
  7079.             if(CapturedBy12 != 4) {
  7080.                 if( IfCapture[12] == 1 ) return 1;
  7081.                 IfCapture[12] = 0;
  7082.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 4);
  7083.                 gscore++;
  7084. //SetTimer("ScoreText", 5000, 0);
  7085.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7086.                 CapturedBy12 = 4;
  7087.                 if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the OilPump!");
  7088.                 GangZoneHideForAll(OilPump);
  7089.                 GangZoneShowForAll(OilPumpG, COLOR_WHITE);
  7090.                 GangZoneHideForAll(OilPumpU);
  7091.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7092.                 CheckForLevelUpdate(i);
  7093.             }
  7094.         }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_RUSSIA)
  7095.         {
  7096.             if(CapturedBy12 != 5) {
  7097.                 if( IfCapture[12] == 1 ) return 1;
  7098.                 IfCapture[12] = 0;
  7099.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 5);
  7100.                 gscore++;
  7101. //SetTimer("ScoreText", 5000, 0);
  7102.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7103.                 CapturedBy12 = 5;
  7104.                 if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the OilPump!");
  7105.                 GangZoneHideForAll(OilPump);
  7106.                 GangZoneShowForAll(OilPumpG, COLOR_ORANGE);
  7107.                 GangZoneHideForAll(OilPumpU);
  7108.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7109.                 CheckForLevelUpdate(i);
  7110.             }
  7111.         }
  7112.     }
  7113.  
  7114.     foreach(Player, i) {
  7115.         if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_USA) {
  7116.             if(CapturedBy13 != 1) {
  7117.                 if( IfCapture[13] == 1 ) return 1;
  7118.                 IfCapture[13] = 0;
  7119.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 1);
  7120.                 uscore++;
  7121. //SetTimer("ScoreText", 5000, 0);
  7122.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7123.                 CapturedBy13 = 1;
  7124.                 if(CapturedBy13 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the CluckinBell!");
  7125.                 GangZoneHideForAll(Cluck);
  7126.                 GangZoneShowForAll(CluckU, COLOR_BLUE);
  7127.                 GangZoneHideForAll(CluckG);
  7128.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  7129.                 CheckForLevelUpdate(i);
  7130.             }
  7131.         }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_GERMANY)
  7132.         {
  7133.             if(CapturedBy13 != 2) {
  7134.                 if( IfCapture[13] == 1 ) return 1;
  7135.                 IfCapture[13] = 0;
  7136.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 2);
  7137.                 gscore++;
  7138. //SetTimer("ScoreText", 5000, 0);
  7139.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7140.                 CapturedBy13 = 2;
  7141.                 if(CapturedBy13 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the CluckinBell!");
  7142.                 GangZoneHideForAll(Cluck);
  7143.                 GangZoneShowForAll(CluckG, COLOR_RED);
  7144.                 GangZoneHideForAll(CluckU);
  7145.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7146.                 CheckForLevelUpdate(i);
  7147.             }
  7148.         }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_AUSTRALIA)
  7149.         {
  7150.             if(CapturedBy13 != 3) {
  7151.                 if( IfCapture[13] == 1 ) return 1;
  7152.                 IfCapture[13] = 0;
  7153.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 3);
  7154.                 gscore++;
  7155. //SetTimer("ScoreText", 5000, 0);
  7156.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7157.                 CapturedBy13 = 3;
  7158.                 if(CapturedBy13 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the CluckinBell!");
  7159.                 GangZoneHideForAll(Cluck);
  7160.                 GangZoneShowForAll(CluckG, COLOR_YELLOW);
  7161.                 GangZoneHideForAll(CluckU);
  7162.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7163.                 CheckForLevelUpdate(i);
  7164.             }
  7165.         }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_JAPAN)
  7166.         {
  7167.             if(CapturedBy13 != 4) {
  7168.                 if( IfCapture[13] == 1 ) return 1;
  7169.                 IfCapture[13] = 0;
  7170.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 4);
  7171.                 gscore++;
  7172. //SetTimer("ScoreText", 5000, 0);
  7173.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7174.                 CapturedBy13 = 4;
  7175.                 if(CapturedBy13 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the CluckinBell!");
  7176.                 GangZoneHideForAll(Cluck);
  7177.                 GangZoneShowForAll(CluckG, COLOR_WHITE);
  7178.                 GangZoneHideForAll(CluckU);
  7179.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7180.                 CheckForLevelUpdate(i);
  7181.             }
  7182.         }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_RUSSIA)
  7183.         {
  7184.             if(CapturedBy13 != 5) {
  7185.                 if( IfCapture[13] == 1 ) return 1;
  7186.                 IfCapture[13] = 0;
  7187.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 5);
  7188.                 gscore++;
  7189. //SetTimer("ScoreText", 5000, 0);
  7190.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7191.                 CapturedBy13 = 5;
  7192.                 if(CapturedBy13 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the CluckinBell!");
  7193.                 GangZoneHideForAll(Cluck);
  7194.                 GangZoneShowForAll(CluckG, COLOR_ORANGE);
  7195.                 GangZoneHideForAll(CluckU);
  7196.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7197.                 CheckForLevelUpdate(i);
  7198.             }
  7199.         }
  7200.     }
  7201.  
  7202.     foreach(Player, i) {
  7203.         if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_USA) {
  7204.             if(CapturedBy14 != 1) {
  7205.                 if( IfCapture[14] == 1 ) return 1;
  7206.                 IfCapture[14] = 0;
  7207.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 1);
  7208.                 uscore++;
  7209. //SetTimer("ScoreText", 5000, 0);
  7210.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7211.                 CapturedBy14 = 1;
  7212.                 if(CapturedBy14 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the BeachShack!");
  7213.                 GangZoneHideForAll(Beach);
  7214.                 GangZoneShowForAll(BeachU, COLOR_BLUE);
  7215.                 GangZoneHideForAll(BeachG);
  7216.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  7217.                 CheckForLevelUpdate(i);
  7218.             }
  7219.         }else if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_GERMANY)
  7220.         {
  7221.             if(CapturedBy14 != 2) {
  7222.                 if( IfCapture[14] == 1 ) return 1;
  7223.                 IfCapture[14] = 0;
  7224.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 2);
  7225.                 gscore++;
  7226. //SetTimer("ScoreText", 5000, 0);
  7227.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7228.                 CapturedBy14 = 2;
  7229.                 if(CapturedBy14 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the BeachShack!");
  7230.                 GangZoneHideForAll(Beach);
  7231.                 GangZoneShowForAll(BeachG, COLOR_RED);
  7232.                 GangZoneHideForAll(BeachU);
  7233.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7234.                 CheckForLevelUpdate(i);
  7235.             }
  7236.         }else if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_AUSTRALIA)
  7237.         {
  7238.             if(CapturedBy14 != 3) {
  7239.                 if( IfCapture[14] == 1 ) return 1;
  7240.                 IfCapture[14] = 0;
  7241.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 3);
  7242.                 gscore++;
  7243. //SetTimer("ScoreText", 5000, 0);
  7244.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7245.                 CapturedBy14 = 3;
  7246.                 if(CapturedBy14 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the BeachShack!");
  7247.                 GangZoneHideForAll(Beach);
  7248.                 GangZoneShowForAll(BeachG, COLOR_YELLOW);
  7249.                 GangZoneHideForAll(BeachU);
  7250.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7251.                 CheckForLevelUpdate(i);
  7252.             }
  7253.         }else if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_JAPAN)
  7254.         {
  7255.             if(CapturedBy14 != 4) {
  7256.                 if( IfCapture[14] == 1 ) return 1;
  7257.                 IfCapture[14] = 0;
  7258.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 4);
  7259.                 gscore++;
  7260. //SetTimer("ScoreText", 5000, 0);
  7261.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7262.                 CapturedBy14 = 4;
  7263.                 if(CapturedBy14 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the BeachShack!");
  7264.                 GangZoneHideForAll(Beach);
  7265.                 GangZoneShowForAll(BeachG, COLOR_WHITE);
  7266.                 GangZoneHideForAll(BeachU);
  7267.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7268.                 CheckForLevelUpdate(i);
  7269.             }
  7270.         }else if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_RUSSIA)
  7271.         {
  7272.             if(CapturedBy14 != 5) {
  7273.                 if( IfCapture[14] == 1 ) return 1;
  7274.                 IfCapture[14] = 0;
  7275.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 5);
  7276.                 gscore++;
  7277. //SetTimer("ScoreText", 5000, 0);
  7278.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7279.                 CapturedBy14 = 5;
  7280.                 if(CapturedBy14 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the BeachShack!");
  7281.                 GangZoneHideForAll(Beach);
  7282.                 GangZoneShowForAll(BeachG, COLOR_ORANGE);
  7283.                 GangZoneHideForAll(BeachU);
  7284.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7285.                 CheckForLevelUpdate(i);
  7286.             }
  7287.         }
  7288.     }
  7289.  
  7290.     foreach(Player, i) {
  7291.         if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_USA) {
  7292.             if(CapturedBy15 != 1) {
  7293.                 if( IfCapture[15] == 1 ) return 1;
  7294.                 IfCapture[15] = 0;
  7295.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 1);
  7296.                 uscore++;
  7297. //SetTimer("ScoreText", 5000, 0);
  7298.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7299.                 CapturedBy15 = 1;
  7300.                 if(CapturedBy15 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Diner!");
  7301.                 GangZoneHideForAll(Diner);
  7302.                 GangZoneShowForAll(DinerU, COLOR_BLUE);
  7303.                 GangZoneHideForAll(DinerG);
  7304.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  7305.                 CheckForLevelUpdate(i);
  7306.             }
  7307.         }else if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_GERMANY)
  7308.         {
  7309.             if(CapturedBy15 != 2) {
  7310.                 if( IfCapture[15] == 1 ) return 1;
  7311.                 IfCapture[15] = 0;
  7312.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 2);
  7313.                 gscore++;
  7314. //SetTimer("ScoreText", 5000, 0);
  7315.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7316.                 CapturedBy15 = 2;
  7317.                 if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Diner!");
  7318.                 GangZoneHideForAll(Diner);
  7319.                 GangZoneShowForAll(DinerG, COLOR_RED);
  7320.                 GangZoneHideForAll(DinerU);
  7321.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7322.                 CheckForLevelUpdate(i);
  7323.             }
  7324.         }else if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_AUSTRALIA)
  7325.         {
  7326.             if(CapturedBy15 != 3) {
  7327.                 if( IfCapture[15] == 1 ) return 1;
  7328.                 IfCapture[15] = 0;
  7329.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 3);
  7330.                 gscore++;
  7331. //SetTimer("ScoreText", 5000, 0);
  7332.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7333.                 CapturedBy15 = 3;
  7334.                 if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the Diner!");
  7335.                 GangZoneHideForAll(Diner);
  7336.                 GangZoneShowForAll(DinerG, COLOR_YELLOW);
  7337.                 GangZoneHideForAll(DinerU);
  7338.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7339.                 CheckForLevelUpdate(i);
  7340.             }
  7341.         }else if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_JAPAN)
  7342.         {
  7343.             if(CapturedBy15 != 4) {
  7344.                 if( IfCapture[15] == 1 ) return 1;
  7345.                 IfCapture[15] = 0;
  7346.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 4);
  7347.                 gscore++;
  7348. //SetTimer("ScoreText", 5000, 0);
  7349.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7350.                 CapturedBy15 = 4;
  7351.                 if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Diner!");
  7352.                 GangZoneHideForAll(Diner);
  7353.                 GangZoneShowForAll(DinerG, COLOR_WHITE);
  7354.                 GangZoneHideForAll(DinerU);
  7355.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7356.                 CheckForLevelUpdate(i);
  7357.             }
  7358.         }else if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_RUSSIA)
  7359.         {
  7360.             if(CapturedBy15 != 5) {
  7361.                 if( IfCapture[15] == 1 ) return 1;
  7362.                 IfCapture[15] = 0;
  7363.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 5);
  7364.                 gscore++;
  7365. //SetTimer("ScoreText", 5000, 0);
  7366.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7367.                 CapturedBy15 = 5;
  7368.                 if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Diner!");
  7369.                 GangZoneHideForAll(Diner);
  7370.                 GangZoneShowForAll(DinerG, COLOR_ORANGE);
  7371.                 GangZoneHideForAll(DinerU);
  7372.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7373.                 CheckForLevelUpdate(i);
  7374.             }
  7375.         }
  7376.     }
  7377.  
  7378.     foreach(Player, i) {
  7379.         if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859) && gTeam[i] == TEAM_USA) {
  7380.             if(CapturedBy16 != 1) {
  7381.                 if( IfCapture[16] == 1 ) return 1;
  7382.                 IfCapture[16] = 0;
  7383.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy16", 1);
  7384.                 uscore++;
  7385. //SetTimer("ScoreText", 5000, 0);
  7386.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7387.                 CapturedBy16 = 1;
  7388.                 if(CapturedBy16 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Quarry!");
  7389.                 GangZoneHideForAll(Quarry);
  7390.                 GangZoneShowForAll(QuarryU, COLOR_BLUE);
  7391.                 GangZoneHideForAll(QuarryG);
  7392.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  7393.                 CheckForLevelUpdate(i);
  7394.             }
  7395.         }else if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859) && gTeam[i] == TEAM_GERMANY)
  7396.         {
  7397.             if(CapturedBy16 != 2) {
  7398.                 if( IfCapture[16] == 1 ) return 1;
  7399.                 IfCapture[16] = 0;
  7400.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy16", 2);
  7401.                 gscore++;
  7402. //SetTimer("ScoreText", 5000, 0);
  7403.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7404.                 CapturedBy16 = 2;
  7405.                 if(CapturedBy16 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Quarry!");
  7406.                 GangZoneHideForAll(Quarry);
  7407.                 GangZoneShowForAll(QuarryG, COLOR_RED);
  7408.                 GangZoneHideForAll(QuarryU);
  7409.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7410.                 CheckForLevelUpdate(i);
  7411.             }
  7412.         }else if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859) && gTeam[i] == TEAM_AUSTRALIA)
  7413.         {
  7414.             if(CapturedBy16 != 3) {
  7415.                 if( IfCapture[16] == 1 ) return 1;
  7416.                 IfCapture[16] = 0;
  7417.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy16", 3);
  7418.                 gscore++;
  7419. //SetTimer("ScoreText", 5000, 0);
  7420.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7421.                 CapturedBy16 = 3;
  7422.                 if(CapturedBy16 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the Quarry!");
  7423.                 GangZoneHideForAll(Quarry);
  7424.                 GangZoneShowForAll(QuarryG, COLOR_YELLOW);
  7425.                 GangZoneHideForAll(QuarryU);
  7426.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7427.                 CheckForLevelUpdate(i);
  7428.             }
  7429.         }else if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859) && gTeam[i] == TEAM_JAPAN)
  7430.         {
  7431.             if(CapturedBy16 != 4) {
  7432.                 if( IfCapture[16] == 1 ) return 1;
  7433.                 IfCapture[16] = 0;
  7434.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy16", 4);
  7435.                 gscore++;
  7436. //SetTimer("ScoreText", 5000, 0);
  7437.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7438.                 CapturedBy16 = 4;
  7439.                 if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Quarry!");
  7440.                 GangZoneHideForAll(Quarry);
  7441.                 GangZoneShowForAll(QuarryG, COLOR_WHITE);
  7442.                 GangZoneHideForAll(QuarryU);
  7443.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7444.                 CheckForLevelUpdate(i);
  7445.             }
  7446.         }else if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859) && gTeam[i] == TEAM_RUSSIA)
  7447.         {
  7448.             if(CapturedBy16 != 5) {
  7449.                 if( IfCapture[16] == 1 ) return 1;
  7450.                 IfCapture[16] = 0;
  7451.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy16", 5);
  7452.                 gscore++;
  7453. //SetTimer("ScoreText", 5000, 0);
  7454.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7455.                 CapturedBy16 = 5;
  7456.                 if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Quarry!");
  7457.                 GangZoneHideForAll(Quarry);
  7458.                 GangZoneShowForAll(QuarryG, COLOR_ORANGE);
  7459.                 GangZoneHideForAll(QuarryU);
  7460.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7461.                 CheckForLevelUpdate(i);
  7462.             }
  7463.         }
  7464.     }
  7465.  
  7466.     foreach(Player, i) {
  7467.         if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170) && gTeam[i] == TEAM_USA) {
  7468.             if(CapturedBy17 != 1) {
  7469.                 if( IfCapture[17] == 1 ) return 1;
  7470.                 IfCapture[17] = 0;
  7471.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy17", 1);
  7472.                 uscore++;
  7473. //SetTimer("ScoreText", 5000, 0);
  7474.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7475.                 CapturedBy17 = 1;
  7476.                 if(CapturedBy17 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Field Hospital!");
  7477.                 GangZoneHideForAll(FH);
  7478.                 GangZoneShowForAll(FHU, COLOR_BLUE);
  7479.                 GangZoneHideForAll(FHG);
  7480.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  7481.                 CheckForLevelUpdate(i);
  7482.             }
  7483.         }else if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170) && gTeam[i] == TEAM_GERMANY)
  7484.         {
  7485.             if(CapturedBy17 != 2) {
  7486.                 if( IfCapture[17] == 1 ) return 1;
  7487.                 IfCapture[17] = 0;
  7488.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy17", 2);
  7489.                 gscore++;
  7490. //SetTimer("ScoreText", 5000, 0);
  7491.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7492.                 CapturedBy17 = 2;
  7493.                 if(CapturedBy17 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Field Hospital!");
  7494.                 GangZoneHideForAll(FH);
  7495.                 GangZoneShowForAll(FHG, COLOR_RED);
  7496.                 GangZoneHideForAll(FHU);
  7497.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7498.                 CheckForLevelUpdate(i);
  7499.             }
  7500.         }else if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170) && gTeam[i] == TEAM_AUSTRALIA)
  7501.         {
  7502.             if(CapturedBy17 != 3) {
  7503.                 if( IfCapture[17] == 1 ) return 1;
  7504.                 IfCapture[17] = 0;
  7505.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy17", 3);
  7506.                 gscore++;
  7507. //SetTimer("ScoreText", 5000, 0);
  7508.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7509.                 CapturedBy17 = 3;
  7510.                 if(CapturedBy17 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the Field Hospital!");
  7511.                 GangZoneHideForAll(FH);
  7512.                 GangZoneShowForAll(FHG, COLOR_YELLOW);
  7513.                 GangZoneHideForAll(FHU);
  7514.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7515.                 CheckForLevelUpdate(i);
  7516.             }
  7517.         }else if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170) && gTeam[i] == TEAM_JAPAN)
  7518.         {
  7519.             if(CapturedBy17 != 4) {
  7520.                 if( IfCapture[17] == 1 ) return 1;
  7521.                 IfCapture[17] = 0;
  7522.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy17", 4);
  7523.                 gscore++;
  7524. //SetTimer("ScoreText", 5000, 0);
  7525.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7526.                 CapturedBy17 = 4;
  7527.                 if(CapturedBy17 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Field Hospital!");
  7528.                 GangZoneHideForAll(FH);
  7529.                 GangZoneShowForAll(FHG, COLOR_WHITE);
  7530.                 GangZoneHideForAll(FHU);
  7531.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7532.                 CheckForLevelUpdate(i);
  7533.             }
  7534.         }else if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170) && gTeam[i] == TEAM_RUSSIA)
  7535.         {
  7536.             if(CapturedBy17 != 5) {
  7537.                 if( IfCapture[17] == 1 ) return 1;
  7538.                 IfCapture[17] = 0;
  7539.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy17", 5);
  7540.                 gscore++;
  7541. //SetTimer("ScoreText", 5000, 0);
  7542.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7543.                 CapturedBy17 = 5;
  7544.                 if(CapturedBy17 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Field Hospital!");
  7545.                 GangZoneHideForAll(FH);
  7546.                 GangZoneShowForAll(FHG, COLOR_ORANGE);
  7547.                 GangZoneHideForAll(FHU);
  7548.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7549.                 CheckForLevelUpdate(i);
  7550.             }
  7551.         }
  7552.     }
  7553.  
  7554.     foreach(Player, i) {
  7555.         if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751) && gTeam[i] == TEAM_USA) {
  7556.             if(CapturedBy18 != 1) {
  7557.                 if( IfCapture[18] == 1 ) return 1;
  7558.                 IfCapture[18] = 0;
  7559.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy18", 1);
  7560.                 uscore++;
  7561. //SetTimer("ScoreText", 5000, 0);
  7562.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7563.                 CapturedBy18 = 1;
  7564.                 if(CapturedBy18 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Gun Warehouse!");
  7565.                 GangZoneHideForAll(GW);
  7566.                 GangZoneShowForAll(GWU, COLOR_BLUE);
  7567.                 GangZoneHideForAll(GWG);
  7568.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  7569.                 CheckForLevelUpdate(i);
  7570.             }
  7571.         }else if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751) && gTeam[i] == TEAM_GERMANY)
  7572.         {
  7573.             if(CapturedBy18 != 2) {
  7574.                 if( IfCapture[18] == 1 ) return 1;
  7575.                 IfCapture[18] = 0;
  7576.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy18", 2);
  7577.                 gscore++;
  7578. //SetTimer("ScoreText", 5000, 0);
  7579.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7580.                 CapturedBy18 = 2;
  7581.                 if(CapturedBy18 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Gun Warhouse!");
  7582.                 GangZoneHideForAll(GW);
  7583.                 GangZoneShowForAll(GWG, COLOR_RED);
  7584.                 GangZoneHideForAll(GWU);
  7585.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7586.                 CheckForLevelUpdate(i);
  7587.             }
  7588.         }else if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751) && gTeam[i] == TEAM_AUSTRALIA)
  7589.         {
  7590.             if(CapturedBy18 != 3) {
  7591.                 if( IfCapture[18] == 1 ) return 1;
  7592.                 IfCapture[18] = 0;
  7593.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy18", 3);
  7594.                 gscore++;
  7595. //SetTimer("ScoreText", 5000, 0);
  7596.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7597.                 CapturedBy18 = 3;
  7598.                 if(CapturedBy18 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the Gun Warehouse!");
  7599.                 GangZoneHideForAll(GW);
  7600.                 GangZoneShowForAll(GWG, COLOR_YELLOW);
  7601.                 GangZoneHideForAll(GWU);
  7602.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7603.                 CheckForLevelUpdate(i);
  7604.             }
  7605.         }else if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751) && gTeam[i] == TEAM_JAPAN)
  7606.         {
  7607.             if(CapturedBy18 != 4) {
  7608.                 if( IfCapture[18] == 1 ) return 1;
  7609.                 IfCapture[18] = 0;
  7610.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy18", 4);
  7611.                 gscore++;
  7612. //SetTimer("ScoreText", 5000, 0);
  7613.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7614.                 CapturedBy18 = 4;
  7615.                 if(CapturedBy18 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Gun Warehouse!");
  7616.                 GangZoneHideForAll(GW);
  7617.                 GangZoneShowForAll(GWG, COLOR_WHITE);
  7618.                 GangZoneHideForAll(GWU);
  7619.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7620.                 CheckForLevelUpdate(i);
  7621.             }
  7622.         }else if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751) && gTeam[i] == TEAM_RUSSIA)
  7623.         {
  7624.             if(CapturedBy18 != 5) {
  7625.                 if( IfCapture[18] == 1 ) return 1;
  7626.                 IfCapture[18] = 0;
  7627.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy18", 5);
  7628.                 gscore++;
  7629. //SetTimer("ScoreText", 5000, 0);
  7630.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7631.                 CapturedBy18 = 5;
  7632.                 if(CapturedBy18 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Gun Warehouse!");
  7633.                 GangZoneHideForAll(GW);
  7634.                 GangZoneShowForAll(GWG, COLOR_ORANGE);
  7635.                 GangZoneHideForAll(GWU);
  7636.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7637.                 CheckForLevelUpdate(i);
  7638.             }
  7639.         }
  7640.     }
  7641.  
  7642.     foreach(Player, i) {
  7643.         if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798) && gTeam[i] == TEAM_USA) {
  7644.             if(CapturedBy19 != 1) {
  7645.                 if( IfCapture[19] == 1 ) return 1;
  7646.                 IfCapture[19] = 0;
  7647.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy19", 1);
  7648.                 uscore++;
  7649. //SetTimer("ScoreText", 5000, 0);
  7650.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7651.                 CapturedBy19 = 1;
  7652.                 if(CapturedBy19 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Docks!");
  7653.                 GangZoneHideForAll(Dock);
  7654.                 GangZoneShowForAll(DockU, COLOR_BLUE);
  7655.                 GangZoneHideForAll(DockG);
  7656.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  7657.                 CheckForLevelUpdate(i);
  7658.             }
  7659.         }else if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798) && gTeam[i] == TEAM_GERMANY)
  7660.         {
  7661.             if(CapturedBy19 != 2) {
  7662.                 if( IfCapture[19] == 1 ) return 1;
  7663.                 IfCapture[19] = 0;
  7664.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy19", 2);
  7665.                 gscore++;
  7666. //SetTimer("ScoreText", 5000, 0);
  7667.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7668.                 CapturedBy19 = 2;
  7669.                 if(CapturedBy19 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Docks!");
  7670.                 GangZoneHideForAll(Dock);
  7671.                 GangZoneShowForAll(DockG, COLOR_RED);
  7672.                 GangZoneHideForAll(DockU);
  7673.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7674.                 CheckForLevelUpdate(i);
  7675.             }
  7676.         }else if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798) && gTeam[i] == TEAM_AUSTRALIA)
  7677.         {
  7678.             if(CapturedBy19 != 3) {
  7679.                 if( IfCapture[19] == 1 ) return 1;
  7680.                 IfCapture[19] = 0;
  7681.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy19", 3);
  7682.                 gscore++;
  7683. //SetTimer("ScoreText", 5000, 0);
  7684.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7685.                 CapturedBy19 = 3;
  7686.                 if(CapturedBy19 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the Docks!");
  7687.                 GangZoneHideForAll(Dock);
  7688.                 GangZoneShowForAll(DockG, COLOR_YELLOW);
  7689.                 GangZoneHideForAll(DockU);
  7690.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7691.                 CheckForLevelUpdate(i);
  7692.             }
  7693.         }else if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798) && gTeam[i] == TEAM_JAPAN)
  7694.         {
  7695.             if(CapturedBy19 != 4) {
  7696.                 if( IfCapture[19] == 1 ) return 1;
  7697.                 IfCapture[19] = 0;
  7698.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy19", 4);
  7699.                 gscore++;
  7700. //SetTimer("ScoreText", 5000, 0);
  7701.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7702.                 CapturedBy19 = 4;
  7703.                 if(CapturedBy19 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Docks!");
  7704.                 GangZoneHideForAll(Dock);
  7705.                 GangZoneShowForAll(DockG, COLOR_WHITE);
  7706.                 GangZoneHideForAll(DockU);
  7707.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7708.                 CheckForLevelUpdate(i);
  7709.             }
  7710.         }else if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798) && gTeam[i] == TEAM_RUSSIA)
  7711.         {
  7712.             if(CapturedBy19 != 5) {
  7713.                 if( IfCapture[19] == 1 ) return 1;
  7714.                 IfCapture[19] = 0;
  7715.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy19", 5);
  7716.                 gscore++;
  7717. //SetTimer("ScoreText", 5000, 0);
  7718.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7719.                 CapturedBy19 = 5;
  7720.                 if(CapturedBy19 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Docks!");
  7721.                 GangZoneHideForAll(Dock);
  7722.                 GangZoneShowForAll(DockG, COLOR_ORANGE);
  7723.                 GangZoneHideForAll(DockU);
  7724.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7725.                 CheckForLevelUpdate(i);
  7726.             }
  7727.         }
  7728.     }
  7729.  
  7730.     foreach(Player, i) {
  7731.         if(IsPlayerInArea(i, 1411.231323, 2715.757568, 1539.231323, 2875.757568) && gTeam[i] == TEAM_USA) {
  7732.             if(CapturedBy20 != 1) {
  7733.                 if( IfCapture[20] == 1 ) return 1;
  7734.                 IfCapture[20] = 0;
  7735.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy20", 1);
  7736.                 uscore++;
  7737. //SetTimer("ScoreText", 5000, 0);
  7738.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7739.                 CapturedBy20 = 1;
  7740.                 if(CapturedBy20 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Country Club!");
  7741.                 GangZoneHideForAll(CC);
  7742.                 GangZoneShowForAll(CCU, COLOR_BLUE);
  7743.                 GangZoneHideForAll(CCG);
  7744.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  7745.                 CheckForLevelUpdate(i);
  7746.             }
  7747.         }else if(IsPlayerInArea(i, 1411.231323, 2715.757568, 1539.231323, 2875.757568) && gTeam[i] == TEAM_GERMANY)
  7748.         {
  7749.             if(CapturedBy20 != 2) {
  7750.                 if( IfCapture[20] == 1 ) return 1;
  7751.                 IfCapture[20] = 0;
  7752.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy20", 2);
  7753.                 gscore++;
  7754. //SetTimer("ScoreText", 5000, 0);
  7755.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7756.                 CapturedBy20 = 2;
  7757.                 if(CapturedBy20 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the COuntry Club!");
  7758.                 GangZoneHideForAll(CC);
  7759.                 GangZoneShowForAll(CCG, COLOR_RED);
  7760.                 GangZoneHideForAll(CCU);
  7761.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7762.                 CheckForLevelUpdate(i);
  7763.             }
  7764.         }else if(IsPlayerInArea(i, 1411.231323, 2715.757568, 1539.231323, 2875.7575688) && gTeam[i] == TEAM_AUSTRALIA)
  7765.         {
  7766.             if(CapturedBy20 != 3) {
  7767.                 if( IfCapture[20] == 1 ) return 1;
  7768.                 IfCapture[20] = 0;
  7769.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy20", 3);
  7770.                 gscore++;
  7771. //SetTimer("ScoreText", 5000, 0);
  7772.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7773.                 CapturedBy20 = 3;
  7774.                 if(CapturedBy20 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the COuntry Club!");
  7775.                 GangZoneHideForAll(CC);
  7776.                 GangZoneShowForAll(CCG, COLOR_YELLOW);
  7777.                 GangZoneHideForAll(CCU);
  7778.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7779.                 CheckForLevelUpdate(i);
  7780.             }
  7781.         }else if(IsPlayerInArea(i, 1411.231323, 2715.757568, 1539.231323, 2875.757568) && gTeam[i] == TEAM_JAPAN)
  7782.         {
  7783.             if(CapturedBy20 != 4) {
  7784.                 if( IfCapture[20] == 1 ) return 1;
  7785.                 IfCapture[20] = 0;
  7786.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy20", 4);
  7787.                 gscore++;
  7788. //SetTimer("ScoreText", 5000, 0);
  7789.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7790.                 CapturedBy20 = 4;
  7791.                 if(CapturedBy20 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Country Club!");
  7792.                 GangZoneHideForAll(CC);
  7793.                 GangZoneShowForAll(CCG, COLOR_WHITE);
  7794.                 GangZoneHideForAll(CCU);
  7795.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7796.                 CheckForLevelUpdate(i);
  7797.             }
  7798.         }else if(IsPlayerInArea(i, 1411.231323, 2715.757568, 1539.231323, 2875.757568) && gTeam[i] == TEAM_RUSSIA)
  7799.         {
  7800.             if(CapturedBy20 != 5) {
  7801.                 if( IfCapture[20] == 1 ) return 1;
  7802.                 IfCapture[20] = 0;
  7803.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy20", 5);
  7804.                 gscore++;
  7805. //SetTimer("ScoreText", 5000, 0);
  7806.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  7807.                 CapturedBy20 = 5;
  7808.                 if(CapturedBy20 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Country Club!");
  7809.                 GangZoneHideForAll(CC);
  7810.                 GangZoneShowForAll(CCG, COLOR_ORANGE);
  7811.                 GangZoneHideForAll(CCU);
  7812.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  7813.                 CheckForLevelUpdate(i);
  7814.             }
  7815.         }
  7816.     }
  7817.     return 1;
  7818. }
  7819.  
  7820.  
  7821. public SendPlayerFormattedText(playerid, const string[], define)
  7822. {
  7823.     new tmpbuf[256];
  7824.     format(tmpbuf, sizeof(tmpbuf), string, define);
  7825.     SendClientMessage(playerid, 0x8CFFA9FF, tmpbuf);
  7826. }
  7827.  
  7828.  
  7829. SendUSAMessage(color, text[])
  7830. {
  7831.     foreach(Player, i) {
  7832.         if (gTeam[i] == TEAM_USA) {
  7833.             SendClientMessage(i, color, text);
  7834.         }
  7835.     }
  7836.     return 1;
  7837. }
  7838.  
  7839.  
  7840. SendGERMANYMessage(color, text[])
  7841. {
  7842.     foreach(Player, i) {
  7843.         if (gTeam[i] == TEAM_GERMANY) {
  7844.             SendClientMessage(i, color, text);
  7845.         }
  7846.     }
  7847.     return 1;
  7848. }
  7849.  
  7850.  
  7851. SendAUSTRALIAMessage(color, text[])
  7852. {
  7853.     foreach(Player, i) {
  7854.         if (gTeam[i] == TEAM_AUSTRALIA) {
  7855.             SendClientMessage(i, color, text);
  7856.         }
  7857.     }
  7858.     return 1;
  7859. }
  7860.  
  7861.  
  7862. SendRUSSIAMessage(color, text[])
  7863. {
  7864.     foreach(Player, i) {
  7865.         if (gTeam[i] == TEAM_RUSSIA) {
  7866.             SendClientMessage(i, color, text);
  7867.         }
  7868.     }
  7869.     return 1;
  7870. }
  7871.  
  7872.  
  7873. SendJAPANMessage(color, text[])
  7874. {
  7875.     foreach(Player, i) {
  7876.         if (gTeam[i] == TEAM_JAPAN) {
  7877.             SendClientMessage(i, color, text);
  7878.         }
  7879.     }
  7880.     return 1;
  7881. }
  7882.  
  7883.  
  7884. /*
  7885. SendSquadMessage(teamid, color, text[])
  7886. {
  7887.     for(new i = 0; i < MAX_PLAYERS; i ++)
  7888.     {
  7889.         if(IsPlayerConnected(i))
  7890.         {
  7891.             if(PlayerSquad[i] == teamid)
  7892.             {
  7893.                 SendClientMessage(i, color, text);
  7894.             }
  7895. }
  7896. }
  7897. return 1;
  7898. }
  7899. */
  7900.  
  7901. stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  7902. {
  7903.     new Float:oldposx, Float:oldposy, Float:oldposz;
  7904.     new Float:tempposx, Float:tempposy, Float:tempposz;
  7905.     GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  7906.     tempposx = (oldposx -x);
  7907.     tempposy = (oldposy -y);
  7908.     tempposz = (oldposz -z);
  7909.     if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) {
  7910.         return 1;
  7911.     }
  7912.     return 0;
  7913. }
  7914.  
  7915.  
  7916. forward mission(playerid);
  7917.  
  7918. public mission(playerid)
  7919. {
  7920.     if(kills[playerid] != 6) {
  7921.         SendClientMessage(playerid, COLOR_WHITE, "You failed the mission. . . .");
  7922.     }
  7923.     return 1;
  7924. }
  7925.  
  7926.  
  7927. RandomPlayerID()
  7928. {
  7929.     new playerid, connected;
  7930.     for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(playerid) == 1) connected++;
  7931.     if(connected == 0) return -1;
  7932.     start:
  7933.     playerid = random(MAX_PLAYERS);
  7934.     if(IsPlayerConnected(playerid) == 0) goto start;
  7935.     return playerid;
  7936. }
  7937.  
  7938.  
  7939. forward Hitman(playerid);
  7940.  
  7941. public Hitman(playerid)
  7942. {
  7943.     new rand = RandomPlayerID();
  7944.     if(gTeam[playerid] == TEAM_USA && gTeam[rand] == TEAM_USA) {
  7945.         SetTimerEx("Hitman", 100, 0, "i", playerid);
  7946.     }
  7947.     else if(gTeam[playerid] == TEAM_USA && gTeam[rand] == TEAM_GERMANY) {
  7948.         new randplayern[MAX_PLAYER_NAME];
  7949.         randperson[rand] = GetPlayerName(rand, randplayern, sizeof(randplayern));
  7950.         new string[128];
  7951.         format(string, sizeof(string), "Find and destroy %s!", randplayern);
  7952.         SendClientMessage(playerid, COLOR_WHITE, string);
  7953.     }
  7954.     return 1;
  7955. }
  7956.  
  7957.  
  7958. forward HitmanG(playerid);
  7959.  
  7960. public HitmanG(playerid)
  7961. {
  7962.     new rand = RandomPlayerID();
  7963.     if(gTeam[playerid] == TEAM_GERMANY && gTeam[rand] == TEAM_GERMANY) {
  7964.         SetTimerEx("HitmanG", 100, 0, "i", playerid);
  7965.     }
  7966.     else if(gTeam[playerid] == TEAM_GERMANY && gTeam[rand] == TEAM_USA) {
  7967.         new randplayern[MAX_PLAYER_NAME];
  7968.         randperson[rand] = GetPlayerName(rand, randplayern, sizeof(randplayern));
  7969.         new string[128];
  7970.         format(string, sizeof(string), "Find and destroy %s!", randplayern);
  7971.         SendClientMessage(playerid, COLOR_WHITE, string);
  7972.     }
  7973.     return 1;
  7974. }
  7975.  
  7976.  
  7977. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  7978. {
  7979.  
  7980.     if (GetVehicleModel(PlayerBarracks[playerid]) == 433) {
  7981.         new vehicleid = PlayerBarracks[playerid];
  7982.         if (IsInBarracks[playerid] == true) {
  7983.             if (newkeys & KEY_SECONDARY_ATTACK) {
  7984.  
  7985.                 LastVehicle[playerid] = PlayerBarracks[playerid];
  7986.                 Barracks[vehicleid][seats] = Barracks[vehicleid][seats] - 1;
  7987.                 new Float:X,Float:Y,Float:Z,Float:Ang;
  7988.                 GetVehiclePos(vehicleid, X, Y, Z);
  7989.                 GetVehicleZAngle(vehicleid, Ang);
  7990.                 X += (2 * floatsin(-Ang, degrees));
  7991.                 Y += (2 * floatcos(-Ang, degrees));
  7992.                 SetPlayerPos(playerid, X, Y, Z);
  7993.                 X += (2 * floatsin(-(Ang-45.0), degrees));
  7994.                 Y += (2 * floatcos(-(Ang-45.0), degrees));
  7995.                 SetPlayerPos(playerid, X, Y, Z);
  7996.                 SetPlayerFacingAngle(playerid, Ang);
  7997.                 cbx[playerid] = X;
  7998.                 cby[playerid] = Y-2;
  7999.                 cbz[playerid] = Z;
  8000.                 cba[playerid] = Ang;
  8001.                 TogglePlayerSpectating(playerid, false);
  8002.                 SetTimerEx("ExitCB", 500, 0, "i", playerid);
  8003.                 GivePlayerWeapon(playerid, 46, 1);
  8004.                 SetCameraBehindPlayer(playerid);
  8005.                 IsInBarracks[playerid] = false;
  8006.                 PlayerBarracks[playerid] = 0;
  8007.             }
  8008.         }
  8009.     }
  8010.  
  8011.     if (GetVehicleModel(PlayerCargoB[playerid]) == 548|| GetVehicleModel(PlayerCargoB[playerid]) == 563|| GetVehicleModel(PlayerCargoB[playerid]) == 511 ) {
  8012.         new vehicleid = PlayerCargoB[playerid];
  8013.         if (IsInCargoB[playerid] == true) {
  8014.             if (newkeys & KEY_SECONDARY_ATTACK) {
  8015.                 LastVehicle[playerid] = PlayerCargoB[playerid];
  8016.                 CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] - 1;
  8017.                 new Float:X,Float:Y,Float:Z,Float:Ang;
  8018.                 GetVehiclePos(vehicleid, X, Y, Z);
  8019.                 GetVehicleZAngle(vehicleid, Ang);
  8020.                 TogglePlayerSpectating(playerid, false);
  8021.                 X += (2 * floatsin(-Ang, degrees));
  8022.                 Y += (2 * floatcos(-Ang, degrees));
  8023.                 SetPlayerPos(playerid, X, Y, Z);
  8024.                 X += (2 * floatsin(-(Ang-45.0), degrees));
  8025.                 Y += (2 * floatcos(-(Ang-45.0), degrees));
  8026.                 SetPlayerPos(playerid, X, Y, Z);
  8027.                 SetPlayerFacingAngle(playerid, Ang);
  8028.                 cbx[playerid] = X;
  8029.                 cby[playerid] = Y-2;
  8030.                 cbz[playerid] = Z;
  8031.                 cba[playerid] = Ang;
  8032.                 SetTimerEx("ExitCB", 500, 0, "i", playerid);
  8033.                 SetPlayerFacingAngle(playerid, Ang);
  8034.                 SetCameraBehindPlayer(playerid);
  8035.                 IsInCargoB[playerid] = false;
  8036.                 PlayerCargoB[playerid] = 0;
  8037.  
  8038.             }
  8039.         }
  8040.     }
  8041.  
  8042.     if(gPlayerClass[playerid] == DEMOLITION) {
  8043.         if((newkeys & KEY_CROUCH) && (newkeys & KEY_FIRE) ) {
  8044.             if(pSpawned[playerid] == 1) {
  8045.                 if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
  8046.                     if( hasbombs[playerid] == 1) {
  8047.                         if(Planted[playerid] == 1) {
  8048.                             GivePlayerWeapon(playerid, 40, 1);
  8049.                             ClearAnimations(playerid);
  8050.                             ApplyAnimation(playerid,"PED","bomber",4.0,0,0,0,0,1000);
  8051.                             SetTimerEx("Explode", 1200, 0, "i", playerid);
  8052.                             SetPlayerArmedWeapon(playerid, 0);
  8053.                             return 1;
  8054.                         }
  8055.                         if(Planted[playerid] == 0) {
  8056.                             GetPlayerPos(playerid, bx[playerid], by[playerid], bz[playerid]);
  8057.                             C4[playerid] = CreateObject(1252, bx[playerid], by[playerid], bz[playerid]-1, -87.6624853592, 0.000000, 0.000000);
  8058.                             Planted[playerid] = 1;
  8059.                             ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
  8060.                             SendClientMessage(playerid,COLOR_YELLOW,"Bomb Planted, Press 'CROUCH + FIRE' to detonate it.");
  8061.                             return 1;
  8062.                         }
  8063.                     } else SendClientMessage(playerid, COLOR_GREY, "You need to be on the explosive class!");
  8064.                 } else SendClientMessage(playerid,COLOR_GREY,"You cannot plant a bomb in a car");
  8065.             } else SendClientMessage(playerid,COLOR_GREY,"You must spawn before planting a bomb");
  8066.         }
  8067.     }
  8068.     return 1;
  8069. }
  8070.  
  8071.  
  8072. public OnPlayerStateChange(playerid, newstate, oldstate)
  8073. {
  8074.     if( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER ) LastVehicle[playerid] = GetPlayerVehicleID(playerid);
  8075.  
  8076.     new vehicleid = LastVehicle[playerid];
  8077.     if( oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) {
  8078.         if (GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 433 || GetVehicleModel(vehicleid) == 563 || GetVehicleModel(vehicleid) == 511) {
  8079.             CargoBobUser[playerid][vehicleid] =0;
  8080.             BarracksUser[playerid][vehicleid] =0;
  8081.         }
  8082.     }
  8083.  
  8084.     if( !IsPlayerAdmin(playerid)) {
  8085.         new vehicleidx = GetPlayerVehicleID(playerid);
  8086.         if(newstate == PLAYER_STATE_DRIVER) {
  8087.             if(GetVehicleModel(vehicleidx) == 460) {
  8088.                 if(rank[playerid] >= 3) {
  8089.                     IsInHunter[playerid] = vehicleidx;
  8090.                 }
  8091.                 else {
  8092.                     new Float:X, Float:Y, Float:Z;
  8093.                     GetPlayerPos(playerid, X, Y, Z);
  8094.                     SetPlayerPos(playerid, X+2.0, Y, Z);
  8095.                     SendClientMessage(playerid, COLOR_RED, "You arent rank 3!");
  8096.                 }
  8097.             }
  8098.  
  8099.             if (GetVehicleModel(vehicleidx) == 432) {
  8100.                 if(rank[playerid] >= 2) {
  8101.                     IsInRhino[playerid] = vehicleidx;
  8102.                 }
  8103.                 else {
  8104.                     new Float:X, Float:Y, Float:Z;
  8105.                     GetPlayerPos(playerid, X, Y, Z);
  8106.                     SetPlayerPos(playerid, X+2.0, Y, Z+2.0);
  8107.                     SendClientMessage(playerid, COLOR_RED, "You arent rank 2!");
  8108.                 }
  8109.             }
  8110.  
  8111.             if (GetVehicleModel(vehicleidx) == 520) {
  8112.                 if(rank[playerid] >= 3) {
  8113.                     if(gPlayerClass[playerid] == PILOT || gPlayerClass[playerid] == ADMIN ) {
  8114. //is in the hydra
  8115.                     }
  8116.                     else {
  8117.                         SendClientMessage(playerid, COLOR_GREY, "You have to be a pilot to drive a hydra!");
  8118.                         new Float:X, Float:Y, Float:Z;
  8119.                         GetPlayerPos(playerid, X, Y, Z);
  8120.                         SetPlayerPos(playerid, X+2.0, Y, Z);
  8121.                     }
  8122.                 }
  8123.                 else {
  8124.                     new Float:X, Float:Y, Float:Z;
  8125.                     GetPlayerPos(playerid, X, Y, Z);
  8126.                     SetPlayerPos(playerid, X+2.0, Y, Z+2.0);
  8127.                     SendClientMessage(playerid, COLOR_RED, "You arent rank 2!");
  8128.                 }
  8129.             }
  8130.  
  8131.             if (GetVehicleModel(vehicleidx) == 425) {
  8132.                 if(rank[playerid] >= 4) {
  8133.                     if(gPlayerClass[playerid] == PILOT || gPlayerClass[playerid] == ADMIN ) {
  8134. //is in the hydra
  8135.                     }
  8136.                     else {
  8137.                         SendClientMessage(playerid, COLOR_GREY, "You have to be a pilot to drive a HUNTER!");
  8138.                         new Float:X, Float:Y, Float:Z;
  8139.                         GetPlayerPos(playerid, X, Y, Z);
  8140.                         SetPlayerPos(playerid, X+2.0, Y, Z);
  8141.                     }
  8142.                 }
  8143.                 else {
  8144.                     new Float:X, Float:Y, Float:Z;
  8145.                     GetPlayerPos(playerid, X, Y, Z);
  8146.                     SetPlayerPos(playerid, X+2.0, Y, Z+2.0);
  8147.                     SendClientMessage(playerid, COLOR_RED, "You arent rank 4!");
  8148.                 }
  8149.             }
  8150.         }
  8151.     }
  8152.     return 1;
  8153. }
  8154.  
  8155.  
  8156. public Explode(playerid)
  8157. {
  8158.     DestroyObject(C4[playerid]);
  8159.     CreateExplosion(bx[playerid], by[playerid], bz[playerid], 6, ExplosionRadius);
  8160.     GameTextForPlayer(playerid, "~R~Bomb Detonated", 2000, 3);
  8161.     Planted[playerid] = 0;
  8162.     return 1;
  8163. }
  8164.  
  8165.  
  8166. public GetClosestPlayer(p1)
  8167. {
  8168.     new x,Float:dis,Float:dis2,player;
  8169.     player = -1;
  8170.     dis = 99999.99;
  8171.     for (x=0;x<MAX_PLAYERS;x++) {
  8172.         if(IsPlayerConnected(x)) {
  8173.             if(x != p1) {
  8174.                 dis2 = GetDistanceBetweenPlayers(x,p1);
  8175.                 if(dis2 < dis && dis2 != -1.00) {
  8176.                     dis = dis2;
  8177.                     player = x;
  8178.                 }
  8179.             }
  8180.         }
  8181.     }
  8182.     return player;
  8183. }
  8184.  
  8185.  
  8186. public Float:GetDistanceBetweenPlayers(p1,p2)
  8187. {
  8188.     new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  8189.     if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)) {
  8190.         return -1.00;
  8191.     }
  8192.     GetPlayerPos(p1,x1,y1,z1);
  8193.     GetPlayerPos(p2,x2,y2,z2);
  8194.     return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  8195. }
  8196.  
  8197.  
  8198. forward Nuke0();
  8199. public Nuke0()
  8200. {
  8201.     nuked = 0;                                    //Reset Timer for nukes, 3 minutes before nukes allowed again
  8202.     return 1;
  8203. }
  8204.  
  8205.  
  8206. forward NukeTime(playerid);
  8207. public NukeTime(playerid)
  8208. {
  8209.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  8210.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  8211.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  8212.     CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
  8213.     CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
  8214.     CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
  8215.     CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
  8216.     CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
  8217.  
  8218.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  8219.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  8220.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  8221.  
  8222.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  8223.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  8224.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  8225.     CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
  8226.     CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
  8227.     CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
  8228.     CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
  8229.     CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
  8230.  
  8231.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  8232.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  8233.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  8234.  
  8235.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  8236.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  8237.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  8238.     CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
  8239.     CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
  8240.     CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
  8241.     CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
  8242.     CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
  8243.  
  8244.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  8245.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  8246.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  8247.  
  8248.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  8249.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  8250.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  8251.     CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
  8252.     CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
  8253.     CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
  8254.     CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
  8255.     CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
  8256.  
  8257.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  8258.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  8259.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  8260.     return 1;
  8261. }
  8262.  
  8263.  
  8264. forward NukeTimeG(playerid);
  8265. public NukeTimeG(playerid)
  8266. {
  8267.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  8268.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  8269.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  8270.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  8271.     CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
  8272.     CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
  8273.     CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
  8274.     CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
  8275.     CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
  8276.  
  8277.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  8278.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  8279.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  8280.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  8281.  
  8282.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  8283.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  8284.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  8285.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  8286.     CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
  8287.     CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
  8288.     CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
  8289.     CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
  8290.     CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
  8291.  
  8292.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  8293.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  8294.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  8295.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  8296.  
  8297.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  8298.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  8299.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  8300.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  8301.     CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
  8302.     CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
  8303.     CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
  8304.     CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
  8305.     CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
  8306.  
  8307.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  8308.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  8309.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  8310.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  8311.  
  8312.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  8313.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  8314.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  8315.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  8316.     CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
  8317.     CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
  8318.     CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
  8319.     CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
  8320.     CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
  8321.  
  8322.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  8323.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  8324.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  8325.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  8326.     return 1;
  8327. }
  8328.  
  8329.  
  8330. forward HealAgain(playerid);
  8331. public HealAgain(playerid)
  8332. {
  8333.     healedrec[playerid] = 0;
  8334.     return 1;
  8335. }
  8336.  
  8337.  
  8338. forward SettingPlayerTeam();
  8339. public SettingPlayerTeam()
  8340. {
  8341.     foreach(Player, playerid) {
  8342.         SetPlayerTeam(playerid, gTeam[playerid]);
  8343.     }
  8344.     return 1;
  8345. }
  8346.  
  8347.  
  8348. forward restorerepair(playerid);
  8349. public restorerepair(playerid)
  8350. {
  8351.     repair[playerid] = 0;
  8352.     return 1;
  8353. }
  8354.  
  8355.  
  8356. forward restoreammo(playerid);
  8357. public restoreammo(playerid)
  8358. {
  8359.     ammoo[playerid] = 0;
  8360.     return 1;
  8361. }
  8362.  
  8363.  
  8364. ReturnUser(text[], playerid = INVALID_PLAYER_ID)
  8365. {
  8366.     new pos = 0;
  8367.     while (text[pos] < 0x21) {
  8368.         if (text[pos] == 0) return INVALID_PLAYER_ID;
  8369.         pos++;
  8370.     }
  8371.     new userid = INVALID_PLAYER_ID;
  8372.     if ((text[pos])) {
  8373.         userid = strval(text[pos]);
  8374.         if (userid >=0 && userid < MAX_PLAYERS) {
  8375.             if(!IsPlayerConnected(userid))
  8376.                 userid = INVALID_PLAYER_ID;
  8377.             else return userid;
  8378.             return playerid;
  8379.         }
  8380.     }
  8381.     new len = strlen(text[pos]);
  8382.     new count = 0;
  8383.     new pname[MAX_PLAYER_NAME];
  8384.     for (new i = 0; i < MAX_PLAYERS; i++) {
  8385.         if (IsPlayerConnected(i)) {
  8386.             GetPlayerName(i, pname, sizeof (pname));
  8387.             if (strcmp(pname, text[pos], true, len) == 0) {
  8388.                 if (len == strlen(pname)) return i;
  8389.                 else {
  8390.                     count++;
  8391.                     userid = i;
  8392.                 }
  8393.             }
  8394.         }
  8395.     }
  8396.     if (count != 1) {
  8397.         if (playerid != INVALID_PLAYER_ID) {
  8398.             if (count) SendClientMessage(playerid, YELLOW, "There are multiple users, enter full playername.");
  8399.             else SendClientMessage(playerid, RED, "Playername not found.");
  8400.         }
  8401.         userid = INVALID_PLAYER_ID;
  8402.     }
  8403.     return userid;
  8404. }
  8405.  
  8406.  
  8407. stock IsNumeric(const string[])
  8408. {
  8409.     for (new i = 0, j = strlen(string); i < j; i++)
  8410.         if (string[i] > '9' || string[i] < '0')
  8411.             return 0;
  8412.     return 1;
  8413. }
  8414.  
  8415.  
  8416. stock sscanf(string[], format[], {Float,_}
  8417. :...)
  8418. {
  8419. #if defined isnull
  8420.     if (isnull(string))
  8421. #else
  8422.         if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
  8423. #endif
  8424.     {
  8425.         return format[0];
  8426.     }
  8427. #pragma tabsize 4
  8428.     new
  8429.         formatPos = 0,
  8430.         stringPos = 0,
  8431.         paramPos = 2,
  8432.         paramCount = numargs(),
  8433.         delim = ' ';
  8434.     while (string[stringPos] && string[stringPos] <= ' ') {
  8435.         stringPos++;
  8436.     }
  8437.     while (paramPos < paramCount && string[stringPos]) {
  8438.         switch (format[formatPos++]) {
  8439.             case '\0':
  8440.             {
  8441.                 return 0;
  8442.             }
  8443.             case 'i', 'd':
  8444.             {
  8445.                 new
  8446.                     neg = 1,
  8447.                     num = 0,
  8448.                     ch = string[stringPos];
  8449.                 if (ch == '-') {
  8450.                     neg = -1;
  8451.                     ch = string[++stringPos];
  8452.                 }
  8453.                 do {
  8454.                     stringPos++;
  8455.                     if ('0' <= ch <= '9') {
  8456.                         num = (num * 10) + (ch - '0');
  8457.                     }
  8458.                     else {
  8459.                         return -1;
  8460.                     }
  8461.                 }
  8462.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  8463.                 setarg(paramPos, 0, num * neg);
  8464.             }
  8465.             case 'h', 'x':
  8466.             {
  8467.                 new
  8468.                     num = 0,
  8469.                     ch = string[stringPos];
  8470.                 do {
  8471.                     stringPos++;
  8472.                     switch (ch) {
  8473.                         case 'x', 'X':
  8474.                         {
  8475.                             num = 0;
  8476.                             continue;
  8477.                         }
  8478.                         case '0' .. '9':
  8479.                         {
  8480.                             num = (num << 4) | (ch - '0');
  8481.                         }
  8482.                         case 'a' .. 'f':
  8483.                         {
  8484.                             num = (num << 4) | (ch - ('a' - 10));
  8485.                         }
  8486.                         case 'A' .. 'F':
  8487.                         {
  8488.                             num = (num << 4) | (ch - ('A' - 10));
  8489.                         }
  8490.                         default:
  8491.                         {
  8492.                             return -1;
  8493.                         }
  8494.                     }
  8495.                 }
  8496.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  8497.                 setarg(paramPos, 0, num);
  8498.             }
  8499.             case 'c':
  8500.             {
  8501.                 setarg(paramPos, 0, string[stringPos++]);
  8502.             }
  8503.             case 'f':
  8504.             {
  8505.                 setarg(paramPos, 0, _:floatstr(string[stringPos]));
  8506.             }
  8507.             case 'p':
  8508.             {
  8509.                 delim = format[formatPos++];
  8510.                 continue;
  8511.             }
  8512.             case '\'':
  8513.             {
  8514.                 new
  8515.                     end = formatPos - 1,
  8516.                     ch;
  8517.                 while ((ch = format[++end]) && ch != '\'') {}
  8518.                 if (!ch) {
  8519.                     return -1;
  8520.                 }
  8521.                 format[end] = '\0';
  8522.                 if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1) {
  8523.                     if (format[end + 1]) {
  8524.                         return -1;
  8525.                     }
  8526.                     return 0;
  8527.                 }
  8528.                 format[end] = '\'';
  8529.                 stringPos = ch + (end - formatPos);
  8530.                 formatPos = end + 1;
  8531.             }
  8532.             case 'u':
  8533.             {
  8534.                 new
  8535.                     end = stringPos - 1,
  8536.                     id = 0,
  8537.                     bool:num = true,
  8538.                     ch;
  8539.                 while ((ch = string[++end]) && ch != delim) {
  8540.                     if (num) {
  8541.                         if ('0' <= ch <= '9') {
  8542.                             id = (id * 10) + (ch - '0');
  8543.                         }
  8544.                         else {
  8545.                             num = false;
  8546.                         }
  8547.                     }
  8548.                 }
  8549.                 if (num && IsPlayerConnected(id)) {
  8550.                     setarg(paramPos, 0, id);
  8551.                 }
  8552.                 else {
  8553. #if !defined foreach
  8554. #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  8555. #define __SSCANF_FOREACH__
  8556. #endif
  8557.                     string[end] = '\0';
  8558.                     num = false;
  8559.                     new
  8560.                         name[MAX_PLAYER_NAME];
  8561.                     id = end - stringPos;
  8562.                     foreach (Player, playerid) {
  8563.                         GetPlayerName(playerid, nameee, sizeof (name));
  8564.                         if (!strcmp(name, string[stringPos], true, id)) {
  8565.                             setarg(paramPos, 0, playerid);
  8566.                             num = true;
  8567.                             break;
  8568.                         }
  8569.                     }
  8570.                     if (!num) {
  8571.                         setarg(paramPos, 0, INVALID_PLAYER_ID);
  8572.                     }
  8573.                     string[end] = ch;
  8574. #if defined __SSCANF_FOREACH__
  8575. #undef foreach
  8576. #undef __SSCANF_FOREACH__
  8577. #endif
  8578.                 }
  8579.                 stringPos = end;
  8580.             }
  8581.             case 's', 'z':
  8582.             {
  8583.                 new
  8584.                     i = 0,
  8585.                     ch;
  8586.                 if (format[formatPos]) {
  8587.                     while ((ch = string[stringPos++]) && ch != delim) {
  8588.                         setarg(paramPos, i++, ch);
  8589.                     }
  8590.                     if (!i) {
  8591.                         return -1;
  8592.                     }
  8593.                 }
  8594.                 else {
  8595.                     while ((ch = string[stringPos++])) {
  8596.                         setarg(paramPos, i++, ch);
  8597.                     }
  8598.                 }
  8599.                 stringPos--;
  8600.                 setarg(paramPos, i, '\0');
  8601.             }
  8602.             default:
  8603.             {
  8604.                 continue;
  8605.             }
  8606.         }
  8607.         while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ') {
  8608.             stringPos++;
  8609.         }
  8610.         while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' ')) {
  8611.             stringPos++;
  8612.         }
  8613.         paramPos++;
  8614.     }
  8615.     do {
  8616.         if ((delim = format[formatPos++]) > ' ') {
  8617.             if (delim == '\'') {
  8618.                 while ((delim = format[formatPos++]) && delim != '\'') {}
  8619.             }
  8620.             else if (delim != 'z') {
  8621.                 return delim;
  8622.             }
  8623.         }
  8624.     }
  8625.     while (delim > ' ');
  8626.     return 0;
  8627. }
  8628.  
  8629.  
  8630. stock CheckForLevelUpdate(playerid)
  8631. {
  8632.     if ( GetPlayerScore(playerid) >= 50 ) {
  8633.         if( rank[playerid] < 1 ) {
  8634.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8635.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8636.             SendClientMessage(playerid, COLOR_CON_GREEN, "*You are a Private!");
  8637.             rank[playerid] = 1;
  8638.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8639.             GivePlayerMoney(playerid, 5000);
  8640.         }
  8641.     }
  8642.  
  8643.     if ( GetPlayerScore(playerid) >= 100 ) {
  8644.         if( rank[playerid] < 2 ) {
  8645.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8646.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8647.             SendClientMessage(playerid, COLOR_CON_GREEN, "**You are a Corporal!");
  8648.             rank[playerid] = 2;
  8649.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8650.             GivePlayerMoney(playerid, 10000);
  8651.         }
  8652.     }
  8653.  
  8654.     if ( GetPlayerScore(playerid) >= 250 ) {
  8655.         if( rank[playerid] < 3 ) {
  8656.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8657.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8658.             SendClientMessage(playerid, COLOR_CON_GREEN, "***You are a Sergeant!");
  8659.             rank[playerid] = 3;
  8660.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8661.             GivePlayerMoney(playerid, 15000);
  8662.         }
  8663.     }
  8664.  
  8665.     if ( GetPlayerScore(playerid) >= 500  ) {
  8666.         if( rank[playerid] < 4 ) {
  8667.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8668.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8669.             SendClientMessage(playerid, COLOR_CON_GREEN, "****You are a Lieutenant!");
  8670.             rank[playerid] = 4;
  8671.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8672.             GivePlayerMoney(playerid, 20000);
  8673.         }
  8674.     }
  8675.  
  8676.     if ( GetPlayerScore(playerid) >= 750 ) {
  8677.         if( rank[playerid] < 5 ) {
  8678.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8679.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8680.             SendClientMessage(playerid, COLOR_CON_GREEN, "*****You are a Captain!");
  8681.             rank[playerid] = 5;
  8682.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8683.             GivePlayerMoney(playerid, 25000);
  8684.         }
  8685.     }
  8686.  
  8687.     if ( GetPlayerScore(playerid) >= 1000 ) {
  8688.         if( rank[playerid] < 6 ) {
  8689.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8690.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8691.             SendClientMessage(playerid, COLOR_CON_GREEN, "******You are a Major!");
  8692.             SendClientMessage(playerid, COLOR_CON_GREEN,"Congratulations! You recieved all the badges!");
  8693.             SendClientMessage(playerid, COLOR_CON_GREEN,"You may still recieve ranks but you will not gain anymore badges.");
  8694.             rank[playerid] = 6;
  8695.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8696.             GivePlayerMoney(playerid, 30000);
  8697.         }
  8698.     }
  8699.  
  8700.     if ( GetPlayerScore(playerid) >= 1250) {
  8701.         if( rank[playerid] < 7 ) {
  8702.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8703.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8704.             SendClientMessage(playerid, COLOR_CON_GREEN, "*******You are a Colonel!");
  8705.             rank[playerid] = 7;
  8706.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8707.             GivePlayerMoney(playerid, 35000);
  8708.         }
  8709.     }
  8710.  
  8711.     if ( GetPlayerScore(playerid) >= 1500 ) {
  8712.         if( rank[playerid] < 8 ) {
  8713.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8714.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8715.             SendClientMessage(playerid, COLOR_CON_GREEN, "********You are a Lieutenant General!");
  8716.             rank[playerid] = 8;
  8717.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8718.             GivePlayerMoney(playerid, 40000);
  8719.         }
  8720.     }
  8721.  
  8722.     if ( GetPlayerScore(playerid) >= 2000 ) {
  8723.         if( rank[playerid] < 9 ) {
  8724.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8725.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8726.             SendClientMessage(playerid, COLOR_CON_GREEN, "*********You are a Major General!");
  8727.             rank[playerid] = 9;
  8728.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8729.             GivePlayerMoney(playerid, 45000);
  8730.         }
  8731.     }
  8732.  
  8733.     if ( GetPlayerScore(playerid) >= 2250 ) {
  8734.         if( rank[playerid] < 10 ) {
  8735.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8736.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8737.             SendClientMessage(playerid, COLOR_CON_GREEN, "**********You are a General!");
  8738.             rank[playerid] = 10;
  8739.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8740.             GivePlayerMoney(playerid, 50000);
  8741.         }
  8742.     }
  8743.  
  8744.     if ( GetPlayerScore(playerid) >= 4500 ) {
  8745.         if( rank[playerid] < 11 ) {
  8746.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  8747.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  8748.             SendClientMessage(playerid, COLOR_CON_GREEN, "***********You are a the General of The Army!");
  8749.             SendClientMessage(playerid, COLOR_CON_GREEN, "Congratulations! You recieved all of the ranks!");
  8750.             rank[playerid] = 11;
  8751.             SetPlayerWantedLevel(playerid, rank[playerid]);
  8752.             GivePlayerMoney(playerid, 100000);
  8753.         }
  8754.     }
  8755.  
  8756.     if( rank[playerid] > 11 ) rank[playerid] = 11;
  8757.     return 1;
  8758. }
  8759.  
  8760.  
  8761. stock RestoreClassWeapons(playerid)
  8762. {
  8763.     if(gPlayerClass[playerid] == 0) {
  8764.         if(gTeam[playerid] == TEAM_USA) {
  8765.             GivePlayerWeapon(playerid, 24, 200);
  8766.             GivePlayerWeapon(playerid, 31, 500);
  8767.             GivePlayerWeapon(playerid, 25, 100);
  8768.         }else
  8769.         if(gTeam[playerid] == TEAM_GERMANY) {
  8770.             GivePlayerWeapon(playerid, 24, 200);
  8771.             GivePlayerWeapon(playerid, 31, 500);
  8772.             GivePlayerWeapon(playerid, 25, 100);
  8773.  
  8774.         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  8775.         {
  8776.             GivePlayerWeapon(playerid, 34, 200);
  8777.             GivePlayerWeapon(playerid, 1, 1);
  8778.             GivePlayerWeapon(playerid, 24, 200);
  8779.         }
  8780.  
  8781.     }
  8782.     if(gPlayerClass[playerid] == 1) {
  8783.         if( rank[playerid] >= 1 ) {
  8784.             if(gTeam[playerid] == TEAM_USA) {
  8785.                 GivePlayerWeapon(playerid, 16, 50);
  8786.                 GivePlayerWeapon(playerid, 36, 5);
  8787.                 GivePlayerWeapon(playerid, 24, 200);
  8788.             }else
  8789.             if(gTeam[playerid] == TEAM_GERMANY) {
  8790.                 GivePlayerWeapon(playerid, 16, 50);
  8791.                 GivePlayerWeapon(playerid, 36, 5);
  8792.                 GivePlayerWeapon(playerid, 24, 200);
  8793.             }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  8794.             {
  8795.                 GivePlayerWeapon(playerid, 34, 200);
  8796.                 GivePlayerWeapon(playerid, 1, 1);
  8797.                 GivePlayerWeapon(playerid, 24, 200);
  8798.             }
  8799.         }else SendClientMessage(playerid, COLOR_RED, "You need to be rank 1 to be able to use Demolition !");
  8800.     }
  8801.  
  8802.     if(gPlayerClass[playerid] == 2) {
  8803.         if(gTeam[playerid] == TEAM_USA) {
  8804.             GivePlayerWeapon(playerid, 34, 200);
  8805.             GivePlayerWeapon(playerid, 1, 1);
  8806.             GivePlayerWeapon(playerid, 24, 200);
  8807.         }else
  8808.         if(gTeam[playerid] == TEAM_GERMANY) {
  8809.             GivePlayerWeapon(playerid, 34, 200);
  8810.             GivePlayerWeapon(playerid, 1, 1);
  8811.             GivePlayerWeapon(playerid, 24, 200);
  8812.         }
  8813.         else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
  8814.             GivePlayerWeapon(playerid, 34, 200);
  8815.             GivePlayerWeapon(playerid, 1, 1);
  8816.             GivePlayerWeapon(playerid, 24, 200);
  8817.         }
  8818.     }
  8819.     if(gPlayerClass[playerid] == 3) {
  8820.         if(gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA) {
  8821.             SendClientMessage(playerid, COLOR_GREY, "You cant be a pilot on russia or japan!");
  8822.             TogglePlayerControllable(playerid, 1);
  8823.             return 1;
  8824.         }
  8825.  
  8826.         if(rank[playerid] >= 3) {
  8827.             if(gTeam[playerid] == TEAM_USA) {
  8828.                 GivePlayerWeapon(playerid, 22, 50);
  8829.             }
  8830.             if(gTeam[playerid] == TEAM_GERMANY) {
  8831.                 GivePlayerWeapon(playerid, 22, 50);
  8832.             }
  8833.         }
  8834.     }
  8835.  
  8836.     if(gPlayerClass[playerid] == 4) {
  8837.         if(gTeam[playerid] == TEAM_USA) {
  8838.             GivePlayerWeapon(playerid, 23, 200);
  8839.             GivePlayerWeapon(playerid, 1, 1);
  8840.             SetPlayerSkin(playerid, 275);
  8841.         }else
  8842.         if(gTeam[playerid] == TEAM_GERMANY) {
  8843.             GivePlayerWeapon(playerid, 1, 1);
  8844.             GivePlayerWeapon(playerid, 23, 200);
  8845.             SetPlayerSkin(playerid, 70);
  8846.         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  8847.         {
  8848.             GivePlayerWeapon(playerid, 34, 200);
  8849.             GivePlayerWeapon(playerid, 1, 1);
  8850.             GivePlayerWeapon(playerid, 24, 200);
  8851.         }
  8852.     }
  8853.  
  8854.     if(gPlayerClass[playerid] == 5) {
  8855.         if(gTeam[playerid] == TEAM_USA) {
  8856.             GivePlayerWeapon(playerid, 27, 200);
  8857.             GivePlayerWeapon(playerid, 1, 1);
  8858.             GivePlayerWeapon(playerid, 29, 200);
  8859.         }else
  8860.         if(gTeam[playerid] == TEAM_GERMANY) {
  8861.             GivePlayerWeapon(playerid, 27, 200);
  8862.             GivePlayerWeapon(playerid, 1, 1);
  8863.             GivePlayerWeapon(playerid, 29, 200);
  8864.         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  8865.         {
  8866.             GivePlayerWeapon(playerid, 34, 200);
  8867.             GivePlayerWeapon(playerid, 1, 1);
  8868.             GivePlayerWeapon(playerid, 24, 200);
  8869.         }
  8870.     }
  8871.  
  8872.     if( gPlayerClass[playerid] == 6 ) {           //pyro
  8873.         if(gTeam[playerid] == TEAM_USA) {
  8874.             GivePlayerWeapon(playerid, 16, 20);
  8875.             GivePlayerWeapon(playerid, 1, 1);
  8876.             GivePlayerWeapon(playerid, 23, 200);
  8877.             GivePlayerWeapon(playerid, 37, 550);
  8878.         }else
  8879.         if(gTeam[playerid] == TEAM_GERMANY) {
  8880.             GivePlayerWeapon(playerid, 16, 20);
  8881.             GivePlayerWeapon(playerid, 1, 1);
  8882.             GivePlayerWeapon(playerid, 23, 200);
  8883.             GivePlayerWeapon(playerid, 37, 550);
  8884.         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  8885.         {
  8886.             GivePlayerWeapon(playerid, 34, 200);
  8887.             GivePlayerWeapon(playerid, 1, 1);
  8888.             GivePlayerWeapon(playerid, 24, 200);
  8889.         }
  8890.  
  8891.     }
  8892.  
  8893.     if( gPlayerClass[playerid] == 7 ) {           //scout
  8894.         if(gTeam[playerid] == TEAM_USA) {
  8895.             SetPlayerArmour(playerid, 25);
  8896.             GivePlayerWeapon(playerid, 28, 200);
  8897.             GivePlayerWeapon(playerid, 1, 1);
  8898.             GivePlayerWeapon(playerid, 22, 200);
  8899.         }else
  8900.         if(gTeam[playerid] == TEAM_GERMANY) {
  8901.             SetPlayerArmour(playerid, 25);
  8902.             GivePlayerWeapon(playerid, 28, 200);
  8903.             GivePlayerWeapon(playerid, 1, 1);
  8904.             GivePlayerWeapon(playerid, 22, 200);
  8905.         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  8906.         {
  8907.             GivePlayerWeapon(playerid, 34, 200);
  8908.             GivePlayerWeapon(playerid, 1, 1);
  8909.             GivePlayerWeapon(playerid, 24, 200);
  8910.         }
  8911.     }
  8912.     if( gPlayerClass[playerid] == ADMIN ) {
  8913.         GivePlayerWeapon(playerid, 38, 20000);
  8914.         GivePlayerWeapon(playerid, 22, 20000);
  8915.         SetPlayerArmour(playerid, 100);
  8916.     }
  8917.  
  8918.     if(gPlayerClass[playerid] == GENERAL) {
  8919.         SetPlayerArmour(playerid, 95);
  8920.         GivePlayerWeapon(playerid, 31, 200);
  8921.         GivePlayerWeapon(playerid, 27, 200);
  8922.         GivePlayerWeapon(playerid, 28, 200);
  8923.     }
  8924.  
  8925.     return 1;
  8926. }
  8927.  
  8928.  
  8929. stock PlayerName(playerid)
  8930. {
  8931.     new UserName[MAX_PLAYER_NAME];
  8932.     GetPlayerName(playerid, UserName, sizeof(UserName));
  8933.     return UserName;
  8934. }
  8935.  
  8936.  
  8937. stock bigstrtok(const string[], &idx)
  8938. {
  8939.     new length = strlen(string);
  8940.     while ((idx < length) && (string[idx] <= ' ')) {
  8941.         idx++;
  8942.     }
  8943.     new offset = idx;
  8944.     new result[128];
  8945.     while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
  8946.         result[idx - offset] = string[idx];
  8947.         idx++;
  8948.     }
  8949.     result[idx - offset] = EOS;
  8950.     return result;
  8951. }
  8952.  
  8953.  
  8954. public SendClientMessageToAdmins(color,string[],alevel)
  8955. {
  8956.     foreach(Player, i) {
  8957.         if (adminlevel[i] >= alevel) {
  8958.             SendClientMessage(i, color, string);
  8959.             printf("%s", string);
  8960.         }
  8961.     }
  8962.     return 1;
  8963. }
  8964.  
  8965.  
  8966. public BanLog(string[])
  8967. {
  8968.     new entry[128];
  8969.     format(entry, sizeof(entry), "%s\r\n",string);
  8970.     new File:hFile;
  8971.     hFile = fopen("ban.log", io_append);
  8972.     if (hFile) {
  8973.         fwrite(hFile, entry);
  8974.         fclose(hFile);
  8975.     }
  8976. }
  8977.  
  8978.  
  8979. public Message()
  8980. {
  8981.     SendClientMessageToAll(WHITE, "If you want your stats, including deaths and kills to be saved type /register [password]");
  8982.     return 1;
  8983. }
  8984.  
  8985.  
  8986. public RankRefresh()
  8987. {
  8988. //rank refresh
  8989.     foreach(Player, i) {
  8990.         if( GetPlayerWantedLevel(i) != rank[i] ) SetPlayerWantedLevel(i, rank[i]);
  8991.     }
  8992.     return 0;
  8993. }
  8994.  
  8995.  
  8996. stock cTogglePlayerSpectating(playerid, bool:tg)
  8997. {
  8998.     TogglePlayerSpectating(playerid, tg);
  8999.     if( tg == 0 ) {
  9000.         SetPlayerPos(playerid, PlayerSpec[playerid][Xspc], PlayerSpec[playerid][Yspc], PlayerSpec[playerid][Zspc]);
  9001.         PlayerSpec[playerid] = 0;
  9002.         SetPlayerInterior(playerid, PlayerSpec[playerid][intspc]);
  9003.     }
  9004.     else if( tg == 1 ) {
  9005.         new Float:X, Float:Y, Float:Z;
  9006.         GetPlayerPos(playerid, X, Y, Z);
  9007.         PlayerSpec[playerid][intspc] = GetPlayerInterior(playerid);
  9008.         PlayerSpec[playerid][Xspc] = X;
  9009.         PlayerSpec[playerid][Yspc] = Y;
  9010.         PlayerSpec[playerid][Zspc] = Z;
  9011.         PlayerSpec[playerid][is] = 1;
  9012.     }
  9013.     return 1;
  9014. }
  9015.  
  9016.  
  9017. stock AddIpToList(playerid, reason[])
  9018. {
  9019.     new ip[50];
  9020.     GetPlayerIp(playerid, ip, sizeof(ip));
  9021.     new entry[128];
  9022.     format(entry, sizeof(entry), "%s    -   %s\r\n", ip, reason);
  9023.     new File:hFile;
  9024.     hFile = fopen("bannedips.cfg", io_append);
  9025.     if (hFile) {
  9026.         fwrite(hFile, entry);
  9027.         fclose(hFile);
  9028.     }
  9029.     return 1;
  9030. }
  9031.  
  9032.  
  9033. stock CheckForJetpackHack(playerid)
  9034. {
  9035.     if( adminlevel[playerid] > 0 ) { {
  9036.  
  9037.         }else
  9038.         GetPlayerName(playerid, nameee, 16);
  9039.         new strr[100];
  9040.         format(strr, 100, "*ANTI-HACK: Player %s has been banned for JETPACK !", nameee);
  9041.         SendClientMessageToAll(COLOR_RED, strr);
  9042.         new IP[50]; GetPlayerIp(playerid, IP, 50);
  9043.         printf("%s | (%i)%s has been banned for usage of JETPACK", IP, playerid, nameee);
  9044.         if( GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK ) BanEx(playerid, "Jetpack Ban");
  9045.         return 1;
  9046.     }
  9047.     return 1;
  9048. }
  9049.  
  9050.  
  9051. stock CheckForMinigun(playerid)
  9052. {
  9053.     if( adminlevel[playerid] < 1 ) {
  9054.         if( GetPlayerWeapon(playerid) == 38 ) {
  9055.             GetPlayerName(playerid, nameee, 16);
  9056.             new strr[100];
  9057.             format(strr, 100, "*ANTI-HACK: Player %s has been banned for MINIGUN !", nameee);
  9058.             SendClientMessageToAll(COLOR_RED, strr);
  9059.             BanEx(playerid, "Minigun Ban");
  9060.         }
  9061.     }
  9062.     return 1;
  9063. }
  9064.  
  9065.  
  9066. /*
  9067. stock GetTeamColor(playerid)
  9068. {
  9069.     new color;
  9070.     if(gTeam[playerid] == TEAM_USA)
  9071.     {
  9072.         color = COLOR_BLUE;
  9073.     }
  9074.     if(gTeam[playerid] == TEAM_GERMANY)
  9075.     {
  9076.         color = COLOR_RED;
  9077. }
  9078. if(gTeam[playerid] == TEAM_RUSSIA)
  9079. {
  9080. color = COLOR_ORANGE;
  9081. }
  9082. if(gTeam[playerid] == TEAM_JAPAN)
  9083. {
  9084. color = COLOR_WHITE;
  9085. }
  9086. if(gTeam[playerid] == TEAM_AUSTRALIA)
  9087. {
  9088. color = COLOR_YELLOW;
  9089. }
  9090. return color;
  9091. }
  9092. */
  9093.  
  9094. Vip(playerid)
  9095. {
  9096.     new ArmourVip;
  9097.     ArmourVip = dini_Int(udb_encode(playername), "ArmourVip");
  9098.     if(ArmourVip == 1) {
  9099.         SetPlayerArmour(playerid, 100);
  9100.     }
  9101.     return 1;
  9102. }
  9103.  
  9104.  
  9105. stock GetAdminLevel(playerid)
  9106. {
  9107.     return adminlevel[playerid];
  9108. }
  9109.  
  9110.  
  9111. stock GetFileDataFromSelectLine(filename[], line, result[])
  9112. {
  9113.     new File:FileHandle;
  9114.     new LineData[1024 char];
  9115.     new LoadCount = 0;
  9116.  
  9117.     if(!fexist(filename)) {
  9118.         printf("Could not open \"%s\" ",filename);
  9119.  
  9120.         return false;
  9121.     }
  9122.  
  9123.     FileHandle = fopen(filename, io_read);
  9124.  
  9125.     while(fread(FileHandle, LineData)) {
  9126.         if(LoadCount == (line - 1)) {
  9127.             if(LineData[0] == 0) {
  9128.                 continue;
  9129.             }
  9130.  
  9131.             if((LineData[strlen(LineData) - 1] == '\n') || (LineData[strlen(LineData) - 1] == '\r')) {
  9132.                 LineData[strlen(LineData) - 1] = 0;
  9133.  
  9134.                 if((LineData[strlen(LineData) - 2] == '\n') || (LineData[strlen(LineData) - 2] == '\r')) {
  9135.                     LineData[strlen(LineData) - 2] = 0;
  9136.                 }
  9137.  
  9138.                 if(LineData[0] == 0) {
  9139.                     continue;
  9140.                 }
  9141.             }
  9142.             format(result, sizeof(LineData), "%s", LineData);
  9143.  
  9144.             fclose(FileHandle);
  9145.             return true;
  9146.         }
  9147.         LoadCount += 1;
  9148.     }
  9149.     fclose(FileHandle);
  9150.     return false;
  9151. }
  9152.  
  9153.  
  9154. stock GetPlayerSpeed(playerid)
  9155. {
  9156.     new v;
  9157.     for(new i=0;i<MAX_CHECKS;i++)
  9158.         v+=Speed[playerid][i];
  9159.     v/=MAX_CHECKS;
  9160.     return v;
  9161. }
  9162.  
  9163.  
  9164. stock IsPlayerInPlane(playerid)
  9165. {
  9166.     new m=GetVehicleModel(GetPlayerVehicleID(playerid));
  9167.     for(new i=0;i<sizeof(Planes);i++)
  9168.         if(m==Planes[i])
  9169.             return true;
  9170.     return false;
  9171. }
  9172.  
  9173.  
  9174. public MutePlayer(playerid,time,reason[])
  9175. {
  9176.     if(IsPlayerConnected(playerid) && time) {
  9177.         Muted[playerid]=time;
  9178.         new string[128];
  9179.         format(string, sizeof(string), "Muting player '%s' (%d) for %d second(s). Reason: %s", ReturnPlayerName(playerid),playerid,time,reason);
  9180.         return 1;
  9181.     }
  9182.     return 0;
  9183. }
  9184.  
  9185.  
  9186. public SpamUpdate()
  9187. {
  9188.     new reason[64];
  9189.     foreach(Player, i) {
  9190.         if(Messages[i]) {
  9191.             if(!Muted[i]) {
  9192.                 if(Messages[i]>15) {
  9193.                     format(reason,sizeof(reason),"Extreme spam [%d messages/second]",Messages[i]);
  9194.                     SendClientMessageToAll(RED, reason);
  9195.                     Kick(i);
  9196.                     continue;
  9197.                 }
  9198.                 else if(Messages[i]>10) {
  9199.                     format(reason,sizeof(reason),"Massive spam [%d messages/second]",Messages[i]);
  9200.                     SendClientMessageToAll(RED, reason);
  9201.                     Kick(i);
  9202.                     continue;
  9203.                 }
  9204.                 else if(Messages[i]>4) {
  9205.                     format(reason,sizeof(reason),"Spam [%d messages/second]",Messages[i]);
  9206.                     SendClientMessageToAll(RED, reason);
  9207.                     MutePlayer(i,2*60,reason);
  9208.                 }
  9209.                 Messages[i]--;
  9210.             }
  9211.  
  9212.             if(Commands[i]) {
  9213.                 if(Commands[i]>15) {
  9214.                     format(reason,sizeof(reason),"Extreme command spam [%d commands/second]",Commands[i]);
  9215.                     SendClientMessageToAll(RED, reason);
  9216.                     Kick(i);
  9217.                     continue;
  9218.                 }
  9219.                 else if(Commands[i]>5) {
  9220.                     format(reason,sizeof(reason),"Massive command spam [%d commands/second]",Commands[i]);
  9221.                     SendClientMessageToAll(RED, reason);
  9222.                     Kick(i);
  9223.                     continue;
  9224.                 }
  9225.                 Commands[i]--;
  9226.             }
  9227.         }
  9228.     }
  9229.     return 1;
  9230. }
  9231.  
  9232.  
  9233. stock ReturnPlayerName(playerid)
  9234. {
  9235.     new name[MAX_PLAYER_NAME];
  9236.     GetPlayerName(playerid,name,sizeof(name));
  9237.     return name;
  9238. }
  9239.  
  9240.  
  9241. stock GetPlayerSpeedSpeedo(playerid, bool:kmh)    // by misco
  9242. {
  9243.     new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
  9244.     if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
  9245.     rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
  9246.     return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
  9247. }
  9248.  
  9249.  
  9250. public VHPBarUpdate()
  9251. {
  9252.     for(new i=0; i<MAX_PLAYERS; i++) {
  9253.         TextDrawHideForPlayer(i,vehiclehpbar[0]);
  9254.         TextDrawHideForPlayer(i,vehiclehpbar[1]);
  9255.         TextDrawHideForPlayer(i,vehiclehpbar[2]);
  9256.         TextDrawHideForPlayer(i,vehiclehpbar[3]);
  9257.         TextDrawHideForPlayer(i,vehiclehpbar[4]);
  9258.         TextDrawHideForPlayer(i,vehiclehpbar[5]);
  9259.         TextDrawHideForPlayer(i,vehiclehpbar[6]);
  9260.         TextDrawHideForPlayer(i,vehiclehpbar[7]);
  9261.         TextDrawHideForPlayer(i,vehiclehpbar[8]);
  9262.         TextDrawHideForPlayer(i,vehiclehpbar[9]);
  9263.         TextDrawHideForPlayer(i,vehiclehpbar[10]);
  9264.         TextDrawHideForPlayer(i,vehiclehpbar[11]);
  9265.         if(IsPlayerInAnyVehicle(i) == 1) {
  9266.             new vehicleid;
  9267.             vehicleid = GetPlayerVehicleID(i);
  9268.             new Float:vhp;
  9269.             GetVehicleHealth(vehicleid,vhp);
  9270.             if(vhp >= 0 && vhp <= 249) {
  9271.                 TextDrawShowForPlayer(i,vehiclehpbar[0]);
  9272.             }
  9273.             if(vhp >= 250 && vhp <= 317) {
  9274.                 TextDrawShowForPlayer(i,vehiclehpbar[1]);
  9275.             }
  9276.             else if(vhp >= 318 && vhp <= 385) {
  9277.                 TextDrawShowForPlayer(i,vehiclehpbar[2]);
  9278.             }
  9279.             else if(vhp >= 386 && vhp <= 453) {
  9280.                 TextDrawShowForPlayer(i,vehiclehpbar[3]);
  9281.             }
  9282.             else if(vhp >= 454 && vhp <= 521) {
  9283.                 TextDrawShowForPlayer(i,vehiclehpbar[4]);
  9284.             }
  9285.             else if(vhp >= 522 && vhp <= 589) {
  9286.                 TextDrawShowForPlayer(i,vehiclehpbar[5]);
  9287.             }
  9288.             else if(vhp >= 590 && vhp <= 657) {
  9289.                 TextDrawShowForPlayer(i,vehiclehpbar[6]);
  9290.             }
  9291.             else if(vhp >= 658 && vhp <= 725) {
  9292.                 TextDrawShowForPlayer(i,vehiclehpbar[7]);
  9293.             }
  9294.             else if(vhp >= 726 && vhp <= 793) {
  9295.                 TextDrawShowForPlayer(i,vehiclehpbar[8]);
  9296.             }
  9297.             else if(vhp >= 794 && vhp <= 861) {
  9298.                 TextDrawShowForPlayer(i,vehiclehpbar[9]);
  9299.             }
  9300.             else if(vhp >= 862 && vhp <= 929) {
  9301.                 TextDrawShowForPlayer(i,vehiclehpbar[10]);
  9302.             }
  9303.             else if(vhp >= 930 && vhp <= 1000) {
  9304.                 TextDrawShowForPlayer(i,vehiclehpbar[11]);
  9305.             }
  9306.         }
  9307.     }
  9308.     return 1;
  9309. }
  9310.  
  9311.  
  9312. public usabomb()
  9313. {
  9314. //
  9315.     CreateExplosion(-233.97259521484, 2633.2021484375, 62.374027252197,7,1);
  9316. //
  9317.     CreateExplosion(-342.97686767578, 2645.517578125, 62.374027252197,7,1);
  9318. //
  9319.     CreateExplosion(-308.1311340332, 2741.7602539063, 62.374027252197,7,1);
  9320. //
  9321.     CreateExplosion(-173.44599914551, 2736.9846191406, 62.374027252197,7,1);
  9322.     return 1;
  9323. }
  9324.  
  9325.  
  9326. public germanbomb()
  9327. {
  9328. //
  9329.     CreateExplosion(-1459.9934082031, 2603.5158691406, 63.685111999512,7,1);
  9330. //
  9331.     CreateExplosion(-1460.349609375, 2666.318359375, 63.685111999512,7,1);
  9332. //
  9333.     CreateExplosion(-1417.2110595703, 2666.5600585938, 63.685111999512,7,1);
  9334. //
  9335.     CreateExplosion(-1477.8121337891, 2555.8120117188, 63.685111999512,7,1);
  9336.     return 1;
  9337. }
  9338.  
  9339.  
  9340. public japanbomb()
  9341. {
  9342. //
  9343.     CreateExplosion(-68.205322265625, 1202.595703125, 31.104057312012,7,1);
  9344. //
  9345.     CreateExplosion(7.6469922065735, 1203.6928710938, 31.104057312012,7,1);
  9346. //
  9347.     CreateExplosion(8.4740104675293, 1146.4287109375, 31.104057312012,7,1);
  9348. //
  9349.     CreateExplosion(-52.749965667725, 1145.5432128906, 31.104057312012,7,1);
  9350. //
  9351.     CreateExplosion(-52.136501312256, 1103.1577148438, 31.104057312012,7,1);
  9352. //
  9353.     CreateExplosion(-80.392822265625, 1102.7485351563, 31.104057312012,7,1);
  9354. //
  9355.     CreateExplosion(-123.14115905762, 1127.2521972656, 31.104057312012,7,1);
  9356. //
  9357.     CreateExplosion(-170.87112426758, 1170.5258789063, 31.104057312012,7,1);
  9358. //
  9359.     CreateExplosion(-130.69058227539, 1215.0708007813, 31.104057312012,7,1);
  9360.     return 1;
  9361. }
  9362.  
  9363.  
  9364. public australiabomb()
  9365. {
  9366. //
  9367.     CreateExplosion(-686.87591552734, 931.30694580078, 14.374816894531,7,1);
  9368. //
  9369.     CreateExplosion(-680.44287109375, 959.30560302734, 14.374816894531,7,1);
  9370. //
  9371.     CreateExplosion(-658.13269042969, 938.02575683594, 14.374816894531,7,1);
  9372. //
  9373.     CreateExplosion(-675.60485839844, 910.60693359375, 14.374816894531,7,1);
  9374.     return 1;
  9375. }
  9376.  
  9377.  
  9378. public russiabomb()
  9379. {
  9380. //
  9381.     CreateExplosion(-835.23388671875, 1550.8673095703, 29.692680358887,7,1);
  9382. //
  9383.     CreateExplosion(-787.06079101563, 1569.4808349609, 29.692680358887,7,1);
  9384. //
  9385.     CreateExplosion(-785.56701660156, 1515.6232910156, 29.692680358887,7,1);
  9386. //
  9387.     CreateExplosion(-826.73297119141, 1509.5181884766, 29.692680358887,7,1);
  9388. //
  9389.     CreateExplosion(-829.17639160156, 1597.6502685547, 29.692680358887,7,1);
  9390. //
  9391.     CreateExplosion(-866.84130859375, 1596.603515625, 29.692680358887,7,1);
  9392. //
  9393.     CreateExplosion(-864.77459716797, 1522.0950927734, 29.692680358887,7,1);
  9394. //
  9395.     CreateExplosion(-768.34216308594, 1556.1833496094, 29.692680358887,7,1);
  9396. //
  9397.     CreateExplosion(-782.17987060547, 1602.0943603516, 29.692680358887,7,1);
  9398. //
  9399.     CreateExplosion(-782.1796875, 1602.09375, 29.692680358887,7,1);
  9400.     return 1;
  9401. }
  9402.  
  9403.  
  9404. #define TogglePlayerSpectating cTogglePlayerSpectating
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement