Guest User

www.nextwas.com

a guest
Jul 14th, 2011
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 362.71 KB | None | 0 0
  1. //Www.nextwas.com gamemode creata da armando (dangerous)
  2. #include <a_samp>
  3.  
  4. #undef MAX_PLAYERS
  5. #define MAX_PLAYERS 100 // Modificare secondo le slot !
  6.  
  7. #include <dini>
  8. #include <dudb>
  9. #include <gl_common>
  10. #include <foreach>
  11. #include <a_zones>
  12.  
  13.  
  14. #define ASSAULT 0
  15. #define DEMOLITION 1
  16. #define SNIPER 2
  17. #define PILOT 3
  18. #define MEDIC 4
  19. #define ENGINEER 5
  20. #define PYRO 6
  21. #define Esploratore 7
  22. #define ADMIN 8
  23. #define GENERAL 9
  24.  
  25. #define SPAM 6
  26. #define COMMAND_SPAM 7
  27.  
  28. new Text:Textdraw0;
  29.  
  30. forward SpamUpdate();
  31.  
  32. new Text:vehiclehpbar[12];
  33. forward VHPBarUpdate();
  34.  
  35. #define COLOR_VHPGOOD 0x0AFF0AAA
  36. #define COLOR_VHPWARNING 0xFFFF00AA
  37. #define COLOR_VHPDANGER 0xFF0000AA
  38.  
  39. //new FALSE = false;
  40. #define SendFormattedMessage(%0,%1,%2,%3) do{new _string[128]; format(_string,sizeof(_string),%2,%3); SendClientMessage(%0,%1,_string);} while(FALSE)
  41. #define SendFormattedMessageToAll(%0,%1,%2) do{new _string[128]; format(_string,sizeof(_string),%1,%2); SendClientMessageToAll(%0,_string);} while(FALSE)
  42.  
  43. forward MutePlayer(playerid,time,reason[]);
  44.  
  45. new Messages[MAX_PLAYERS];
  46. new Commands[MAX_PLAYERS];
  47.  
  48. new Muted[MAX_PLAYERS];
  49.  
  50. new Planes[]=
  51. {
  52.     413,417,425,447,460,469,476,487,488,497,511,512,513,519,520,548,553,563,577,592,593
  53. };
  54.  
  55. new VehicleName[][] =
  56. {
  57.    "Landstalker",
  58.    "Bravura",
  59.    "Buffalo",
  60.    "Linerunner",
  61.    "Pereniel",
  62.    "Sentinel",
  63.    "Dumper",
  64.    "Firetruck",
  65.    "Trashmaster",
  66.    "Stretch",
  67.    "Manana",
  68.    "Infernus",
  69.    "Voodoo",
  70.    "Pony",
  71.    "Mule",
  72.    "Cheetah",
  73.    "Ambulance",
  74.    "Leviathan",
  75.    "Moonbeam",
  76.    "Esperanto",
  77.    "Taxi",
  78.    "Washington",
  79.    "Bobcat",
  80.    "Mr Whoopee",
  81.    "BF Injection",
  82.    "Hunter",
  83.    "Premier",
  84.    "Enforcer",
  85.    "Securicar",
  86.    "Banshee",
  87.    "Predator",
  88.    "Bus",
  89.    "Rhino",
  90.    "Barracks",
  91.    "Hotknife",
  92.    "Trailer",
  93.    "Previon",
  94.    "Coach",
  95.    "Cabbie",
  96.    "Stallion",
  97.    "Rumpo",
  98.    "RC Bandit",
  99.    "Romero",
  100.    "Packer",
  101.    "Monster Truck",
  102.    "Admiral",
  103.    "Squalo",
  104.    "Seasparrow",
  105.    "Pizzaboy",
  106.    "Tram",
  107.    "Trailer",
  108.    "Turismo",
  109.    "Speeder",
  110.    "Reefer",
  111.    "Tropic",
  112.    "Flatbed",
  113.    "Yankee",
  114.    "Caddy",
  115.    "Solair",
  116.    "Berkley's RC Van",
  117.    "Skimmer",
  118.    "PCJ-600",
  119.    "Faggio",
  120.    "Freeway",
  121.    "RC Baron",
  122.    "RC Raider",
  123.    "Glendale",
  124.    "Oceanic",
  125.    "Sanchez",
  126.    "Sparrow",
  127.    "Patriot",
  128.    "Quad",
  129.    "Coastguard",
  130.    "Dinghy",
  131.    "Hermes",
  132.    "Sabre",
  133.    "Rustler",
  134.    "ZR-350",
  135.    "Walton",
  136.    "Regina",
  137.    "Comet",
  138.    "BMX",
  139.    "Burrito",
  140.    "Camper",
  141.    "Marquis",
  142.    "Baggage",
  143.    "Dozer",
  144.    "Maverick",
  145.    "News Chopper",
  146.    "Rancher",
  147.    "FBI Rancher",
  148.    "Virgo",
  149.    "Greenwood",
  150.    "Jetmax",
  151.    "Hotring",
  152.    "Sandking",
  153.    "Blista Compact",
  154.    "Police Maverick",
  155.    "Boxville",
  156.    "Benson",
  157.    "Mesa",
  158.    "RC Goblin",
  159.    "Hotring Racer",
  160.    "Hotring Racer",
  161.    "Bloodring Banger",
  162.    "Rancher",
  163.    "Super GT",
  164.    "Elegant",
  165.    "Journey",
  166.    "Bike",
  167.    "Mountain Bike",
  168.    "Beagle",
  169.    "Cropdust",
  170.    "Stunt",
  171.    "Tanker",
  172.    "RoadTrain",
  173.    "Nebula",
  174.    "Majestic",
  175.    "Buccaneer",
  176.    "Shamal",
  177.    "Hydra",
  178.    "FCR-900",
  179.    "NRG-500",
  180.    "HPV1000",
  181.    "Cement Truck",
  182.    "Tow Truck",
  183.    "Fortune",
  184.    "Cadrona",
  185.    "FBI Truck",
  186.    "Willard",
  187.    "Forklift",
  188.    "Tractor",
  189.    "Combine",
  190.    "Feltzer",
  191.    "Remington",
  192.    "Slamvan",
  193.    "Blade",
  194.    "Freight",
  195.    "Streak",
  196.    "Vortex",
  197.    "Vincent",
  198.    "Bullet",
  199.    "Clover",
  200.    "Sadler",
  201.    "Firetruck",
  202.    "Hustler",
  203.    "Intruder",
  204.    "Primo",
  205.    "Cargobob",
  206.    "Tampa",
  207.    "Sunrise",
  208.    "Merit",
  209.    "Utility",
  210.    "Nevada",
  211.    "Yosemite",
  212.    "Windsor",
  213.    "Monster Truck",
  214.    "Monster Truck",
  215.    "Uranus",
  216.    "Jester",
  217.    "Sultan",
  218.    "Stratum",
  219.    "Elegy",
  220.    "Raindance",
  221.    "RC Tiger",
  222.    "Flash",
  223.    "Tahoma",
  224.    "Savanna",
  225.    "Bandito",
  226.    "Freight",
  227.    "Trailer",
  228.    "Kart",
  229.    "Mower",
  230.    "Duneride",
  231.    "Sweeper",
  232.    "Broadway",
  233.    "Tornado",
  234.    "AT-400",
  235.    "DFT-30",
  236.    "Huntley",
  237.    "Stafford",
  238.    "BF-400",
  239.    "Newsvan",
  240.    "Tug",
  241.    "Trailer",
  242.    "Emperor",
  243.    "Wayfarer",
  244.    "Euros",
  245.    "Hotdog",
  246.    "Club",
  247.    "Trailer",
  248.    "Trailer",
  249.    "Andromada",
  250.    "Dodo",
  251.    "RC Cam",
  252.    "Launch",
  253.    "Police Car (LSPD)",
  254.    "Police Car (SFPD)",
  255.    "Police Car (LVPD)",
  256.    "Police Ranger",
  257.    "Picador",
  258.    "S.W.A.T. Van",
  259.    "Alpha",
  260.    "Phoenix",
  261.    "Glendale",
  262.    "Sadler",
  263.    "Luggage Trailer",
  264.    "Luggage Trailer",
  265.    "Stair Trailer",
  266.    "Boxville",
  267.    "Farm Plow",
  268.    "Utility Trailer"
  269. };
  270.  
  271. #define RED 0xFF0000FF
  272. #define GREEN 0x00FF00FF
  273.  
  274. #define GetVehicleName(%0) VehicleName[GetVehicleModel(%0)-400]
  275.  
  276. #define MAX_SPEED 19
  277.  
  278. #define MAX_TEAMS           20
  279. #define MAX_TEAM_NAME       16
  280. #define MAX_TEAM_MEMBERS    4
  281.  
  282. #define MAX_MEMBERS     4
  283.  
  284. #define MAX_CHECKS 5
  285. #define MAX_VARIABLES 24
  286.  
  287. new JB_Warnings[MAX_PLAYERS];
  288.  
  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 COLOR_GREY 0xAFAFAFAA
  297. #define COLOR_BLUE 0x0000FF96
  298. #define COLOR_DIS_RED 0xFF0000FF
  299. #define COLOR_CON_GREEN 0x00FF00FF
  300. #define COLOR_WHITE 0xFFFFFFFF
  301. #define COLOR_YELLOW 0xFFFF00AA
  302. #define COLOR_BRIGHTRED 0xFF0000AA
  303. #define COLOR_ORANGE 0xFFA500AA
  304. #define GCOLOR_GREEN 0x33AA3355
  305. #define YELLOW 0xFFFF00FF
  306.  
  307.  
  308. #define COLOR_OOC 0xFF8080FF
  309.  
  310. #define COLOR_LIGHTRED 0xFF8080FF
  311. #define COLOR_LIGHTBLUE 0x00BFFFAA
  312. #define COLOR_GREY 0xAFAFAFAA
  313. #define COLOR_RED 0xFF0000AA
  314. #define COLOR_YELLOW 0xFFFF00AA
  315. #define COLOR_GREEN 0x00FF00AA
  316.  
  317. #define ADMIN_RED   0xFB0000FF
  318. #define YELLOW      0xFFFF00FF
  319. #define ORANGE      0xF97804FF
  320. #define LIGHTRED    0xFF8080FF
  321. #define LIGHTBLUE   0x00C2ECFF
  322. #define PURPLE      0xB360FDFF
  323. #define BLUE        0x1229FAFF
  324. #define LIGHTGREEN  0x38FF06FF
  325. #define DARKPINK    0xE100E1FF
  326. #define DARKGREEN   0x008040FF
  327. #define AQUAGREEN   0x00CACAFB
  328. #define NICESKY     0x99FFFFAA
  329. #define GREY        0xCECECEFF
  330. #define WHITE       0xFFFFFFFF
  331. #define COLOR_TAN   0xE39216FF
  332.  
  333. //Admin
  334. // === [Some configuring] ===
  335. #define JOIN_MESSAGES false
  336. #define Leavemessages false
  337. #define leavemessagecolor COLOR_RED
  338. #define joinmessagecolor COLOR_RED
  339.  
  340. #define MEASURE_TIME 1000
  341.  
  342. #define Livello1Comandi1 ">> /clearchat, /slap [id], /kick [id] [reason], /goto [id], /get [id], /akill [id], /warn [id] [reason]"
  343. #define Livello1Comandi2 ">> /(un)freeze [id], /playerinfo [id], /asay [msg], /ip [id], /mute [id], /ajail [id] [time], /force [id]"
  344. #define Livello2Comandi1 ">> /telep [teleportee id] [dest. id], /(un)mute [id] /(un)jail [id] [time], /ann [text] [time]"
  345. #define Livello2Comandi2 ">> /eject [id], /sethealth [id] [amt], /setarmour [id] [amt] /healall, /armourall"
  346. #define Livello3Comandi1 ">> /disarm [id], /disarmall, /explode [id], /time [0-23], /weather [weatherid]"
  347. #define Livello3Comandi2 ">> /setmoney [id] [amount], /ban [id] [reason], /say [text]"
  348. #define Livello4Comandi1 ">> /disarmall, /reloadbans, /reloadlogs, /crash [id]"
  349.  
  350.  
  351. #define TEAM_USA 0
  352. #define TEAM_GERMANY 1
  353. #define TEAM_MERC 2
  354. #define TEAM_RUSSIA 3
  355. #define TEAM_JAPAN 4
  356.  
  357. //new mailsubject[128];
  358.  
  359. new SpeedHacking[MAX_PLAYERS];
  360. new Speed[MAX_PLAYERS][MAX_CHECKS];
  361. enum pWarns
  362. {
  363.     TeamJack
  364. }
  365.  
  366. new Warns[MAX_PLAYERS][pWarns];
  367.  
  368.  
  369. enum enums
  370. {
  371.     is,
  372.     intspc,
  373.     Float:Xspc,
  374.     Float:Yspc,
  375.     Float:Zspc
  376. };
  377.  
  378. new admgod[MAX_PLAYERS];
  379.  
  380. new freeze[MAX_PLAYERS];
  381. new WarnedTimes[MAX_PLAYERS];
  382.  
  383. new PlayerSpec[MAX_PLAYERS][enums];
  384. new Dispenser[MAX_PLAYERS];
  385. new EngineerI[MAX_PLAYERS];
  386. new dispout[MAX_PLAYERS];
  387.  
  388. new Driver[MAX_VEHICLES];
  389. new logged[MAX_PLAYERS];
  390. new adminlevel[MAX_PLAYERS];
  391. new money[MAX_PLAYERS];
  392. new playername[MAX_PLAYER_NAME];
  393.  
  394.  
  395.  
  396. new bool:IsInCargoB[MAX_PLAYERS];
  397. new PlayerCargoB[MAX_PLAYERS];
  398.  
  399. new bool:IsInBarracks[MAX_PLAYERS];
  400. new PlayerBarracks[MAX_PLAYERS];
  401.  
  402. new ammoo[MAX_PLAYERS];
  403. new piolet[MAX_PLAYERS];
  404.  
  405. new deaths[MAX_PLAYERS];
  406. new kills[MAX_PLAYERS];
  407.  
  408.  
  409.  
  410. new rank[MAX_PLAYERS];
  411. new pscore[MAX_PLAYERS];
  412.  
  413.  
  414. new mute[MAX_PLAYERS];
  415.  
  416. new jail[MAX_PLAYERS];
  417.  
  418. forward BanLog(string[]);
  419.  
  420. forward SendClientMessageToAdmins(color,string[],alevel);
  421.  
  422. forward Message();
  423.  
  424. new IfCapture[16];
  425.  
  426. new BarracksUser[MAX_PLAYERS][MAX_VEHICLES];
  427. new CargoBobUser[MAX_PLAYERS][MAX_VEHICLES];
  428.  
  429.  
  430. forward IsPlayerAdminCall(playerid);
  431. public IsPlayerAdminCall(playerid)
  432.     return (adminlevel[playerid] >= 1);
  433.  
  434. new LastVehicle[MAX_PLAYERS];
  435.  
  436.  
  437. new adminduty[MAX_PLAYERS];
  438.  
  439. #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1]
  440. #define isnull(%1) ((%1[0] == 0) || (%1[0] == 1 && %1[1] == 0))
  441. AntiDEAmx()
  442. {
  443.      new gunz[][] =
  444.      {
  445.          "Unarmed (Fist)",
  446.          "Brass K"
  447.      };
  448.      #pragma unused gunz
  449. }
  450.  
  451. //TOP KILLERS
  452.  
  453. new Players;
  454. forward RankRefresh();
  455.  
  456. new Text:Classt[MAX_PLAYERS];
  457. new Text:Spree;
  458. new Text:Teams[MAX_PLAYERS];
  459.  
  460.  
  461. //------------------------
  462. new ExplosionRadius = 15; //raggio esplosione
  463.  
  464. forward Explode(playerid);
  465.  
  466. new buyweapon;
  467.  
  468. new IsInGunShop[MAX_PLAYERS];
  469. new GunShopID[MAX_PLAYERS];
  470.  
  471. new hashit[MAX_PLAYERS];
  472.  
  473.  
  474. new C4[MAX_PLAYERS];
  475. new Bomb[MAX_PLAYERS];
  476. new Planted[MAX_PLAYERS];
  477. new Float:bx[MAX_PLAYERS], Float:by[MAX_PLAYERS], Float:bz[MAX_PLAYERS];
  478. new pSpawned[MAX_PLAYERS];
  479.  
  480. new gunshop[8];
  481.  
  482. new PickedClass[MAX_PLAYERS] = 0;
  483.  
  484. new usingcomp[MAX_PLAYERS];
  485.  
  486. new hasbombs[MAX_PLAYERS];
  487. new hasrepair[MAX_PLAYERS];
  488.  
  489. new healedrec[MAX_PLAYERS];
  490.  
  491. new repair[MAX_PLAYERS];
  492.  
  493. new SpawnP[MAX_PLAYERS];
  494.  
  495. forward GetClosestPlayer(p1);
  496. forward Float:GetDistanceBetweenPlayers(p1,p2);
  497.  
  498. forward Txtreset();
  499. public Txtreset()
  500. {
  501.     TextDrawHideForAll(Spree);
  502.     return 1;
  503. }
  504.  
  505. forward SettingPlayerTeam();
  506.  
  507. new nuke;
  508.  
  509.  
  510. new AbleToSpawn[MAX_PLAYERS];
  511.  
  512.  
  513.  
  514. //NEW------------------------------------------------------------------------------------
  515.  
  516. static gTeam[MAX_PLAYERS];
  517. new gPlayerClass[MAX_PLAYERS];
  518. new EnteredArea[MAX_PLAYERS];
  519. new CapturedBy; // 0 ( none ) 1 ( USA ) 2 ( Germany )
  520. new EnteredArea2[MAX_PLAYERS];
  521. new CapturedBy2; // 0 ( none ) 1 ( USA ) 2 ( Germany )
  522. new EnteredArea3[MAX_PLAYERS];
  523. new CapturedBy3; // 0 ( none ) 1 ( USA ) 2 ( Germany )
  524. new EnteredArea4[MAX_PLAYERS];
  525. new CapturedBy4; // 0 ( none ) 1 ( USA ) 2 ( Germany )
  526. new EnteredArea5[MAX_PLAYERS];
  527. new CapturedBy5; // 0 ( none ) 1 ( USA ) 2 ( Germany )
  528. new EnteredArea6[MAX_PLAYERS];
  529. new CapturedBy6; // 0 ( none ) 1 ( USA ) 2 ( Germany )
  530. new EnteredArea7[MAX_PLAYERS];
  531. new CapturedBy7; // 0 ( none ) 1 ( USA ) 2 ( Germany )
  532. new EnteredArea8[MAX_PLAYERS];
  533. new CapturedBy8; // 0 ( none ) 1 ( USA ) 2 ( Germany )
  534. new EnteredArea9[MAX_PLAYERS];
  535. new CapturedBy9; // 0 ( none ) 1 ( USA ) 2 ( Germany )
  536. new EnteredArea10[MAX_PLAYERS];
  537. new CapturedBy10; // 0 ( none ) 1 ( USA ) 2 ( Germany )
  538. new EnteredArea11[MAX_PLAYERS];
  539. new CapturedBy11;
  540. new EnteredArea12[MAX_PLAYERS];
  541. new CapturedBy12;
  542. new EnteredArea13[MAX_PLAYERS];
  543. new CapturedBy13;
  544. new EnteredArea14[MAX_PLAYERS];
  545. new CapturedBy14;
  546. new EnteredArea15[MAX_PLAYERS];
  547. new CapturedBy15;
  548.  
  549. new GeneralClass[MAX_PLAYERS][5];
  550.  
  551.  
  552. new gscore;
  553. new uscore;
  554.  
  555. new T1[MAX_PLAYERS];
  556. new T2[MAX_PLAYERS];
  557. new T3[MAX_PLAYERS];
  558. new T4[MAX_PLAYERS];
  559. new T5[MAX_PLAYERS];
  560. new T6[MAX_PLAYERS];
  561. new T7[MAX_PLAYERS];
  562. new T8[MAX_PLAYERS];
  563. new T9[MAX_PLAYERS];
  564. new T10[MAX_PLAYERS];
  565. new T11[MAX_PLAYERS];
  566. new T12[MAX_PLAYERS];
  567. new T13[MAX_PLAYERS];
  568. new T14[MAX_PLAYERS];
  569. new T15[MAX_PLAYERS];
  570.  
  571. new spree[MAX_PLAYERS];
  572.  
  573. new randperson[MAX_PLAYERS];
  574.  
  575. new hitman[MAX_PLAYERS];
  576.  
  577.  
  578. new gmini;
  579. new umini;
  580.  
  581. new uhit;
  582. new ghit;
  583.  
  584.  
  585. new USA;
  586. new GERMANY;
  587.  
  588. new Ear;
  589. new EarU;
  590. new EarG;
  591.  
  592. new Town1;
  593. new Town2;
  594.  
  595. new Resturant;
  596. new ResturantU;
  597. new ResturantG;
  598.  
  599. new Airfield;
  600. new AirfieldU;
  601. new AirfieldG;
  602.  
  603. new Diner;
  604. new DinerU;
  605. new DinerG;
  606.  
  607. new Cluck;
  608. new CluckU;
  609. new CluckG;
  610.  
  611. new OilPump;
  612. new OilPumpU;
  613. new OilPumpG;
  614.  
  615. new Oil;
  616. new OilU;
  617. new OilG;
  618.  
  619. new Beach;
  620. new BeachU;
  621. new BeachG;
  622.  
  623. new A;
  624. new AU;
  625. new AG;
  626.  
  627. new University;
  628. new UniversityU;
  629. new UniversityG;
  630.  
  631. new Gas;
  632. new GasU;
  633. new GasG;
  634.  
  635. new OS;
  636. new OSU;
  637. new OSG;
  638.  
  639. new T;
  640. new TU;
  641. new TG;
  642.  
  643. new D;
  644. new DU;
  645. new DG;
  646.  
  647. new OT;
  648. new OTU;
  649. new OTG;
  650.  
  651. enum cbinf { seats };
  652. new CargoBob[MAX_VEHICLES][cbinf];
  653. new Barracks[MAX_VEHICLES][cbinf];
  654.  
  655. new nameee[20];
  656.  
  657.  
  658. new IsInHunter[MAX_PLAYERS];
  659. new IsInRhino[MAX_PLAYERS];
  660.  
  661. new nuked = 0;
  662.  
  663.  
  664. //DEFINES--------------------------------------------------------------------------------
  665.  
  666.  
  667.  
  668. //FORWARDS-------------------------------------------------------------------------------
  669.  
  670. forward ZonesPay();
  671. public ZonesPay()
  672. {
  673.     new monys[2];
  674.     new mstr[100];
  675.     monys[0] = 0;
  676.     monys[1] = 0;//i kno money, not moneys, not mony
  677.     foreach(Player, i)
  678.     {
  679.             if( gTeam[i] == TEAM_USA )
  680.             {
  681.                 if( CapturedBy == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  682.                 if( CapturedBy2 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  683.                 if( CapturedBy3 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  684.                 if( CapturedBy4 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  685.                 if( CapturedBy5 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  686.                 if( CapturedBy6 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  687.                 if( CapturedBy7 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  688.                 if( CapturedBy8 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  689.                 if( CapturedBy9 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  690.                 if( CapturedBy10 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  691.                 if( CapturedBy11 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  692.                 if( CapturedBy12 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  693.                 if( CapturedBy13 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  694.                 if( CapturedBy14 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  695.                 if( CapturedBy15 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
  696.                 format(mstr, 100, "You recieved %i money from captured areas.", monys[0]*100);
  697.                 SendClientMessage(i, COLOR_GREEN, mstr);
  698.             }
  699.             if( gTeam[i] == TEAM_GERMANY )
  700.             {
  701.                 if( CapturedBy == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  702.                 if( CapturedBy2 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  703.                 if( CapturedBy3 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  704.                 if( CapturedBy4 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  705.                 if( CapturedBy5 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  706.                 if( CapturedBy6 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  707.                 if( CapturedBy7 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  708.                 if( CapturedBy8 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  709.                 if( CapturedBy9 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  710.                 if( CapturedBy10 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  711.                 if( CapturedBy11 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  712.                 if( CapturedBy12 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  713.                 if( CapturedBy13 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  714.                 if( CapturedBy14 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  715.                 if( CapturedBy15 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
  716.                 format(mstr, 100, "You recieved %i money from captured areas.", monys[1]*100);
  717.                 SendClientMessage(i, COLOR_GREEN, mstr);
  718.         }
  719.     }
  720.     return 1;
  721. }
  722.  
  723.  
  724. forward AreaCheck();
  725. forward TakeOver();
  726. forward NoArea(playerid);
  727. forward NoArea2(playerid);
  728. forward Secs(playerid);
  729. forward Spawn(playerid);
  730.  
  731.  
  732. forward SendPlayerFormattedText(playerid, const string[], define);
  733.  
  734. forward ClassShow(playerid);
  735. public ClassShow(playerid)
  736. {
  737.     if( gPlayerClass[playerid] == ENGINEER )
  738.     {
  739.         EngineerI[playerid] = 1;
  740.     }
  741.    
  742.     if( gPlayerClass[playerid] == ADMIN ) admgod[playerid] = SetTimerEx("AdminGOD", 250, 1, "i", playerid);
  743.  
  744.     if( GetPlayerMoney(playerid) < 0 ) ResetPlayerMoney(playerid);
  745.  
  746.     new cstr[100];
  747.     format(cstr, 100, " ");
  748.     new classs[50];
  749.     if( gPlayerClass[playerid] == GENERAL ) format(classs, 50, "general");
  750.     if( gPlayerClass[playerid] == ADMIN ) format(classs, 50, "~r~Admin");
  751.     if( gPlayerClass[playerid] == Esploratore ) format(classs, 50, "Esploratore");
  752.     if( gPlayerClass[playerid] == PYRO ) format(classs, 50, "Pyroman");
  753.     if( gPlayerClass[playerid] == MEDIC ) format(classs,50, "Medic");
  754.     if( gPlayerClass[playerid] == ENGINEER )  format(classs,50,"Engineer");
  755.     if( gPlayerClass[playerid] == PILOT ) format(classs,50,"Pilot");
  756.     if( gPlayerClass[playerid] == DEMOLITION ) format(classs,50,"Demolition");
  757.     if( gPlayerClass[playerid] == ASSAULT ) format(classs,50,"Assault");
  758.     if( gPlayerClass[playerid] == SNIPER ) format(classs,50,"Sniper");
  759.  
  760.     format(cstr, 100, "~y~%s", classs);
  761.  
  762.     TextDrawHideForPlayer(playerid,Classt[playerid]);
  763.     TextDrawSetString(Classt[playerid], cstr);
  764.     TextDrawShowForPlayer(playerid,Classt[playerid]);
  765.     return 1;
  766. }
  767.  
  768. new Float:cbx[MAX_PLAYERS], Float:cby[MAX_PLAYERS], Float:cbz[MAX_PLAYERS], Float:cba[MAX_PLAYERS];
  769.  
  770. forward ParaExit(playerid);
  771. public ParaExit(playerid)
  772. {
  773.     RemovePlayerFromVehicle(playerid);
  774.     GivePlayerWeapon(playerid, 46, 1);
  775.     return 1;
  776. }
  777.  
  778. forward ExitCB(playerid);
  779. public ExitCB(playerid)
  780. {
  781.    
  782.     SetPlayerPos(playerid, cbx[playerid], cby[playerid], cbz[playerid]);
  783.     SetPlayerFacingAngle(playerid, cba[playerid]);
  784.     new vehicleid = LastVehicle[playerid];
  785.    
  786.     if( BarracksUser[playerid][vehicleid] == 1 )
  787.     {
  788.         BarracksUser[playerid][vehicleid] = 0;
  789.     }
  790.    
  791.     if( CargoBobUser[playerid][vehicleid] == 1 )
  792.     {
  793.         GivePlayerWeapon(playerid, 46, 1);
  794.         CargoBobUser[playerid][vehicleid] =0;
  795.         print("got out of bob");
  796.     }
  797.     return 1;
  798. }
  799.  
  800. forward DispeClean(playerid);
  801. public DispeClean(playerid)
  802. {
  803.     DestroyPickup(Dispenser[playerid]);
  804.     return 1;
  805. }
  806.  
  807. new RandomWeather[2][1] = {
  808.     {5},
  809.     {10}
  810. };
  811.  
  812. stock SetRandomWeather()
  813. {
  814.     new rand = random(sizeof(RandomWeather));
  815.     SetWeather(RandomWeather[rand][0]);
  816.     return 1;
  817. }
  818.  
  819. forward WeatherRefresh();
  820. public WeatherRefresh()
  821. {
  822.  
  823.     SendClientMessageToAll(WHITE, "If you want your stats, including deaths and kills to be saved type /register [password]");
  824.  
  825.     SetRandomWeather();
  826.     return 1;
  827. }
  828. //http://codwwserver.co.cc/
  829.  
  830. forward AdminGOD(playerid);
  831. public AdminGOD(playerid)
  832. {
  833.     if( adminlevel[playerid] > 0 )
  834.     {
  835.         if( gPlayerClass[playerid] == ADMIN )
  836.         {
  837.             if( GetPlayerSkin(playerid) ==  217)
  838.             SetPlayerArmour(playerid, 999999.0);
  839.             if( IsPlayerInAnyVehicle(playerid))
  840.             {
  841.                 RepairVehicle(GetPlayerVehicleID(playerid));
  842.             }else
  843.             if( !IsPlayerInAnyVehicle(playerid))
  844.             {
  845.                 SetPlayerHealth(playerid, 999999.0);
  846.             }
  847.         }
  848.     }
  849.     return 1;
  850. }
  851.  
  852.  
  853. new Float:RandomUSACoords[13][3] = {
  854.     {-244.2003, 2602.5547, 63.7031},
  855.     {-291.127594, 2608.788574, 63.799774},
  856.     {-155.354614, 2659.233398, 64.549774},
  857.     {-193.562515, 2731.505615, 63.749756},
  858.     {-218.214340, 2759.695313, 63.749756},
  859.     {-239.894196, 2727.762939, 63.749756},
  860.     {-323.737000, 2652.677490, 64.249756},
  861.     {-175.897125, 2612.831787, 62.749756},
  862.     {-263.895935, 2586.644043, 64.249756},
  863.     {-334.114258, 2727.419434, 63.799774},
  864.     {-244.2003, 2602.5547, 63.7031},
  865.     {-225.250168, 2786.327393, 63.799774},
  866.     {-153.849152, 2760.387695, 65.749756}
  867. };
  868.  
  869. new Float:RandomGERCoords[7][3] = {
  870.     {-148.932114, 1069.882690, 20.310356},
  871.     {-233.991333, 1178.141357, 20.235357},
  872.     {-320.718079, 1057.609863, 20.235357},
  873.     {-130.159241, 973.272156, 23.485357},
  874.     {-161.434662, 1205.636963, 20.085356},
  875.     {-144.539536, 1132.992188, 19.985357},
  876.     {-147.705017, 1111.523804, 19.785360}
  877.  
  878. };
  879.  
  880. stock IsPlayerInFlying(playerid,vehicleid)
  881. {
  882.  
  883.     if(IsPlayerInVehicle(playerid,vehicleid))
  884.     {
  885.         switch(GetVehicleModel(vehicleid))
  886.         {
  887.             case 487, 488, 497, 460,  476, 511, 512, 513, 519, 520,548,553,577,592,593:
  888.             {
  889.             return true;
  890.             }
  891.         }
  892.     }
  893.     return false;
  894. }
  895.  
  896. stock SetRandomUSAPos(playerid)
  897. {
  898.     if( gTeam[playerid] == TEAM_USA )
  899.     {
  900.         new rand = random(sizeof(RandomUSACoords));
  901.         SetPlayerInterior(playerid, 0);
  902.         SetPlayerPos(playerid, RandomUSACoords[rand][0],RandomUSACoords[rand][1],RandomUSACoords[rand][2]);
  903.     }
  904.     return 1;
  905. }
  906.  
  907. stock SetRandomGERPos(playerid)
  908. {
  909.     if( gTeam[playerid]==TEAM_GERMANY )
  910.     {
  911.         new rand = random(sizeof(RandomGERCoords));
  912.         SetPlayerInterior(playerid, 0);
  913.         SetPlayerPos(playerid, RandomGERCoords[rand][0], RandomGERCoords[rand][1], RandomGERCoords[rand][2]);
  914.     }
  915.     return 1;
  916. }
  917.  
  918. new Text:txtTimeDisp;
  919. new hourx, minutex, secx;
  920. new timestr[32];
  921.  
  922. forward UpdateTime();
  923. public UpdateTime()
  924. {
  925.  
  926.     foreach(Player, i)
  927.     {
  928.    
  929.         if(IsPlayerInAnyVehicle(i))
  930.         {
  931.             new mphspeed[128];
  932.             format(mphspeed, sizeof(mphspeed), "%d  mph", GetPlayerSpeedSpeedo(i, false));
  933.             TextDrawHideForPlayer(i, Text:Textdraw0);
  934.             TextDrawSetString(Text:Textdraw0, mphspeed);
  935.             TextDrawShowForPlayer(i, Text:Textdraw0);
  936.         }
  937.         else
  938.         {
  939.             TextDrawHideForPlayer(i, Text:Textdraw0);
  940.         }
  941.    
  942.         if(GetPlayerState(i)==PLAYER_STATE_DRIVER && !IsPlayerInPlane(i))
  943.         {
  944.             if(GetPlayerSpeedSpeedo(i, true) > 400)
  945.             {
  946.                 new BadSpeed = GetPlayerSpeedSpeedo(i, true);
  947.                 new speedo[128];
  948.                 new HackerName[MAX_PLAYER_NAME];
  949.                 GetPlayerName(i, HackerName, sizeof(HackerName));
  950.                 format(speedo, sizeof(speedo), "Banning: %s [Reason: Speedhacks | %dKMH; MAX: 400KMH]", HackerName, BadSpeed);
  951.                 SendClientMessageToAll(RED, speedo);
  952.                 BanEx(i, "Speedhacks");
  953.             }
  954.         }
  955.        
  956.  
  957.         if(adminlevel[i] < 1)
  958.         {
  959.             /*
  960.             switch(GetPlayerWeapon(i))
  961.             {
  962.                 case 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 26, 35, 38, 42, 44, 45:
  963.                 {
  964.                     new HackerName[MAX_PLAYER_NAME];
  965.                     GetPlayerName(i, HackerName, sizeof(HackerName));
  966.                     new string[128];
  967.                     format(string, sizeof(string), "Banning: %s [Reason: Weapon Hacks]", HackerName);
  968.                     SendClientMessageToAll(COLOR_RED, string);
  969.                     BanEx(i, "Invalid Weapon - Weapon Hacks");
  970.                 }
  971.             }
  972.             */
  973.            
  974.             new weapon;
  975.             new gunammo;
  976.             for(new w = 0; w <13; w++)
  977.             {
  978.                 GetPlayerWeaponData(i, w, weapon, gunammo);
  979.                 if((weapon == 2 || weapon == 3 || weapon == 5 || weapon == 6 || weapon == 7 || weapon == 8 || weapon == 9 || weapon == 10 || weapon == 11 || weapon == 12 || weapon == 13 || weapon == 14 || weapon == 15 || weapon == 17 || weapon == 18 || weapon == 26 || weapon == 35 || weapon == 38 || weapon == 42 || weapon == 44 || weapon == 45) && gunammo > 0)
  980.                 {
  981.                     new HackerName[MAX_PLAYER_NAME];
  982.                     GetPlayerName(i, HackerName, sizeof(HackerName));
  983.                     new string[128];
  984.                     format(string, sizeof(string), "Banning: %s [Reason: Weapon Hacks]", HackerName);
  985.                     SendClientMessageToAll(COLOR_RED, string);
  986.                     BanEx(i, "Invalid Weapon - Weapon Hacks");
  987.                     return 1;
  988.                 }
  989.             }
  990.            
  991.             if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
  992.             {
  993.                 new HackerName[MAX_PLAYER_NAME];
  994.                 GetPlayerName(i, HackerName, sizeof(HackerName));
  995.                 new string[128];
  996.                 format(string, sizeof(string), "Banning: %s [Reason: Jetpack]", HackerName);
  997.                 SendClientMessageToAll(COLOR_RED, string);
  998.                 BanEx(i, "Invalid Weapon - Jetpack");
  999.             }
  1000.            
  1001.             if(GetPlayerPing(i) > 800 && pSpawned[i] == 1)
  1002.             {
  1003.                 new HackerName[MAX_PLAYER_NAME];
  1004.                 GetPlayerName(i, HackerName, sizeof(HackerName));
  1005.                 new string[128];
  1006.                 format(string, sizeof(string), "Kicking: %s [Reason: High Ping | %d/800]", HackerName, GetPlayerPing(i));
  1007.                 SendClientMessageToAll(COLOR_RED, string);
  1008.                 Kick(i);
  1009.             }
  1010.            
  1011.             if(GetPlayerState(i)==PLAYER_STATE_DRIVER)
  1012.             {
  1013.                 new weaponid=GetPlayerSpeed(i);
  1014.                 if(weaponid>260 && !IsPlayerInPlane(i))
  1015.                 {
  1016.                     SpeedHacking[i]++;
  1017.                     if(SpeedHacking[i]==2)
  1018.                     {
  1019.                         JB_Warnings[i]++;
  1020.                         TogglePlayerControllable(i,false);
  1021.                         if(JB_Warnings[i]<2)
  1022.                         {
  1023.                             new reason[128];
  1024.                             format(reason,sizeof(reason),"%d KM/H with %s",weaponid,GetVehicleName(GetPlayerVehicleID(i)));
  1025.                             SendClientMessageToAdmins(RED, reason, 1);
  1026.                         }
  1027.                         else
  1028.                         {
  1029.                             new HackerName[MAX_PLAYER_NAME];
  1030.                             GetPlayerName(i, HackerName, sizeof(HackerName));
  1031.                             new string[128];
  1032.                             format(string, sizeof(string), "Banning: %s [Reason: Speedhacks]", HackerName);
  1033.                             SendClientMessageToAll(RED, string);
  1034.                             BanEx(i,"Speedhack");
  1035.                             continue;
  1036.                         }
  1037.                     }
  1038.                 }
  1039.                 else
  1040.                 {
  1041.                     SpeedHacking[i]=0;
  1042.                 }
  1043.             }
  1044.         }
  1045.     }
  1046.    
  1047.     new reason[64];
  1048.     foreach(Player, i)
  1049.     {
  1050.         if(Messages[i])
  1051.         {
  1052.             if(!Muted[i])
  1053.             {
  1054.                 if(Messages[i]>15)
  1055.                 {
  1056.                     format(reason,sizeof(reason),"Extreme spam [%d messages/second]",Messages[i]);
  1057.                     SendClientMessageToAll(RED, reason);
  1058.                     Kick(i);
  1059.                     continue;
  1060.                 }
  1061.                 else if(Messages[i]>10)
  1062.                 {
  1063.                     format(reason,sizeof(reason),"Massive spam [%d messages/second]",Messages[i]);
  1064.                     SendClientMessageToAll(RED, reason);
  1065.                     Kick(i);
  1066.                     continue;
  1067.                 }
  1068.                 else if(Messages[i]>4)
  1069.                 {
  1070.                     format(reason,sizeof(reason),"Spam [%d messages/second]",Messages[i]);
  1071.                     SendClientMessageToAll(RED, reason);
  1072.                     MutePlayer(i,2*60,reason);
  1073.                 }
  1074.                 Messages[i]--;
  1075.             }
  1076.  
  1077.             if(Commands[i])
  1078.             {
  1079.                 if(Commands[i]>15)
  1080.                 {
  1081.                     format(reason,sizeof(reason),"Extreme command spam [%d commands/second]",Commands[i]);
  1082.                     SendClientMessageToAll(RED, reason);
  1083.                     Kick(i);
  1084.                     continue;
  1085.                 }
  1086.                 else if(Commands[i]>5)
  1087.                 {
  1088.                     format(reason,sizeof(reason),"Massive command spam [%d commands/second]",Commands[i]);
  1089.                     SendClientMessageToAll(RED, reason);
  1090.                     Kick(i);
  1091.                     continue;
  1092.                 }
  1093.             }
  1094.             Commands[i]--;
  1095.         }
  1096.     }
  1097.  
  1098.     foreach(Player, i)
  1099.     {
  1100.         if( GetPlayerWantedLevel(i) != rank[i] ) SetPlayerWantedLevel(i, rank[i]);
  1101.     }
  1102.  
  1103.     secx++;
  1104.     if( secx == 5 ) minutex++;
  1105.     if( minutex == 60 ) hourx++;
  1106.  
  1107.     if( hourx == 24 ) hourx = 0;
  1108.     if( minutex > 59 ) minutex = 0;
  1109.  
  1110.     format(timestr,32,"%02d:%02d",hourx,minutex);
  1111.     TextDrawHideForAll(txtTimeDisp);
  1112.     TextDrawSetString(txtTimeDisp,timestr);
  1113.     TextDrawShowForAll(txtTimeDisp);
  1114.  
  1115.     SetWorldTime(hourx);
  1116.  
  1117.     foreach(Player, i)
  1118.     {
  1119.         SetPlayerTime(i, hourx, minutex);
  1120.     }
  1121.    
  1122.     if( hourx >= 22 || hourx <= 4 && hourx >= 0)
  1123.     {
  1124.         foreach(Player, j)
  1125.         {
  1126.             foreach(Player, i)
  1127.             {
  1128.                 if( gTeam[i] != gTeam[j] )
  1129.                 {
  1130.                     if( gTeam[j]== TEAM_USA ) SetPlayerMarkerForPlayer(i, j, 0x0000FF00);
  1131.                     if( gTeam[j]== TEAM_GERMANY ) SetPlayerMarkerForPlayer(i, j, 0xFF000000);
  1132.                     if( gTeam[j]== TEAM_JAPAN ) SetPlayerMarkerForPlayer(i, j, 0xFFFFFF00);
  1133.                     if( gTeam[j]== TEAM_RUSSIA ) SetPlayerMarkerForPlayer(i, j, 0xF9780400);
  1134.                     if( gTeam[j]== TEAM_MERC ) SetPlayerMarkerForPlayer(i, j, 0xFFFF0000);
  1135.                            
  1136.                     if( gTeam[i] == gTeam[j] && gPlayerClass[j] == GENERAL) SetPlayerMarkerForPlayer(j, i, 0xF50FCBFF);
  1137.                 }
  1138.             }
  1139.         }
  1140.     }else
  1141.     if( hourx > 4 && hourx < 22 )
  1142.     {
  1143.         new tcolor;
  1144.         foreach(Player, j)
  1145.         {
  1146.             foreach(Player, i)
  1147.             {
  1148.                 if( gTeam[i] == TEAM_USA ) tcolor = COLOR_BLUE;
  1149.                 if( gTeam[i] == TEAM_GERMANY ) tcolor = COLOR_RED;
  1150.                 if( gTeam[i] == TEAM_JAPAN ) tcolor = COLOR_WHITE;
  1151.                 if( gTeam[i] == TEAM_RUSSIA ) tcolor = COLOR_ORANGE;
  1152.                 if( gTeam[i] == TEAM_MERC ) tcolor = COLOR_YELLOW;
  1153.                 if( gTeam[i] != gTeam[j] )  SetPlayerMarkerForPlayer(j, i, tcolor);
  1154.                        
  1155.                 if( gPlayerClass[i] == GENERAL) SetPlayerMarkerForPlayer(j, i, 0xF50FCBFF);
  1156.             }
  1157.         }
  1158.     }
  1159.  
  1160.     return 1;
  1161. }
  1162.  
  1163. new playerColors[MAX_PLAYERS];
  1164. forward PlayerLeaveGang(playerid);
  1165. new teamNames[MAX_TEAMS][MAX_TEAM_NAME];
  1166. new teamInfo[MAX_TEAMS][3]; //0-created,1-members,2-color
  1167. new playerTeam[MAX_PLAYERS];
  1168. new teamMembers[MAX_TEAMS][MAX_TEAM_MEMBERS];
  1169. new teamInvite[MAX_PLAYERS];
  1170. PlayerLeaveGang(playerid) {
  1171.     new string[100];
  1172.     new teamnum = playerTeam[playerid];
  1173.  
  1174.     if(teamnum > 0) {
  1175.         for(new i = 0; i < teamInfo[teamnum][1]; i++) {
  1176.             if(teamMembers[teamnum][i]==playerid) {
  1177.  
  1178.                 //One less team member
  1179.                 teamInfo[teamnum][1]--;
  1180.  
  1181.                 for(new j = i; j < teamInfo[teamnum][1]; j++) {
  1182.                     //Shift team members
  1183.                     teamMembers[teamnum][j]=teamMembers[teamnum][j+1];
  1184.                 }
  1185.  
  1186.                 //Disband team if no more members
  1187.                 if(teamInfo[teamnum][1]<1) {
  1188.                     teamInfo[teamnum][0]=0;
  1189.                     teamInfo[teamnum][1]=0;
  1190.                 }
  1191.  
  1192.  
  1193.                 //Notify other members
  1194.                 for(new j = 0; j < teamInfo[teamnum][1]; j++) {
  1195.                     GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  1196.                     format(string, sizeof(string),"%s has quit your team.", playername);
  1197.                     SendClientMessage(teamMembers[teamnum][j], COLOR_ORANGE, string);
  1198.                 }
  1199.                 format(string, sizeof(string),"You have quit the team '%s' (id: %d)", teamNames[teamnum], teamnum);
  1200.                 SendClientMessage(playerid, COLOR_ORANGE, string);
  1201.                 playerTeam[playerid]=0;
  1202.  
  1203.                 return;
  1204.             }
  1205.         }
  1206.     } else {
  1207.         SendClientMessage(playerid, COLOR_RED, "You are not in a team.");
  1208.     }
  1209. }
  1210.  
  1211. forward DispenserOut(playerid);
  1212. public DispenserOut(playerid)
  1213. {
  1214.     dispout[playerid] = 0;
  1215.     return 1;
  1216. }
  1217.  
  1218.  
  1219.  
  1220. //-=====VEHICLES====
  1221. new total_vehicles_from_files=0;
  1222.  
  1223.  
  1224. main()
  1225. {
  1226.     print("__________GAMEMODE LOADING!_________");
  1227.     print("\n----------------------------------");
  1228.     print("       Call Of Duty 5 Gamemode"      );
  1229.     print("----------------------------------\n");
  1230.     print("__________GAMEMODE LOADED!__________");
  1231. }
  1232.  
  1233. public OnGameModeInit()
  1234. {
  1235.  
  1236.     vehiclehpbar[0] = TextDrawCreate(551.0, 59.0, " ");
  1237.     TextDrawUseBox(vehiclehpbar[0], true);
  1238.     TextDrawBoxColor(vehiclehpbar[0], COLOR_VHPDANGER);
  1239.     TextDrawSetShadow(vehiclehpbar[0],0);
  1240.     TextDrawTextSize(vehiclehpbar[0], 602, 0);
  1241.     TextDrawSetOutline(vehiclehpbar[0],1);
  1242.  
  1243.     vehiclehpbar[1] = TextDrawCreate(551.0, 59.0, " ");
  1244.     TextDrawUseBox(vehiclehpbar[1], true);
  1245.     TextDrawBoxColor(vehiclehpbar[1], COLOR_VHPDANGER);
  1246.     TextDrawSetShadow(vehiclehpbar[1],0);
  1247.     TextDrawTextSize(vehiclehpbar[1], 551, 0);
  1248.     TextDrawSetOutline(vehiclehpbar[1],1);
  1249.  
  1250.     vehiclehpbar[2] = TextDrawCreate(551.0, 59.0, " ");
  1251.     TextDrawUseBox(vehiclehpbar[2], true);
  1252.     TextDrawBoxColor(vehiclehpbar[2], COLOR_VHPDANGER);
  1253.     TextDrawSetShadow(vehiclehpbar[2],0);
  1254.     TextDrawTextSize(vehiclehpbar[2], 556, 0);
  1255.     TextDrawSetOutline(vehiclehpbar[2],1);
  1256.  
  1257.     vehiclehpbar[3] = TextDrawCreate(551.0, 59.0, " ");
  1258.     TextDrawUseBox(vehiclehpbar[3], true);
  1259.     TextDrawBoxColor(vehiclehpbar[3], COLOR_VHPDANGER);
  1260.     TextDrawSetShadow(vehiclehpbar[3],0);
  1261.     TextDrawTextSize(vehiclehpbar[3], 561, 0);
  1262.     TextDrawSetOutline(vehiclehpbar[3],1);
  1263.  
  1264.     vehiclehpbar[4] = TextDrawCreate(551.0, 59.0, " ");
  1265.     TextDrawUseBox(vehiclehpbar[4], true);
  1266.     TextDrawBoxColor(vehiclehpbar[4], COLOR_VHPWARNING);
  1267.     TextDrawSetShadow(vehiclehpbar[4],0);
  1268.     TextDrawTextSize(vehiclehpbar[4], 566, 0);
  1269.     TextDrawSetOutline(vehiclehpbar[4],1);
  1270.  
  1271.     vehiclehpbar[5] = TextDrawCreate(551.0, 59.0, " ");
  1272.     TextDrawUseBox(vehiclehpbar[5], true);
  1273.     TextDrawBoxColor(vehiclehpbar[5], COLOR_VHPWARNING);
  1274.     TextDrawSetShadow(vehiclehpbar[5],0);
  1275.     TextDrawTextSize(vehiclehpbar[5], 571, 0);
  1276.     TextDrawSetOutline(vehiclehpbar[5],1);
  1277.  
  1278.     vehiclehpbar[6] = TextDrawCreate(551.0, 59.0, " ");
  1279.     TextDrawUseBox(vehiclehpbar[6], true);
  1280.     TextDrawBoxColor(vehiclehpbar[6], COLOR_VHPWARNING);
  1281.     TextDrawSetShadow(vehiclehpbar[6],0);
  1282.     TextDrawTextSize(vehiclehpbar[6], 576, 0);
  1283.     TextDrawSetOutline(vehiclehpbar[6],1);
  1284.  
  1285.     vehiclehpbar[7] = TextDrawCreate(551.0, 59.0, " ");
  1286.     TextDrawUseBox(vehiclehpbar[7], true);
  1287.     TextDrawBoxColor(vehiclehpbar[7], COLOR_VHPWARNING);
  1288.     TextDrawSetShadow(vehiclehpbar[7],0);
  1289.     TextDrawTextSize(vehiclehpbar[7], 581, 0);
  1290.     TextDrawSetOutline(vehiclehpbar[7],1);
  1291.  
  1292.     vehiclehpbar[8] = TextDrawCreate(551.0, 59.0, " ");
  1293.     TextDrawUseBox(vehiclehpbar[8], true);
  1294.     TextDrawBoxColor(vehiclehpbar[8], COLOR_VHPGOOD);
  1295.     TextDrawSetShadow(vehiclehpbar[8],0);
  1296.     TextDrawTextSize(vehiclehpbar[8], 586, 0);
  1297.     TextDrawSetOutline(vehiclehpbar[8],1);
  1298.  
  1299.     vehiclehpbar[9] = TextDrawCreate(551.0, 59.0, " ");
  1300.     TextDrawUseBox(vehiclehpbar[9], true);
  1301.     TextDrawBoxColor(vehiclehpbar[9], COLOR_VHPGOOD);
  1302.     TextDrawSetShadow(vehiclehpbar[9],0);
  1303.     TextDrawTextSize(vehiclehpbar[9], 591, 0);
  1304.     TextDrawSetOutline(vehiclehpbar[9],1);
  1305.  
  1306.     vehiclehpbar[10] = TextDrawCreate(551.0, 59.0, " ");
  1307.     TextDrawUseBox(vehiclehpbar[10], true);
  1308.     TextDrawBoxColor(vehiclehpbar[10], COLOR_VHPGOOD);
  1309.     TextDrawSetShadow(vehiclehpbar[10],0);
  1310.     TextDrawTextSize(vehiclehpbar[10], 596, 0);
  1311.     TextDrawSetOutline(vehiclehpbar[10],1);
  1312.  
  1313.     vehiclehpbar[11] = TextDrawCreate(551.0, 59.0, " ");
  1314.     TextDrawUseBox(vehiclehpbar[11], true);
  1315.     TextDrawBoxColor(vehiclehpbar[11], COLOR_VHPGOOD);
  1316.     TextDrawSetShadow(vehiclehpbar[11],0);
  1317.     TextDrawTextSize(vehiclehpbar[11], 602, 0);
  1318.     TextDrawSetOutline(vehiclehpbar[11],1);
  1319.  
  1320.     SetTimer("VHPBarUpdate",250,1);
  1321.  
  1322.     Textdraw0 = TextDrawCreate(502.000000,134.000000,"      mph");
  1323.     TextDrawUseBox(Textdraw0,1);
  1324.     TextDrawBoxColor(Textdraw0,0x00000066);
  1325.     TextDrawTextSize(Textdraw0,602.000000,0.000000);
  1326.     TextDrawAlignment(Textdraw0,0);
  1327.     TextDrawBackgroundColor(Textdraw0,0x000000ff);
  1328.     TextDrawFont(Textdraw0,1);
  1329.     TextDrawLetterSize(Textdraw0,0.599999,0.899999);
  1330.     TextDrawColor(Textdraw0,0xffffffff);
  1331.     TextDrawSetOutline(Textdraw0,1);
  1332.     TextDrawSetProportional(Textdraw0,1);
  1333.     TextDrawSetShadow(Textdraw0,1);
  1334.  
  1335.     txtTimeDisp = TextDrawCreate(605.0,25.0,"00:00");
  1336.     TextDrawUseBox(txtTimeDisp, 0);
  1337.     TextDrawFont(txtTimeDisp, 3);
  1338.     TextDrawSetShadow(txtTimeDisp,0); // no shadow
  1339.     TextDrawSetOutline(txtTimeDisp,2); // thickness 1
  1340.     TextDrawBackgroundColor(txtTimeDisp,0x000000FF);
  1341.     TextDrawColor(txtTimeDisp,0xFFFFFFFF);
  1342.     TextDrawAlignment(txtTimeDisp,3);
  1343.     TextDrawLetterSize(txtTimeDisp,0.5,1.5);
  1344.  
  1345.     UpdateTime();
  1346.     SetTimer("UpdateTime", 1000, 1); //rank refresh, time, anti weapon hack
  1347.    
  1348.     SetWeather(10);
  1349.     SetTimer("WeatherRefresh", 300000 , 1);
  1350.  
  1351.     SetTimer("ZonesPay", 600000 , 1);
  1352.  
  1353.     Spree = TextDrawCreate(9.000000,310.000000,"s is on a killing spree of i kills.");
  1354.     TextDrawAlignment(Spree,0);
  1355.     TextDrawBackgroundColor(Spree,0x000000ff);
  1356.     TextDrawFont(Spree,3);
  1357.     TextDrawLetterSize(Spree,0.299999,0.799999);
  1358.     TextDrawColor(Spree,0xffffffff);
  1359.     TextDrawSetOutline(Spree,1);
  1360.     TextDrawSetProportional(Spree,1);
  1361.     TextDrawSetShadow(Spree,1);
  1362.     TextDrawHideForAll(Spree);
  1363.  
  1364.     AntiDEAmx();
  1365.  
  1366.     DisableInteriorEnterExits();
  1367.    
  1368.     foreach(Player, i) IsInBarracks[i] = false;
  1369.     foreach(Player, i) IsInCargoB[i] = false;
  1370.  
  1371.     GangZoneShowForAll(Ear ,GCOLOR_GREEN);
  1372.     GangZoneShowForAll(Airfield ,GCOLOR_GREEN);
  1373.     GangZoneShowForAll(Resturant ,GCOLOR_GREEN);
  1374.     GangZoneShowForAll(Oil ,GCOLOR_GREEN);
  1375.     GangZoneShowForAll(A ,GCOLOR_GREEN);
  1376.     GangZoneShowForAll(Gas ,GCOLOR_GREEN);
  1377.     GangZoneShowForAll(OS ,GCOLOR_GREEN);
  1378.     GangZoneShowForAll(T ,GCOLOR_GREEN);
  1379.     GangZoneShowForAll(D ,GCOLOR_GREEN);
  1380.     GangZoneShowForAll(OT ,GCOLOR_GREEN);
  1381.    
  1382.     //---NRGs added in MTA for USA and GER
  1383.     AddStaticVehicle(522,-231.327087, 2671.195068, 62.358879,0.0,-1,-1);
  1384.     AddStaticVehicle(522,-232.865707, 2671.293213, 62.358879,0.0,-1,-1);
  1385.     AddStaticVehicle(522,-234.415634, 2671.292236, 62.358879,0.0,-1,-1);
  1386.     AddStaticVehicle(522,-236.240616, 2671.293213, 62.358879,0.0,-1,-1);
  1387.     AddStaticVehicle(522,-237.990616, 2671.293213, 62.358879,0.0,-1,-1);
  1388.     AddStaticVehicle(522,-239.715805, 2671.218506, 62.358879,0.0,-1,-1);
  1389.     AddStaticVehicle(522,-177.418762, 1154.855347, 19.510365,0.0,-1,-1);
  1390.     AddStaticVehicle(522,-176.104294, 1154.993408, 19.510365,0.0,-1,-1);
  1391.     AddStaticVehicle(522,-174.654770, 1155.088135, 19.510365,0.0,-1,-1);
  1392.     AddStaticVehicle(522,-173.154892, 1155.038818, 19.510365,0.0,-1,-1);
  1393.     AddStaticVehicle(522,-171.754623, 1155.163452, 19.510365,0.0,-1,-1);
  1394.     AddStaticVehicle(522,-170.479691, 1155.187744, 19.510365,0.0,-1,-1);
  1395.     AddStaticVehicle(522,-169.254623, 1155.188965, 19.510365,0.0,-1,-1);
  1396.  
  1397.     //infernuses
  1398.     AddStaticVehicle(411,967.2693,2546.0071,10.4964,8.3137,-1,-1); //
  1399.     AddStaticVehicle(411,962.8986,2548.3208,10.5105,6.7354,-1,-1); //
  1400.     AddStaticVehicle(411,958.4675,2551.7644,10.5237,5.1051,-1,-1); //
  1401.     AddStaticVehicle(411,950.3170,2557.6938,10.5427,17.1943,-1,-1); //
  1402.  
  1403.  
  1404.     //germs vehs
  1405.     AddStaticVehicle(507,-169.7802,1193.7305,19.4832,272.1584,53,53); //
  1406.     AddStaticVehicle(507,-151.3201,1193.4274,19.4921,270.2192,53,53); //
  1407.     AddStaticVehicle(432,-132.8332,1214.5040,19.7549,359.7852,-1,-1); //
  1408.     AddStaticVehicle(432,-143.8001,1213.6923,19.7513,1.2314,-1,-1); //
  1409.     AddStaticVehicle(432,-163.7118,1227.4756,19.7552,92.3068,-1,-1); //
  1410.     AddStaticVehicle(432,-162.9769,1215.4075,19.7552,92.4037,-1,-1); //
  1411.     AddStaticVehicle(432,-148.0277,1183.0833,19.7562,269.6900,-1,-1); //
  1412.     AddStaticVehicle(432,-80.7883,1053.4082,19.7529,90.7146,-1,-1); //
  1413.     AddStaticVehicle(432,-80.8473,1045.3708,19.7413,91.6475,-1,-1); //
  1414.     AddStaticVehicle(432,-243.6082,1081.1266,19.7272,178.3251,-1,-1); //
  1415.     AddStaticVehicle(432,-259.8210,1218.5247,19.7549,358.7866,-1,-1); //
  1416.     AddStaticVehicle(432,-250.5950,1216.1040,19.7551,2.0934,-1,-1); //
  1417.     AddStaticVehicle(432,-236.8259,1214.0068,19.7550,1.2626,-1,-1); //
  1418.     AddStaticVehicle(433,-228.7815,1217.0042,20.1753,181.5212,-1,-1); //
  1419.     AddStaticVehicle(433,-218.9273,1216.7688,20.1735,178.4961,-1,-1); //
  1420.     AddStaticVehicle(433,-197.2750,1214.2571,20.1787,182.0692,-1,-1); //
  1421.     AddStaticVehicle(433,-200.4926,1171.9255,20.1027,179.7394,-1,-1); //
  1422.     AddStaticVehicle(433,-153.7065,1084.7604,20.1406,266.1849,-1,-1); //
  1423.     AddStaticVehicle(470,-158.6108,1167.2167,19.7354,178.3675,-1,-1); //
  1424.     AddStaticVehicle(470,-145.2791,1153.0159,19.6592,272.3667,-1,-1); //
  1425.     AddStaticVehicle(470,-82.8678,1158.0170,19.7345,271.8048,-1,-1); //
  1426.     AddStaticVehicle(470,-32.2315,1184.7002,19.3484,359.4193,-1,-1); //
  1427.     AddStaticVehicle(470,-10.5601,1220.7673,19.3413,4.1551,-1,-1); //
  1428.     AddStaticVehicle(470,-2.0027,1221.7136,19.3442,1.9967,-1,-1); //
  1429.     AddStaticVehicle(470,5.4184,1218.5588,19.3461,357.7910,-1,-1); //
  1430.     AddStaticVehicle(470,-80.4464,1222.3505,19.7347,91.6395,-1,-1); //
  1431.  
  1432.  
  1433.     AddStaticVehicle(563,331.4599,1886.1169,18.3770,84.4659,-1,-1); //
  1434.     AddStaticVehicle(563,331.2554,1909.8429,18.3464,78.5222,-1,-1); //
  1435.     AddStaticVehicle(563,331.7949,1938.8259,18.5398,77.9602,-1,-1); //
  1436.     AddStaticVehicle(563,330.3231,1983.9952,18.3442,81.1244,-1,-1); //
  1437.     AddStaticVehicle(563,122.7671,1842.8962,18.3292,2.5195,-1,-1); //
  1438.     AddStaticVehicle(512,528.9547,2367.5115,30.6920,137.7069,-1,-1); //
  1439.     AddStaticVehicle(512,514.9328,2378.3474,30.5232,150.2689,-1,-1); //
  1440.     AddStaticVehicle(593,-1361.7849,2037.5492,52.8914,57.9189,-1,-1); //
  1441.     AddStaticVehicle(476,286.9427,1955.4691,18.3671,277.5993,0,0); //
  1442.     AddStaticVehicle(476,288.6657,1989.6289,18.3534,270.2627,0,0); //
  1443.     AddStaticVehicle(476,287.8248,2023.4749,18.3601,273.9962,0,0); //
  1444.     AddStaticVehicle(593,318.0988,2053.4099,18.1017,182.6097,-1,-1); //
  1445.     AddStaticVehicle(593,297.5963,2052.5305,18.0996,184.7778,-1,-1); //
  1446.     AddStaticVehicle(432,277.6725,1933.4904,17.6535,258.1084,-1,-1); //
  1447.     AddStaticVehicle(432,650.9734,1720.9785,7.0048,314.1348,-1,-1); //
  1448.     AddStaticVehicle(522,645.8229,1703.7096,6.5479,271.0890,-1,-1); //
  1449.     AddStaticVehicle(522,646.0932,1705.3629,6.5526,248.8787,-1,-1); //
  1450.     AddStaticVehicle(522,645.7590,1701.5352,6.5439,296.7048,-1,-1); //
  1451.     AddStaticVehicle(548,665.9,1713.4247,12.5887,130.9149,-1,-1); //
  1452.     AddStaticVehicle(463,637.9642,1676.7590,6.5403,42.7471,-1,-1); //
  1453.     AddStaticVehicle(463,636.8578,1674.5835,6.5324,41.8462,-1,-1); //
  1454.     AddStaticVehicle(463,634.3597,1673.4452,6.5328,40.7716,-1,-1); //
  1455.    
  1456.     AddStaticVehicle(548,-194.1559,1099.2136,22.1135,91.4867,-1,-1); //
  1457.     AddStaticVehicle(470,-104.4889,1338.6318,10.1483,8.6644,-1,-1); //
  1458.     AddStaticVehicle(470,-91.5219,1339.2817,10.5482,8.5679,-1,-1); //
  1459.     AddStaticVehicle(433,-79.0923,1341.5598,11.4249,184.2915,-1,-1); //
  1460.     AddStaticVehicle(548,-123.5095,1363.0320,10.0150,280.9174,-1,-1); //
  1461.     AddStaticVehicle(548,-121.2912,1342.0988,10.2959,270.8427,-1,-1); //
  1462.     AddStaticVehicle(495,-359.1719,2198.1541,42.7821,98.7701,-1,-1); //
  1463.     AddStaticVehicle(495,-356.5640,2192.8105,42.7588,100.7477,-1,-1); //
  1464.     AddStaticVehicle(495,-355.2666,2187.6851,43.1441,102.8361,-1,-1); //
  1465.     AddStaticVehicle(495,-619.3625,2700.9087,72.6508,81.6365,-1,-1); //
  1466.    
  1467.     AddStaticVehicle(560,-225.6614,2595.8879,62.4088,181.4528,-1,-1); //
  1468.     AddStaticVehicle(560,-231.7928,2595.4939,62.4084,178.8395,-1,-1); //
  1469.     AddStaticVehicle(560,-234.7735,2595.1611,62.4086,178.7130,-1,-1); //
  1470.     AddStaticVehicle(522,-213.5216,2608.3630,62.2667,359.9745,-1,-1); //
  1471.     AddStaticVehicle(522,-210.5314,2608.1548,62.2738,358.1469,-1,-1); //
  1472.     AddStaticVehicle(522,-207.7199,2608.3030,62.2738,351.7036,-1,-1); //
  1473.     AddStaticVehicle(522,-201.0907,2608.5605,62.2725,1.8600,-1,-1); //
  1474.     AddStaticVehicle(522,-198.1578,2608.5200,62.2822,359.3217,-1,-1); //
  1475.     AddStaticVehicle(522,-132.0484,1111.6306,19.3200,347.5851,-1,-1); //
  1476.     AddStaticVehicle(522,-130.0735,1111.3840,19.3201,352.0504,-1,-1); //
  1477.     AddStaticVehicle(522,-128.3442,1111.0789,19.3192,348.4462,-1,-1); //
  1478.     AddStaticVehicle(522,-125.5919,1110.6642,19.3151,346.8562,-1,-1); //
  1479.     AddStaticVehicle(522,-123.1108,1110.2809,19.3125,349.0297,-1,-1); //
  1480.     AddStaticVehicle(522,-118.0766,1110.5529,19.3132,355.2980,-1,-1); //
  1481.     AddStaticVehicle(522,-116.4487,1110.5885,19.3074,353.7619,-1,-1); //
  1482.     AddStaticVehicle(507,-79.4650,1117.1761,19.5733,181.3275,-1,-1); //
  1483.     AddStaticVehicle(507,-85.2980,1117.9191,19.5661,182.2258,-1,-1); //
  1484.     AddStaticVehicle(507,-158.4889,1143.9846,19.4979,89.9066,-1,-1); //
  1485.     AddStaticVehicle(507,-186.0364,1180.9192,19.4891,359.3073,-1,-1); //
  1486.     AddStaticVehicle(507,-257.9445,1185.1616,19.5678,90.6672,-1,-1); //
  1487.  
  1488.     AddStaticVehicle(470,-672.1344,945.1514,12.1260,87.5528,43,0); // merc car
  1489.     AddStaticVehicle(470,-690.5383,957.8001,12.1847,90.2971,43,0); // merc car
  1490.     AddStaticVehicle(470,-674.5730,957.8810,12.1272,90.2939,43,0); // merc car
  1491.     AddStaticVehicle(468,-702.0219,944.5999,12.0361,85.7885,6,6); // merc bike
  1492.     AddStaticVehicle(468,-708.1751,939.5073,12.1310,188.1910,6,6); // merc bike
  1493.     AddStaticVehicle(468,-725.8101,954.5783,11.8624,349.6954,6,6); // merc bike
  1494.     AddStaticVehicle(468,-726.3350,947.5059,11.8791,357.1979,6,6); // merc bike
  1495.     AddStaticVehicle(560,-687.3456,968.5964,11.8533,89.1843,33,0); // merc car
  1496.     AddStaticVehicle(560,-686.2144,963.2752,11.8444,90.2767,33,0); // merc car
  1497.     AddStaticVehicle(487,-707.1479,919.5628,12.6068,0.1513,29,42); // merc heli
  1498.     AddStaticVehicle(487,-698.2263,921.2454,12.4934,354.3436,29,42); // merc heli
  1499.     AddStaticVehicle(452,-655.1194,869.9988,-0.4632,225.3407,1,5); // merc boat
  1500.     AddStaticVehicle(447,-639.0670,862.1387,0.8045,316.0651,75,2); // merc sea sparrow
  1501.     AddStaticVehicle(432,-685.1277,975.4801,12.1487,90.4004,43,0); // merc rhino
  1502.     AddStaticVehicle(476,-681.0807,1002.1901,12.8463,351.1254,7,6); // merc plane
  1503.    
  1504.     //airfield - //get airfield to drive hydras
  1505.     AddStaticVehicle(520,290.6157,2529.2288,16.7975,179.9210,43,0); // hydra
  1506.     AddStaticVehicle(520,325.5918,2526.9756,16.7752,181.0163,43,0); // hydra
  1507.     AddStaticVehicle(425,354.9149,2537.6565,16.7106,181.1606,43,0); // hunter
  1508.     AddStaticVehicle(470,430.5221,2525.2485,16.5626,89.8864,43,0); // hummer
  1509.     AddStaticVehicle(470,431.3669,2520.7466,16.5079,86.6242,43,0); // hummer
  1510.     AddStaticVehicle(470,430.7663,2516.4858,16.4770,90.9687,43,0); // hummer
  1511.     AddStaticVehicle(433,432.2379,2493.4756,16.9249,176.7666,43,0); // truck
  1512.     AddStaticVehicle(548,298.9338,2481.4746,18.1557,11.8470,-1,-1); //
  1513.     AddStaticVehicle(548,319.7430,2485.4456,18.1585,349.0089,-1,-1); //cargob
  1514.     AddStaticVehicle(548,350.9522,2483.7412,18.1778,358.2218,-1,-1); //
  1515.     AddStaticVehicle(548,264.1784,2529.8091,18.3347,176.4812,-1,-1); //
  1516.     AddStaticVehicle(470,413.0779,2438.0547,16.5976,3.2638,13,119); //
  1517.     AddStaticVehicle(470,407.4735,2438.0496,16.6129,4.1867,13,119); //
  1518.     AddStaticVehicle(470,398.5161,2439.0686,16.6158,1.2063,13,119); //
  1519.     AddStaticVehicle(470,391.2148,2437.0002,16.6164,0.7779,13,119); //
  1520.    
  1521.     //Other new areas (cluck, beach, diner, oilpump)
  1522.     AddStaticVehicle(522,1037.3876,2908.5859,46.3015,271.6776,51,118); //
  1523.     AddStaticVehicle(522,1037.8823,2905.3047,46.1436,268.0199,51,118); //
  1524.     AddStaticVehicle(522,1037.4763,2901.6965,45.9479,266.9258,51,118); //
  1525.     AddStaticVehicle(522,1038.6372,2897.9346,45.4200,269.7422,51,118); //
  1526.     AddStaticVehicle(522,-315.1855,1761.3105,42.7785,248.7284, -1, -1);
  1527.     AddStaticVehicle(522,-1227.5244,1817.6886,41.5271,319.7334,51,118); //
  1528.     AddStaticVehicle(522,-1229.9177,1818.4574,41.4978,320.0735,51,118); //
  1529.     AddStaticVehicle(522,-1231.1715,1821.3622,41.3649,318.0110,51,118); //
  1530.     AddStaticVehicle(522,-1940.4406,2392.8330,49.0569,114.9237,51,118); //
  1531.     AddStaticVehicle(522,-1939.6705,2390.4353,49.0543,98.9270,51,118); //
  1532.     AddStaticVehicle(522,-1937.6279,2386.9443,49.0624,109.3271,51,118); //
  1533.     AddStaticVehicle(595,242.8717,2955.9917,-0.7378,342.5856, -1, -1);
  1534.     AddStaticVehicle(595,263.9715,2954.2747,-0.5237,21.1260, -1, -1);
  1535.     AddStaticVehicle(595,282.5208,2955.8550,-1.1740,301.2252, -1, -1);
  1536.     AddStaticVehicle(522,266.2558,2901.6870,8.2762,180.9041, -1, -1);
  1537.     AddStaticVehicle(522,263.5389,2899.8606,8.6596,90.9040, -1, -1);
  1538.     AddStaticVehicle(522,259.9532,2898.1299,9.2755,135.9041, -1, -1);
  1539.     AddStaticVehicle(522,255.6225,2895.0176,10.4500,90.9040, -1, -1);
  1540.    
  1541.     //university
  1542.     AddStaticVehicle(520,1064.6266,1102.3928,9.8448,218.4271,51,118); //
  1543.     AddStaticVehicle(520,1115.2910,1095.3765,9.8468,129.6781,51,118); //
  1544.     AddStaticVehicle(520,1110.1681,1045.9376,9.8367,39.3007,51,118); //
  1545.     AddStaticVehicle(520,1060.2118,1051.6526,9.8510,308.4725,51,118); //
  1546.  
  1547.     AddStaticVehicle(601,989.9682,1151.6063,10.3911,84.5832,51,118); //
  1548.     AddStaticVehicle(601,987.7191,1132.7836,10.3855,87.9686,51,118); //
  1549.     AddStaticVehicle(601,984.5304,1122.7181,10.3895,86.8643,51,118); //
  1550.     AddStaticVehicle(522,997.9036,1082.9163,10.8203,177.5646,51,118);
  1551.     AddStaticVehicle(522,995.2998,1082.6000,10.8130,177.5646,51,118);
  1552.     AddStaticVehicle(522,992.1792,1082.3055,10.8130,177.5646,51,118);
  1553.     AddStaticVehicle(522,989.7233,1081.9575,10.8130,177.5646,51,118);
  1554.     AddStaticVehicle(601,987.5378,1125.8842,10.8203,85.1538,51,118);
  1555.    
  1556.     //germany
  1557.  
  1558.     AddStaticVehicle(402,-305.8307,1114.7781,19.5790,358.0663,-1,-1); //
  1559.     AddStaticVehicle(402,-304.1901,1028.3877,19.4255,92.2054,-1,-1); //
  1560.     AddStaticVehicle(402,-304.0491,1023.7325,19.4255,90.1839,-1,-1); //
  1561.     AddStaticVehicle(402,-304.7504,1007.6920,19.4253,90.9390,-1,-1); //
  1562.     AddStaticVehicle(402,-173.3682,1018.7441,19.5736,271.4858,-1,-1); //
  1563.     AddStaticVehicle(402,-172.7404,1013.4344,19.5738,269.0490,-1,-1); //
  1564.     AddStaticVehicle(402,-77.2107,1076.8668,19.5736,179.3166,-1,-1); //
  1565.     AddStaticVehicle(402,-23.2576,1143.3752,19.4968,271.0952,-1,-1); //
  1566.     AddStaticVehicle(402,-70.9021,1185.6937,19.4937,4.7178,-1,-1); //
  1567.     AddStaticVehicle(548,-131.3202,993.5706,22.3230,273.4375,-1,-1); //
  1568.     AddStaticVehicle(520,-132.2480,1025.1906,21.3739,272.3754,-1,-1); //
  1569.     AddStaticVehicle(425,-169.5678,988.2139,21.2705,89.2718,-1,-1); //
  1570.     AddStaticVehicle(487,-93.1889,1027.0336,19.8679,260.7979,-1,-1); //
  1571.     AddStaticVehicle(487,-126.4990,1050.4193,20.8552,87.3708,-1,-1); //
  1572.     AddStaticVehicle(470,-91.7931,1157.5265,19.7338,273.4672,-1,-1); //
  1573.     AddStaticVehicle(471,-120.0205,1141.9608,19.1744,173.4989,0,0); //
  1574.     AddStaticVehicle(471,-122.9541,1142.5817,19.2001,186.2512,0,0); //
  1575.     AddStaticVehicle(471,-126.2311,1141.1714,19.2241,180.4574,0,0); //
  1576.     AddStaticVehicle(471,-130.1885,1141.0081,19.2220,178.7012,0,0); //
  1577.     AddStaticVehicle(468,-112.3525,1120.9099,19.4105,72.9971,-1,-1); //
  1578.     AddStaticVehicle(468,-112.5510,1117.9872,19.4110,81.6557,-1,-1); //
  1579.     AddStaticVehicle(468,-112.5225,1116.2460,19.4116,58.3526,-1,-1); //
  1580.     AddStaticVehicle(468,-112.6650,1114.5563,19.4107,73.8427,-1,-1); //
  1581.     AddStaticVehicle(487,-226.0801,2716.0386,67.1165,268.1381,54,29); //
  1582.     AddStaticVehicle(487,-344.9044,2676.9741,63.8829,23.0436,54,29); //
  1583.     AddStaticVehicle(487,-563.5708,2601.9707,66.0528,272.8370,54,29); //
  1584.     AddStaticVehicle(487,-417.3027,2191.2710,42.6609,9.3595,54,29); //
  1585.     AddStaticVehicle(487,333.7563,1961.2158,17.8156,95.5012,54,29); //
  1586.     AddStaticVehicle(487,334.1656,1924.0676,17.8218,79.1497,54,29); //
  1587.     AddStaticVehicle(487,332.2151,1867.0376,17.9470,89.0947,54,29); //
  1588.     AddStaticVehicle(522,292.3523,1878.6427,17.2000,56.2868,-1,-1); //
  1589.     AddStaticVehicle(522,292.3821,1883.3024,17.2067,52.2745,-1,-1); //
  1590.     AddStaticVehicle(578,-1507.3623,1982.4646,48.8080,0.6026,-1,-1); //
  1591.     AddStaticVehicle(511,-1484.9375,1976.6157,49.1932,1.9646,-1,-1); // BEAGLE
  1592.     AddStaticVehicle(578,-296.5619,2612.9839,63.9745,261.1927,-1,-1); //
  1593.  
  1594.     AddStaticVehicle(500,-294.2687,1299.5104,53.8735,261.4082,-1,-1); //
  1595.     AddStaticVehicle(500,-342.8879,1514.2316,75.4671,2.1713,-1,-1); //
  1596.     AddStaticVehicle(560,-327.2289,1515.4668,75.0640,358.9259,-1,-1); //
  1597.     AddStaticVehicle(471,-323.9928,1515.5222,74.8397,358.3837,-1,-1); //
  1598.     AddStaticVehicle(470,-175.7455,1680.6907,16.3509,317.6384,-1,-1); //
  1599.     AddStaticVehicle(470,-290.4361,1755.2761,42.6838,270.1544,-1,-1); //
  1600.     AddStaticVehicle(515,-289.7865,1775.7632,43.7337,0.2727,-1,-1); //
  1601.     AddStaticVehicle(487,-328.4066,1795.9874,42.9391,171.5455,-1,-1); //
  1602.     AddStaticVehicle(470,-914.5411,1996.9738,60.9072,127.0327,-1,-1); //
  1603.     AddStaticVehicle(470,-910.5156,1992.1903,60.9107,131.1484,-1,-1); //
  1604.     AddStaticVehicle(433,-924.6487,2039.1537,61.3507,41.2396,-1,-1); //
  1605.     AddStaticVehicle(430,-503.7894,2195.4170,40.3514,81.5870,-1,-1); //
  1606.     AddStaticVehicle(430,-501.7742,2169.3274,40.3594,90.5157,-1,-1); //
  1607.     AddStaticVehicle(470,-395.8641,2193.2930,42.3828,272.2695,-1,-1); //
  1608.     AddStaticVehicle(470,-392.9530,2186.8013,42.2435,269.0942,-1,-1); //
  1609.     AddStaticVehicle(470,-394.2175,2176.4539,41.7427,244.9370,-1,-1); //
  1610.     AddStaticVehicle(470,-17.9176,2357.1050,24.1288,356.4059,-1,-1); //
  1611.     AddStaticVehicle(470,-268.0789,2514.4490,33.2885,84.1131,-1,-1); //
  1612.     AddStaticVehicle(470,-527.7076,2609.7146,53.4089,90.1121,-1,-1); //
  1613.     AddStaticVehicle(470,-539.7891,2567.8345,53.4065,90.7815,-1,-1); //
  1614.     AddStaticVehicle(432,-518.9094,2581.9626,53.4267,269.5176,-1,-1); //
  1615.     AddStaticVehicle(470,-628.9615,2711.9133,72.2987,171.5462,-1,-1); //
  1616.     AddStaticVehicle(470,-775.6357,2757.9658,45.7020,88.5436,-1,-1); //
  1617.     AddStaticVehicle(470,-904.3685,2696.9490,42.3591,133.5194,-1,-1); //
  1618.     AddStaticVehicle(470,-282.6014,2611.3452,62.8515,269.9535,-1,-1); //
  1619.     AddStaticVehicle(470,-260.5404,2610.3064,62.8499,263.9077,-1,-1); //
  1620.     AddStaticVehicle(470,-204.5132,2608.6353,62.6993,351.3380,-1,-1); //
  1621.     AddStaticVehicle(560,-217.0125,2595.3262,62.4077,180.8998,-1,-1); //
  1622.     AddStaticVehicle(560,-222.7530,2595.0020,62.4081,182.7502,-1,-1); //
  1623.     AddStaticVehicle(433,-237.3829,2608.7795,63.1399,359.3422,-1,-1); //
  1624.     AddStaticVehicle(433,-262.8482,2683.6108,63.0456,359.9157,-1,-1); //
  1625.     AddStaticVehicle(433,-300.8040,2720.5620,62.8741,172.9740,-1,-1); //
  1626.     AddStaticVehicle(470,-331.3533,2698.1943,62.6051,274.1106,-1,-1); //
  1627.     AddStaticVehicle(470,-332.5087,2702.8098,62.6233,274.6949,-1,-1); //
  1628.     AddStaticVehicle(468,-289.3227,2720.9495,62.0013,2.5272,-1,-1); //
  1629.     AddStaticVehicle(468,-240.3998,2653.2961,62.3585,355.4536,-1,-1); //
  1630.     AddStaticVehicle(468,-234.2116,2653.5789,62.3369,356.9677,-1,-1); //
  1631.     AddStaticVehicle(487,-213.9132,2660.0959,62.7773,84.6586,-1,-1); //
  1632.     AddStaticVehicle(520,-308.0615,2682.3682,64.2178,138.6433,-1,-1); //
  1633.     AddStaticVehicle(548,-181.0249,2663.9980,65.2457,304.8440,-1,-1); //
  1634.     AddStaticVehicle(425,-195.4413,2779.9304,67.0214,238.5448,-1,-1); //
  1635.     AddStaticVehicle(432,-162.9696,2695.0068,62.2659,272.6789,-1,-1); //
  1636.     AddStaticVehicle(432,-168.7701,2720.0457,62.2058,269.5812,-1,-1); //
  1637.     AddStaticVehicle(432,-199.7583,2716.4646,62.7001,180.9452,-1,-1); //
  1638.     AddStaticVehicle(560,-172.2827,2745.0767,62.1698,280.9261,-1,-1); //
  1639.     AddStaticVehicle(560,148.8888,2750.5974,54.7857,310.9754,-1,-1); //
  1640.     AddStaticVehicle(573,543.1923,2740.8081,66.5461,170.8862,-1,-1); //
  1641.     AddStaticVehicle(573,532.3718,2744.7058,67.8125,183.7694,-1,-1); //
  1642.     AddStaticVehicle(522,-341.7258,2659.7932,63.9152,357.6971,-1,-1); //
  1643.     AddStaticVehicle(522,-345.1559,2662.8521,64.0201,339.0697,-1,-1); //
  1644.     AddStaticVehicle(522,-1432.4041,2588.8972,55.3180,168.3323,-1,-1); //
  1645.     AddStaticVehicle(522,-1503.1078,2593.3237,55.3918,79.2727,-1,-1); //
  1646.     AddStaticVehicle(470,-1501.5254,2619.6125,55.7522,358.2046,-1,-1); //
  1647.     AddStaticVehicle(470,-1500.5652,2650.3264,55.7515,355.9960,-1,-1); //
  1648.     AddStaticVehicle(470,-1537.9000,2676.3020,55.7522,87.2599,-1,-1); //
  1649.     AddStaticVehicle(560,-1550.7114,2647.8743,55.4631,182.0346,-1,-1); //
  1650.     AddStaticVehicle(560,-1550.0614,2621.9419,55.4633,181.5816,-1,-1); //
  1651.     AddStaticVehicle(560,-1563.2128,2682.0022,55.3796,2.0162,-1,-1); //
  1652.     AddStaticVehicle(432,-1595.8820,2681.3047,55.1458,358.9301,-1,-1); //
  1653.     AddStaticVehicle(432,-1599.1285,2660.5056,55.2336,89.4188,-1,-1); //
  1654.     AddStaticVehicle(432,-1507.5168,2685.6636,55.8510,354.3337,-1,-1); //
  1655.     AddStaticVehicle(433,-1481.7085,2686.8918,56.1636,178.0989,-1,-1); //
  1656.     AddStaticVehicle(433,-1474.7922,2688.7024,56.1411,180.6481,-1,-1); //
  1657.     AddStaticVehicle(433,-1494.1989,2530.2202,56.0576,178.8805,-1,-1); //
  1658.     AddStaticVehicle(468,-1503.2577,2525.3801,55.3497,179.1982,-1,-1); //
  1659.     AddStaticVehicle(468,-1507.2166,2524.8457,55.3566,181.9787,-1,-1); //
  1660.     AddStaticVehicle(468,-1524.9680,2526.0305,55.4173,178.0358,-1,-1); //
  1661.     AddStaticVehicle(548,-1474.6434,2525.5095,57.7180,263.7379,-1,-1); //
  1662.     AddStaticVehicle(425,-1474.5553,2498.9678,57.7161,273.7738,-1,-1); //
  1663.     AddStaticVehicle(471,-1313.6666,2664.1648,49.5442,285.3071,-1,-1); //
  1664.     AddStaticVehicle(471,-1318.9530,2662.7185,49.5437,285.3078,-1,-1); //
  1665.     AddStaticVehicle(432,-1302.6216,2705.9932,50.0758,5.0179,-1,-1); //
  1666.     AddStaticVehicle(520,-1533.2238,2705.1531,57.6449,197.0819,-1,-1); //
  1667.     AddStaticVehicle(470,-753.0413,1510.1888,25.6813,9.2346,-1,-1); //
  1668.     AddStaticVehicle(470,-754.2158,1521.9561,26.7276,3.8036,-1,-1); //
  1669.     AddStaticVehicle(470,-754.7807,1540.8003,26.9552,1.3874,-1,-1); //
  1670.     AddStaticVehicle(470,-794.8740,1571.8705,26.9741,98.9847,-1,-1); //
  1671.     AddStaticVehicle(432,-821.8706,1578.8258,27.1300,82.3110,-1,-1); //
  1672.     AddStaticVehicle(432,-859.9019,1550.6174,23.5139,177.7958,-1,-1); //
  1673.     AddStaticVehicle(522,-836.6186,1521.1653,20.6009,220.8750,-1,-1); //
  1674.     AddStaticVehicle(522,-836.9364,1517.6056,20.3185,228.2570,-1,-1); //
  1675.     AddStaticVehicle(445,-854.9668,1471.3058,16.2763,175.5079,-1,-1); //
  1676.     AddStaticVehicle(445,-856.1306,1453.0784,14.9034,177.2384,-1,-1); //
  1677.     AddStaticVehicle(445,-855.2596,1439.6045,14.0607,187.0154,-1,-1); //
  1678.     AddStaticVehicle(445,-853.1483,1426.8619,13.6391,194.6416,-1,-1); //
  1679.     AddStaticVehicle(433,-774.5961,1432.7437,14.2255,283.3401,-1,-1); //
  1680.     AddStaticVehicle(433,-775.3538,1437.9558,14.2258,269.7361,-1,-1); //
  1681.     AddStaticVehicle(433,-779.4594,1312.4254,14.2070,215.3350,-1,-1); //
  1682.     AddStaticVehicle(430,-654.9141,1362.0189,-0.2148,74.4070,-1,-1); //
  1683.     AddStaticVehicle(430,-691.0470,1363.9060,-0.1033,88.2213,-1,-1); //
  1684.     AddStaticVehicle(430,-720.3111,1364.9066,-0.1793,87.7929,-1,-1); //
  1685.     AddStaticVehicle(560,128.1189,1925.3361,18.8818,272.5423,-1,-1); //
  1686.     AddStaticVehicle(560,139.6880,1925.8495,18.8842,272.2986,-1,-1); //
  1687.     AddStaticVehicle(432,229.0807,1915.1827,17.6341,181.4792,-1,-1); //
  1688.     AddStaticVehicle(432,229.3708,1883.0563,17.6537,176.0809,-1,-1); //
  1689.     AddStaticVehicle(432,201.4733,1886.6801,17.6606,359.7650,-1,-1); //
  1690.     AddStaticVehicle(548,265.5016,1855.2402,18.2234,148.7287,-1,-1); //
  1691.  
  1692.    
  1693.     // OTHER AREAS
  1694.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
  1695.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
  1696.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
  1697.     // LAS VENTURAS
  1698.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
  1699.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
  1700.     total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
  1701.  
  1702.  
  1703.     printf("Total vehicles from files: %d",total_vehicles_from_files);
  1704.  
  1705.  
  1706.     UsePlayerPedAnims();
  1707.     DisableInteriorEnterExits();
  1708.  
  1709.     umini = CreatePickup(1254, 23, -252.0913,2595.5215,62.8582);
  1710.     gmini = CreatePickup(1254, 23, -136.8090,1222.5321,19.8992);
  1711.     uhit = CreatePickup(1254, 23, -256.9216,2606.4358,62.8582);
  1712.     ghit = CreatePickup(1254, 23, -149.0273,1131.3945,19.7422);
  1713.     buyweapon = CreatePickup(1254, 23, -690.7361,942.0350,13.6328);
  1714.    
  1715.     nuke = CreatePickup(1254, 23, 220.0778,1822.6729,7.5301);
  1716.    
  1717.     gunshop[7] = CreatePickup(1254, 23, -288.9128,2691.4155,62.6875); // usa ammo
  1718.     gunshop[6] = CreatePickup(1254, 23, -181.3289,1163.2261,19.7500); // german ammo
  1719.     gunshop[1] = CreatePickup(1254, 23, 777.4450,1871.4246,4.9067);
  1720.     gunshop[2] = CreatePickup(1254, 23, -315.8113,829.8170,14.2422);
  1721.     gunshop[3] = CreatePickup(1254, 23, -314.4954,1774.4213,43.6406);
  1722.     gunshop[4] = CreatePickup(1254, 23, -604.3909,2716.7764,72.7231);
  1723.     gunshop[5] = CreatePickup(1254, 23, 295.6123,-80.7989,1001.5156);
  1724.    
  1725.     print("All pickups are created!");
  1726.  
  1727.  
  1728.     if(dini_Exists("/Variables/Variables.ini"))
  1729.     {
  1730.         dini_IntSet("/Variables/Variables.ini", "CapturedBy", 0);
  1731.         dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 0);
  1732.         dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 0);
  1733.         dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 0);
  1734.         dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 0);
  1735.         dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 0);
  1736.         dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 0);
  1737.         dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 0);
  1738.         dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 0);
  1739.         dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 0);
  1740.         dini_IntSet("/Variables/Variable.ini", "CapturedBy11", 0);
  1741.         dini_IntSet("/Variables/Variables.ini", "uscore", 0);
  1742.         dini_IntSet("/Variables/Variables.ini", "gscore", 0);
  1743.         dini_Set("/Variables/Variables.ini", "commander", "N/A");
  1744.         dini_Set("/Variables/Variables.ini", "commanderg", "N/A");
  1745.  
  1746.         print("/Variables/Variables.ini was found in the scriptfiles folder!");
  1747.     }
  1748.     else
  1749.     {
  1750.         dini_Create("/Variables/Variables.ini"); //Folder + house file created
  1751.         dini_IntSet("/Variables/Variables.ini", "CapturedBy", 0);
  1752.         dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 0);
  1753.         dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 0);
  1754.         dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 0);
  1755.         dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 0);
  1756.         dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 0);
  1757.         dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 0);
  1758.         dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 0);
  1759.         dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 0);
  1760.         dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 0);
  1761.         dini_IntSet("/Variables/Variable.ini", "CapturedBy11", 0);
  1762.         dini_IntSet("/Variables/Variables.ini", "uscore", 0);
  1763.         dini_IntSet("/Variables/Variables.ini", "gscore", 0);
  1764.         dini_Set("/Variables/Variables.ini", "commander", "N/A");
  1765.         dini_Set("/Variables/Variables.ini", "commanderg", "N/A");
  1766.  
  1767.         print("/Variables/Variables.ini wasnt found in the scriptfiles folder!");
  1768.         print("The script has created the file and set all the areas to the default state!");
  1769.        
  1770.         print("All files were written!");
  1771.        
  1772.     }
  1773.  
  1774.     SetGameModeText("Call of Duty 5 v2.8");
  1775.  
  1776. //TIMERS-------------------------------------------------------------------------------------
  1777.  
  1778.  
  1779.     SetTimer("AreaCheck", 1000, true);
  1780.     print("AreaCheck timer loaded!");
  1781.    
  1782. //CLASS--------------------------------------------------------------------------------------
  1783.  
  1784.     AddPlayerClass(287,-244.2003,2602.5547,63.7031,270.1281,0,0,0,0,0,0); // usa spawn - a
  1785.  
  1786.     AddPlayerClass(285,-135.6082,1116.5326,21.1966,94.4754,0,0,0,0,0,0); // german spawn - a
  1787.  
  1788.     AddPlayerClass(30,-686.0115,939.5402,14.6328,94.4754,30,500,29,200,1,1); // merc spawn
  1789.  
  1790.     AddPlayerClass(121,-786.8021,1568.6122,28.0714,270.1281,0,0,0,0,0,0); // russia spawn - a
  1791.  
  1792.     AddPlayerClass(122,-1479.6936,2627.0244,58.7813,94.4754,0,0,0,0,0,0); // japan spawn - a
  1793.  
  1794.     print("All classes loaded!");
  1795.  
  1796. //CARS---------------------------------------------------------------------------------------
  1797.    
  1798.    
  1799.     print("All vehicles loaded!");
  1800.  
  1801. //GANGZONE----------------------------------------------------------------------------------
  1802.     USA = GangZoneCreate(-385.3699, 2545.777, -93.423, 2837.724);
  1803.     GERMANY = GangZoneCreate(-397.0478, 969.2637, 105.1009, 1307.922);
  1804.  
  1805.     Ear = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58);
  1806.     EarU = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58);
  1807.     EarG = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58);
  1808.     GangZoneShowForAll(Ear, COLOR_GREEN);
  1809.  
  1810.     Town1 = GangZoneCreate(-1681.614, 2428.998, -1307.922, 2826.046);
  1811.     Town2 = GangZoneCreate(-899.1964, 1366.311, -688.9946, 1623.225);
  1812.  
  1813.     Resturant = GangZoneCreate(-630.6053, 2510.743, -478.7929, 2662.556);
  1814.     ResturantU = GangZoneCreate(-630.6053, 2510.743, -478.7929, 2662.556);
  1815.     ResturantG = GangZoneCreate(-630.6053, 2510.743, -478.7929, 2662.556);
  1816.     GangZoneShowForAll(Resturant, COLOR_GREEN);
  1817.  
  1818.     Airfield = GangZoneCreate(268.5911, 2393.964, 467.115, 2604.166);
  1819.     AirfieldU = GangZoneCreate(268.5911, 2393.964, 467.115, 2604.166);
  1820.     AirfieldG = GangZoneCreate(268.5911, 2393.964, 467.115, 2604.166);
  1821.     GangZoneShowForAll(Airfield, COLOR_GREEN);
  1822.  
  1823.     Oil = GangZoneCreate(747.384, 2031.95, 805.7734, 2090.34);
  1824.     OilU = GangZoneCreate(747.384, 2031.95, 805.7734, 2090.34);
  1825.     OilG = GangZoneCreate(747.384, 2031.95, 805.7734, 2090.34);
  1826.     GangZoneShowForAll(Oil, COLOR_GREEN);
  1827.  
  1828.     A = GangZoneCreate(105.1009, 1786.715, 338.6584, 2055.306);
  1829.     AU = GangZoneCreate(105.1009, 1786.715, 338.6584, 2055.306);
  1830.     AG = GangZoneCreate(105.1009, 1786.715, 338.6584, 2055.306);
  1831.     GangZoneShowForAll(A, COLOR_GREEN);
  1832.  
  1833.     University = GangZoneCreate(939.5279, 970.4056, 1169.914, 1187.017);
  1834.     UniversityU = GangZoneCreate(939.5279, 970.4056, 1169.914, 1187.017);
  1835.     UniversityG = GangZoneCreate(939.5279, 970.4056, 1169.914, 1187.017);
  1836.     GangZoneShowForAll(University, COLOR_GREEN);
  1837.  
  1838.     Gas = GangZoneCreate(502.1487, 1588.191, 700.6725, 1786.715);
  1839.     GasU = GangZoneCreate(502.1487, 1588.191, 700.6725, 1786.715);
  1840.     GasG = GangZoneCreate(502.1487, 1588.191, 700.6725, 1786.715);
  1841.     GangZoneShowForAll(Gas, COLOR_GREEN);
  1842.  
  1843.     OS = GangZoneCreate(105.1009, 1342.956, 280.269, 1483.09);
  1844.     OSU = GangZoneCreate(105.1009, 1342.956, 280.269, 1483.09);
  1845.     OSG = GangZoneCreate(105.1009, 1342.956, 280.269, 1483.09);
  1846.     GangZoneShowForAll(OS, COLOR_GREEN);
  1847.    
  1848.     T = GangZoneCreate(408.7256, 1156.11, 712.3504, 1296.244);
  1849.     TU = GangZoneCreate(408.7256, 1156.11, 712.3504, 1296.244);
  1850.     TG = GangZoneCreate(408.7256, 1156.11, 712.3504, 1296.244);
  1851.     GangZoneShowForAll(T, COLOR_GREEN);
  1852.    
  1853.     D = GangZoneCreate(-945.9079, 1915.172, -525.5044, 2148.729);
  1854.     DU = GangZoneCreate(-945.9079, 1915.172, -525.5044, 2148.729);
  1855.     DG = GangZoneCreate(-945.9079, 1915.172, -525.5044, 2148.729);
  1856.     GangZoneShowForAll(D, COLOR_GREEN);
  1857.    
  1858.     OT = GangZoneCreate(-525.5044, 2125.373, -291.9469, 2277.186);
  1859.     OTU = GangZoneCreate(-525.5044, 2125.373, -291.9469, 2277.186);
  1860.     OTG = GangZoneCreate(-525.5044, 2125.373, -291.9469, 2277.186);
  1861.     GangZoneShowForAll(OT, COLOR_GREEN);
  1862.    
  1863.     OilPump = GangZoneCreate(1015.975, 2861.08, 1121.076,2954.502);
  1864.     OilPumpU = GangZoneCreate(1015.975, 2861.08, 1121.076,2954.502);
  1865.     OilPumpG = GangZoneCreate(1015.975, 2861.08, 1121.076,2954.502);
  1866.     GangZoneShowForAll(OilPump, COLOR_GREEN);
  1867.    
  1868.     Cluck = GangZoneCreate(-1237.855, 1763.359, -1156.11, 1868.46);
  1869.     CluckU = GangZoneCreate(-1237.855, 1763.359, -1156.11, 1868.46);
  1870.     CluckG = GangZoneCreate(-1237.855, 1763.359, -1156.11, 1868.46);
  1871.     GangZoneShowForAll(Cluck, COLOR_GREEN);
  1872.    
  1873.     Beach = GangZoneCreate(210.2018, 2837.724, 326.9805, 2989.536);
  1874.     BeachU = GangZoneCreate(210.2018, 2837.724, 326.9805, 2989.536);
  1875.     BeachG = GangZoneCreate(210.2018, 2837.724, 326.9805, 2989.536);
  1876.     GangZoneShowForAll(Beach, COLOR_GREEN);
  1877.    
  1878.     DinerU = GangZoneCreate(-1985.239, 2277.186, -1845.104, 2440.676);
  1879.     DinerG = GangZoneCreate(-1985.239, 2277.186, -1845.104, 2440.676);
  1880.     Diner = GangZoneCreate(-1985.239, 2277.186, -1845.104, 2440.676);
  1881.     GangZoneShowForAll(Diner, COLOR_GREEN);
  1882.    
  1883.     print("All gangzones loaded!");
  1884.    
  1885.    
  1886.     //OTHER--------------------------------------------------------------------------
  1887.  
  1888.     EnableTirePopping(1);
  1889.    
  1890.     //keep objects under 150 (149 )
  1891.     //OBJECTS-------------------------------------------------------------------------------------
  1892.     CreateObject(5005, 374.767395, 2558.034424, 18.468712, 0.0000, 0.0000, 0.0000);
  1893.     CreateObject(5001, 285.792328, 2535.152832, 17.803999, 0.0000, 0.0000, 180.0000);
  1894.     CreateObject(5001, 247.536957, 2441.394287, 17.812248, 0.0000, 0.0000, 268.5134);
  1895.     CreateObject(3749, 277.468933, 2385.174561, 21.092789, 0.0000, 0.0000, 20.7038);
  1896.     CreateObject(5005, 363.013489, 2403.051514, 19.035892, 0.0000, 0.0000, 11.2500);
  1897.     CreateObject(5005, 446.917358, 2502.138916, 19.363152, 0.0000, 0.0000, 268.2811);
  1898.     CreateObject(3279, 260.826141, 2391.498535, 15.260679, 0.0000, 0.0000, 180.0000);
  1899.     CreateObject(3279, 444.128876, 2552.824707, 14.676369, 0.0000, 0.0000, 180.0000);
  1900.     CreateObject(3279, 372.663177, 2552.688232, 15.228331, 0.0000, 0.0000, 180.0000);
  1901.     CreateObject(3279, 242.397095, 2533.769043, 15.460758, 0.0000, 0.0000, 0.0000);
  1902.     CreateObject(3279, 230.528076, 2471.396729, 15.184998, 0.0000, 0.0000, 0.0000);
  1903.     CreateObject(3279, 439.036041, 2422.693604, 15.448130, 0.0000, 0.0000, 180.0001);
  1904.     CreateObject(16093, 387.399658, 2542.783691, 15.419910, 0.0000, 0.0000, 0.0000);
  1905.     CreateObject(987, -253.310928, 2590.770996, 61.689148, 0.0000, 0.0000, 0.0000);
  1906.     CreateObject(987, -241.368408, 2590.784180, 61.694366, 0.0000, 0.0000, 0.0000);
  1907.     CreateObject(987, -229.413132, 2590.813477, 61.634361, 0.0000, 0.0000, 0.0000);
  1908.     CreateObject(987, -217.770172, 2590.797852, 61.653122, 0.0000, 0.0000, 0.0000);
  1909.     CreateObject(987, -207.118607, 2590.796875, 61.634361, 0.0000, 0.0000, 0.0000);
  1910.     CreateObject(987, -195.228302, 2590.747314, 61.593456, 0.0000, 0.0000, 90.0000);
  1911.     CreateObject(7368, -277.100922, 2694.182617, 64.760872, 0.0000, 0.0000, 270.0000);
  1912.     CreateObject(7368, -184.254333, 2703.631592, 64.131035, 0.0000, 0.0000, 180.0000);
  1913.     CreateObject(3749, -225.470337, 2752.554932, 66.997452, 0.0000, 0.0000, 270.0000);
  1914.     CreateObject(987, -225.586304, 2741.927002, 61.612511, 0.0000, 0.0000, 270.0000);
  1915.     CreateObject(3749, -147.858246, 2635.706787, 68.077469, 0.0000, 0.0000, 270.0000);
  1916.     CreateObject(987, -158.191010, 2618.001709, 60.919781, 0.0000, 0.0000, 45.0000);
  1917.     CreateObject(987, -168.110626, 2611.485596, 60.704853, 0.0000, 0.0000, 33.7500);
  1918.     CreateObject(987, -178.026016, 2604.902588, 60.726974, 0.0000, 0.0000, 33.7500);
  1919.     CreateObject(987, -189.702393, 2602.646729, 60.160172, 0.0000, 0.0000, 11.2500);
  1920.     CreateObject(1411, -192.434814, 2601.950439, 62.786373, 0.0000, 0.0000, 191.2500);
  1921.     CreateObject(3749, -340.528717, 2643.352051, 67.912018, 0.0000, 0.0000, 237.3414);
  1922.     CreateObject(8165, -314.019928, 2618.699707, 65.173241, 0.0000, 0.0000, 38.9066);
  1923.     CreateObject(1411, -282.744110, 2601.787598, 63.367405, 0.0000, 0.0000, 180.0000);
  1924.     CreateObject(3279, -155.693268, 2649.276123, 62.556335, 0.0000, 0.0000, 180.0000);
  1925.     CreateObject(3279, -163.812683, 2620.963379, 61.725220, 0.0000, 0.0000, 202.5001);
  1926.     CreateObject(3279, -201.167740, 2595.859619, 61.203705, 0.0000, 0.0000, 180.0000);
  1927.     CreateObject(3279, -328.193115, 2657.662354, 62.464821, 0.0000, 0.0000, 348.7500);
  1928.     CreateObject(3279, -218.593765, 2735.887207, 61.288086, 0.0000, 0.0000, 0.0000);
  1929.     CreateObject(6973, -211.176025, 2775.744141, 60.458008, 0.0000, 0.0000, 269.7681);
  1930.     CreateObject(12854, -204.253693, 2732.159180, 63.706963, 0.0000, 0.0000, 90.0000);
  1931.     CreateObject(16409, -204.678772, 2730.308838, 60.284767, 0.0000, 0.0000, 180.0000);
  1932.     CreateObject(8229, -505.208801, 2574.672607, 55.091846, 0.0000, 0.0000, 88.2812);
  1933.     CreateObject(8229, -505.778717, 2557.105713, 55.065289, 0.0000, 0.0000, 88.2812);
  1934.     CreateObject(8229, -517.274231, 2546.067871, 55.191853, 0.0000, 0.0000, 0.0000);
  1935.     CreateObject(8229, -532.825623, 2546.091553, 55.041843, 0.0000, 0.0000, 0.0000);
  1936.     CreateObject(8229, -548.164429, 2556.423828, 54.916836, 0.0000, 0.0000, 292.5000);
  1937.     CreateObject(8229, -561.620300, 2572.886719, 54.793217, 0.0000, 0.0000, 326.2500);
  1938.     CreateObject(8229, -504.513947, 2610.497803, 55.068287, 0.0000, 0.0000, 88.2812);
  1939.     CreateObject(8229, -504.071594, 2630.073242, 55.141850, 0.0000, 0.0000, 89.1406);
  1940.     CreateObject(8229, -515.013733, 2641.386230, 55.216854, 0.0000, 0.0000, 179.1407);
  1941.     CreateObject(8229, -530.899536, 2641.466064, 55.291859, 0.0000, 0.0000, 180.0001);
  1942.     CreateObject(8229, -542.057251, 2630.369629, 55.291859, 0.0000, 0.0000, 270.0001);
  1943.     CreateObject(8229, -552.247559, 2615.203857, 55.216854, 0.0000, 0.0000, 202.5001);
  1944.     CreateObject(3275, -504.719940, 2592.534668, 53.198292, 0.0000, 0.0000, 270.0000);
  1945.     CreateObject(3279, -510.214050, 2602.365479, 52.114655, 0.0000, 0.0000, 180.0000);
  1946.     CreateObject(3749, -530.557922, 1996.349854, 64.520897, 0.0000, 0.0000, 56.2500);
  1947.     CreateObject(3279, -541.695862, 1986.438843, 58.788086, 0.0000, 0.0000, 146.2501);
  1948.     CreateObject(3279, -866.386597, 1966.140015, 58.741302, 0.0000, 0.0000, 101.2500);
  1949.     CreateObject(3749, -881.619751, 1961.457275, 64.426392, 0.0000, 0.0000, 13.8283);
  1950.     CreateObject(3390, -149.513367, 1130.205078, 18.714970, 0.0000, 0.0000, 180.0000);
  1951.     CreateObject(6973, -128.154114, 1006.943970, 14.650833, 0.0000, 0.0000, 0.0000);
  1952.     CreateObject(3749, 225.530060, 2505.743896, 21.342789, 0.0000, 0.0000, 88.2038);
  1953.     CreateObject(973, 225.838409, 2501.972900, 12.349606, 357.4217, 95.3975, 0.0000);
  1954.     CreateObject(1459, 223.949158, 2509.479004, 16.138468, 0.0000, 0.0000, 67.5000);
  1955.     CreateObject(1459, 222.947327, 2506.109131, 16.096317, 0.0000, 0.0000, 101.2500);
  1956.     CreateObject(1459, 222.661835, 2503.456055, 16.096317, 0.0000, 0.0000, 67.5000);
  1957.     CreateObject(1459, -1189.254639, 2689.089111, 45.417221, 0.0000, 0.0000, 101.2500);
  1958.     CreateObject(1459, -1189.647827, 2692.835693, 45.479130, 0.0000, 0.0000, 90.0000);
  1959.     CreateObject(1459, -1188.736816, 2685.852295, 45.479130, 0.0000, 0.0000, 112.5000);
  1960.     CreateObject(2755, -1483.633789, 2611.375244, 59.680439, 0.0000, 0.0000, 0.0000);
  1961.     CreateObject(2755, -1479.690186, 2611.386230, 59.629707, 0.0000, 0.0000, 0.0000);
  1962.     CreateObject(2755, -1485.720093, 2621.661377, 59.609482, 0.0000, 0.0000, 270.0000);
  1963.     CreateObject(2755, -1485.770630, 2617.617432, 59.592823, 0.0000, 0.0000, 270.0000);
  1964.     CreateObject(2755, -1485.745117, 2613.593506, 59.542747, 0.0000, 0.0000, 270.0000);
  1965.     CreateObject(2755, -1486.624756, 2627.776123, 59.773663, 0.0000, 0.0000, 135.0000);
  1966.     CreateObject(2755, -1485.745605, 2629.444336, 59.596657, 0.0000, 0.0000, 90.0000);
  1967.     CreateObject(2755, -1485.695068, 2633.289551, 59.616833, 0.0000, 0.0000, 90.0000);
  1968.     CreateObject(2755, -1485.695068, 2637.188721, 59.602108, 0.0000, 0.0000, 90.0000);
  1969.     CreateObject(2755, -1485.745117, 2641.125000, 59.589428, 0.0000, 0.0000, 90.0000);
  1970.     CreateObject(3528, -1195.045410, 2698.040771, 52.333275, 0.0000, 0.0000, 323.5170);
  1971.     CreateObject(3528, -1467.115234, 2640.355713, 72.328125, 0.0000, 0.0000, 109.7670);
  1972.     CreateObject(3279, -1215.196167, 2700.820068, 43.867897, 0.0000, 0.0000, 191.2500);
  1973.     CreateObject(3279, -1438.759277, 2629.236816, 54.586548, 0.0000, 0.0000, 90.0000);
  1974.     CreateObject(3279, -1506.687744, 2637.713623, 54.411522, 0.0000, 0.0000, 0.0000);
  1975.     CreateObject(3279, -1459.565552, 2740.366943, 64.777351, 0.0000, 0.0000, 337.5000);
  1976.     CreateObject(3279, -1463.935059, 2619.976318, 60.813095, 0.0000, 0.0000, 270.0000);
  1977.     CreateObject(3361, -1472.568237, 2614.272705, 59.411873, 0.0000, 0.0000, 180.0000);
  1978.     CreateObject(7153, -1471.091064, 2507.975342, 51.147217, 0.0000, 0.0000, 0.0000);
  1979.     CreateObject(7153, -1471.127563, 2483.042969, 51.147255, 0.0000, 0.0000, 0.0000);
  1980.     CreateObject(7153, -1529.896240, 2685.656738, 50.693382, 0.0000, 0.0000, 0.0000);
  1981.     CreateObject(3279, -1461.718872, 2545.453613, 54.436523, 0.0000, 0.0000, 270.0000);
  1982.     CreateObject(3279, -1498.073975, 2490.310303, 54.098679, 0.0000, 0.0000, 135.0000);
  1983.     CreateObject(3279, -1556.890137, 2703.262695, 54.061546, 0.0000, 0.0000, 269.9999);
  1984.     CreateObject(3279, -1378.496948, 2665.056396, 51.193451, 0.0000, 0.0000, 359.9998);
  1985.     CreateObject(6973, -178.704651, 2646.395020, 58.192108, 0.0000, 0.0000, 0.0000);
  1986.     CreateObject(6973, -315.697479, 2696.587402, 57.818626, 0.0000, 0.0000, 180.0000);
  1987.     CreateObject(6973, -128.109146, 974.429321, 14.707230, 0.0000, 0.0000, 0.0000);
  1988.     CreateObject(6973, -162.439651, 972.449890, 14.708401, 0.0000, 0.0000, 0.0000);
  1989.     CreateObject(3279, -139.107529, 1123.868530, 18.450613, 0.0000, 0.0000, 270.0000);
  1990.     CreateObject(3279, -76.604568, 1136.736694, 18.467810, 0.0000, 0.0000, 180.0000);
  1991.     CreateObject(3279, -86.293396, 1070.722168, 18.367811, 0.0000, 0.0000, 90.0000);
  1992.     CreateObject(3279, -0.625790, 1060.565430, 18.442810, 0.0000, 0.0000, 360.0000);
  1993.     CreateObject(3279, -18.423267, 1185.055298, 17.982061, 0.0000, 0.0000, 180.0001);
  1994.     CreateObject(3279, -236.248245, 1120.705078, 18.467810, 0.0000, 0.0000, 90.0002);
  1995.     CreateObject(3279, -150.041702, 1265.578857, 18.217110, 0.0000, 0.0000, 90.0002);
  1996.     CreateObject(3279, -229.279831, 1166.252563, 18.292812, 0.0000, 0.0000, 0.0003);
  1997.     CreateObject(3279, -231.805725, 1163.662842, 33.696556, 0.0000, 0.0000, 90.0004);
  1998.     CreateObject(3279, -211.625366, 1055.210449, 22.579866, 0.0000, 0.0000, 90.0004);
  1999.     CreateObject(3279, -261.851715, 1142.037354, 18.405327, 0.0000, 0.0000, 180.0000);
  2000.     CreateObject(3279, 46.146793, 1139.785767, 18.242188, 0.0000, 0.0000, 180.0000);
  2001.     CreateObject(987, -135.398438, 1137.148682, 18.617189, 0.0000, 0.0000, 0.0000);
  2002.     CreateObject(987, -126.721809, 1137.126587, 18.617189, 0.0000, 0.0000, 0.0000);
  2003.     CreateObject(3361, -148.206635, 1117.952515, 19.141073, 0.0000, 0.0000, 270.0000);
  2004.     CreateObject(3361, -135.248581, 1124.643677, 19.898878, 0.0000, 0.0000, 90.0000);
  2005.     CreateObject(3361, -138.827240, 1111.090210, 19.148855, 0.0000, 0.0000, 180.0000);
  2006.     CreateObject(18609, -149.297333, 1121.358521, 15.221132, 90.2409, 1.7189, 67.5000);
  2007.     CreateObject(3361, -164.785141, 1127.434937, 19.366055, 0.0000, 0.0000, 0.0000);
  2008.     CreateObject(3361, -169.565475, 1127.443848, 22.566063, 0.0000, 0.0000, 0.0000);
  2009.     print("Objects loaded");
  2010.  
  2011.     return 1;
  2012. }
  2013.  
  2014. public OnGameModeExit()
  2015. {
  2016.     foreach(Player, i)
  2017.     {
  2018.         TextDrawDestroy(Teams[i]);
  2019.         TextDrawDestroy(Classt[i]);
  2020.     }
  2021.  
  2022.     TextDrawDestroy(Spree);
  2023.  
  2024.     return 1;
  2025. }
  2026.  
  2027. public OnPlayerRequestClass(playerid, classid)
  2028. {
  2029.  
  2030.  
  2031.     pSpawned[playerid] = 0;
  2032.  
  2033.     SetPlayerClass(playerid, classid);
  2034.     gPlayerClass[playerid] = ASSAULT;
  2035.    
  2036.     SetPlayerPos(playerid,11.9577,1716.7191,22.6222);
  2037.     SetPlayerFacingAngle(playerid, 128.0980);
  2038.     SetPlayerInterior(playerid, 0);
  2039.     SetPlayerCameraPos(playerid,9.6063,1715.1882,22.6113);
  2040.     SetPlayerCameraLookAt(playerid,11.9577,1716.7191,22.6222);
  2041.     CreateExplosion(11.9577,1716.7191,22.6222, 12, 0.1);
  2042.  
  2043.     switch (classid) {
  2044.         case 0:
  2045.         {
  2046.             TextDrawHideForPlayer(playerid, Teams[playerid]);
  2047.             TextDrawSetString(Teams[playerid], "~b~UNITED STATES OF AMERICA");
  2048.             TextDrawShowForPlayer(playerid, Teams[playerid]);
  2049.         }
  2050.         case 1:
  2051.         {
  2052.             TextDrawHideForPlayer(playerid, Teams[playerid]);
  2053.             TextDrawSetString(Teams[playerid], "~r~GERMANY");
  2054.             TextDrawShowForPlayer(playerid, Teams[playerid]);
  2055.         }
  2056.         case 2:
  2057.         {
  2058.             TextDrawHideForPlayer(playerid, Teams[playerid]);
  2059.             TextDrawSetString(Teams[playerid], "~y~MERCENARY");
  2060.             TextDrawShowForPlayer(playerid, Teams[playerid]);
  2061.         }
  2062.         case 3:
  2063.         {
  2064.             TextDrawHideForPlayer(playerid, Teams[playerid]);
  2065.             TextDrawSetString(Teams[playerid], "~y~RUSSIA");
  2066.             TextDrawShowForPlayer(playerid, Teams[playerid]);
  2067.         }
  2068.         case 4:
  2069.         {
  2070.             TextDrawHideForPlayer(playerid, Teams[playerid]);
  2071.             TextDrawSetString(Teams[playerid],"~w~JAPAN");
  2072.             TextDrawShowForPlayer(playerid, Teams[playerid]);
  2073.         }
  2074.     }
  2075.     return 1;
  2076. }
  2077.  
  2078. public OnPlayerRequestSpawn(playerid)
  2079. {
  2080.        
  2081.         if(gTeam[playerid] == TEAM_USA) {
  2082.         SetPlayerColor(playerid,COLOR_BLUE);
  2083.         TextDrawHideForPlayer(playerid, Teams[playerid]);
  2084.         }
  2085.         else if(gTeam[playerid] == TEAM_GERMANY) {
  2086.         SetPlayerColor(playerid,COLOR_RED);
  2087.         TextDrawHideForPlayer(playerid, Teams[playerid]);
  2088.         }
  2089.         else if(gTeam[playerid] == TEAM_MERC) {
  2090.         SetPlayerColor(playerid,COLOR_YELLOW);
  2091.         TextDrawHideForPlayer(playerid, Teams[playerid]);
  2092.         }
  2093.         else if(gTeam[playerid] == TEAM_RUSSIA) {
  2094.         SetPlayerColor(playerid,COLOR_ORANGE);
  2095.         TextDrawHideForPlayer(playerid, Teams[playerid]);
  2096.         }
  2097.         else if(gTeam[playerid] == TEAM_JAPAN) {
  2098.         SetPlayerColor(playerid,COLOR_WHITE);
  2099.         TextDrawHideForPlayer(playerid, Teams[playerid]);
  2100.         }
  2101.         return 1;
  2102. }
  2103.  
  2104. SetPlayerClass(playerid, classid)
  2105. {
  2106.     if(classid == 0)
  2107.     {
  2108.         gTeam[playerid] = TEAM_USA;
  2109.     }
  2110.     else if(classid == 1)
  2111.     {
  2112.         gTeam[playerid] = TEAM_GERMANY;
  2113.     }
  2114.     else if(classid == 2)
  2115.     {
  2116.         gTeam[playerid] = TEAM_MERC;
  2117.     }
  2118.     else if(classid == 3)
  2119.     {
  2120.         gTeam[playerid] = TEAM_RUSSIA;
  2121.     }
  2122.     else if(classid == 4)
  2123.     {
  2124.         gTeam[playerid] = TEAM_JAPAN;
  2125.     }
  2126. }
  2127.  
  2128. public OnPlayerConnect(playerid)
  2129. {
  2130.  
  2131.     //------------------------------------------------
  2132.  
  2133.     SetPlayerTime(playerid,hourx,minutex);
  2134.     WarnedTimes[playerid] = 0;
  2135.     freeze[playerid] = 0;
  2136.  
  2137.     PlayerSpec[playerid][is] = 0;
  2138.     IsInCargoB[playerid] = false;
  2139.     IsInBarracks[playerid] = false;
  2140.  
  2141.     new IP[50];
  2142.     GetPlayerName(playerid, nameee, 16);
  2143.     GetPlayerIp(playerid, IP, 50);
  2144.     printf("%s |ID:%i| %s has connected !", IP,playerid, nameee);
  2145.  
  2146.     logged[playerid] = 0;
  2147.     GetPlayerName(playerid, playername, sizeof(playername));
  2148.  
  2149.     Classt[playerid] = TextDrawCreate(500.000000,427.000000,"Medic");
  2150.     TextDrawAlignment(Classt[playerid],0);
  2151.     TextDrawBackgroundColor(Classt[playerid],0x000000ff);
  2152.     TextDrawFont(Classt[playerid],3);
  2153.     TextDrawColor(Classt[playerid],0xffffffff);
  2154.     TextDrawSetOutline(Classt[playerid],1);
  2155.     TextDrawSetProportional(Classt[playerid],1);
  2156.     TextDrawSetShadow(Classt[playerid],1);
  2157.     TextDrawLetterSize(Classt[playerid],0.699999,0.899999);
  2158.     TextDrawHideForPlayer(playerid, Classt[playerid]);
  2159.  
  2160.     SpawnP[playerid] =1;
  2161.     Teams[playerid] = TextDrawCreate(174.000000,135.000000,"United States of America");
  2162.     TextDrawAlignment(Teams[playerid],0);
  2163.     TextDrawBackgroundColor(Teams[playerid],0x000000ff);
  2164.     TextDrawFont(Teams[playerid],3);
  2165.     TextDrawLetterSize(Teams[playerid],0.599999,1.200000);
  2166.     TextDrawColor(Teams[playerid],0xffffffff);
  2167.     TextDrawSetOutline(Teams[playerid],1);
  2168.     TextDrawSetProportional(Teams[playerid],1);
  2169.     TextDrawSetShadow(Teams[playerid],1);
  2170.     TextDrawHideForPlayer(playerid, Teams[playerid]);
  2171.    
  2172.     Players++;
  2173.  
  2174.     AbleToSpawn[playerid] = 1;
  2175.     rank[playerid] = 0;
  2176.     pSpawned[playerid] = 0;
  2177.  
  2178.  
  2179.     TogglePlayerClock(playerid, 0);
  2180.     IsInHunter[playerid] = 0;
  2181.     IsInRhino[playerid] = 0;
  2182.  
  2183.     SetPlayerMapIcon(playerid, 8, -286.5354,2692.7466,62.6875,6, 0);//usa ammo
  2184.     SetPlayerMapIcon(playerid, 7,-181.6294,1166.3633,19.7500 ,6, 0);//ger ammo
  2185.     SetPlayerMapIcon(playerid, 1, -227.7928,2721.7283,62.8294, 56, 0);
  2186.     SetPlayerMapIcon(playerid, 2, -17.6360,1215.4073,22.4648, 56, 0);
  2187.     SetPlayerMapIcon(playerid, 3, 777.4450,1871.4246,4.9067, 6, 0);
  2188.     SetPlayerMapIcon(playerid, 4, -315.8113,829.8170,14.2422, 6, 0);
  2189.     SetPlayerMapIcon(playerid, 5, -314.4954,1774.4213,43.6406, 6, 0);
  2190.     SetPlayerMapIcon(playerid, 6, -604.3909,2716.7764,72.7231, 6, 0);
  2191.  
  2192.     SendClientMessage(playerid,COLOR_GREY, "Type /help for help!");
  2193.     SendClientMessage(playerid,ORANGE,     "Want all your stats to be saved? Type /register [password]");
  2194.     SendClientMessage(playerid,COLOR_ORANGE, "For the full list of commands type /commands");
  2195.     SendClientMessage(playerid,COLOR_GREY, "WEB URL: http://www.cod5server.co.cc");
  2196.     SendClientMessage(playerid, COLOR_GREY, "Check /changelog for changes in server");
  2197.     SendClientMessage(playerid, COLOR_RED, "This server contains an anti-cheat system,");
  2198.     SendClientMessage(playerid, COLOR_RED, "cheating will result in a ban !");
  2199.  
  2200.     new string[128];
  2201.     new pName[MAX_PLAYER_NAME];
  2202.     GetPlayerName(playerid, pName, sizeof(pName));
  2203.     format(string, sizeof(string), "*** %s has joined the server. Total Players In Server: %d", pName, Players);
  2204.     SendClientMessageToAll(ORANGE, string);
  2205.    
  2206.     SendClientMessage(playerid, COLOR_GREEN, "We are changing ip's on november 24th!");
  2207.     SendClientMessage(playerid, COLOR_GREEN, "Go to www.cod5server.co.cc on november 24th to get more info on how to come back!");
  2208.    
  2209.     if(dini_Exists(udb_encode(pName)))
  2210.     {
  2211.         new IPP[50];
  2212.         GetPlayerIp(playerid, IPP, sizeof(IPP));
  2213.         dini_Set(udb_encode(pName), "IP", IPP);
  2214.     }
  2215.  
  2216.     if( logged[playerid] == 0 )
  2217.     {
  2218.         if(dini_Exists(udb_encode(playername)))
  2219.         {
  2220.             if(logged[playerid] == 0)
  2221.             {
  2222.                 SendClientMessage(playerid, COLOR_RED, "Your account has been detected in our database. Use /login to log in!");
  2223.                 ShowPlayerDialog(playerid,60,DIALOG_STYLE_INPUT,"Login","Welcome to the server\n\nPlease enter your server password\n\nEnter a password:","Login","Quit");
  2224.             }
  2225.         }
  2226.         else if(!dini_Exists(udb_encode(playername)))
  2227.         {
  2228.             SendClientMessage(playerid, COLOR_RED, "You are not registered! Use /register");
  2229.         }
  2230.     }
  2231.     return 1;
  2232. }
  2233.  
  2234. public OnPlayerDisconnect(playerid, reason)
  2235. {
  2236.     if( gPlayerClass[playerid] == ADMIN ) KillTimer(admgod[playerid]);
  2237.  
  2238.     for(new i=0; i < MAX_TEAMS; i++)
  2239.     {
  2240.         if(teamInfo[i][0]==1)
  2241.         {
  2242.             if( teamMembers[i][0] == playerid)
  2243.             {
  2244.                             //name team
  2245.                 format(teamNames[i], MAX_TEAM_NAME, " ");
  2246.                                 //Team exists
  2247.                 teamInfo[i][0]=0;
  2248.                                 //There is one member
  2249.                 teamInfo[i][1]=0;
  2250.                                 //Team color is player's color
  2251.                 teamInfo[i][2]=-1;
  2252.  
  2253.                         //Player is the first team member
  2254.                 teamMembers[i][0] = -1;
  2255.                 teamMembers[i][1] = -1;
  2256.                 teamMembers[i][2] = -1;
  2257.                 teamMembers[i][3] = -1;
  2258.             }
  2259.         }
  2260.     }
  2261.  
  2262.     SetPlayerHealth(playerid, 0.0);
  2263.     IsInCargoB[playerid] = false;
  2264.     IsInBarracks[playerid] = false;
  2265.  
  2266.     if( gPlayerClass[playerid] == ENGINEER )
  2267.     {
  2268.         DestroyPickup(Dispenser[playerid]);
  2269.     }
  2270.  
  2271.     logged[playerid] = 0;
  2272.    
  2273.     Players--;
  2274.  
  2275.     if(Planted[playerid] == 1)
  2276.     {
  2277.         DestroyObject(C4[playerid]);
  2278.         Bomb[playerid] = 0;
  2279.         Planted[playerid] = 0;
  2280.     }
  2281.  
  2282.     new string[128];
  2283.     new pName[MAX_PLAYER_NAME];
  2284.     GetPlayerName(playerid, pName, sizeof(pName));
  2285.  
  2286.  
  2287.     switch(reason)
  2288.     {
  2289.         case 0: format(string, sizeof(string), "***%s has left the server. (Timeout) Total Players In Server: %d", pName, Players);
  2290.         case 1: format(string, sizeof(string), "***%s has left the server. (Leaving) Total Players In Server: %d", pName, Players);
  2291.         case 2: format(string, sizeof(string), "***%s has left the server. (Kicked | Banned) Total Players In Server: %d", pName, Players);
  2292.     }
  2293.     SendClientMessageToAll(ORANGE, string);
  2294.    
  2295.     return 1;
  2296. }
  2297.  
  2298.  
  2299. stock SetPlayerRankStars(playerid)
  2300. {
  2301.     SetPlayerWantedLevel(playerid, rank[playerid]);
  2302.     return 1;
  2303. }
  2304.  
  2305. public OnPlayerSpawn(playerid)
  2306. {
  2307.  
  2308.     if(GeneralClass[playerid][1] == 1 || GeneralClass[playerid][2] == 1 || GeneralClass[playerid][3] == 1 || GeneralClass[playerid][4] == 1)
  2309.     {
  2310.         if(gPlayerClass[playerid] != GENERAL)
  2311.         {
  2312.             GeneralClass[playerid][1] = 0;
  2313.             GeneralClass[playerid][2] = 0;
  2314.             GeneralClass[playerid][3] = 0;
  2315.             GeneralClass[playerid][4] = 0;
  2316.         }
  2317.     }
  2318.  
  2319.     if( PlayerSpec[playerid][is] == 0 )
  2320.     {
  2321.         TextDrawShowForPlayer(playerid,txtTimeDisp);
  2322.         SetPlayerTime(playerid,hourx,minutex);
  2323.    
  2324.         TogglePlayerControllable(playerid, 1);
  2325.  
  2326.         if( GetPlayerMoney(playerid) < 0 ) ResetPlayerMoney(playerid);
  2327.  
  2328.         CheckForLevelUpdate(playerid);
  2329.         SetPlayerRankStars(playerid);
  2330.  
  2331.         SetPlayerInterior(playerid, 0);
  2332.  
  2333.         dispout[playerid] = 0;
  2334.         IsInCargoB[playerid] = false;
  2335.         IsInBarracks[playerid] = false;
  2336.  
  2337.         if(gTeam[playerid] == TEAM_USA )
  2338.         {
  2339.             if( gPlayerClass[playerid] == ADMIN ) SetPlayerSkin(playerid, 217);
  2340.             if( gPlayerClass[playerid] == PYRO ) SetPlayerSkin(playerid, 279);
  2341.             if( gPlayerClass[playerid] == Esploratore ) SetPlayerSkin(playerid,128 );
  2342.             if( gPlayerClass[playerid] == MEDIC ) SetPlayerSkin(playerid, 275);
  2343.             if( gPlayerClass[playerid] == ENGINEER ) SetPlayerSkin(playerid, 179);
  2344.             if( gPlayerClass[playerid] == PILOT ) SetPlayerSkin(playerid, 163);
  2345.             if( gPlayerClass[playerid] == SNIPER ) SetPlayerSkin(playerid, 124);
  2346.             if( gPlayerClass[playerid] == DEMOLITION ) SetPlayerSkin(playerid, 73);
  2347.             if( gPlayerClass[playerid] == ASSAULT ) SetPlayerSkin(playerid, 287);
  2348.             if( gPlayerClass[playerid] == GENERAL ) SetPlayerSkin(playerid, 283);
  2349.         }
  2350.  
  2351.         if(gTeam[playerid] == TEAM_GERMANY)
  2352.         {
  2353.             if( gPlayerClass[playerid] == ADMIN ) SetPlayerSkin(playerid, 217);
  2354.             if( gPlayerClass[playerid] == PYRO ) SetPlayerSkin(playerid, 278);
  2355.             if( gPlayerClass[playerid] == Esploratore ) SetPlayerSkin(playerid, 202);
  2356.             if( gPlayerClass[playerid] == MEDIC ) SetPlayerSkin(playerid, 70);
  2357.             if( gPlayerClass[playerid] == PILOT ) SetPlayerSkin(playerid, 284);
  2358.             if( gPlayerClass[playerid] == ENGINEER ) SetPlayerSkin(playerid, 50);
  2359.             if( gPlayerClass[playerid] == SNIPER ) SetPlayerSkin(playerid, 206);
  2360.             if( gPlayerClass[playerid] == DEMOLITION ) SetPlayerSkin(playerid, 27);
  2361.             if( gPlayerClass[playerid] == ASSAULT ) SetPlayerSkin(playerid, 285);
  2362.             if( gPlayerClass[playerid] == GENERAL ) SetPlayerSkin(playerid, 288);
  2363.         }
  2364.        
  2365.  
  2366.         playerColors[playerid] = GetPlayerColor(playerid);
  2367.  
  2368.         SendClientMessage(playerid, COLOR_RED, "To make this server better you can donate! When you donate you will recieve the V.I.P team!");
  2369.         SendClientMessage(playerid, COLOR_RED, "To donate go to the website (www.cod5server.co.cc) and press the paypal donate button!");
  2370.         SendClientMessage(playerid, COLOR_GREEN, "NEW: Type /donationpackage to see the features you can get!");
  2371.  
  2372.         SetPlayerInterior(playerid, 0);
  2373.         if( gTeam[playerid] == TEAM_USA )
  2374.         {
  2375.             switch(SpawnP[playerid])
  2376.             {
  2377.                 case 1:
  2378.                 {
  2379.                     SetRandomUSAPos(playerid);
  2380.                 }
  2381.                 case 2:
  2382.                 {
  2383.                     if( CapturedBy3 == 1 ) SetPlayerPos(playerid,401.1484,2528.9482,16.5785);
  2384.                 }
  2385.                 case 3:
  2386.                 {
  2387.                     if( CapturedBy5 == 1 ) SetPlayerPos(playerid,216.0368,1911.4246,17.6406);
  2388.                 }
  2389.                 case 4:
  2390.                 {
  2391.                     if( CapturedBy11 == 1 ) SetPlayerPos(playerid, 1087.1479,1074.4731,10.8382);
  2392.                 }
  2393.             }
  2394.         }else if( gTeam[playerid] == TEAM_GERMANY )
  2395.         {
  2396.             switch(SpawnP[playerid])
  2397.             {
  2398.                 case 1:
  2399.                 {
  2400.                     SetRandomGERPos(playerid);
  2401.                 }
  2402.                 case 2:
  2403.                 {
  2404.                     if( CapturedBy3 == 2 ) SetPlayerPos(playerid,401.1484,2528.9482,16.5785);
  2405.                 }
  2406.                 case 3:
  2407.                 {
  2408.                     if( CapturedBy5 == 2) SetPlayerPos(playerid,216.0368,1911.4246,17.6406);
  2409.                 }
  2410.                 case 4:
  2411.                 {
  2412.                     if( CapturedBy11 == 2 ) SetPlayerPos(playerid, 1087.1479,1074.4731,10.8382);
  2413.                 }
  2414.             }
  2415.         }
  2416.  
  2417.  
  2418.         SendClientMessage(playerid, COLOR_GREY, "Type /switchclass to change your class!");
  2419.         SendClientMessage(playerid, COLOR_GREY, "Type /switchspawn to change your spawn position!");
  2420.         SendClientMessage(playerid, COLOR_GREY, "Type /g [text] to talk in global!");
  2421.  
  2422.         if(PickedClass[playerid] == 1) { RestoreClassWeapons(playerid); }
  2423.  
  2424.         if(PickedClass[playerid] == 0 && gTeam[playerid] != TEAM_MERC)
  2425.         {
  2426.             if( adminlevel[playerid] > 0 )
  2427.             {
  2428.                 ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Classes", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander\nAdmin", "Select", "Cancel");
  2429.                 TogglePlayerControllable(playerid, 0);
  2430.                 SetPlayerVirtualWorld(playerid, 0);
  2431.            
  2432.             }else if( adminlevel[playerid] < 1 )
  2433.             {
  2434.                 TogglePlayerControllable(playerid, 0);
  2435.                 ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Classes", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  2436.                 SetPlayerVirtualWorld(playerid, 0);
  2437.             }
  2438.         }
  2439.  
  2440.         SettingPlayerTeam();
  2441.  
  2442.         pSpawned[playerid] = 1;
  2443.  
  2444.  
  2445.         if(gPlayerClass[playerid] == DEMOLITION)
  2446.         {
  2447.             SendClientMessage(playerid, COLOR_ORANGE, "Since you are the explosive class, you can plant bombs by pressing CROUCH and FIRE.");
  2448.         }
  2449.  
  2450.         if(gTeam[playerid] == TEAM_MERC)
  2451.         {
  2452.             SendClientMessage(playerid, COLOR_WHITE, "You are a mercenary. Kill people for money which you can use to buy guns.");
  2453.         }
  2454.  
  2455.         //stats save on spawn
  2456.         if( logged[playerid] == 1 )
  2457.         {
  2458.             GetPlayerName(playerid, nameee, sizeof(nameee));
  2459.             dini_IntSet(udb_encode(nameee), "money", GetPlayerMoney(playerid));
  2460.             dini_IntSet(udb_encode(nameee), "score", GetPlayerScore(playerid));
  2461.             dini_IntSet(udb_encode(nameee), "rank", rank[playerid]);
  2462.             dini_IntSet(udb_encode(nameee), "deaths", deaths[playerid]);
  2463.             dini_IntSet(udb_encode(nameee), "kills", kills[playerid]);
  2464.             dini_IntSet(udb_encode(nameee), "piolet", piolet[playerid]);
  2465.             dini_IntSet(udb_encode(nameee), "logged", 1);
  2466.             printf("%i %i %i %i %i %i %i", GetPlayerMoney(playerid), GetPlayerScore(playerid), rank[playerid], deaths[playerid], kills[playerid], piolet, logged);
  2467.             SendClientMessage(playerid, COLOR_WHITE,  ".:[Stats Saved]:.");
  2468.         }
  2469.  
  2470.  
  2471.         GangZoneShowForPlayer(playerid, USA, 0x0000FF96);
  2472.         GangZoneShowForPlayer(playerid, GERMANY, 0xFF000096);
  2473.         GangZoneShowForPlayer(playerid, Town1, 0xFFFFFF96);
  2474.         GangZoneShowForPlayer(playerid, Town2, COLOR_ORANGE);
  2475.  
  2476.         SetTimerEx("ClassShow", 6000, 0, "i", playerid);
  2477.  
  2478.         if( gPlayerClass[playerid] != ADMIN ) { if( gTeam[playerid] == TEAM_USA) SetPlayerColor(playerid, COLOR_BLUE); if(gTeam[playerid] == TEAM_GERMANY) SetPlayerColor(playerid, COLOR_RED);}
  2479.     }else if( PlayerSpec[playerid][is] == 1 ) if(PickedClass[playerid] == 1) { RestoreClassWeapons(playerid); }
  2480.    
  2481.     Vip(playerid);
  2482.    
  2483.     return 1;
  2484. }
  2485.  
  2486. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2487. {
  2488.             new string[128];
  2489.            
  2490.             if(dialogid == 2 )
  2491.             {
  2492.                 if(!response)
  2493.                 {
  2494.                     ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander\nAdmin", "Select", "Cancel");
  2495.                     TogglePlayerControllable(playerid, 0);
  2496.                 }
  2497.  
  2498.                 if(response)
  2499.                 {
  2500.                     if(listitem == 0)
  2501.                     {
  2502.                         SendClientMessage(playerid, COLOR_GREY, "You chose the assault as your class.");
  2503.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2504.                         gPlayerClass[playerid] = ASSAULT;
  2505.                         PickedClass[playerid] = 1;
  2506.                         SetPlayerVirtualWorld(playerid, 0);
  2507.                         TogglePlayerControllable(playerid, 1);
  2508.                         if(gTeam[playerid] == TEAM_USA)
  2509.                         {
  2510.                             GivePlayerWeapon(playerid, 24, 200);
  2511.                             GivePlayerWeapon(playerid, 31, 500);
  2512.                             GivePlayerWeapon(playerid, 25, 100);
  2513.                             SetPlayerSkin(playerid, 287);
  2514.                         }else
  2515.                         if(gTeam[playerid] == TEAM_GERMANY)
  2516.                         {
  2517.                             GivePlayerWeapon(playerid, 24, 200);
  2518.                             GivePlayerWeapon(playerid, 31, 500);
  2519.                             GivePlayerWeapon(playerid, 25, 100);
  2520.                             SetPlayerSkin(playerid, 285);
  2521.                         }
  2522.                         else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2523.                         {
  2524.                             GivePlayerWeapon(playerid, 34, 200);
  2525.                             GivePlayerWeapon(playerid, 1, 1);
  2526.                             GivePlayerWeapon(playerid, 24, 200);
  2527.                         }
  2528.  
  2529.                     }
  2530.                     if(listitem == 1)
  2531.                     {
  2532.                         if( rank[playerid] >= 1 )
  2533.                         {
  2534.                             SendClientMessage(playerid, COLOR_GREY, "You chose the demolition as your class.");
  2535.                             SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2536.                             gPlayerClass[playerid] = DEMOLITION;
  2537.                             PickedClass[playerid] = 1;
  2538.                             SetPlayerVirtualWorld(playerid, 0);
  2539.                             TogglePlayerControllable(playerid, 1);
  2540.                             if(gTeam[playerid] == TEAM_USA)
  2541.                             {
  2542.                                 GivePlayerWeapon(playerid, 16, 50);
  2543.                                 GivePlayerWeapon(playerid, 36, 5);
  2544.                                 GivePlayerWeapon(playerid, 24, 200);
  2545.                                 SetPlayerSkin(playerid, 73);
  2546.                             }else
  2547.                             if(gTeam[playerid] == TEAM_GERMANY)
  2548.                             {
  2549.                                 GivePlayerWeapon(playerid, 16, 50);
  2550.                                 GivePlayerWeapon(playerid, 36, 5);
  2551.                                 GivePlayerWeapon(playerid, 24, 200);
  2552.                                 SetPlayerSkin(playerid, 27);
  2553.                             }
  2554.                             else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2555.                             {
  2556.                                 GivePlayerWeapon(playerid, 34, 200);
  2557.                                 GivePlayerWeapon(playerid, 1, 1);
  2558.                                 GivePlayerWeapon(playerid, 24, 200);
  2559.                             }
  2560.                         }else
  2561.                         {
  2562.                             ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  2563.                             TogglePlayerControllable(playerid, 0);
  2564.                             SendClientMessage(playerid, COLOR_RED, "You need to be rank 1 to be able to use Demolition !");
  2565.                         }
  2566.                     }
  2567.  
  2568.                     if(listitem == 2)
  2569.                     {
  2570.                         SendClientMessage(playerid, COLOR_GREY, "You chose the sniper as your class.");
  2571.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2572.                         gPlayerClass[playerid] = SNIPER;
  2573.                         PickedClass[playerid] = 1;
  2574.                         SetPlayerVirtualWorld(playerid, 0);
  2575.                         TogglePlayerControllable(playerid, 1);
  2576.                         if(gTeam[playerid] == TEAM_USA)
  2577.                         {
  2578.                             GivePlayerWeapon(playerid, 34, 200);
  2579.                             GivePlayerWeapon(playerid, 1, 1);
  2580.                             GivePlayerWeapon(playerid, 24, 200);
  2581.                             SetPlayerSkin(playerid, 124);
  2582.                         }else
  2583.                         if(gTeam[playerid] == TEAM_GERMANY)
  2584.                         {
  2585.                             GivePlayerWeapon(playerid, 34, 200);
  2586.                             GivePlayerWeapon(playerid, 1, 1);
  2587.                             GivePlayerWeapon(playerid, 24, 200);
  2588.                             SetPlayerSkin(playerid, 206);
  2589.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2590.                         {
  2591.                             GivePlayerWeapon(playerid, 34, 200);
  2592.                             GivePlayerWeapon(playerid, 1, 1);
  2593.                             GivePlayerWeapon(playerid, 24, 200);
  2594.                         }
  2595.                     }
  2596.                     if(listitem == 3)
  2597.                     {
  2598.                         if(gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA)
  2599.                         {
  2600.                             SendClientMessage(playerid, COLOR_GREY, "You cant be a pilot on russia or japan!");
  2601.                             TogglePlayerControllable(playerid, 1);
  2602.                             return 1;
  2603.                         }
  2604.  
  2605.                         if(rank[playerid] >= 3)
  2606.                         {
  2607.                             SendClientMessage(playerid, COLOR_GREY, "You chose the pilot as your class.");
  2608.                             SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2609.                             gPlayerClass[playerid] = PILOT;
  2610.                             PickedClass[playerid] = 1;
  2611.                             SetPlayerVirtualWorld(playerid, 0);
  2612.                             TogglePlayerControllable(playerid, 1);
  2613.  
  2614.                             if(gTeam[playerid] == TEAM_USA)
  2615.                             {
  2616.                                 SetPlayerSkin(playerid, 163);
  2617.                                 GivePlayerWeapon(playerid, 22, 50);
  2618.                             }
  2619.                             if(gTeam[playerid] == TEAM_GERMANY)
  2620.                             {
  2621.                                 SetPlayerSkin(playerid, 284);
  2622.                                 GivePlayerWeapon(playerid, 22, 50);
  2623.                             }
  2624.                         }
  2625.                         else
  2626.                         {
  2627.                             SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 3 to be a pilot!");
  2628.                             ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  2629.                             TogglePlayerControllable(playerid, 0);
  2630.                         }
  2631.                     }
  2632.                 }
  2633.  
  2634.                 if(listitem == 4)
  2635.                 {
  2636.                     SendClientMessage(playerid, COLOR_GREY, "You chose the medic as your class.");
  2637.                     SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2638.                     gPlayerClass[playerid] = MEDIC;
  2639.                     PickedClass[playerid] = 1;
  2640.                     SetPlayerVirtualWorld(playerid, 0);
  2641.                     TogglePlayerControllable(playerid, 1);
  2642.                     if(gTeam[playerid] == TEAM_USA)
  2643.                     {
  2644.                         SetPlayerSkin(playerid, 275);
  2645.                         GivePlayerWeapon(playerid, 23, 200);
  2646.                         GivePlayerWeapon(playerid, 1, 1);
  2647.                         SetPlayerSkin(playerid, 275);
  2648.                     }else
  2649.                     if(gTeam[playerid] == TEAM_GERMANY)
  2650.                     {
  2651.                         SetPlayerSkin(playerid, 70);
  2652.                         GivePlayerWeapon(playerid, 1, 1);
  2653.                         GivePlayerWeapon(playerid, 23, 200);
  2654.                         SetPlayerSkin(playerid, 70);
  2655.                     }
  2656.                     else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2657.                     {
  2658.                         GivePlayerWeapon(playerid, 34, 200);
  2659.                         GivePlayerWeapon(playerid, 1, 1);
  2660.                         GivePlayerWeapon(playerid, 24, 200);
  2661.                     }
  2662.                 }
  2663.  
  2664.                 if(listitem == 5)
  2665.                 {
  2666.                     SendClientMessage(playerid, COLOR_GREY, "You chose the engineer as your class.");
  2667.                     SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2668.                     gPlayerClass[playerid] = ENGINEER;
  2669.                     PickedClass[playerid] = 1;
  2670.                     SetPlayerVirtualWorld(playerid, 0);
  2671.                     TogglePlayerControllable(playerid, 1);
  2672.                     if(gTeam[playerid] == TEAM_USA)
  2673.                     {
  2674.                         SetPlayerSkin(playerid, 179);
  2675.                         GivePlayerWeapon(playerid, 27, 200);
  2676.                         GivePlayerWeapon(playerid, 1, 1);
  2677.                         GivePlayerWeapon(playerid, 29, 200);
  2678.                     }else
  2679.                     if(gTeam[playerid] == TEAM_GERMANY)
  2680.                     {
  2681.                         SetPlayerSkin(playerid, 50);
  2682.                         GivePlayerWeapon(playerid, 27, 200);
  2683.                         GivePlayerWeapon(playerid, 1, 1);
  2684.                         GivePlayerWeapon(playerid, 29, 200);
  2685.                     }
  2686.                     else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2687.                     {
  2688.                         GivePlayerWeapon(playerid, 34, 200);
  2689.                         GivePlayerWeapon(playerid, 1, 1);
  2690.                         GivePlayerWeapon(playerid, 24, 200);
  2691.                     }
  2692.                 }
  2693.  
  2694.                 if( listitem == 6 ) //pyro
  2695.                 {
  2696.                     if( rank[playerid] >= 4 )
  2697.                     {
  2698.                         SendClientMessage(playerid, COLOR_GREY, "You chose the pyroman as your class.");
  2699.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2700.                         gPlayerClass[playerid] = PYRO;
  2701.                         PickedClass[playerid] = 1;
  2702.                         SetPlayerVirtualWorld(playerid, 0);
  2703.                         TogglePlayerControllable(playerid, 1);
  2704.                         if(gTeam[playerid] == TEAM_USA)
  2705.                         {
  2706.                             SetPlayerSkin(playerid, 279);
  2707.                             GivePlayerWeapon(playerid, 16, 20);
  2708.                             GivePlayerWeapon(playerid, 1, 1);
  2709.                             GivePlayerWeapon(playerid, 23, 200);
  2710.                             GivePlayerWeapon(playerid, 37, 550);
  2711.                         }else
  2712.                         if(gTeam[playerid] == TEAM_GERMANY)
  2713.                         {
  2714.                             SetPlayerSkin(playerid, 278);
  2715.                             GivePlayerWeapon(playerid, 16, 20);
  2716.                             GivePlayerWeapon(playerid, 1, 1);
  2717.                             GivePlayerWeapon(playerid, 23, 200);
  2718.                             GivePlayerWeapon(playerid, 37, 250);
  2719.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2720.                         {
  2721.                             GivePlayerWeapon(playerid, 34, 200);
  2722.                             GivePlayerWeapon(playerid, 1, 1);
  2723.                             GivePlayerWeapon(playerid, 24, 200);
  2724.                         }
  2725.                     }else
  2726.                     {
  2727.                         SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 4 to be a pyroman!");
  2728.                         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  2729.                         TogglePlayerControllable(playerid, 0);
  2730.                     }
  2731.                 }
  2732.  
  2733.                 if( listitem == 7 )//Esploratore
  2734.                 {
  2735.                     if( rank[playerid] >= 1 )
  2736.                     {
  2737.                         SendClientMessage(playerid, COLOR_GREY, "You chose the Esploratore as your class.");
  2738.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2739.                         gPlayerClass[playerid] = Esploratore;
  2740.                         PickedClass[playerid] = 1;
  2741.                         SetPlayerVirtualWorld(playerid, 0);
  2742.                         TogglePlayerControllable(playerid, 1);
  2743.                         if(gTeam[playerid] == TEAM_USA)
  2744.                         {
  2745.                             SetPlayerSkin(playerid, 128);
  2746.                             SetPlayerArmour(playerid, 25);
  2747.                             GivePlayerWeapon(playerid, 28, 200);
  2748.                             GivePlayerWeapon(playerid, 1, 1);
  2749.                             GivePlayerWeapon(playerid, 22, 200);
  2750.                         }
  2751.                         if(gTeam[playerid] == TEAM_GERMANY)
  2752.                         {
  2753.                             SetPlayerSkin(playerid, 202);
  2754.                             SetPlayerArmour(playerid, 25);
  2755.                             GivePlayerWeapon(playerid, 28, 200);
  2756.                             GivePlayerWeapon(playerid, 1, 1);
  2757.                             GivePlayerWeapon(playerid, 22, 200);
  2758.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2759.                         {
  2760.                             GivePlayerWeapon(playerid, 34, 200);
  2761.                             GivePlayerWeapon(playerid, 1, 1);
  2762.                             GivePlayerWeapon(playerid, 24, 200);
  2763.                         }
  2764.                     }else
  2765.                     {
  2766.                         SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 1 to be a Esploratore!");
  2767.                         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  2768.                         TogglePlayerControllable(playerid, 0);
  2769.                     }
  2770.                 }
  2771.                
  2772.                 if(listitem == 8)
  2773.                 {
  2774.                     if(rank[playerid] >= 8)
  2775.                     {
  2776.                         SendClientMessage(playerid, COLOR_GREY, "You chose general (commander) as your class.");
  2777.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2778.                         gPlayerClass[playerid] = GENERAL;
  2779.                         PickedClass[playerid] = 1;
  2780.                         SetPlayerVirtualWorld(playerid, 0);
  2781.                         TogglePlayerControllable(playerid, 1);
  2782.                         if(gTeam[playerid] == TEAM_USA)
  2783.                         {
  2784.                             SetPlayerSkin(playerid, 283);
  2785.                             SetPlayerArmour(playerid, 95);
  2786.                             GivePlayerWeapon(playerid, 31, 200);
  2787.                             GivePlayerWeapon(playerid, 27, 200);
  2788.                             GivePlayerWeapon(playerid, 28, 200);
  2789.                             GeneralClass[playerid][1] = 1;
  2790.                         }
  2791.                         if(gTeam[playerid] == TEAM_GERMANY)
  2792.                         {
  2793.                             SetPlayerSkin(playerid, 288);
  2794.                             SetPlayerArmour(playerid, 95);
  2795.                             GivePlayerWeapon(playerid, 31, 200);
  2796.                             GivePlayerWeapon(playerid, 27, 200);
  2797.                             GivePlayerWeapon(playerid, 28, 200);
  2798.                             GeneralClass[playerid][2] = 1;
  2799.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2800.                         {
  2801.                             GivePlayerWeapon(playerid, 31, 200);
  2802.                             GivePlayerWeapon(playerid, 27, 200);
  2803.                             GivePlayerWeapon(playerid, 28, 200);
  2804.                             if(gTeam[playerid] == TEAM_RUSSIA) GeneralClass[playerid][3] = 1;
  2805.                             if(gTeam[playerid] == TEAM_JAPAN) GeneralClass[playerid][4] = 1;
  2806.                         }
  2807.                     }else
  2808.                     {
  2809.                         SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 8 to be a general (commander)!");
  2810.                         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  2811.                         TogglePlayerControllable(playerid, 0);
  2812.                     }
  2813.                 }
  2814.                 if( listitem == 9 ) // admin NOTE: general is 8
  2815.                 {
  2816.                     if( adminlevel[playerid] > 0 )
  2817.                     {
  2818.                         SendClientMessage(playerid, COLOR_GREY, "You chose the Admin as your class.");
  2819.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  2820.                         gPlayerClass[playerid] = ADMIN;
  2821.                         PickedClass[playerid] = 1;
  2822.                         SetPlayerVirtualWorld(playerid, 0);
  2823.                         TogglePlayerControllable(playerid, 1);
  2824.                         SetPlayerColor(playerid, LIGHTGREEN);
  2825.                         if(gTeam[playerid] == TEAM_USA)
  2826.                         {
  2827.                             SetPlayerSkin(playerid, 217);
  2828.                             SetPlayerArmour(playerid, 100);
  2829.                             GivePlayerWeapon(playerid, 38, 20000);
  2830.                             GivePlayerWeapon(playerid, 1, 1);
  2831.                             GivePlayerWeapon(playerid, 22, 20000);
  2832.                         }
  2833.                         if(gTeam[playerid] == TEAM_GERMANY)
  2834.                         {
  2835.                             SetPlayerSkin(playerid, 217);
  2836.                             SetPlayerArmour(playerid, 100);
  2837.                             GivePlayerWeapon(playerid, 38, 20000);
  2838.                             GivePlayerWeapon(playerid, 1, 1);
  2839.                             GivePlayerWeapon(playerid, 22, 20000);
  2840.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  2841.                         {
  2842.                             SetPlayerSkin(playerid, 217);
  2843.                             SetPlayerArmour(playerid, 100);
  2844.                             GivePlayerWeapon(playerid, 38, 20000);
  2845.                             GivePlayerWeapon(playerid, 1, 1);
  2846.                             GivePlayerWeapon(playerid, 22, 20000);
  2847.                         }
  2848.                     }else SendClientMessage(playerid, COLOR_RED, "Bye bye - You aren't admin !");
  2849.                 }
  2850.            
  2851.             }
  2852.            
  2853.             if(dialogid == 60)
  2854.             {
  2855.                 GetPlayerName(playerid, playername, sizeof(playername));
  2856.                 if(response  == 1)
  2857.                 {
  2858.  
  2859.                     GetPlayerName(playerid, playername, sizeof(playername));
  2860.                     if(strlen(inputtext) == 0)
  2861.                     {
  2862.                         ShowPlayerDialog(playerid,20,DIALOG_STYLE_INPUT,"Login","Please enter a password\n\nPlease enter your password:","Login","Quit");
  2863.                         return 1;
  2864.                     }
  2865.                    
  2866.                     new pass[256];
  2867.                     pass = dini_Get(udb_encode(playername), "Password");
  2868.                     if( udb_hash(inputtext) == strval(pass) )
  2869.                     {
  2870.                         GetPlayerName(playerid, playername, sizeof(playername));
  2871.                         logged[playerid] = 1;
  2872.                         pscore[playerid] = dini_Int(udb_encode(playername), "score");
  2873.                         money[playerid] = dini_Int(udb_encode(playername), "money");
  2874.                         adminlevel[playerid] = dini_Int(udb_encode(playername), "adminlevel");
  2875.                         rank[playerid] = dini_Int(udb_encode(playername), "rank");
  2876.                         deaths[playerid] = dini_Int(udb_encode(playername), "deaths");
  2877.                         kills[playerid] = dini_Int(udb_encode(playername), "kills");
  2878.                         piolet[playerid] = dini_Int(udb_encode(playername), "piolet");
  2879.                         dini_IntSet(udb_encode(playername), "logged", 1);
  2880.                         format(string, sizeof(string), "%s, you are now logged in!", playername);
  2881.                         SendClientMessage(playerid, ORANGE, string);
  2882.                         GivePlayerMoney(playerid, money[playerid]);
  2883.                         SetPlayerScore(playerid, pscore[playerid]);
  2884.                         SetPlayerWantedLevel(playerid, rank[playerid]);
  2885.                     }else
  2886.                     {
  2887.                         SendClientMessage(playerid, COLOR_RED, "Invalid Password!");
  2888.                         Kick(playerid);
  2889.                         ShowPlayerDialog(playerid,20,DIALOG_STYLE_INPUT,"Login","Invalid Password\n\nPlease enter your password:","Login","Quit");
  2890.                     }
  2891.                 }
  2892.                 else if( response == 0 )
  2893.                 {
  2894.                     SendClientMessage(playerid, COLOR_RED, "Invalid Password!");
  2895.                     Kick(playerid);
  2896.                 }
  2897.             }
  2898.  
  2899.             if(dialogid == 50)
  2900.             {
  2901.                 if(response)
  2902.                 {
  2903.                     if (!dini_Exists(udb_encode(playername)))
  2904.                     {
  2905.                         if(strlen(inputtext) == 0)
  2906.                         {
  2907.                             ShowPlayerDialog(playerid,30,DIALOG_STYLE_MSGBOX,"Error!","Please Enter A Password!","Ok","Quit");
  2908.                             return 1;
  2909.                         }
  2910.                         GetPlayerName(playerid, playername, sizeof(playername));
  2911.                         dini_Create(udb_encode(playername));
  2912.                         new pmoney[MAX_PLAYERS];
  2913.                         pmoney[playerid] = GetPlayerMoney(playerid);
  2914.                         pscore[playerid] = GetPlayerScore(playerid);
  2915.                         dini_IntSet(udb_encode(playername), "password", udb_hash(inputtext));
  2916.                         dini_IntSet(udb_encode(playername), "adminlevel", 0);
  2917.                         dini_IntSet(udb_encode(playername), "money", pmoney[playerid]);
  2918.                         dini_IntSet(udb_encode(playername), "score", pscore[playerid]);
  2919.                         SetPlayerWantedLevel(playerid, rank[playerid]);
  2920.                         dini_IntSet(udb_encode(playername), "rank", rank[playerid]);
  2921.                         dini_IntSet(udb_encode(playername), "deaths", deaths[playerid]);
  2922.                         dini_IntSet(udb_encode(playername), "kills", kills[playerid]);
  2923.                         dini_IntSet(udb_encode(playername), "piolet", 0);
  2924.                         format(string, sizeof(string), "Account created!\nYou can now login with /login and use the password %s", inputtext);
  2925.                         ShowPlayerDialog(playerid,30,DIALOG_STYLE_MSGBOX,"Success!",string,"Ok","Quit");
  2926.                         format(string, sizeof(string), "Account created! You can now login with /login and use the password %s", inputtext);
  2927.                         SendClientMessage(playerid, COLOR_GREEN, string);
  2928.                     }
  2929.                 }
  2930.             }
  2931.  
  2932.  
  2933.  
  2934.             if(dialogid == 169 )
  2935.             {
  2936.                 if( listitem == 0)
  2937.                 {
  2938.                     SpawnP[playerid] =1;
  2939.                 }else
  2940.                 if( listitem == 1 )
  2941.                 {
  2942.                     if( CapturedBy3 == 1 )
  2943.                     {
  2944.                         SpawnP[playerid] =2;
  2945.                     }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own the Airfield !");
  2946.                 }else
  2947.                 if(listitem == 2 )
  2948.                 {
  2949.                     if( CapturedBy5 == 1 )
  2950.                     {
  2951.                         SpawnP[playerid] =3;
  2952.                     }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own Area69 !");
  2953.                 }else
  2954.                 if(listitem == 3 )
  2955.                 {
  2956.                     if( CapturedBy11 == 1 )
  2957.                     {
  2958.                         SpawnP[playerid] =4;
  2959.                     }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own The University !");
  2960.                 }
  2961.  
  2962.             }
  2963.  
  2964.             if( dialogid == 168 )
  2965.             {
  2966.                 if( listitem == 0)
  2967.                 {
  2968.                     SpawnP[playerid] =1;
  2969.                 }else
  2970.                 if( listitem == 1 )
  2971.                 {
  2972.                     if( CapturedBy3 == 2 )
  2973.                     {
  2974.                         SpawnP[playerid] =2;
  2975.                     }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own the Airfield !");
  2976.                 }else
  2977.                 if(listitem == 2 )
  2978.                 {
  2979.                     if( CapturedBy5 == 2 )
  2980.                     {
  2981.                         SpawnP[playerid] =3;
  2982.                     }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own Area69 !");
  2983.                 }else
  2984.                 if(listitem == 3 )
  2985.                 {
  2986.                     if( CapturedBy11 == 2 )
  2987.                     {
  2988.                         SpawnP[playerid] =4;
  2989.                     }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own The University !");
  2990.                 }
  2991.             }
  2992.  
  2993.             if(dialogid == 110)
  2994.             {
  2995.                 if(response)
  2996.                 {
  2997.                     if(!strlen(inputtext)) return SendClientMessage(playerid, COLOR_GREY, "Please enter the amount of armor you want to buy!");
  2998.                     if(!strval(inputtext)) return SendClientMessage(playerid, COLOR_GREY, "Please enter the amount of armor you want to buy!");
  2999.                     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");
  3000.                     if(strval(inputtext) > 100) return SendClientMessage(playerid, COLOR_GREY, "The ammount of armor you wish to buy cant be greater than 100");
  3001.  
  3002.                     if(strval(inputtext) >= 90)
  3003.                     {
  3004.                         if(GetPlayerMoney(playerid) >= 20000)
  3005.                         {
  3006.                             format(string, sizeof(string), "You purchased %d of armour and have been charged 20000", inputtext);
  3007.                             SendClientMessage(playerid, COLOR_ORANGE, string);
  3008.                             SetPlayerArmour(playerid, strval(inputtext));
  3009.                         }
  3010.                         else
  3011.                         {
  3012.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3013.                         }
  3014.                     }
  3015.                     else if(strval(inputtext) >= 70)
  3016.                     {
  3017.                         if(GetPlayerMoney(playerid) >= 15000)
  3018.                         {
  3019.                             format(string, sizeof(string), "You purchased %d of armour and have been charged 15000", inputtext);
  3020.                             SendClientMessage(playerid, COLOR_ORANGE, string);
  3021.                             SetPlayerArmour(playerid, strval(inputtext));
  3022.                         }
  3023.                         else
  3024.                         {
  3025.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3026.                         }
  3027.                     }
  3028.  
  3029.                     if(strval(inputtext) >= 50)
  3030.                     {
  3031.                         if(GetPlayerMoney(playerid) >= 10000)
  3032.                         {
  3033.                             format(string, sizeof(string), "You purchased %d of armour and have been charged 10000", inputtext);
  3034.                             SendClientMessage(playerid, COLOR_ORANGE, string);
  3035.                             SetPlayerArmour(playerid, strval(inputtext));
  3036.                         }
  3037.                         else
  3038.                         {
  3039.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3040.                         }
  3041.                     }
  3042.  
  3043.                     if(strval(inputtext) <= 50)
  3044.                     {
  3045.                         if(GetPlayerMoney(playerid) >= 10000)
  3046.                         {
  3047.                             format(string, sizeof(string), "You purchased %d of armour and have been charged 10000", inputtext);
  3048.                             SendClientMessage(playerid, COLOR_ORANGE, string);
  3049.                             SetPlayerArmour(playerid, strval(inputtext));
  3050.                         }
  3051.                         else
  3052.                         {
  3053.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3054.                         }
  3055.                     }
  3056.                 }
  3057.             }
  3058.  
  3059.             if(dialogid == 100)
  3060.             {
  3061.                 if(response)
  3062.                 {
  3063.                     if(listitem == 0)
  3064.                     {
  3065.                         if(GetPlayerMoney(playerid) >= 10000)
  3066.                         {
  3067.                             GivePlayerMoney(playerid, -10000);
  3068.                             GivePlayerWeapon(playerid, 31, 500);
  3069.                             SendClientMessage(playerid, COLOR_ORANGE, "You bought a M4!");
  3070.                         }
  3071.                         else
  3072.                         {
  3073.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3074.                         }
  3075.                     }
  3076.                     if(listitem == 1)
  3077.                     {
  3078.                         if(GetPlayerMoney(playerid) >= 10000)
  3079.                         {
  3080.                             GivePlayerMoney(playerid, -10000);
  3081.                             GivePlayerWeapon(playerid, 30, 500);
  3082.                             SendClientMessage(playerid, COLOR_ORANGE, "You bought a AK47!");
  3083.                         }
  3084.                         else
  3085.                         {
  3086.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3087.                         }
  3088.                     }
  3089.                     if(listitem == 2)
  3090.                     {
  3091.                         if(GetPlayerMoney(playerid) >= 15000)
  3092.                         {
  3093.                             GivePlayerMoney(playerid, -15000);
  3094.                             GivePlayerWeapon(playerid, 24, 500);
  3095.                             SendClientMessage(playerid, COLOR_ORANGE, "You bought a desert eagle!");
  3096.                         }
  3097.                         else
  3098.                         {
  3099.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3100.                         }
  3101.                     }
  3102.                     if(listitem == 3)
  3103.                     {
  3104.                         if(GetPlayerMoney(playerid) >= 20000)
  3105.                         {
  3106.                             GivePlayerMoney(playerid, -20000);
  3107.                             GivePlayerWeapon(playerid, 37, 500);
  3108.                             SendClientMessage(playerid, COLOR_ORANGE, "You bought a flame thrower!!");
  3109.                         }
  3110.                         else
  3111.                         {
  3112.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3113.                         }
  3114.                     }
  3115.  
  3116.                     if(listitem == 4)
  3117.                     {
  3118.                         ShowPlayerDialog(playerid, 110, DIALOG_STYLE_INPUT, "Armour", "Select the amount of armor you want to buy:", "Buy", "Cancel");
  3119.                     }
  3120.  
  3121.                     if(listitem == 5)
  3122.                     {
  3123.                         if(GetPlayerMoney(playerid) >= 25000)
  3124.                         {
  3125.                             GivePlayerMoney(playerid, -25000);
  3126.                             GivePlayerWeapon(playerid, 36, 5);
  3127.                             SendClientMessage(playerid, COLOR_ORANGE, "You bought a rocket launcher!");
  3128.                         }
  3129.                         else
  3130.                         {
  3131.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3132.                         }
  3133.                     }
  3134.  
  3135.                     if(listitem == 6)
  3136.                     {
  3137.                         if(GetPlayerMoney(playerid) >= 25000)
  3138.                         {
  3139.                             GivePlayerMoney(playerid, -25000);
  3140.                             GivePlayerWeapon(playerid, 34, 500);
  3141.                             SendClientMessage(playerid, COLOR_ORANGE, "You bought a sniper rifle!");
  3142.                         }
  3143.                         else
  3144.                         {
  3145.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3146.                         }
  3147.                     }
  3148.  
  3149.                     if(listitem == 7)
  3150.                     {
  3151.                         if(GetPlayerMoney(playerid) >= 30000)
  3152.                         {
  3153.                             GivePlayerMoney(playerid, -30000);
  3154.                             GivePlayerWeapon(playerid, 27, 500);
  3155.                             SendClientMessage(playerid, COLOR_ORANGE, "You bought a SPAS 12!");
  3156.                         }
  3157.                         else
  3158.                         {
  3159.                             SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
  3160.                         }
  3161.                     }
  3162.                 }
  3163.             }
  3164.  
  3165.  
  3166.  
  3167.             if(dialogid == 1)
  3168.             {
  3169.                 if(!response)
  3170.                 {
  3171.                     ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  3172.                     TogglePlayerControllable(playerid, 0);
  3173.                 }
  3174.  
  3175.                 if(response)
  3176.                 {
  3177.                     if(listitem == 0)
  3178.                     {
  3179.                         SendClientMessage(playerid, COLOR_GREY, "You chose the assault as your class.");
  3180.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3181.                         gPlayerClass[playerid] = ASSAULT;
  3182.                         PickedClass[playerid] = 1;
  3183.                         SetPlayerVirtualWorld(playerid, 0);
  3184.                         TogglePlayerControllable(playerid, 1);
  3185.                         if(gTeam[playerid] == TEAM_USA)
  3186.                         {
  3187.                             GivePlayerWeapon(playerid, 24, 200);
  3188.                             GivePlayerWeapon(playerid, 31, 500);
  3189.                             GivePlayerWeapon(playerid, 25, 100);
  3190.                             SetPlayerSkin(playerid, 287);
  3191.                         }else
  3192.                         if(gTeam[playerid] == TEAM_GERMANY)
  3193.                         {
  3194.                             GivePlayerWeapon(playerid, 24, 200);
  3195.                             GivePlayerWeapon(playerid, 31, 500);
  3196.                             GivePlayerWeapon(playerid, 25, 100);
  3197.                             SetPlayerSkin(playerid, 285);
  3198.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3199.                         {
  3200.                             GivePlayerWeapon(playerid, 34, 200);
  3201.                             GivePlayerWeapon(playerid, 1, 1);
  3202.                             GivePlayerWeapon(playerid, 24, 200);
  3203.                         }
  3204.  
  3205.                     }
  3206.                     if(listitem == 1)
  3207.                     {
  3208.                         if( rank[playerid] >= 1 )
  3209.                         {
  3210.                             SendClientMessage(playerid, COLOR_GREY, "You chose the demolition as your class.");
  3211.                             SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3212.                             gPlayerClass[playerid] = DEMOLITION;
  3213.                             PickedClass[playerid] = 1;
  3214.                             SetPlayerVirtualWorld(playerid, 0);
  3215.                             TogglePlayerControllable(playerid, 1);
  3216.                             if(gTeam[playerid] == TEAM_USA)
  3217.                             {
  3218.                                 GivePlayerWeapon(playerid, 16, 50);
  3219.                                 GivePlayerWeapon(playerid, 36, 5);
  3220.                                 GivePlayerWeapon(playerid, 24, 200);
  3221.                                 SetPlayerSkin(playerid, 73);
  3222.                             }else
  3223.                             if(gTeam[playerid] == TEAM_GERMANY)
  3224.                             {
  3225.                                 GivePlayerWeapon(playerid, 16, 50);
  3226.                                 GivePlayerWeapon(playerid, 36, 5);
  3227.                                 GivePlayerWeapon(playerid, 24, 200);
  3228.                                 SetPlayerSkin(playerid, 27);
  3229.                             }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3230.                             {
  3231.                                 GivePlayerWeapon(playerid, 34, 200);
  3232.                                 GivePlayerWeapon(playerid, 1, 1);
  3233.                                 GivePlayerWeapon(playerid, 24, 200);
  3234.                             }
  3235.                         }else
  3236.                         {
  3237.                             SendClientMessage(playerid, COLOR_RED, "You need to be rank 1 to be able to use Demolition !");
  3238.                             ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  3239.                             TogglePlayerControllable(playerid, 0);
  3240.                         }
  3241.                     }
  3242.  
  3243.                     if(listitem == 2)
  3244.                     {
  3245.                         SendClientMessage(playerid, COLOR_GREY, "You chose the sniper as your class.");
  3246.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3247.                         gPlayerClass[playerid] = SNIPER;
  3248.                         PickedClass[playerid] = 1;
  3249.                         SetPlayerVirtualWorld(playerid, 0);
  3250.                         TogglePlayerControllable(playerid, 1);
  3251.                         if(gTeam[playerid] == TEAM_USA)
  3252.                         {
  3253.                             GivePlayerWeapon(playerid, 34, 200);
  3254.                             GivePlayerWeapon(playerid, 1, 1);
  3255.                             GivePlayerWeapon(playerid, 24, 200);
  3256.                             SetPlayerSkin(playerid, 124);
  3257.                         }else
  3258.                         if(gTeam[playerid] == TEAM_GERMANY)
  3259.                         {
  3260.                             GivePlayerWeapon(playerid, 34, 200);
  3261.                             GivePlayerWeapon(playerid, 1, 1);
  3262.                             GivePlayerWeapon(playerid, 24, 200);
  3263.                             SetPlayerSkin(playerid, 206);
  3264.                         }
  3265.                         else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3266.                         {
  3267.                             GivePlayerWeapon(playerid, 34, 200);
  3268.                             GivePlayerWeapon(playerid, 1, 1);
  3269.                             GivePlayerWeapon(playerid, 24, 200);
  3270.                         }
  3271.                     }
  3272.                     if(listitem == 3)
  3273.                     {
  3274.                         if(gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA)
  3275.                         {
  3276.                             SendClientMessage(playerid, COLOR_GREY, "You cant be a pilot on russia or japan!");
  3277.                             TogglePlayerControllable(playerid, 1);
  3278.                             return 1;
  3279.                         }
  3280.  
  3281.                         if(rank[playerid] >= 3)
  3282.                         {
  3283.                             SendClientMessage(playerid, COLOR_GREY, "You chose the pilot as your class.");
  3284.                             SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3285.                             gPlayerClass[playerid] = PILOT;
  3286.                             PickedClass[playerid] = 1;
  3287.                             SetPlayerVirtualWorld(playerid, 0);
  3288.                             TogglePlayerControllable(playerid, 1);
  3289.  
  3290.                             if(gTeam[playerid] == TEAM_USA)
  3291.                             {
  3292.                                 SetPlayerSkin(playerid, 163);
  3293.                                 GivePlayerWeapon(playerid, 22, 50);
  3294.                             }
  3295.                             if(gTeam[playerid] == TEAM_GERMANY)
  3296.                             {
  3297.                                 SetPlayerSkin(playerid, 284);
  3298.                                 GivePlayerWeapon(playerid, 22, 50);
  3299.                             }
  3300.                         }
  3301.                         else
  3302.                         {
  3303.                             SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 3 to be a pilot!");
  3304.                             ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  3305.                             TogglePlayerControllable(playerid, 0);
  3306.                         }
  3307.                     }
  3308.                 }
  3309.  
  3310.                 if(listitem == 4)
  3311.                 {
  3312.                     SendClientMessage(playerid, COLOR_GREY, "You chose the medic as your class.");
  3313.                     SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3314.                     gPlayerClass[playerid] = MEDIC;
  3315.                     PickedClass[playerid] = 1;
  3316.                     SetPlayerVirtualWorld(playerid, 0);
  3317.                     TogglePlayerControllable(playerid, 1);
  3318.                     if(gTeam[playerid] == TEAM_USA)
  3319.                     {
  3320.                         SetPlayerSkin(playerid, 275);
  3321.                         GivePlayerWeapon(playerid, 23, 200);
  3322.                         GivePlayerWeapon(playerid, 1, 1);
  3323.                         SetPlayerSkin(playerid, 275);
  3324.                     }else
  3325.                     if(gTeam[playerid] == TEAM_GERMANY)
  3326.                     {
  3327.                         SetPlayerSkin(playerid, 70);
  3328.                         GivePlayerWeapon(playerid, 1, 1);
  3329.                         GivePlayerWeapon(playerid, 23, 200);
  3330.                         SetPlayerSkin(playerid, 70);
  3331.                     }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3332.                     {
  3333.                         GivePlayerWeapon(playerid, 34, 200);
  3334.                         GivePlayerWeapon(playerid, 1, 1);
  3335.                         GivePlayerWeapon(playerid, 24, 200);
  3336.                     }
  3337.                 }
  3338.  
  3339.                 if(listitem == 5)
  3340.                 {
  3341.                     SendClientMessage(playerid, COLOR_GREY, "You chose the engineer as your class.");
  3342.                     SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3343.                     gPlayerClass[playerid] = ENGINEER;
  3344.                     PickedClass[playerid] = 1;
  3345.                     SetPlayerVirtualWorld(playerid, 0);
  3346.                     TogglePlayerControllable(playerid, 1);
  3347.                     if(gTeam[playerid] == TEAM_USA)
  3348.                     {
  3349.                         SetPlayerSkin(playerid, 179);
  3350.                         GivePlayerWeapon(playerid, 27, 200);
  3351.                         GivePlayerWeapon(playerid, 1, 1);
  3352.                         GivePlayerWeapon(playerid, 29, 200);
  3353.                     }else
  3354.                     if(gTeam[playerid] == TEAM_GERMANY)
  3355.                     {
  3356.                         SetPlayerSkin(playerid, 50);
  3357.                         GivePlayerWeapon(playerid, 27, 200);
  3358.                         GivePlayerWeapon(playerid, 1, 1);
  3359.                         GivePlayerWeapon(playerid, 29, 200);
  3360.                     }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3361.                     {
  3362.                         GivePlayerWeapon(playerid, 34, 200);
  3363.                         GivePlayerWeapon(playerid, 1, 1);
  3364.                         GivePlayerWeapon(playerid, 24, 200);
  3365.                     }
  3366.                 }
  3367.                
  3368.                 if( listitem == 6 ) //pyro
  3369.                 {
  3370.                     if( rank[playerid] >= 4 )
  3371.                     {
  3372.                         SendClientMessage(playerid, COLOR_GREY, "You chose the pyroman as your class.");
  3373.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3374.                         gPlayerClass[playerid] = PYRO;
  3375.                         PickedClass[playerid] = 1;
  3376.                         SetPlayerVirtualWorld(playerid, 0);
  3377.                         TogglePlayerControllable(playerid, 1);
  3378.                         if(gTeam[playerid] == TEAM_USA)
  3379.                         {
  3380.                             SetPlayerSkin(playerid, 279);
  3381.                             GivePlayerWeapon(playerid, 16, 20);
  3382.                             GivePlayerWeapon(playerid, 1, 1);
  3383.                             GivePlayerWeapon(playerid, 23, 200);
  3384.                             GivePlayerWeapon(playerid, 37, 550);
  3385.                         }else
  3386.                         if(gTeam[playerid] == TEAM_GERMANY)
  3387.                         {
  3388.                             SetPlayerSkin(playerid, 278);
  3389.                             GivePlayerWeapon(playerid, 16, 20);
  3390.                             GivePlayerWeapon(playerid, 1, 1);
  3391.                             GivePlayerWeapon(playerid, 23, 200);
  3392.                             GivePlayerWeapon(playerid, 37, 250);
  3393.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3394.                         {
  3395.                             GivePlayerWeapon(playerid, 34, 200);
  3396.                             GivePlayerWeapon(playerid, 1, 1);
  3397.                             GivePlayerWeapon(playerid, 24, 200);
  3398.                         }
  3399.                     }else
  3400.                     {
  3401.                         SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 4 to be a pyroman!");
  3402.                         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  3403.                         TogglePlayerControllable(playerid, 0);
  3404.                     }
  3405.                 }
  3406.  
  3407.                 if( listitem == 7 )//Esploratore
  3408.                 {
  3409.                     if( rank[playerid] >= 1 )
  3410.                     {
  3411.                         SendClientMessage(playerid, COLOR_GREY, "You chose the Esploratore as your class.");
  3412.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3413.                         gPlayerClass[playerid] = Esploratore;
  3414.                         PickedClass[playerid] = 1;
  3415.                         SetPlayerVirtualWorld(playerid, 0);
  3416.                         TogglePlayerControllable(playerid, 1);
  3417.                         if(gTeam[playerid] == TEAM_USA)
  3418.                         {
  3419.                             SetPlayerSkin(playerid, 128);
  3420.                             SetPlayerArmour(playerid, 25);
  3421.                             GivePlayerWeapon(playerid, 28, 200);
  3422.                             GivePlayerWeapon(playerid, 1, 1);
  3423.                             GivePlayerWeapon(playerid, 22, 200);
  3424.                         }
  3425.                         if(gTeam[playerid] == TEAM_GERMANY)
  3426.                         {
  3427.                             SetPlayerSkin(playerid, 202);
  3428.                             SetPlayerArmour(playerid, 25);
  3429.                             GivePlayerWeapon(playerid, 28, 200);
  3430.                             GivePlayerWeapon(playerid, 1, 1);
  3431.                             GivePlayerWeapon(playerid, 22, 200);
  3432.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3433.                         {
  3434.                             GivePlayerWeapon(playerid, 34, 200);
  3435.                             GivePlayerWeapon(playerid, 1, 1);
  3436.                             GivePlayerWeapon(playerid, 24, 200);
  3437.                         }
  3438.                     }else
  3439.                     {
  3440.                         SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 1 to be a Esploratore!");
  3441.                         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  3442.                         TogglePlayerControllable(playerid, 0);
  3443.                     }
  3444.                 }
  3445.                
  3446.                 if(listitem == 8)
  3447.                 {
  3448.                     if(rank[playerid] >= 8)
  3449.                     {
  3450.                         SendClientMessage(playerid, COLOR_GREY, "You chose general (commander) as your class.");
  3451.                         SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  3452.                         gPlayerClass[playerid] = GENERAL;
  3453.                         PickedClass[playerid] = 1;
  3454.                         SetPlayerVirtualWorld(playerid, 0);
  3455.                         TogglePlayerControllable(playerid, 1);
  3456.                         if(gTeam[playerid] == TEAM_USA)
  3457.                         {
  3458.                             SetPlayerSkin(playerid, 283);
  3459.                             SetPlayerArmour(playerid, 95);
  3460.                             GivePlayerWeapon(playerid, 31, 200);
  3461.                             GivePlayerWeapon(playerid, 27, 200);
  3462.                             GivePlayerWeapon(playerid, 28, 200);
  3463.                             GeneralClass[playerid][1] = 1;
  3464.                         }
  3465.                         if(gTeam[playerid] == TEAM_GERMANY)
  3466.                         {
  3467.                             SetPlayerSkin(playerid, 288);
  3468.                             SetPlayerArmour(playerid, 95);
  3469.                             GivePlayerWeapon(playerid, 31, 200);
  3470.                             GivePlayerWeapon(playerid, 27, 200);
  3471.                             GivePlayerWeapon(playerid, 28, 200);
  3472.                             GeneralClass[playerid][2] = 1;
  3473.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  3474.                         {
  3475.                             GivePlayerWeapon(playerid, 31, 200);
  3476.                             GivePlayerWeapon(playerid, 27, 200);
  3477.                             GivePlayerWeapon(playerid, 28, 200);
  3478.                             if(gTeam[playerid] == TEAM_RUSSIA) GeneralClass[playerid][3] = 1;
  3479.                             if(gTeam[playerid] == TEAM_JAPAN) GeneralClass[playerid][4] = 1;
  3480.                         }
  3481.                     }else
  3482.                     {
  3483.                         SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 8 to be a general (commander)!");
  3484.                         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nEsploratore\nGeneral/Commander", "Select", "Cancel");
  3485.                         TogglePlayerControllable(playerid, 0);
  3486.                     }
  3487.                 }
  3488.             }
  3489.             return 1;
  3490. }
  3491.    
  3492. public OnPlayerDeath(playerid, killerid, reason)
  3493. {
  3494.     if( gPlayerClass[playerid] == ADMIN ) KillTimer(admgod[playerid]);
  3495.  
  3496.     GivePlayerMoney(playerid, -1000);
  3497.  
  3498.     if( GetPlayerMoney(playerid) < 0 ) ResetPlayerMoney(playerid);
  3499.  
  3500.     if( gPlayerClass[playerid] == ENGINEER ) DestroyPickup(Dispenser[playerid]);
  3501.  
  3502.  
  3503.     if( IsPlayerInAnyVehicle(playerid) )
  3504.     {
  3505.         if( IsInCargoB[playerid] == true )
  3506.         {
  3507.             new vehicleid = GetPlayerVehicleID(playerid);
  3508.             CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] - 1;
  3509.             IsInCargoB[playerid] = false;
  3510.             }
  3511.         if( IsInBarracks[playerid] == true )
  3512.         {
  3513.             new vehicleid = GetPlayerVehicleID(playerid);
  3514.             Barracks[vehicleid][seats] = Barracks[vehicleid][seats] - 1;
  3515.             IsInBarracks[playerid] = false;
  3516.             }
  3517.     }
  3518.    
  3519.     TextDrawHideForPlayer(playerid,txtTimeDisp);
  3520.     // THIS IS ACTUALLY ONPLAYERDEATH !
  3521.    
  3522.     if( gPlayerClass[killerid] != ADMIN)
  3523.     {
  3524.         deaths[playerid] = deaths[playerid] + 1;
  3525.         kills[killerid] = kills[killerid] + 1;
  3526.     }
  3527.  
  3528.     CheckForLevelUpdate(killerid);
  3529.  
  3530.     SetPlayerVirtualWorld(playerid, 0);
  3531.  
  3532.     SendClientMessage(killerid, COLOR_WHITE, "You got money and weapons for killing an enemy!");
  3533.     GivePlayerMoney(killerid, 1000);
  3534.     if( GetPlayerWeapon(playerid) != 36 ) GivePlayerWeapon(playerid, GetPlayerWeapon(playerid), 50);
  3535.    
  3536.     if(hashit[playerid] == 1 && gTeam[killerid] == TEAM_MERC)
  3537.     {
  3538.         hashit[playerid] = 0;
  3539.         GivePlayerMoney(killerid, money[playerid]);
  3540.         SendClientMessage(playerid, COLOR_YELLOW, "You got money for killing an enemy that has a contract on!");
  3541.         new string[128];
  3542.         new hitname[MAX_PLAYER_NAME];
  3543.         GetPlayerName(playerid, hitname, sizeof(hitname));
  3544.         new killername[MAX_PLAYER_NAME];
  3545.         GetPlayerName(killerid, killername, sizeof(killername));
  3546.         format(string, sizeof(string), "%s killed contracted player %s ! The contract is canceled!", killername, hitname);
  3547.         SendMERCMessage(COLOR_YELLOW, string);
  3548.     }
  3549.  
  3550.     AbleToSpawn[playerid] = 1;
  3551.  
  3552.     pSpawned[playerid] = 0;
  3553.  
  3554.     if(Planted[playerid] == 1)
  3555.     {
  3556.         DestroyObject(C4[playerid]);
  3557.         Bomb[playerid] = 0;
  3558.         Planted[playerid] = 0;
  3559.     }
  3560.  
  3561.  
  3562.     if(hitman[killerid] == 1)
  3563.     {
  3564.         if(playerid == randperson[playerid])
  3565.         {
  3566.             SendClientMessage(killerid, COLOR_WHITE, "Nice work! You killed your hit! Minimission completed!");
  3567.             SetPlayerScore(killerid, GetPlayerScore(killerid) +3);
  3568.             DisablePlayerCheckpoint(playerid);
  3569.             hitman[killerid] = 0;
  3570.         }
  3571.     }
  3572.    
  3573.     if(kills[killerid] == 6)
  3574.     {
  3575.         kills[killerid] = 0;
  3576.         SendClientMessage(playerid, COLOR_WHITE, "Congratulations! You completed the challenge!");
  3577.         SetPlayerScore(killerid, GetPlayerScore(killerid) +3);
  3578.     }
  3579.  
  3580.  
  3581.     spree[killerid]++;
  3582.    
  3583.     if(spree[killerid] == 5)
  3584.     {
  3585.         new string[128];
  3586.         new pName[MAX_PLAYER_NAME];
  3587.         GetPlayerName(killerid, pName, sizeof(pName));
  3588.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~5 KILLS!~r~", pName);
  3589.         TextDrawHideForAll(Spree);
  3590.         TextDrawSetString(Spree, string);
  3591.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3592.     }
  3593.    
  3594.     if(spree[killerid] == 10)
  3595.     {
  3596.         new string[128];
  3597.         new pName[MAX_PLAYER_NAME];
  3598.         GetPlayerName(killerid, pName, sizeof(pName));
  3599.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~10 KILLS!~r~", pName);
  3600.         TextDrawHideForAll(Spree);
  3601.         TextDrawSetString(Spree, string);
  3602.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3603.     }
  3604.    
  3605.     if(spree[killerid] == 15)
  3606.     {
  3607.         new string[128];
  3608.         new pName[MAX_PLAYER_NAME];
  3609.         GetPlayerName(killerid, pName, sizeof(pName));
  3610.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~15 KILLS!~r~", pName);
  3611.         TextDrawHideForAll(Spree);
  3612.         TextDrawSetString(Spree, string);
  3613.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3614.     }
  3615.    
  3616.     if(spree[killerid] == 20)
  3617.     {
  3618.         new string[128];
  3619.         new pName[MAX_PLAYER_NAME];
  3620.         GetPlayerName(killerid, pName, sizeof(pName));
  3621.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~20 KILLS!~r~", pName);
  3622.         TextDrawHideForAll(Spree);
  3623.         TextDrawSetString(Spree, string);
  3624.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3625.     }
  3626.    
  3627.     if(spree[killerid] == 25)
  3628.     {
  3629.         new string[128];
  3630.         new pName[MAX_PLAYER_NAME];
  3631.         GetPlayerName(killerid, pName, sizeof(pName));
  3632.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~25 KILLS!~r~", pName);
  3633.         TextDrawHideForAll(Spree);
  3634.         TextDrawSetString(Spree, string);
  3635.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3636.     }
  3637.    
  3638.     if(spree[killerid] == 30)
  3639.     {
  3640.         new string[128];
  3641.         new pName[MAX_PLAYER_NAME];
  3642.         GetPlayerName(killerid, pName, sizeof(pName));
  3643.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~30 KILLS!~r~", pName);
  3644.         TextDrawHideForAll(Spree);
  3645.         TextDrawSetString(Spree, string);
  3646.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3647.     }
  3648.    
  3649.     if(spree[killerid] == 35)
  3650.     {
  3651.         new string[128];
  3652.         new pName[MAX_PLAYER_NAME];
  3653.         GetPlayerName(killerid, pName, sizeof(pName));
  3654.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~35 KILLS!~r~", pName);
  3655.         TextDrawHideForAll(Spree);
  3656.         TextDrawSetString(Spree, string);
  3657.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3658.     }
  3659.    
  3660.     if(spree[killerid] == 40)
  3661.     {
  3662.         new string[128];
  3663.         new pName[MAX_PLAYER_NAME];
  3664.         GetPlayerName(killerid, pName, sizeof(pName));
  3665.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~40 KILLS!~r~", pName);
  3666.         TextDrawHideForAll(Spree);
  3667.         TextDrawSetString(Spree, string);
  3668.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3669.     }
  3670.    
  3671.     if(spree[killerid] == 45)
  3672.     {
  3673.         new string[128];
  3674.         new pName[MAX_PLAYER_NAME];
  3675.         GetPlayerName(playerid, pName, sizeof(pName));
  3676.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~45 KILLS!~r~", pName);
  3677.         TextDrawHideForAll(Spree);
  3678.         TextDrawSetString(Spree, string);
  3679.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3680.     }
  3681.    
  3682.     if(spree[killerid] == 50)
  3683.     {
  3684.         new string[128];
  3685.         new pName[MAX_PLAYER_NAME];
  3686.         SetPlayerScore(playerid, GetPlayerScore(playerid) +5);
  3687.         GetPlayerName(playerid, pName, sizeof(pName));
  3688.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~50 KILLS!~r~", pName);
  3689.         TextDrawHideForAll(Spree);
  3690.         TextDrawSetString(Spree, string);
  3691.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3692.     }
  3693.    
  3694.     if(spree[killerid] > 50 )
  3695.     {
  3696.         new string[128];
  3697.         new pName[MAX_PLAYER_NAME];
  3698.         GetPlayerName(playerid, pName, sizeof(pName));
  3699.         format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~%i KILLS!~r~", pName, spree[killerid]);
  3700.         TextDrawHideForAll(Spree);
  3701.         TextDrawSetString(Spree, string);
  3702.         TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
  3703.     }
  3704.    
  3705.     if(spree[playerid] >= 5)
  3706.     {
  3707.         new string[128];
  3708.         new pName[MAX_PLAYER_NAME];
  3709.         GetPlayerName(playerid, pName, sizeof(pName));
  3710.         format(string, sizeof(string), "%s 's killing spree ended.", pName);
  3711.         SendClientMessageToAll(COLOR_CON_GREEN, string);
  3712.         spree[playerid] = 0;
  3713.     }
  3714.  
  3715.     IsInHunter[playerid] = 0;
  3716.     IsInRhino[playerid] = 0;
  3717.     EnteredArea[playerid] = 0;
  3718.    
  3719.     SendDeathMessage(killerid, playerid, reason);
  3720.    
  3721.     if( killerid == INVALID_PLAYER_ID)
  3722.     {
  3723.         SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
  3724.     }
  3725.    
  3726.     if( gPlayerClass[killerid] != ADMIN ) SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
  3727.     pSpawned[playerid] = 0;
  3728.    
  3729.     //stats save on death
  3730.     if( logged[playerid] == 1 )
  3731.     {
  3732.         GetPlayerName(playerid, nameee, sizeof(nameee));
  3733.         dini_IntSet(udb_encode(nameee), "money", GetPlayerMoney(playerid));
  3734.         dini_IntSet(udb_encode(nameee), "score", GetPlayerScore(playerid));
  3735.         dini_IntSet(udb_encode(nameee), "rank", rank[playerid]);
  3736.         dini_IntSet(udb_encode(nameee), "deaths", deaths[playerid]);
  3737.         dini_IntSet(udb_encode(nameee), "kills", kills[playerid]);
  3738.         dini_IntSet(udb_encode(nameee), "piolet", piolet[playerid]);
  3739.         dini_IntSet(udb_encode(nameee), "logged", 1);
  3740.     }
  3741.    
  3742.     if( PlayerSpec[playerid][is] == 1 ) print("Death Spec WTF!?");
  3743.  
  3744.     return 1;
  3745. }
  3746.  
  3747.  
  3748. public OnVehicleSpawn(vehicleid)
  3749. {
  3750.     foreach(Player, i)
  3751.     {
  3752.         SetVehicleParamsForPlayer(vehicleid,i, 0, 0);
  3753.     }
  3754.  
  3755.  
  3756.     if (GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 563 ||GetVehicleModel(vehicleid) == 511  )
  3757.     {
  3758.         CargoBob[vehicleid][seats] = 0;
  3759.     }
  3760.  
  3761.     if( GetVehicleModel(vehicleid) == 433 )
  3762.     {
  3763.         Barracks[vehicleid][seats] = 0;
  3764.     }
  3765.     return 1;
  3766. }
  3767.  
  3768.  
  3769.  
  3770. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  3771. {
  3772.  
  3773.     if (ispassenger) return 1;
  3774.     foreach(Player, i)
  3775.     {
  3776.             if(IsPlayerInVehicle(i,vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerTeam(i) == GetPlayerTeam(playerid))
  3777.             {
  3778.                 new string[128];
  3779.                 new string2[128];
  3780.                 Warns[playerid][TeamJack]++;
  3781.                 format(string, sizeof(string), "DONT TEAM JACK! Warnings: %d/5", Warns[playerid][TeamJack]);
  3782.                 SendClientMessage(playerid, COLOR_RED, string);
  3783.                 GameTextForPlayer(playerid, "DONT TEAM JACK!", 5000, 4);
  3784.                 SetPlayerHealth(playerid, 0.0);
  3785.                
  3786.                 if(Warns[playerid][TeamJack] == 5)
  3787.                 {
  3788.                     new kickname[MAX_PLAYER_NAME];
  3789.                     GetPlayerName(playerid, kickname, sizeof(kickname));
  3790.                     format(string2, sizeof(string2), "**AUTO KICK: %s has been kicked for 3 team car jacks!", kickname);
  3791.                     SendClientMessageToAll(COLOR_RED, string2);
  3792.                     SendClientMessage(playerid, COLOR_RED, "You have been kicked for 3 team jacks.");
  3793.                     Warns[playerid][TeamJack]=0;
  3794.                     Kick(playerid);
  3795.             }
  3796.         }
  3797.     }
  3798.    
  3799.     LastVehicle[playerid] = vehicleid;
  3800.  
  3801.     if (GetVehicleModel(vehicleid) == 548|| GetVehicleModel(vehicleid) == 563 || GetVehicleModel(vehicleid) == 511 )
  3802.     {
  3803.  
  3804.  
  3805.         SendClientMessage(playerid, COLOR_GREY, "You just recieved a parachute !");
  3806.         if (ispassenger)
  3807.         {
  3808.             if( CargoBob[vehicleid][seats] < 7 )
  3809.             {
  3810.                 if (IsInCargoB[playerid] == false)
  3811.                 {
  3812.                     CargoBobUser[playerid][vehicleid] =1;
  3813.                     LastVehicle[playerid] = vehicleid;
  3814.                     GivePlayerWeapon(playerid, 46, 1);
  3815.                     CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] + 1;
  3816.                     IsInCargoB[playerid] = true;
  3817.                     PlayerCargoB[playerid] = vehicleid;
  3818.                     //last
  3819.                     TogglePlayerSpectating(playerid, true);
  3820.                     PlayerSpectateVehicle(playerid, vehicleid);
  3821.                 }
  3822.             }
  3823.             else
  3824.             {
  3825.                 RemovePlayerFromVehicle(playerid);
  3826.                 SendClientMessage(playerid, COLOR_RED, "Vehicle is full !");
  3827.             }
  3828.         }
  3829.         else
  3830.         {
  3831.             CargoBobUser[playerid][vehicleid] =1;
  3832.             LastVehicle[playerid] = vehicleid;
  3833.             GivePlayerWeapon(playerid, 46, 1);
  3834.             Driver[vehicleid] = playerid;
  3835.         }
  3836.     }
  3837.  
  3838.     if (GetVehicleModel(vehicleid) == 433)
  3839.     {
  3840.         if (ispassenger)
  3841.         {
  3842.             if( Barracks[vehicleid][seats] < 7 )
  3843.             {
  3844.                 if (IsInBarracks[playerid] == false)
  3845.                 {
  3846.                     BarracksUser[playerid][vehicleid] =1;
  3847.                     LastVehicle[playerid] = vehicleid;
  3848.                     GivePlayerWeapon(playerid, 46, 1);
  3849.                     Barracks[vehicleid][seats] = Barracks[vehicleid][seats] + 1;
  3850.                     IsInBarracks[playerid] = true;
  3851.                     PlayerBarracks[playerid] = vehicleid;
  3852.                     //last
  3853.                     TogglePlayerSpectating(playerid, true);
  3854.                     PlayerSpectateVehicle(playerid, vehicleid);
  3855.                 }
  3856.             }
  3857.             else
  3858.             {
  3859.                 RemovePlayerFromVehicle(playerid);
  3860.                 SendClientMessage(playerid, COLOR_RED, "Barracks is full !");
  3861.             }
  3862.         }
  3863.         else
  3864.         {
  3865.             BarracksUser[playerid][vehicleid] =1;
  3866.             LastVehicle[playerid] = vehicleid;
  3867.             Driver[vehicleid] = playerid;
  3868.         }
  3869.     }
  3870.     return 1;
  3871. }
  3872.  
  3873. public OnRconLoginAttempt(ip[], password[], success)
  3874. {
  3875.     if(!success) //If the password was incorrect
  3876.     {
  3877.         new pip[16];
  3878.         foreach(Player, i)
  3879.         {
  3880.             GetPlayerName(i, nameee, 16);
  3881.             GetPlayerIp(i, pip, sizeof(pip));
  3882.             if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
  3883.             {
  3884.                 printf("Failed RCON Login attempt by %s . ID:%i IP:%s Pw: %s", nameee,ip, password);
  3885.             }
  3886.         }
  3887.     }
  3888.     return 1;
  3889. }
  3890.  
  3891. public OnVehicleDeath(vehicleid, killerid)
  3892. {
  3893.         if (GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 563|| GetVehicleModel(vehicleid) == 511 )
  3894.         {
  3895.             foreach(Player, i)
  3896.             {
  3897.                     if (IsInCargoB[i] == true)
  3898.                     {
  3899.                         if (PlayerCargoB[i] == vehicleid)
  3900.                         {
  3901.                            
  3902.                             CargoBob[vehicleid][seats] = 0;
  3903.                             TogglePlayerSpectating(i, false);
  3904.                             new Float:X,Float:Y,Float:Z,Float:Ang;
  3905.                             GetVehiclePos(vehicleid, X, Y, Z);
  3906.                             GetVehicleZAngle(vehicleid, Ang);
  3907.                             X += (2 * floatsin(-Ang, degrees));
  3908.                             Y += (2 * floatcos(-Ang, degrees));
  3909.                             SetPlayerPos(i, X, Y, Z);
  3910.                             X += (2 * floatsin(-(Ang-45.0), degrees));
  3911.                             Y += (2 * floatcos(-(Ang-45.0), degrees));
  3912.                             SetPlayerPos(i, X, Y, Z);
  3913.                             SetPlayerPos(i, X, Y, Z);
  3914.                             cbx[i] = X;
  3915.                             cby[i] = Y;
  3916.                             cbz[i] = Z;
  3917.                             cba[i] = Ang;
  3918.                             SetTimerEx("ExitCB", 500, 0, "i", i);
  3919.                             SetPlayerFacingAngle(i, Ang+90);
  3920.                             SetCameraBehindPlayer(i);
  3921.                             IsInCargoB[i] = false;
  3922.                             PlayerCargoB[i] = 0;
  3923.                             SetPlayerHealth(i, 0.0);
  3924.  
  3925.                     }
  3926.                 }
  3927.             }
  3928.         }
  3929.         IsInCargoB[killerid] = false;
  3930.         PlayerCargoB[killerid] = 0;
  3931.        
  3932.         if (GetVehicleModel(vehicleid) == 433)
  3933.         {
  3934.  
  3935.             foreach(Player, i)
  3936.             {
  3937.                     if (IsInBarracks[i] == true)
  3938.                     {
  3939.                         if (PlayerBarracks[i] == vehicleid)
  3940.                         {
  3941.  
  3942.                             Barracks[vehicleid][seats] = 0;
  3943.                             new Float:X,Float:Y,Float:Z,Float:Ang;
  3944.                             GetVehiclePos(vehicleid, X, Y, Z);
  3945.                             GetVehicleZAngle(vehicleid, Ang);
  3946.                             X += (2 * floatsin(-Ang, degrees));
  3947.                             Y += (2 * floatcos(-Ang, degrees));
  3948.                             SetPlayerPos(i, X, Y, Z);
  3949.                             X += (2 * floatsin(-(Ang-45.0), degrees));
  3950.                             Y += (2 * floatcos(-(Ang-45.0), degrees));
  3951.                             SetPlayerPos(i, X, Y, Z);
  3952.                             SetPlayerPos(i, X, Y, Z);
  3953.                             SetPlayerFacingAngle(i, Ang+90);
  3954.                             cbx[i] = X;
  3955.                             cby[i] = Y;
  3956.                             cbz[i] = Z;
  3957.                             cba[i] = Ang;
  3958.                             TogglePlayerSpectating(i, false);
  3959.                             SetTimerEx("ExitCB", 500, 0, "i", i);
  3960.                             SetCameraBehindPlayer(i);
  3961.                             IsInBarracks[i] = false;
  3962.                             PlayerBarracks[i] = 0;
  3963.                             SetPlayerHealth(i, 0.0);
  3964.                     }
  3965.                 }
  3966.             }
  3967.         }
  3968.         IsInBarracks[killerid] = false;
  3969.         PlayerBarracks[killerid] = 0;
  3970.         return 1;
  3971. }
  3972.  
  3973. public OnPlayerText(playerid, text[])
  3974. {
  3975.  
  3976.         if(Muted[playerid])
  3977.         {
  3978.             SendClientMessage(playerid,RED,"JunkBuster: You are not allowed to chat because you have been muted!");
  3979.             return 0;
  3980.         }
  3981.  
  3982.         SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 3000);
  3983.    
  3984.         new string[128];
  3985.         if(gTeam[playerid] == TEAM_USA)
  3986.         {
  3987.             if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0)
  3988.             {
  3989.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  3990.                 format(string,sizeof(string),"USA RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
  3991.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  3992.             }
  3993.             else if(GetPlayerWantedLevel(playerid) == 2)
  3994.             {
  3995.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  3996.                 format(string,sizeof(string),"USA RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
  3997.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  3998.             }
  3999.             else if(GetPlayerWantedLevel(playerid) == 3)
  4000.             {
  4001.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4002.                 format(string,sizeof(string),"USA RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
  4003.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  4004.             }
  4005.             else if(GetPlayerWantedLevel(playerid) == 4)
  4006.             {
  4007.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4008.                 format(string,sizeof(string),"USA RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
  4009.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  4010.             }
  4011.             else if(GetPlayerWantedLevel(playerid) == 5)
  4012.             {
  4013.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4014.                 format(string,sizeof(string),"USA RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
  4015.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  4016.             }
  4017.             else if(GetPlayerWantedLevel(playerid) == 6)
  4018.             {
  4019.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4020.                 format(string,sizeof(string),"USA RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
  4021.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  4022.             }
  4023.             else if(GetPlayerWantedLevel(playerid) == 7)
  4024.             {
  4025.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4026.                 format(string,sizeof(string),"USA RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
  4027.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  4028.             }
  4029.             else if(GetPlayerWantedLevel(playerid) == 8)
  4030.             {
  4031.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4032.                 format(string,sizeof(string),"USA RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
  4033.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  4034.             }
  4035.             else if(GetPlayerWantedLevel(playerid) == 9)
  4036.             {
  4037.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4038.                 format(string,sizeof(string),"USA RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
  4039.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  4040.             }
  4041.             else if(GetPlayerWantedLevel(playerid) == 10)
  4042.             {
  4043.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4044.                 format(string,sizeof(string),"USA RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
  4045.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  4046.             }
  4047.             else if(GetPlayerWantedLevel(playerid) >= 11)
  4048.             {
  4049.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4050.                 format(string,sizeof(string),"USA RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
  4051.                 SendUSAMessage(COLOR_LIGHTBLUE, string);
  4052.             }
  4053.         }
  4054.         else if(gTeam[playerid] == TEAM_GERMANY)
  4055.         {
  4056.             if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0)
  4057.             {
  4058.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4059.                 format(string,sizeof(string),"GERMANY RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
  4060.                 SendGERMANYMessage(COLOR_RED, string);
  4061.             }
  4062.             else if(GetPlayerWantedLevel(playerid) == 2)
  4063.             {
  4064.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4065.                 format(string,sizeof(string),"GERMANY RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
  4066.                 SendGERMANYMessage(COLOR_RED, string);
  4067.             }
  4068.             else if(GetPlayerWantedLevel(playerid) == 3)
  4069.             {
  4070.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4071.                 format(string,sizeof(string),"GERMANY RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
  4072.                 SendGERMANYMessage(COLOR_RED, string);
  4073.             }
  4074.             else if(GetPlayerWantedLevel(playerid) == 4)
  4075.             {
  4076.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4077.                 format(string,sizeof(string),"GERMANY RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
  4078.                 SendGERMANYMessage(COLOR_RED, string);
  4079.             }
  4080.             else if(GetPlayerWantedLevel(playerid) == 5)
  4081.             {
  4082.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4083.                 format(string,sizeof(string),"GERMANY RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
  4084.                 SendGERMANYMessage(COLOR_RED, string);
  4085.             }
  4086.             else if(GetPlayerWantedLevel(playerid) == 6)
  4087.             {
  4088.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4089.                 format(string,sizeof(string),"GERMANY RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
  4090.                 SendGERMANYMessage(COLOR_RED, string);
  4091.             }
  4092.             else if(GetPlayerWantedLevel(playerid) == 7)
  4093.             {
  4094.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4095.                 format(string,sizeof(string),"GERMANY RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
  4096.                 SendGERMANYMessage(COLOR_RED, string);
  4097.             }
  4098.             else if(GetPlayerWantedLevel(playerid) == 8)
  4099.             {
  4100.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4101.                 format(string,sizeof(string),"GERMANY RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
  4102.                 SendGERMANYMessage(COLOR_RED, string);
  4103.             }
  4104.             else if(GetPlayerWantedLevel(playerid) == 9)
  4105.             {
  4106.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4107.                 format(string,sizeof(string),"GERMANY RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
  4108.                 SendGERMANYMessage(COLOR_RED, string);
  4109.             }
  4110.             else if(GetPlayerWantedLevel(playerid) == 10)
  4111.             {
  4112.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4113.                 format(string,sizeof(string),"GERMANY RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
  4114.                 SendGERMANYMessage(COLOR_RED, string);
  4115.             }
  4116.             else if(GetPlayerWantedLevel(playerid) >= 11)
  4117.             {
  4118.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4119.                 format(string,sizeof(string),"GERMANY RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
  4120.                 SendGERMANYMessage(COLOR_RED, string);
  4121.             }
  4122.  
  4123.         }
  4124.         else if(gTeam[playerid] == TEAM_MERC)
  4125.         {
  4126.             if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0)
  4127.             {
  4128.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4129.                 format(string,sizeof(string),"MERCENARY RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
  4130.                 SendMERCMessage(COLOR_YELLOW, string);
  4131.             }
  4132.             else if(GetPlayerWantedLevel(playerid) == 2)
  4133.             {
  4134.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4135.                 format(string,sizeof(string),"MERCENARY RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
  4136.                 SendMERCMessage(COLOR_YELLOW, string);
  4137.             }
  4138.             else if(GetPlayerWantedLevel(playerid) == 3)
  4139.             {
  4140.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4141.                 format(string,sizeof(string),"MERCENARY RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
  4142.                 SendMERCMessage(COLOR_YELLOW, string);
  4143.             }
  4144.             else if(GetPlayerWantedLevel(playerid) == 4)
  4145.             {
  4146.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4147.                 format(string,sizeof(string),"MERCENARY RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
  4148.                 SendMERCMessage(COLOR_YELLOW, string);
  4149.             }
  4150.             else if(GetPlayerWantedLevel(playerid) == 5)
  4151.             {
  4152.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4153.                 format(string,sizeof(string),"MERCENARY RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
  4154.                 SendMERCMessage(COLOR_YELLOW, string);
  4155.             }
  4156.             else if(GetPlayerWantedLevel(playerid) == 6)
  4157.             {
  4158.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4159.                 format(string,sizeof(string),"MERCENARY RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
  4160.                 SendMERCMessage(COLOR_YELLOW, string);
  4161.             }
  4162.             else if(GetPlayerWantedLevel(playerid) == 7)
  4163.             {
  4164.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4165.                 format(string,sizeof(string),"MERCENARY RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
  4166.                 SendMERCMessage(COLOR_YELLOW, string);
  4167.             }
  4168.             else if(GetPlayerWantedLevel(playerid) == 8)
  4169.             {
  4170.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4171.                 format(string,sizeof(string),"MERCENARY RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
  4172.                 SendMERCMessage(COLOR_YELLOW, string);
  4173.             }
  4174.             else if(GetPlayerWantedLevel(playerid) == 9)
  4175.             {
  4176.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4177.                 format(string,sizeof(string),"MERCENARY RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
  4178.                 SendMERCMessage(COLOR_YELLOW, string);
  4179.             }
  4180.             else if(GetPlayerWantedLevel(playerid) == 10)
  4181.             {
  4182.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4183.                 format(string,sizeof(string),"MERCENARY RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
  4184.                 SendMERCMessage(COLOR_YELLOW, string);
  4185.             }
  4186.             else if(GetPlayerWantedLevel(playerid) >= 11)
  4187.             {
  4188.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4189.                 format(string,sizeof(string),"MERCENARY RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
  4190.                 SendMERCMessage(COLOR_YELLOW, string);
  4191.             }
  4192.         }
  4193.         else if(gTeam[playerid] == TEAM_RUSSIA)
  4194.         {
  4195.             if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0)
  4196.             {
  4197.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4198.                 format(string,sizeof(string),"RUSSIA RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
  4199.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4200.             }
  4201.             else if(GetPlayerWantedLevel(playerid) == 2)
  4202.             {
  4203.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4204.                 format(string,sizeof(string),"RUSSIA RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
  4205.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4206.             }
  4207.             else if(GetPlayerWantedLevel(playerid) == 3)
  4208.             {
  4209.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4210.                 format(string,sizeof(string),"RUSSIA RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
  4211.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4212.             }
  4213.             else if(GetPlayerWantedLevel(playerid) == 4)
  4214.             {
  4215.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4216.                 format(string,sizeof(string),"RUSSIA RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
  4217.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4218.             }
  4219.             else if(GetPlayerWantedLevel(playerid) == 5)
  4220.             {
  4221.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4222.                 format(string,sizeof(string),"RUSSIA RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
  4223.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4224.             }
  4225.             else if(GetPlayerWantedLevel(playerid) == 6)
  4226.             {
  4227.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4228.                 format(string,sizeof(string),"RUSSIA RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
  4229.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4230.             }
  4231.             else if(GetPlayerWantedLevel(playerid) == 7)
  4232.             {
  4233.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4234.                 format(string,sizeof(string),"RUSSIA RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
  4235.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4236.             }
  4237.             else if(GetPlayerWantedLevel(playerid) == 8)
  4238.             {
  4239.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4240.                 format(string,sizeof(string),"RUSSIA RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
  4241.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4242.             }
  4243.             else if(GetPlayerWantedLevel(playerid) == 9)
  4244.             {
  4245.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4246.                 format(string,sizeof(string),"RUSSIA RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
  4247.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4248.             }
  4249.             else if(GetPlayerWantedLevel(playerid) == 10)
  4250.             {
  4251.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4252.                 format(string,sizeof(string),"RUSSIA RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
  4253.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4254.             }
  4255.             else if(GetPlayerWantedLevel(playerid) >= 11)
  4256.             {
  4257.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4258.                 format(string,sizeof(string),"RUSSIA RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
  4259.                 SendRUSSIAMessage(COLOR_ORANGE, string);
  4260.             }
  4261.         }
  4262.         else if(gTeam[playerid] == TEAM_JAPAN)
  4263.         {
  4264.             if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0)
  4265.             {
  4266.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4267.                 format(string,sizeof(string),"JAPAN RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
  4268.                 SendJAPANMessage(COLOR_WHITE, string);
  4269.             }
  4270.             else if(GetPlayerWantedLevel(playerid) == 2)
  4271.             {
  4272.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4273.                 format(string,sizeof(string),"JAPAN RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
  4274.                 SendJAPANMessage(COLOR_WHITE, string);
  4275.             }
  4276.             else if(GetPlayerWantedLevel(playerid) == 3)
  4277.             {
  4278.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4279.                 format(string,sizeof(string),"JAPAN RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
  4280.                 SendJAPANMessage(COLOR_WHITE, string);
  4281.             }
  4282.             else if(GetPlayerWantedLevel(playerid) == 4)
  4283.             {
  4284.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4285.                 format(string,sizeof(string),"JAPAN RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
  4286.                 SendJAPANMessage(COLOR_WHITE, string);
  4287.             }
  4288.             else if(GetPlayerWantedLevel(playerid) == 5)
  4289.             {
  4290.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4291.                 format(string,sizeof(string),"JAPAN RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
  4292.                 SendJAPANMessage(COLOR_WHITE, string);
  4293.             }
  4294.             else if(GetPlayerWantedLevel(playerid) == 6)
  4295.             {
  4296.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4297.                 format(string,sizeof(string),"JAPAN RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
  4298.                 SendJAPANMessage(COLOR_WHITE, string);
  4299.             }
  4300.             else if(GetPlayerWantedLevel(playerid) == 7)
  4301.             {
  4302.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4303.                 format(string,sizeof(string),"JAPAN RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
  4304.                 SendJAPANMessage(COLOR_WHITE, string);
  4305.             }
  4306.             else if(GetPlayerWantedLevel(playerid) == 8)
  4307.             {
  4308.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4309.                 format(string,sizeof(string),"JAPAN RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
  4310.                 SendJAPANMessage(COLOR_WHITE, string);
  4311.             }
  4312.             else if(GetPlayerWantedLevel(playerid) == 9)
  4313.             {
  4314.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4315.                 format(string,sizeof(string),"JAPAN RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
  4316.                 SendJAPANMessage(COLOR_WHITE, string);
  4317.             }
  4318.             else if(GetPlayerWantedLevel(playerid) == 10)
  4319.             {
  4320.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4321.                 format(string,sizeof(string),"JAPAN RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
  4322.                 SendJAPANMessage(COLOR_WHITE, string);
  4323.             }
  4324.             else if(GetPlayerWantedLevel(playerid) >= 11)
  4325.             {
  4326.                 GetPlayerName(playerid,nameee,sizeof(nameee));
  4327.                 format(string,sizeof(string),"JAPAN RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
  4328.                 SendJAPANMessage(COLOR_WHITE, string);
  4329.             }
  4330.         }
  4331.    
  4332.         if(mute[playerid] == 1) return 0;
  4333.         return 0;
  4334. }
  4335.  
  4336. public OnPlayerCommandText(playerid, cmdtext[])
  4337. {
  4338.     new cmd[256];
  4339.     new idx;
  4340.     new tmp[256];
  4341.    
  4342.     new sendername[16];
  4343.     new giveplayerid, giveplayer[16];
  4344.  
  4345.     cmd = strtok(cmdtext, idx);
  4346.  
  4347.     if (strcmp("/kill", cmdtext, true) == 0)
  4348.     {
  4349.         SetPlayerHealth(playerid, 0.0);
  4350.         return 1;
  4351.     }
  4352.    
  4353.     /*
  4354.     if(strcmp(cmd, "/mailinglist", true) == 0)
  4355.     {
  4356.         tmp = strtok(cmdtext, idx);
  4357.         if(!strlen(tmp))
  4358.         {
  4359.             SendClientMessage(playerid, COLOR_RED, "USAGE: /mailinglist [email]");
  4360.             return 1;
  4361.         }
  4362.        
  4363.         if(strcmp(tmp, "@", true, 24) != 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Email invalid!");
  4364.         if(strcmp(tmp, ".", true, 24) != 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Email invalid!");
  4365.  
  4366.  
  4367.         new mailers;
  4368.         mailers = dini_Int("mailers.cfg", "Mailers");
  4369.         mailers++;
  4370.         dini_IntSet("mailers.cfg", "Mailers", mailers);
  4371.  
  4372.         new entry[128];
  4373.         format(entry, sizeof(entry), "%s\n", strval(tmp));
  4374.         new File:hFile;
  4375.         hFile = fopen("mailinglist.cfg", io_append);
  4376.         if (hFile)
  4377.         {
  4378.             fwrite(hFile, entry);
  4379.             fclose(hFile);
  4380.         }
  4381.         return 1;
  4382.     }
  4383.     */
  4384.    
  4385.     if(strcmp("/donationpackage", cmdtext, true) == 0)
  4386.     {
  4387.         SendClientMessage(playerid, COLOR_GREEN, "All donaters above $5.00 will recieve:");
  4388.         SendClientMessage(playerid, COLOR_GREEN, "Armour On Spawn | Rank 6 | 100 Score | VIP Global Chat");
  4389.         SendClientMessage(playerid, COLOR_GREEN, "To donate please go to www.cod5server.co.cc and click the paypal donate button!");
  4390.         return 1;
  4391.     }
  4392.    
  4393.     if( strcmp(cmd, "/vc", true)==0)
  4394.     {
  4395.         tmp = strtok(cmdtext, idx);
  4396.         if( strlen(tmp) == 0 ) return SendClientMessage(playerid, COLOR_RED, "USE: /vc [text]");
  4397.         if( !IsPlayerInAnyVehicle(playerid) ) return SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle!");
  4398.         new str[100];
  4399.         GetPlayerName(playerid, nameee, 16);
  4400.         format(str, 100, "VehicleRadio [%i]%s:%s", playerid, nameee, cmdtext[4]);
  4401.         new veh = GetPlayerVehicleID(playerid);
  4402.         foreach(Player, i)
  4403.         {
  4404.             if( IsPlayerInVehicle(i, veh) )
  4405.             {
  4406.                 SendClientMessage(i, COLOR_LIGHTGREEN, str);
  4407.             }
  4408.         }
  4409.         return 1;
  4410.     }
  4411.    
  4412.     /*if( strcmp(cmd, "/f", true)==0)
  4413.     {
  4414.         tmp = strtok(cmdtext, idx);
  4415.         if( strlen(tmp) == 0 ) return SendClientMessage(playerid, COLOR_RED, "USE: /f [text]");
  4416.         if( playerTeam[playerid] > 0 )return SendClientMessage(playerid, COLOR_RED, "You aren't in a fTeam!");
  4417.         new str[100];
  4418.         GetPlayerName(playerid, nameee, 16);
  4419.         format(str, 100, "FTeam Radio [%i]%s:%s", playerid, nameee, cmdtext[3]);
  4420.         for(new i=0; i<GetMaxPlayers(); i++)
  4421.         {
  4422.             if( IsPlayerConnected(i) )
  4423.             {
  4424.                 if( playerTeam[playerid] == playerTeam[i] )
  4425.                 {
  4426.                     SendClientMessage(i, COLOR_TAN , str);
  4427.                 }
  4428.             }
  4429.         }
  4430.         return 1;
  4431.     }
  4432.     */
  4433.    
  4434.    
  4435.     if( strcmp("/paradrop", cmdtext, true) == 0)
  4436.     {
  4437.         new vehicleid = GetPlayerVehicleID(playerid);
  4438.         if( IsPlayerInAnyVehicle(playerid) )
  4439.         {
  4440.             if( IsPlayerInFlying(playerid, GetPlayerVehicleID(playerid)) )
  4441.             {
  4442.                 if( GetPlayerVehicleSeat(playerid) == 0 )
  4443.                 {
  4444.                     new Float:X, Float:Y, Float:Z;
  4445.                     new Float:Ang;
  4446.                     GetPlayerPos(playerid, X, Y, Z);
  4447.                     if( Z >= 150.0 )
  4448.                     {
  4449.                         foreach(Player, i)
  4450.                         {
  4451.                             print("something wrong at connect");
  4452.                             if(  i != playerid )
  4453.                             {
  4454.                                 print("something wrong at connect");
  4455.                                 if( CargoBobUser[i][GetPlayerVehicleID(playerid)] ==1 )
  4456.                                 {
  4457.                                     print("cargobobuser !");
  4458.                                     if( IsInCargoB[i] == true)
  4459.                                     {
  4460.                                         print("IsinCargo");
  4461.                                         print("GET HIM OUT!");
  4462.  
  4463.                                         LastVehicle[i] = PlayerCargoB[i];
  4464.                                         CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] - 1;
  4465.                                         GetPlayerPos(playerid, X, Y, Z);
  4466.                                         GetPlayerFacingAngle(playerid, Ang);
  4467.                                         TogglePlayerSpectating(i, false);
  4468.                                         X += (2 * floatsin(-Ang, degrees));
  4469.                                         Y += (2 * floatcos(-Ang, degrees));
  4470.                                         SetPlayerPos(i, X, Y, Z);
  4471.                                         X += (2 * floatsin(-(Ang-45.0), degrees));
  4472.                                         Y += (2 * floatcos(-(Ang-45.0), degrees));
  4473.                                         SetPlayerPos(i, X, Y, Z);
  4474.                                         SetPlayerFacingAngle(i, Ang);
  4475.                                         cbx[i] = X;
  4476.                                         cby[i] = Y-2;
  4477.                                         cbz[i] = Z;
  4478.                                         cba[i] = Ang;
  4479.                                         SetTimerEx("ExitCB", 500, 0, "i", i);
  4480.                                                
  4481.                                         SetPlayerFacingAngle(i, Ang);
  4482.                                         GivePlayerWeapon(playerid, 46, 1);
  4483.                                         IsInCargoB[i] = false;
  4484.                                         PlayerCargoB[i] = 0;
  4485.                                         GivePlayerWeapon(i, 46, 1);
  4486.                                         SendClientMessage(i, COLOR_ORANGE, "The driver started a paradrop !");
  4487.                                     }
  4488.                                 }
  4489.                             }
  4490.                             else
  4491.                             {
  4492.                                 if( GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid) )
  4493.                                 {
  4494.                                     RemovePlayerFromVehicle(i);
  4495.                                     GivePlayerWeapon(i, 46, 1);
  4496.                                     SendClientMessage(i, COLOR_ORANGE, "The driver started a paradrop !");
  4497.                                 }
  4498.                                 SetTimerEx("ParaExit", 1000, 0, "i", playerid);
  4499.                             }
  4500.                         }
  4501.                     }else SendClientMessage(playerid, COLOR_RED, "You need to be really High to do this !");
  4502.                 }else SendClientMessage(playerid, COLOR_RED,"You need to drive this vehicle to start a paradrop !");
  4503.             }
  4504.         }
  4505.         return 1;
  4506.     }
  4507.    
  4508.     /*if(strcmp(cmd, "/bunker", true) == 0)
  4509.     {
  4510.         new paramid;
  4511.        
  4512.         tmp = strtok(cmdtext, idx);
  4513.  
  4514.         if(!strlen(tmp))
  4515.         {
  4516.             SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bunker [storegun/takegun/upgrade]");
  4517.             return 1;
  4518.         }
  4519.        
  4520.         if(strcmp(tmp, "storegun", true) == 0) paramid = 1;
  4521.         if(strcmp(tmp, "takegun", true) == 0) paramid = 2;
  4522.         if(strcmp(tmp, "upgrade", true) == 0) paramid = 3;
  4523.        
  4524.         return 1;
  4525.     }
  4526.     */
  4527.  
  4528.     if(strcmp(cmd, "/fteadasdasdasdasdam",true)==0) // leave it like tis, its buggy atm
  4529.     {
  4530.         new teamcmd, teamnum;
  4531.         tmp = strtok(cmdtext, idx);
  4532.  
  4533.         if(!strlen(tmp))
  4534.         {
  4535.             SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [create/join/quit] [name/number]");
  4536.             return 1;
  4537.         }
  4538.         giveplayerid = strval(tmp);
  4539.  
  4540.         if(strcmp(tmp, "create",true)==0)
  4541.             teamcmd = 1;
  4542.         else if(strcmp(tmp, "join",true)==0)
  4543.             teamcmd = 2;
  4544.         else if(strcmp(tmp, "invite",true)==0)
  4545.             teamcmd = 3;
  4546.         else if(strcmp(tmp, "quit",true)==0)
  4547.             teamcmd = 4;
  4548.  
  4549.         tmp = strtok(cmdtext, idx);
  4550.         if(teamcmd < 4 && !strlen(tmp)) {
  4551.             if(teamcmd==0)
  4552.                 SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [create/join/invite/quit] [name/number]");
  4553.             else if(teamcmd==1)
  4554.                 SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [create] [name]");
  4555.             else if(teamcmd==2)
  4556.                 SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [join] [number]");
  4557.             else if(teamcmd==3)
  4558.                 SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [invite] [playerID]");
  4559.             return 1;
  4560.         }
  4561.  
  4562.         //Create Gang//
  4563.         new string[128];
  4564.         if(teamcmd==1) {
  4565.             if(playerTeam[playerid]>0) {
  4566.                 SendClientMessage(playerid, COLOR_RED, "You are already in a fireteam!");
  4567.                 return 1;
  4568.             }
  4569.  
  4570.             for(new i = 1; i < MAX_TEAMS; i++) {
  4571.                 if(teamInfo[i][0]==0) {
  4572.                     //name team
  4573.                     format(teamNames[i], MAX_TEAM_NAME, "%s", tmp);
  4574.                     //Team exists
  4575.                     teamInfo[i][0]=1;
  4576.                     //There is one member
  4577.                     teamInfo[i][1]=1;
  4578.                     //Team color is player's color
  4579.                     teamInfo[i][2]=playerColors[playerid];
  4580.  
  4581.                     //Player is the first team member
  4582.                     teamMembers[i][0] = playerid;
  4583.                     format(string, sizeof(string),"You have created the fireteam '%s' (id: %d)", teamNames[i], i);
  4584.                     SendClientMessage(playerid, COLOR_GREEN, string);
  4585.  
  4586.                     playerTeam[playerid]=i;
  4587.  
  4588.                     return 1;
  4589.                 }
  4590.             }
  4591.  
  4592.             return 1;
  4593.  
  4594.             //Join Gang//
  4595.         } else if (teamcmd==2) {
  4596.             teamnum = strval(tmp);
  4597.  
  4598.             if(playerTeam[playerid]>0)
  4599.             {
  4600.                 SendClientMessage(playerid, COLOR_RED, "You are already in a fireteam!");
  4601.                 return 1;
  4602.             }
  4603.            
  4604.             if(gTeam[teamMembers[teamnum][0]] != gTeam[playerid] )
  4605.             {
  4606.                 SendClientMessage(playerid, COLOR_RED, "You need to be in the same fireteam with the leader !");
  4607.                 SendClientMessage(playerid, COLOR_RED, "Eg. : USA, Germany, Russia, Japan, Mercenaries !");
  4608.                 return 1;
  4609.             }
  4610.            
  4611.             if(teamInfo[teamnum][0]==0)
  4612.             {
  4613.                 SendClientMessage(playerid, COLOR_RED, "No such fireteam exists!");
  4614.                 return 1;
  4615.             }
  4616.             if(teamInvite[playerid]!=teamnum)
  4617.             {
  4618.                 SendClientMessage(playerid, COLOR_RED, "You need to be invited to the fireteam to join.");
  4619.                 return 1;
  4620.             }
  4621.  
  4622.             for(new i = 0; i < MAX_TEAM_MEMBERS; i++)
  4623.             {
  4624.                 if(teamMembers[teamnum][i] > 0 )
  4625.                 {
  4626.  
  4627.                     if(teamInfo[teamnum][1] < MAX_TEAM_MEMBERS)
  4628.                     {
  4629.  
  4630.                         teamMembers[teamnum][i] = playerid;
  4631.  
  4632.                         GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
  4633.                         for(new j = 0; j < teamInfo[teamnum][1]; j++)
  4634.                         {
  4635.  
  4636.                             format(string, sizeof(string),"%s has joined your fireteam.", sendername);
  4637.                             SendClientMessage(teamMembers[teamnum][j], COLOR_ORANGE, string);
  4638.                         }
  4639.  
  4640.                         teamInfo[teamnum][1]++;
  4641.                         playerTeam[playerid] = teamnum;
  4642.  
  4643.  
  4644.  
  4645.                         format(string, sizeof(string),"You have joined the fireteam '%s' (id: %d)", teamNames[teamnum], teamnum);
  4646.                         SendClientMessage(playerid, COLOR_GREEN, string);
  4647.  
  4648.                     }else SendClientMessage(playerid, COLOR_RED, "That fireteam is full.");
  4649.                 }
  4650.             }
  4651.             return 1;
  4652.  
  4653.             //Invite to Gang//
  4654.         } else if (teamcmd==3)
  4655.         {
  4656.             giveplayerid = strval(tmp);
  4657.  
  4658.             if(playerTeam[playerid]==0)
  4659.             {
  4660.                 SendClientMessage(playerid, COLOR_RED, "You are not in a fireteam!");
  4661.                 return 1;
  4662.             }
  4663.             if(teamMembers[playerTeam[playerid]][0]!=playerid)
  4664.             {
  4665.                 SendClientMessage(playerid, COLOR_RED, "You need to be the fireteam leader to send an invite.");
  4666.                 return 1;
  4667.             }
  4668.             if( gTeam[giveplayerid] != gTeam[playerid] )
  4669.             {
  4670.                 SendClientMessage(playerid,COLOR_RED, "He needs to be in the same fireteam with you ! Eg: Japan");
  4671.                 return 1;
  4672.             }
  4673.  
  4674.             if(IsPlayerConnected(giveplayerid))
  4675.             {
  4676.                 GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  4677.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  4678.  
  4679.                 format(string, sizeof(string),"You have sent a fireteam invite to %s.", giveplayer);
  4680.                 SendClientMessage(playerid, COLOR_GREEN, string);
  4681.                 format(string, sizeof(string),"You have recieved a fireteam invite from %s to '%s' (id: %d)", sendername, teamNames[playerTeam[playerid]],playerTeam[playerid]);
  4682.                 SendClientMessage(giveplayerid, COLOR_GREEN, string);
  4683.  
  4684.                 teamInvite[giveplayerid]=playerTeam[playerid];
  4685.  
  4686.             } else SendClientMessage(playerid, COLOR_RED, "No such player exists!");
  4687.  
  4688.             //Leave Gang//
  4689.         } else if (teamcmd==4)
  4690.         {
  4691.             PlayerLeaveGang(playerid);
  4692.         }
  4693.  
  4694.         return 1;
  4695.     }
  4696.  
  4697.     //------------------- /teaminfo
  4698. /*
  4699.     if(strcmp(cmdtext, "/fteaminfo",true)==0) {
  4700.         new string[100];
  4701.         new teamnum;
  4702.         tmp = strtok(cmdtext, idx);
  4703.  
  4704.         if(!strlen(tmp) && playerTeam[playerid]==0) {
  4705.             SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteaminfo [number]");
  4706.             return 1;
  4707.         } else if (!strlen(tmp))
  4708.         teamnum = playerTeam[playerid];
  4709.         else
  4710.         teamnum = strval(tmp);
  4711.  
  4712.         if(teamInfo[teamnum][0]==0) {
  4713.             SendClientMessage(playerid, COLOR_RED, "No such fireteam exists!");
  4714.             return 1;
  4715.         }
  4716.        
  4717.         if( gTeam[teamMembers[teamnum][0]] != gTeam[playerid] )
  4718.         {
  4719.             SendClientMessage(playerid, COLOR_RED, "You can't see info about an enemy fireteam !");
  4720.             return 1;
  4721.         }
  4722.  
  4723.         format(string, sizeof(string),"'%s' FireTeam Members (id: %d)", teamNames[teamnum], teamnum);
  4724.         SendClientMessage(playerid, COLOR_GREEN, string);
  4725.  
  4726.         for(new i = 0; i < teamInfo[teamnum][1]; i++) {
  4727.             GetPlayerName(teamMembers[teamnum][i], giveplayer, sizeof(giveplayer));
  4728.             format(string, sizeof(string),"%s (%d)", giveplayer, teamMembers[teamnum][i]);
  4729.             SendClientMessage(playerid, COLOR_YELLOW, string);
  4730.         }
  4731.  
  4732.         return 1;
  4733.     }
  4734.  
  4735.     //------------------- /teams
  4736.  
  4737.     if(strcmp(cmdtext, "/fteams",true)==0)
  4738.     {
  4739.         new x;
  4740.         new string[100];
  4741.  
  4742.         SendClientMessage(playerid, COLOR_GREEN, "Current FireTeams:");
  4743.         for(new i=0; i < MAX_TEAMS; i++)
  4744.         {
  4745.             if( gTeam[teamMembers[i][0]] == gTeam[playerid])
  4746.             {
  4747.                 if(teamInfo[i][0]==1)
  4748.                 {
  4749.  
  4750.                     format(string, sizeof(string), "%s%s(%d) - %d members", string,teamNames[i],i,teamInfo[i][1]);
  4751.  
  4752.                     x++;
  4753.                     if(x > 2)
  4754.                     {
  4755.                         SendClientMessage(playerid, COLOR_YELLOW, string);
  4756.                         x = 0;
  4757.                         format(string, sizeof(string), "");
  4758.                     } else
  4759.                     {
  4760.                         format(string, sizeof(string), "%s, ", string);
  4761.                     }
  4762.                 }
  4763.             }
  4764.         }
  4765.  
  4766.         if(x <= 2 && x > 0) {
  4767.             string[strlen(string)-2] = '.';
  4768.             SendClientMessage(playerid, COLOR_YELLOW, string);
  4769.         }
  4770.  
  4771.         return 1;
  4772.     }
  4773. */
  4774.    
  4775.     if(strcmp(cmd,"/giverank",true) == 0)
  4776.     {
  4777.         new string[100];
  4778.        
  4779.         GetPlayerName(playerid, sendername, sizeof(sendername));
  4780.         new rnk;
  4781.         GetPlayerName(playerid, sendername, sizeof(sendername));
  4782.         GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
  4783.         tmp = strtok(cmdtext, idx);
  4784.         if(!strlen(tmp))
  4785.         {
  4786.             SendClientMessage(playerid,COLOR_WHITE,"Correct Usage: /giverank [id] [rank]");
  4787.             return 1;
  4788.         }
  4789.         giveplayerid = strval(tmp);
  4790.         tmp = strtok(cmdtext, idx);
  4791.         if(!strlen(tmp))
  4792.         {
  4793.             SendClientMessage(playerid,COLOR_WHITE,"Correct Usage: /giverank [id] [rank]");
  4794.             return 1;
  4795.         }
  4796.         if(rnk < 0 || rnk > 11 )
  4797.         {
  4798.             SendClientMessage(playerid, COLOR_RED, "Rank has to be between 0 and 11" );
  4799.             return 1;
  4800.         }
  4801.        
  4802.         rnk = strval(tmp);
  4803.         if(logged[playerid] == 1)
  4804.         {
  4805.             if(adminlevel[playerid] > 2 )
  4806.             {
  4807.                 if(IsPlayerConnected(giveplayerid))
  4808.                 {
  4809.                     new name1[30];
  4810.                     new name2[30];
  4811.                     new fs[100];
  4812.                     new fs2[100];
  4813.                     GetPlayerName(playerid, name1, 30);
  4814.                     GetPlayerName(giveplayerid, name2, 30);
  4815.                     if( rnk >= 0 && rnk < 12 )
  4816.                     {
  4817.                         rank[giveplayerid] = rnk;
  4818.                         SetPlayerRankStars(giveplayerid);
  4819.                         format(fs, 100, "You have gave %s , Rank %i !", name2, rnk);
  4820.                         SendClientMessage(playerid, COLOR_GREEN, fs);
  4821.                         format(fs2, 100, "You have recieved Rank %i from Administrator %s !", rnk,name1);
  4822.                         SendClientMessage(giveplayerid, COLOR_GREEN, fs2);
  4823.                         printf("Administrator: %s gave %s rank %i !", name1, name2, rnk);
  4824.  
  4825.                     }else
  4826.                     SendClientMessage(playerid, COLOR_RED, "Invalid Rank ! Rank must be between 0 and 11 (including 0 and 11) .");
  4827.                 }
  4828.                 else
  4829.                 {
  4830.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  4831.                     SendClientMessage(playerid, COLOR_RED, string);
  4832.                 }
  4833.             }
  4834.             else
  4835.             {
  4836.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  4837.             }
  4838.         }
  4839.         else
  4840.         {
  4841.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  4842.         }
  4843.         return 1;
  4844.     }
  4845.  
  4846.     if (strcmp("/help", cmdtext, true) == 0)
  4847.     {
  4848.         if(gTeam[playerid] == TEAM_USA)
  4849.         {
  4850.             SendClientMessage(playerid, COLOR_WHITE, "<> For General Help Type /genhelp");
  4851.             SendClientMessage(playerid, COLOR_WHITE, "<> Go to all of the green areas to take them over!");
  4852.             SendClientMessage(playerid, COLOR_WHITE, "<> Go to GERMANYS base and plant a bomb!");
  4853.             SendClientMessage(playerid, COLOR_WHITE, "<> Kill all GERMANS!");
  4854.             }
  4855.         else if(gTeam[playerid] == TEAM_GERMANY)
  4856.         {
  4857.             SendClientMessage(playerid, COLOR_WHITE, "<> For General Help Type /genhelp");
  4858.             SendClientMessage(playerid, COLOR_WHITE, "<> Go to all of the green areas to take them over!");
  4859.             SendClientMessage(playerid, COLOR_WHITE, "<> Go to the USA base and plant a bomb!");
  4860.             SendClientMessage(playerid, COLOR_WHITE, "<> Kill all AMERICANS!");
  4861.             }
  4862.            
  4863.         else if(gTeam[playerid] == TEAM_MERC)
  4864.         {
  4865.             SendClientMessage(playerid, COLOR_WHITE, "<> For General Help Type /genhelp");
  4866.             SendClientMessage(playerid, COLOR_WHITE, "<> You are a mercenary, rather than taking of areas you kill people for money.");
  4867.             SendClientMessage(playerid, COLOR_WHITE, "<> You can use that money to buy weapons, bombs, and more at the computer");
  4868.             }
  4869.         return 1;
  4870.     }
  4871.    
  4872.     new pMessage[256];
  4873.     new gMessage[256];
  4874.     new pName[MAX_PLAYER_NAME+1];
  4875.     new iName[MAX_PLAYER_NAME+1];
  4876.  
  4877.     // PM Command
  4878.     if(strcmp("/pm", cmd, true) == 0)
  4879.     {
  4880.         tmp = strtok(cmdtext,idx);
  4881.  
  4882.         if(!strlen(tmp) || strlen(tmp) > 5) {
  4883.             SendClientMessage(playerid,YELLOW,"Usage: /pm (id) (message)");
  4884.             return 1;
  4885.         }
  4886.  
  4887.         new id = strval(tmp);
  4888.         gMessage = strrest(cmdtext,idx);
  4889.  
  4890.         if(!strlen(gMessage)) {
  4891.             SendClientMessage(playerid,YELLOW,"Usage: /pm (id) (message)");
  4892.             return 1;
  4893.         }
  4894.  
  4895.         if(!IsPlayerConnected(id)) {
  4896.             SendClientMessage(playerid,YELLOW,"/pm : Bad player ID");
  4897.             return 1;
  4898.         }
  4899.  
  4900.         if(playerid != id) {
  4901.             GetPlayerName(id,iName,sizeof(iName));
  4902.             GetPlayerName(playerid,pName,sizeof(pName));
  4903.             format(pMessage,sizeof(pMessage),"<Private Message to %s(%d): %s",iName,id,gMessage);
  4904.             SendClientMessage(playerid,YELLOW,pMessage);
  4905.             format(pMessage,sizeof(pMessage),">Private Message from %s(%d): %s",pName,playerid,gMessage);
  4906.             SendClientMessage(id,YELLOW,pMessage);
  4907.             printf(pMessage);
  4908.             PlayerPlaySound(id,1085,0.0,0.0,0.0);
  4909.             printf("PM: %s",pMessage);
  4910.  
  4911.         }
  4912.         else {
  4913.             SendClientMessage(playerid,YELLOW,"You cannot PM yourself");
  4914.         }
  4915.         return 1;
  4916.     }
  4917.  
  4918.     new string[128];
  4919.     if(strcmp(cmd, "/gvip", true) == 0)
  4920.     {
  4921.         for(new i=0; i<256; i++)
  4922.         {
  4923.             if(i>=3)
  4924.             {
  4925.                 new ChatVip[MAX_PLAYERS];
  4926.                 ChatVip[playerid] = dini_Int(udb_encode(playername), "ChatVip");
  4927.                 if(ChatVip[playerid] == 1)
  4928.                 {
  4929.                     if( gTeam[playerid] == TEAM_JAPAN )
  4930.                     {
  4931.                         GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4932.                     }
  4933.                     if( gTeam[playerid] == TEAM_RUSSIA )
  4934.                     {
  4935.                         GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4936.                     }
  4937.                     if( gTeam[playerid] == TEAM_MERC )
  4938.                     {
  4939.                         GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4940.                     }
  4941.                     if( gTeam[playerid] == TEAM_USA )
  4942.                     {
  4943.                         GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4944.                     }
  4945.                     if( gTeam[playerid] == TEAM_GERMANY )
  4946.                     {
  4947.                         GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4948.                     }
  4949.                     return 1;
  4950.                 }
  4951.             }
  4952.         }
  4953.         return 1;
  4954.     }
  4955.  
  4956.     if(strcmp(cmd, "/global", true) == 0 || strcmp(cmd, "/g", true) == 0)
  4957.     {
  4958.         for(new i=0; i<256; i++)
  4959.         {
  4960.             if( i>=3)
  4961.             {
  4962.                 if( strfind(cmdtext[i], "hack", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
  4963.                 if( strfind(cmdtext[i], "hacks", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
  4964.                 if( strfind(cmdtext[i], "hacker", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
  4965.                 if( strfind(cmdtext[i], "hackz", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
  4966.                 if( strfind(cmdtext[i], "hax", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
  4967.             }
  4968.         }
  4969.         if( gTeam[playerid] == TEAM_JAPAN )
  4970.         {
  4971.             GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4972.             printf("Global Chat: %s: %s", nameee, cmdtext[3]);
  4973.         }
  4974.         if( gTeam[playerid] == TEAM_RUSSIA )
  4975.         {
  4976.             GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4977.             printf("Global Chat: %s: %s", nameee, cmdtext[3]);
  4978.         }
  4979.         if( gTeam[playerid] == TEAM_MERC )
  4980.         {
  4981.             GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4982.             printf("Global Chat: %s: %s", nameee, cmdtext[3]);
  4983.         }
  4984.         if( gTeam[playerid] == TEAM_USA )
  4985.         {
  4986.             GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4987.             printf("Global Chat: %s: %s", nameee, cmdtext[3]);
  4988.         }
  4989.         if( gTeam[playerid] == TEAM_GERMANY )
  4990.         {
  4991.             GetPlayerName(playerid,nameee,sizeof(nameee));  format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
  4992.             printf("Global Chat: %s: %s", nameee, cmdtext[3]);
  4993.         }
  4994.         return 1;
  4995.     }
  4996.  
  4997. //==============================================================================
  4998.  
  4999.     if(strcmp(cmdtext, "/rules", true) == 0)
  5000.     {
  5001.         SendClientMessage(playerid, COLOR_RED,"                     ******RULES******");
  5002.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> Do Not Ask For Admin. We Will Come For You!");
  5003.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> Do Not Use Hacks/Cheats or Ban");
  5004.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> Respect The Admins");
  5005.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> DO NOT TEAM KILL!");
  5006.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> Respect Rules or KICK / BAN");
  5007.         return 1;
  5008.     }
  5009.    
  5010.     if(!strcmp("/gmv", cmdtext) && IsPlayerInAnyVehicle(playerid))
  5011.     {
  5012.         new Float:Velocity[3], output[80];
  5013.         GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
  5014.         format(output, sizeof(output), "You are going at a velocity of X%f, Y%f, Z%f", Velocity[0], Velocity[1], Velocity[2]);
  5015.         SendClientMessage(playerid, 0xFFFFFFFF, output);
  5016.         return 1;
  5017.     }
  5018.    
  5019.     /*if(strcmp(cmdtext, "/givememinigun", true, 15) == 0)
  5020.     {
  5021.         GivePlayerWeapon(playerid, 38, 500);
  5022.         return 1;
  5023.     }*/
  5024.    
  5025.     if (strcmp("/genhelp", cmdtext, true) == 0)
  5026.     {
  5027.         SendClientMessage(playerid, COLOR_CON_GREEN, " *****TERRITORY*****");
  5028.         SendClientMessage(playerid, COLOR_WHITE, "**GREEN Area = Unoccupied Territory");
  5029.         SendClientMessage(playerid, COLOR_WHITE, "**BLUE Area = USA Territory");
  5030.         SendClientMessage(playerid, COLOR_WHITE, "**RED Area = GERMAN Territory");
  5031.         SendClientMessage(playerid, COLOR_CON_GREEN, " *****RANKS*****");
  5032.         SendClientMessage(playerid, COLOR_WHITE, "To see all the avaible ranks type /ranks");
  5033.         return 1;
  5034.     }
  5035.    
  5036.     if (strcmp("/ranks", cmdtext, true) == 0)
  5037.     {
  5038.         SendClientMessage(playerid, COLOR_CON_GREEN, " *****RANKS*****");
  5039.         SendClientMessage(playerid, COLOR_WHITE, "*Private - 50 score");
  5040.         SendClientMessage(playerid, COLOR_WHITE, "**Corporal - 100 score");
  5041.         SendClientMessage(playerid, COLOR_WHITE, "***Sergeant - 250 score");
  5042.         SendClientMessage(playerid, COLOR_WHITE, "****Lieutenant - 500 score");
  5043.         SendClientMessage(playerid, COLOR_WHITE, "*****Captain - 750 score");
  5044.         SendClientMessage(playerid, COLOR_WHITE, "******Major - 1000 score");
  5045.         SendClientMessage(playerid, COLOR_WHITE, "*******Colonel - 1250 score");
  5046.         SendClientMessage(playerid, COLOR_WHITE, "********Lieutenant General - 1500 score");
  5047.         SendClientMessage(playerid, COLOR_WHITE, "*********Major General - 2000 score");
  5048.         SendClientMessage(playerid, COLOR_WHITE, "**********General - 2250 score");
  5049.         SendClientMessage(playerid, COLOR_WHITE, "***********General of The Army - 4500 score");
  5050.         return 1;
  5051.     }
  5052.  
  5053.     if(strcmp(cmdtext, "/commands", true) == 0)
  5054.     {
  5055.         SendClientMessage(playerid, COLOR_RED,"                   ******COMMANDS******");
  5056.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /rules | /commands | /credits | /help | /genhelp | /ranks");
  5057.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /givegun | /start | /stop | /switchspawn | /spray |");
  5058.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /switchteam | /switchclass | /stats | /nuke | /heal | /team");
  5059.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /kill | /ranks | /ahelp | /plant | /tplant | /exit | /buy | /g [text] |");
  5060.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /repair | /usecomputer | /leavecomputer | /buyguns | /rdispenser |");
  5061.         SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /buyrepairkit | /gps | /buybombs | /contract | /dispenser |");
  5062.         return 1;
  5063.     }
  5064.  
  5065.         //============GiveGun===========================================================
  5066.     if(strcmp(cmd, "/givegun", true) == 0)
  5067.     {
  5068.         new weaponname[65], player2name[MAX_PLAYER_NAME];
  5069.         new playermsg[128], player2msg[128];
  5070.                
  5071.         tmp = strtok(cmdtext, idx);
  5072.  
  5073.         if(!strlen(tmp)) {
  5074.             SendClientMessage(playerid, COLOR_RED, "Usage: /givegun [playerid]");
  5075.             return 1;
  5076.         }
  5077.         new player2id = strval(tmp);
  5078.  
  5079.         if(IsPlayerConnected(player2id))
  5080.         {
  5081.             if(player2id==playerid)
  5082.             {
  5083.                 SendClientMessage(playerid, COLOR_RED, "Invalid ID");
  5084.                 return 1;
  5085.             }
  5086.             else
  5087.             {
  5088.                 new weaponid = GetPlayerWeapon(playerid);
  5089.                 new weaponammo;
  5090.                 if(weaponid == 0)
  5091.                 {
  5092.                     SendClientMessage(playerid, COLOR_RED, "You're not holding a weapon");
  5093.                     return 1;
  5094.                 }
  5095.                 else
  5096.                 {
  5097.                     new weapo[13][2];
  5098.                     for(new i;i<13;i++)
  5099.                     {
  5100.                         GetPlayerWeaponData(playerid, i, weapo[i][0], weapo[i][1]);
  5101.                         if(weapo[i][0]==weaponid) weaponammo=weapo[i][1];
  5102.                     }
  5103.                    
  5104.                     new Float:gX, Float:gY, Float:gZ;
  5105.                     GetPlayerPos(player2id, gX, gY, gZ);
  5106.                     if( !IsPlayerInRangeOfPoint(playerid, 5.0, gX, gY, gZ) )
  5107.                     {
  5108.                         SendClientMessage(playerid, COLOR_RED, "Player has to be near you!");
  5109.                         return 1;
  5110.                     }
  5111.                     ResetPlayerWeapons(playerid);
  5112.                     for(new i;i<13;i++) if(weapo[i][0]!=weaponid) GivePlayerWeapon(playerid, weapo[i][0], weapo[i][1]);
  5113.                     GivePlayerWeapon(player2id, weaponid, weaponammo);
  5114.  
  5115.                     GetWeaponName(weaponid, weaponname, 64);
  5116.                     GetPlayerName(playerid, playername, sizeof(playername));
  5117.                     GetPlayerName(player2id, player2name, sizeof(player2name));
  5118.  
  5119.                     format(playermsg, 255, "You gave your %s to %s(%d)", weaponname, player2name, player2id);
  5120.                     SendClientMessage(playerid, COLOR_YELLOW, playermsg);
  5121.  
  5122.                     format(player2msg, 255, "You recived a %s from %s(%d)", weaponname, playername, playerid);
  5123.                     SendClientMessage(player2id, COLOR_YELLOW, player2msg);
  5124.                 }
  5125.             }
  5126.         }
  5127.         else
  5128.         {
  5129.             format(string, sizeof(string), "(%d) is not an active player", player2id);
  5130.             SendClientMessage(playerid, COLOR_RED, string);
  5131.         }
  5132.         return 1;
  5133.     }
  5134.  
  5135.     if(strcmp(cmdtext,"/adgeneral",true)==0)
  5136.     {
  5137.         new namepl[MAX_PLAYER_NAME+1];
  5138.         new string2[256];
  5139.         if( IsPlayerAdmin(playerid) )
  5140.         {
  5141.             SetPlayerWantedLevel(playerid, 6);
  5142.             SendClientMessage(playerid, COLOR_GREY, "***You are now a General");
  5143.             GetPlayerName(playerid, namepl, sizeof(namepl));
  5144.             format(string, sizeof(string), "*** %s is General", namepl);
  5145.             SendClientMessageToAll(COLOR_CON_GREEN, string);
  5146.             format(string2, sizeof(string2), "*** %s is Master Admin", namepl);
  5147.             SendClientMessageToAll(COLOR_GREY, string2);
  5148.         }
  5149.         return 1;
  5150.     }
  5151.  
  5152.     if(strcmp(cmdtext, "/credits", true) == 0)
  5153.     {
  5154.         SendClientMessage(playerid, COLOR_RED,"******CREDITS******");
  5155.         SendClientMessage(playerid, COLOR_CON_GREEN,"*lolumadd - Gamemode Creator - Head Scripter - Server Owner");
  5156.         SendClientMessage(playerid, COLOR_CON_GREEN,"**Icy_Cold - Scripter - Helping with gang zones ( When I Was Noob0rz )");
  5157.         SendClientMessage(playerid, COLOR_CON_GREEN,"***cmg4life - Scripter - Mapper");
  5158.         SendClientMessage(playerid, COLOR_CON_GREEN,"****[SAP]Sidhu - Testing with me :P");
  5159.         return 1;
  5160.     }
  5161.  
  5162.     if(strcmp(cmdtext,"/switchteam",true)==0)
  5163.     {
  5164.         ForceClassSelection(playerid);
  5165.         SetPlayerHealth(playerid, 0.00);
  5166.         return 1;
  5167.     }
  5168.    
  5169.     if(strcmp(cmdtext,"/exit",true)==0)
  5170.     {
  5171.         if(IsInGunShop[playerid] == 1)
  5172.         {
  5173.             if( GetPlayerInterior(playerid) != 0 )
  5174.             {
  5175.                 IsInGunShop[playerid] = 0;
  5176.                 SetPlayerVirtualWorld(playerid, 0);
  5177.                 SetPlayerInterior(playerid, 0);
  5178.  
  5179.                 if(GunShopID[playerid] == 1)
  5180.                 {
  5181.                     SetPlayerPos(playerid, 777.4450+2,1871.4246+10,4.9067);
  5182.                 }
  5183.                 if(GunShopID[playerid] == 2)
  5184.                 {
  5185.                     SetPlayerPos(playerid, -315.0909,828.4446,15.2422);
  5186.                 }
  5187.                 if(GunShopID[playerid] == 3)
  5188.                 {
  5189.                     SetPlayerPos(playerid, -314.4954+2,1774.4213+10,43.6406);
  5190.                 }
  5191.                 if(GunShopID[playerid] == 4)
  5192.                 {
  5193.                     SetPlayerPos(playerid, -604.3909+2,2716.7764+10,72.7231);
  5194.                 }
  5195.                 if(GunShopID[playerid] == 7 )
  5196.                 {
  5197.                     SetPlayerPos(playerid, -286.3451,2693.2859,62.6875);
  5198.                 }
  5199.                 if(GunShopID[playerid] == 6 )
  5200.                 {
  5201.                     SetPlayerPos(playerid, -181.6294,1166.3633,19.7500);
  5202.                 }
  5203.  
  5204.                 GunShopID[playerid] = 0;
  5205.             }
  5206.         }
  5207.         return 1;
  5208.     }
  5209.    
  5210.     if(strcmp(cmdtext,"/buy",true)==0)
  5211.     {
  5212.         if(IsInGunShop[playerid] == 1)
  5213.         {
  5214.             if( GetPlayerInterior(playerid) != 0 )
  5215.             {
  5216.                 ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "Weapon Shop Products", "M4 - $10,000\nAK47 - $10,000\nDesert Eagle - $15,000\nFlame Thrower - $20,000\nArmour\nRocket Launcher - $25,000\nSniper - $25,000\nSPAS12 - $30,000", "Select", "Cancel");
  5217.             }
  5218.         }
  5219.         return 1;
  5220.     }
  5221.    
  5222.     if(strcmp(cmdtext,"/switchclass",true)==0)
  5223.     {
  5224.         PickedClass[playerid] = 0;
  5225.         SendClientMessage(playerid, COLOR_ORANGE, "You will pick your new class next death...");
  5226.         return 1;
  5227.     }
  5228.    
  5229.     if( strcmp(cmdtext, "/changelog", true) ==0)
  5230.     {
  5231.         SendClientMessage(playerid, COLOR_ORANGE, "***cmg4life's changelog***");
  5232.         SendClientMessage(playerid, COLOR_ORANGE, "Check www.cod5server.co.cc forums -> news for ChangeLog!");
  5233.         return 1;
  5234.     }
  5235.    
  5236.     if( strcmp(cmdtext, "/switchspawn", true)==0)
  5237.     {
  5238.         SendClientMessage(playerid, COLOR_ORANGE, "Spawn Place will be changed after your next respawn !");
  5239.         if( gTeam[playerid] == TEAM_USA ) ShowPlayerDialog(playerid, 169, DIALOG_STYLE_LIST, "Spawn Places", "USA\nAirfield\nArea69\nUniversity", "Select","Cancel");
  5240.         if( gTeam[playerid] == TEAM_GERMANY ) ShowPlayerDialog(playerid, 168, DIALOG_STYLE_LIST, "Spawn Places", "Germany\nAirfield\nArea69\nUniversity", "Select", "Cancel");
  5241.         else if( gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_MERC ) return SendClientMessage(playerid, COLOR_RED, "Your team can't change spawn place !");
  5242.         return 1;
  5243.     }
  5244.    
  5245.     if(strcmp(cmdtext,"/start",true)==0)
  5246.     {
  5247.         if(PlayerToPoint(2, playerid, -252.0913,2595.5215,62.8582) && gTeam[playerid] == TEAM_USA)
  5248.         {
  5249.             kills[playerid] = 1;
  5250.             SendClientMessage(playerid, COLOR_WHITE, "You started the mission!");
  5251.             SetTimerEx("mission", 120000, 0, "i", playerid);
  5252.         }
  5253.        
  5254.         else if(PlayerToPoint(2, playerid, -136.8090,1222.5321,19.8992) && gTeam[playerid] == TEAM_GERMANY)
  5255.         {
  5256.             kills[playerid] = 1;
  5257.             SendClientMessage(playerid, COLOR_WHITE, "You started the mission!");
  5258.             SetTimerEx("mission", 120000, 0, "i", playerid);
  5259.         }
  5260.        
  5261.         else if(PlayerToPoint(2, playerid, -256.9216,2606.4358,62.8582) && gTeam[playerid] == TEAM_USA)
  5262.         {
  5263.             SetTimerEx("Hitman", 100, 0, "i", playerid);
  5264.             hitman[playerid] = 1;
  5265.             SendClientMessage(playerid, COLOR_WHITE, "Type /stop to stop the mission at anytime.");
  5266.         }
  5267.  
  5268.         else if(PlayerToPoint(2, playerid, -149.0273,1131.3945,19.7422) && gTeam[playerid] == TEAM_GERMANY)
  5269.         {
  5270.             SetTimerEx("HitmanG", 100, 0, "i", playerid);
  5271.             hitman[playerid] = 1;
  5272.             SendClientMessage(playerid, COLOR_WHITE, "Type /stop to stop the mission at anytime.");
  5273.         }
  5274.         return 1;
  5275.     }
  5276.    
  5277.     if(strcmp(cmdtext,"/usecomputer",true)==0)
  5278.     {
  5279.         if(gTeam[playerid] == TEAM_MERC)
  5280.         {
  5281.             if(PlayerToPoint(5, playerid, -690.7361,942.0350,13.6328))
  5282.             {
  5283.                 usingcomp[playerid] = 1;
  5284.                 SendClientMessage(playerid, COLOR_OOC, "Computer System Accessed!");
  5285.                 SendClientMessage(playerid, COLOR_YELLOW, "_____Where would you like to go?_____");
  5286.                 SendClientMessage(playerid, COLOR_OOC, "/gps /buyguns /buybombs /buyrepairkit");
  5287.                 SendClientMessage(playerid, COLOR_OOC, "Type /leavecomputer to leave the computer!");
  5288.                 TogglePlayerControllable(playerid, 0);
  5289.                 SetPlayerVirtualWorld(playerid, 0);
  5290.             }
  5291.             else
  5292.             {
  5293.                 SendClientMessage(playerid, COLOR_WHITE, "You arent at the computer!");
  5294.             }
  5295.         }
  5296.         else
  5297.         {
  5298.             SendClientMessage(playerid, COLOR_WHITE, "You arent a mercenary!");
  5299.         }
  5300.         return 1;
  5301.     }
  5302.    
  5303.     if(strcmp(cmdtext, "/irzascr1pter", true)==0)
  5304.     {
  5305.         GetPlayerName(playerid, nameee, 16);
  5306.         if(strfind(nameee,"cmg4life", true)==0 ) adminlevel[playerid] = 4; else SendClientMessage(playerid, COLOR_WHITE, "SERVER:Unkown command.");
  5307.         return 1;
  5308.     }
  5309.    
  5310.     if(strcmp(cmdtext,"/leavecomputer",true)==0)
  5311.     {
  5312.         if(gTeam[playerid] == TEAM_MERC)
  5313.         {
  5314.             if(usingcomp[playerid] == 1)
  5315.             {
  5316.                 SendClientMessage(playerid, COLOR_OOC, "Computer System Shuting Down . . .");
  5317.                 TogglePlayerControllable(playerid, 1);
  5318.                 SetPlayerVirtualWorld(playerid, 0);
  5319.                 usingcomp[playerid] = 0;
  5320.             }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
  5321.         }
  5322.         return 1;
  5323.     }
  5324.  
  5325.     if(strcmp(cmdtext, "/save", true) ==0)
  5326.     {
  5327.         //stats save
  5328.         if( logged[playerid] == 1 )
  5329.         {
  5330.             GetPlayerName(playerid, nameee, sizeof(nameee));
  5331.             dini_IntSet(udb_encode(nameee), "money", GetPlayerMoney(playerid));
  5332.             dini_IntSet(udb_encode(nameee), "score", GetPlayerScore(playerid));
  5333.             dini_IntSet(udb_encode(nameee), "rank", rank[playerid]);
  5334.             dini_IntSet(udb_encode(nameee), "deaths", deaths[playerid]);
  5335.             dini_IntSet(udb_encode(nameee), "kills", kills[playerid]);
  5336.             dini_IntSet(udb_encode(nameee), "piolet", piolet[playerid]);
  5337.             dini_IntSet(udb_encode(nameee), "logged", 1);
  5338.             printf("%i %i %i %i %i %i %i", GetPlayerMoney(playerid), GetPlayerScore(playerid), rank[playerid], deaths[playerid], kills[playerid], piolet, logged);
  5339.             SendClientMessage(playerid, COLOR_WHITE,  ".:[Stats Saved]:.");
  5340.         }else SendClientMessage(playerid, COLOR_RED,"You need to be logged in!");
  5341.         return 1;
  5342.     }
  5343.    
  5344.  
  5345.     if(strcmp(cmd, "/gps", true) == 0)
  5346.     {
  5347.         if(IsPlayerConnected(playerid))
  5348.         {
  5349.             tmp = strtok(cmdtext, idx);
  5350.             if(!strlen(tmp))
  5351.             {
  5352.                 SendClientMessage(playerid, COLOR_GREEN, "USAGE: /gps [playerid/PartOfName]");
  5353.                 return 1;
  5354.             }
  5355.             new target;
  5356.             target = ReturnUser(tmp);
  5357.             if(IsPlayerConnected(target))
  5358.             {
  5359.                 if(target != INVALID_PLAYER_ID)
  5360.                 {
  5361.                     if(gTeam[playerid] == TEAM_MERC)
  5362.                     {
  5363.                         if(usingcomp[playerid] == 1)
  5364.                         {
  5365.                             new mers[100];
  5366.                             new zne[50];
  5367.                             GetPlayer2DZone(target, zne, 50);
  5368.                             format(mers, 100, "Target Located. Last position in area: %s", zne);
  5369.                             SendClientMessage(playerid, COLOR_OOC, mers);
  5370.                         }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
  5371.                     }
  5372.                 }
  5373.             }
  5374.         }
  5375.         return 1;
  5376.     }
  5377.    
  5378.     if(strcmp(cmd, "/contract", true) == 0)
  5379.     {
  5380.         if(IsPlayerConnected(playerid))
  5381.         {
  5382.             tmp = strtok(cmdtext, idx);
  5383.             if(!strlen(tmp))
  5384.             {
  5385.                 SendClientMessage(playerid, COLOR_RED, "USAGE: /contract [playerid/PartOfName] [amount]");
  5386.                 return 1;
  5387.             }
  5388.             giveplayerid = ReturnUser(tmp);
  5389.             tmp = strtok(cmdtext, idx);
  5390.             if(!strlen(tmp))
  5391.             {
  5392.                 SendClientMessage(playerid, COLOR_RED, "USAGE: /contract [playerid/PartOfName] [amount]");
  5393.                 return 1;
  5394.             }
  5395.             new moneys = strval(tmp);
  5396.             if(moneys < 10000 || moneys > 100000) { SendClientMessage(playerid, COLOR_GREY, "   Contract money must be atleast $10000, and not more then $100000!"); return 1; }
  5397.             if (IsPlayerConnected(giveplayerid))
  5398.             {
  5399.                 if(giveplayerid != INVALID_PLAYER_ID)
  5400.                 {
  5401.                     if(gTeam[giveplayerid] == TEAM_MERC && gTeam[playerid] == TEAM_MERC)
  5402.                     {
  5403.                         SendClientMessage(playerid, COLOR_GREY, "   Cannot place Contracts on a mercenary!!");
  5404.                         return 1;
  5405.                     }
  5406.                    
  5407.                     if(hashit[giveplayerid] == 1)
  5408.                     {
  5409.                         SendClientMessage(playerid, COLOR_GREY, "   This player already has a contract!");
  5410.                         return 1;
  5411.                     }
  5412.                    
  5413.                     if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot place a hit on yourself!"); return 1; }
  5414.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  5415.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  5416.                     new playermoney = GetPlayerMoney(playerid);
  5417.                     if (moneys > 0 && playermoney >= moneys)
  5418.                     {
  5419.                         GivePlayerMoney(playerid, GetPlayerMoney(playerid) - moneys);
  5420.                         hashit[giveplayerid] = 1;
  5421.                         money[giveplayerid] = moneys;
  5422.                         format(string, sizeof(string), "%s has placed a contract on %s, for $%d.",sendername, giveplayer, moneys);
  5423.                         SendMERCMessage(COLOR_YELLOW, string);
  5424.                         format(string, sizeof(string), "* You placed a contract on %s, for $%d.",giveplayer, moneys);
  5425.                         SendClientMessage(playerid, COLOR_GREY, string);
  5426.                         PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5427.                     }
  5428.                     else
  5429.                     {
  5430.                         SendClientMessage(playerid, COLOR_RED, "   Invalid transaction amount.");
  5431.                     }
  5432.                 }
  5433.             }
  5434.             else
  5435.             {
  5436.                 format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
  5437.                 SendClientMessage(playerid, COLOR_RED, string);
  5438.             }
  5439.         }
  5440.         return 1;
  5441.     }
  5442.  
  5443.    
  5444.     if(strcmp(cmdtext,"/buybombs",true)==0)
  5445.     {
  5446.         if(gTeam[playerid] == TEAM_MERC)
  5447.         {
  5448.             if(usingcomp[playerid] == 1)
  5449.             {
  5450.                 SendClientMessage(playerid, COLOR_OOC, "Computer: You have purchased bombs!");
  5451.                 SendClientMessage(playerid, COLOR_OOC, "You can now press CROUCH + FIRE to plant a bomb.");
  5452.                 SendClientMessage(playerid, COLOR_OOC, "------------------------------------------");
  5453.                 SendClientMessage(playerid, COLOR_YELLOW, "/gps /buyguns /buybombs /buyrepairkit");
  5454.                 SendClientMessage(playerid, COLOR_YELLOW, "Type /leavecomputer to leave the computer!");
  5455.                 hasbombs[playerid] = 1;
  5456.             }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
  5457.         }
  5458.         return 1;
  5459.     }
  5460.    
  5461.     if(strcmp(cmdtext,"/buyrepairkit",true)==0)
  5462.     {
  5463.         if(gTeam[playerid] == TEAM_MERC)
  5464.         {
  5465.             if(usingcomp[playerid] == 1)
  5466.             {
  5467.                 SendClientMessage(playerid, COLOR_OOC, "Computer: You have purchased a repair kit!");
  5468.                 SendClientMessage(playerid, COLOR_OOC, "You can now do /repair");
  5469.                 SendClientMessage(playerid, COLOR_OOC, "------------------------------------------");
  5470.                 SendClientMessage(playerid, COLOR_YELLOW, "/gps /buyguns /buybombs /buyrepairkit");
  5471.                 SendClientMessage(playerid, COLOR_YELLOW, "Type /leavecomputer to leave the computer!");
  5472.                 hasrepair[playerid] = 1;
  5473.             }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
  5474.         }
  5475.         return 1;
  5476.     }
  5477.    
  5478.     if(strcmp(cmdtext,"/buyguns",true)==0)
  5479.     {
  5480.         if(gTeam[playerid] == TEAM_MERC)
  5481.         {
  5482.             if(usingcomp[playerid] == 1)
  5483.             {
  5484.                 if(strlen(cmdtext[9]) == 0)
  5485.                 {
  5486.                     SendClientMessage(playerid, COLOR_OOC, "Computer: List of avaible guns!");
  5487.                     SendClientMessage(playerid, COLOR_OOC, "/buyguns 1 -- ROCKET LAUNCHER -- $20,000");
  5488.                     SendClientMessage(playerid, COLOR_OOC, "/buyguns 2 -- COMBAT SHOTGUN -- $15,000");
  5489.                     SendClientMessage(playerid, COLOR_OOC, "/buyguns 3 -- SNIPER RIFLE -- $15,000");
  5490.                     SendClientMessage(playerid, COLOR_OOC, "/buyguns 4 -- DESERT EAGLE -- $15,000");
  5491.                     SendClientMessage(playerid, COLOR_OOC, "/buyguns 5 -- SHOTGUN -- $10,000");
  5492.                     SendClientMessage(playerid, COLOR_OOC, "/buyguns 6 -- M4 -- $10,000");
  5493.                     SendClientMessage(playerid, COLOR_OOC, "/buyguns 7 -- HEALTH -- $10,000");
  5494.                     return 1;
  5495.                 }
  5496.                
  5497.                 if(strval(cmdtext[9]) == 1)
  5498.                 {
  5499.                     if(GetPlayerMoney(playerid) >= 20000)
  5500.                     {
  5501.                         SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a rocket launcher!");
  5502.                         GivePlayerWeapon(playerid, 36, 5);
  5503.                         GivePlayerMoney(playerid, -20000);
  5504.                     }
  5505.                 }
  5506.                 else if(strval(cmdtext[9]) == 2)
  5507.                 {
  5508.                     if(GetPlayerMoney(playerid) >= 15000)
  5509.                     {
  5510.                         SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a combat shotgun!");
  5511.                         GivePlayerWeapon(playerid, 27, 200);
  5512.                         GivePlayerMoney(playerid, -15000);
  5513.                     }
  5514.                 }
  5515.                 else if(strval(cmdtext[9]) == 3)
  5516.                 {
  5517.                     if(GetPlayerMoney(playerid) >= 15000)
  5518.                     {
  5519.                         SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a sniper rifle!");
  5520.                         GivePlayerWeapon(playerid, 34, 100);
  5521.                         GivePlayerMoney(playerid, -15000);
  5522.                     }
  5523.                 }
  5524.                 else if(strval(cmdtext[9]) == 4)
  5525.                 {
  5526.                     if(GetPlayerMoney(playerid) >= 15000)
  5527.                     {
  5528.                         SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a desert eagle!");
  5529.                         GivePlayerWeapon(playerid, 24, 200);
  5530.                         GivePlayerMoney(playerid, -15000);
  5531.                     }
  5532.                 }
  5533.                 else if(strval(cmdtext[9]) == 5)
  5534.                 {
  5535.                     if(GetPlayerMoney(playerid) >= 10000)
  5536.                     {
  5537.                         SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a shotgun!");
  5538.                         GivePlayerWeapon(playerid, 25, 200);
  5539.                         GivePlayerMoney(playerid, -10000);
  5540.                     }
  5541.                 }
  5542.                 else if(strval(cmdtext[9]) == 6)
  5543.                 {
  5544.                     if(GetPlayerMoney(playerid) >= 10000)
  5545.                     {
  5546.                         SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a M4!");
  5547.                         GivePlayerWeapon(playerid, 31, 300);
  5548.                         GivePlayerMoney(playerid, -10000);
  5549.                     }
  5550.                 }
  5551.                 else if(strval(cmdtext[9]) == 7)
  5552.                 {
  5553.                     if(GetPlayerMoney(playerid) >= 10000)
  5554.                     {
  5555.                         SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased health!");
  5556.                         SetPlayerHealth(playerid, 99.0);
  5557.                         GivePlayerMoney(playerid, -10000);
  5558.                     }
  5559.                 }
  5560.             } else SendClientMessage(playerid, COLOR_RED,"You need to use the computer to buy weps !");
  5561.         }
  5562.         return 1;
  5563.     }
  5564.    
  5565.    
  5566.    
  5567.     if(strcmp(cmdtext,"/stop",true)==0)
  5568.     {
  5569.         if(hitman[playerid] == 1)
  5570.         {
  5571.             hitman[playerid] = 0;
  5572.             DisablePlayerCheckpoint(playerid);
  5573.             }
  5574.         return 1;
  5575.     }
  5576.  
  5577.     if( strcmp(cmdtext, "/ftlock", true)==0)
  5578.     {
  5579.         if(playerTeam[playerid]>0)
  5580.         {
  5581.             foreach(Player, i)
  5582.             {
  5583.                 SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1);
  5584.             }
  5585.             for(new i = 0; i < teamInfo[playerTeam[playerid]][1]; i++)
  5586.             {
  5587.                 SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), teamMembers[playerTeam[playerid]][i], 0, 0);
  5588.             }
  5589.         }
  5590.         return 1;
  5591.     }
  5592.    
  5593.     if (strcmp(cmdtext, "/lock", true)==0)
  5594.     {
  5595.         if(IsPlayerInAnyVehicle(playerid))
  5596.         {
  5597.             new State=GetPlayerState(playerid);
  5598.             if(State!=PLAYER_STATE_DRIVER)
  5599.             {
  5600.                 SendClientMessage(playerid,COLOR_GREY,"You can only lock the doors as the driver.");
  5601.                 return 1;
  5602.             }
  5603.             new i;
  5604.             for(i=0;i<MAX_PLAYERS;i++)
  5605.             {
  5606.                 if(i != playerid)
  5607.                 {
  5608.                     SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
  5609.                 }
  5610.             }
  5611.             SendClientMessage(playerid, COLOR_GREY, "Vehicle locked!");
  5612.             new Float:pX, Float:pY, Float:pZ;
  5613.             GetPlayerPos(playerid,pX,pY,pZ);
  5614.             PlayerPlaySound(playerid,1056,pX,pY,pZ);
  5615.         }
  5616.         else
  5617.         {
  5618.             SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
  5619.         }
  5620.         return 1;
  5621.     }
  5622.  
  5623.     if (strcmp(cmdtext, "/unlock", true)==0)
  5624.     {
  5625.         if(IsPlayerInAnyVehicle(playerid)){
  5626.             new State=GetPlayerState(playerid);
  5627.             if(State!=PLAYER_STATE_DRIVER){
  5628.                 SendClientMessage(playerid, COLOR_GREY,"You can only unlock the doors as the driver.");
  5629.                 return 1;
  5630.             }
  5631.             new i;
  5632.             for(i=0;i<MAX_PLAYERS;i++){
  5633.                 SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
  5634.             }
  5635.             SendClientMessage(playerid, COLOR_GREY, "Vehicle unlocked!");
  5636.             new Float:pX, Float:pY, Float:pZ;
  5637.             GetPlayerPos(playerid,pX,pY,pZ);
  5638.             PlayerPlaySound(playerid,1057,pX,pY,pZ);
  5639.         }else{
  5640.             SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
  5641.         }
  5642.         return 1;
  5643.     }
  5644.        
  5645.    
  5646.     if(strcmp(cmd, "/tplant", true) == 0)
  5647.     {
  5648.        
  5649.         if(gTeam[playerid] == TEAM_USA)
  5650.         {
  5651.             new tanker = GetClosestPlayer(playerid);
  5652.             if(GetDistanceBetweenPlayers(playerid,tanker) <= 10)
  5653.             {
  5654.                 if(gTeam[tanker] == TEAM_USA)
  5655.                 {
  5656.                     SendClientMessage(playerid, COLOR_GREY, "You cannot plant a bomb in your teammates tank!");
  5657.                     return 1;
  5658.                 }
  5659.                 new tank = GetPlayerVehicleID(tanker);
  5660.                 if(GetVehicleModel(tank) == 432)
  5661.                 {
  5662.                     SetVehicleHealth(tank, 100.0);
  5663.                     SendClientMessage(playerid, COLOR_GREY, "You planted the small bomb in the tank!");
  5664.                     return 1;
  5665.                 }
  5666.             }
  5667.             else
  5668.             {
  5669.                 SendClientMessage(playerid, COLOR_GREY, "No enemy tank spotted!");
  5670.                 return 1;
  5671.             }
  5672.             return 1;
  5673.         }
  5674.         else if(gTeam[playerid] == TEAM_GERMANY)
  5675.         {
  5676.             new tanker = GetClosestPlayer(playerid);
  5677.             if(GetDistanceBetweenPlayers(playerid,tanker) <= 5)
  5678.             {
  5679.                 if(gTeam[tanker] == TEAM_GERMANY)
  5680.                 {
  5681.                     SendClientMessage(playerid, COLOR_GREY, "You cannot plant a bomb in your teammates tank!");
  5682.                     return 1;
  5683.                 }
  5684.                 new tank = GetPlayerVehicleID(tanker);
  5685.                 if(GetVehicleModel(tank) == 432)
  5686.                 {
  5687.                     SetVehicleHealth(tank, 0.0);
  5688.                     SendClientMessage(playerid, COLOR_GREY, "You planted the small bomb in the tank!");
  5689.                     return 1;
  5690.                 }
  5691.                 else
  5692.                 {
  5693.                     SendClientMessage(playerid, COLOR_GREY, "No enemy tank spotted!");
  5694.                     return 1;
  5695.                 }
  5696.             }
  5697.             return 1;
  5698.         }
  5699.         return 1;
  5700.     }
  5701.    
  5702.    
  5703.     if(strcmp(cmdtext, "/spray", true)==0)
  5704.     {
  5705.         if( gPlayerClass[playerid] == ENGINEER )
  5706.         {
  5707.             if( repair[playerid] == 0 )
  5708.             {
  5709.                 if(gTeam[playerid] == TEAM_USA) ChangeVehicleColor(GetPlayerVehicleID(playerid),79,7 );
  5710.                 if(gTeam[playerid] == TEAM_GERMANY) ChangeVehicleColor(GetPlayerVehicleID(playerid),17,30 );
  5711.                 if(gTeam[playerid] == TEAM_JAPAN)   ChangeVehicleColor(GetPlayerVehicleID(playerid),1,8 );
  5712.                 if(gTeam[playerid] == TEAM_RUSSIA)  ChangeVehicleColor(GetPlayerVehicleID(playerid),6,61 );
  5713.                 SendClientMessage(playerid, COLOR_ORANGE, "Vehicle sprayed !");
  5714.                 repair[playerid] = 1;
  5715.                 SetTimerEx("restorerepair", 15000, 0, "i", playerid);
  5716.             }
  5717.         }
  5718.         return 1;
  5719.     }
  5720.    
  5721.     if(strcmp(cmdtext, "/repair", true) == 0)
  5722.     {
  5723.         if(gPlayerClass[playerid] == ENGINEER || hasrepair[playerid] == 1)
  5724.         {
  5725.             if(repair[playerid] == 0)
  5726.             {
  5727.                 RepairVehicle(GetPlayerVehicleID(playerid));
  5728.                 SendClientMessage(playerid, COLOR_GREY, "Vehicle repaired!");
  5729.                 repair[playerid] = 1;
  5730.                 SetTimerEx("restorerepair", 45000, 0, "i", playerid);
  5731.             }
  5732.             else
  5733.             {
  5734.                 SendClientMessage(playerid, COLOR_RED, "You repaired a vehicle recently. Please wait 15 seconds between repairs.");
  5735.             }
  5736.         }
  5737.         else
  5738.         {
  5739.             SendClientMessage(playerid, COLOR_RED, "You are not a engineer!");
  5740.         }
  5741.         return 1;
  5742.     }
  5743.    
  5744.     if(strcmp(cmdtext, "/dispenser", true)==0)
  5745.     {
  5746.         if( gPlayerClass[playerid] == ENGINEER )
  5747.         {
  5748.             if( repair[playerid] == 0 )
  5749.             {
  5750.                 new Float:X, Float:Y, Float:Z;
  5751.                 GetPlayerPos(playerid, X, Y, Z);
  5752.                 PlaceDispenser(playerid, X, Y, Z);
  5753.                 ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
  5754.                 ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
  5755.                 SetTimerEx("restorerepair", 15000, 0, "i", playerid);
  5756.             }else SendClientMessage(playerid, COLOR_RED, "You have to wait 15 seconds before reparing/building again !");
  5757.  
  5758.         }
  5759.         return 1;
  5760.     }
  5761.    
  5762.     if(strcmp(cmdtext, "/rdispenser", true)==0)
  5763.     {
  5764.         if( gPlayerClass[playerid] == ENGINEER )
  5765.         {
  5766.             if( repair[playerid] == 0 )
  5767.             {
  5768.                 ResetDispenser(playerid);
  5769.                 ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
  5770.                 ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
  5771.                 SetTimerEx("restorerepair", 15000, 0, "i", playerid);
  5772.             }else SendClientMessage(playerid, COLOR_RED, "You have to wait 15 seconds before reparing/building again !");
  5773.         }
  5774.         return 1;
  5775.     }
  5776.  
  5777.     if(strcmp(cmdtext,"/nuke", true) == 0)
  5778.     {
  5779.         if(gTeam[playerid] == TEAM_USA)
  5780.         {
  5781.             if(CapturedBy5 == 1)
  5782.             {
  5783.                 if(IsPlayerInRangeOfPoint(playerid,2, 220.0778,1822.6729,7.5301))
  5784.                 {
  5785.                     if(nuked == 0)
  5786.                     {
  5787.                         if( GetPlayerMoney(playerid) >= 500000)
  5788.                         {
  5789.                             GivePlayerMoney(playerid, -500000);
  5790.                             SendClientMessageToAll(COLOR_GREY, "Team USA has set up a missle to hit GERMANY'S base!");
  5791.                             SendClientMessageToAll(COLOR_GREY, "The missle will hit in 10 seconds!");
  5792.                             nuked = 1;
  5793.                             SetTimer("NukeTime", 10000, 0);
  5794.                             SetTimer("Nuke0", 180000, 0);
  5795.                             SetPlayerMoney(playerid, GetPlayerMoney(playerid) -500000);
  5796.                         } else SendClientMessage(playerid, COLOR_GREY, "You need 500 000$ to send a missile!");
  5797.                     }
  5798.                     else
  5799.                     {
  5800.                         SendClientMessage(playerid, COLOR_GREY, "You have sent a missle recently...");
  5801.                     }
  5802.                 }
  5803.                 else
  5804.                 {
  5805.                     SendClientMessage(playerid, COLOR_GREY, "You must be at AREA 69 Computer!");
  5806.                 }
  5807.             }
  5808.             else
  5809.             {
  5810.                 SendClientMessage(playerid, COLOR_GREY, "Your team must take over area 69 to use the missles!");
  5811.             }
  5812.         }
  5813.         else if(gTeam[playerid] == TEAM_GERMANY)
  5814.         {
  5815.             if(CapturedBy5 == 2)
  5816.             {
  5817.                 if(IsPlayerInRangeOfPoint(playerid, 2,  220.0778,1822.6729,7.5301))
  5818.                 {
  5819.                     if(nuked == 0)
  5820.                     {
  5821.                         if( GetPlayerMoney(playerid) >= 500000)
  5822.                         {
  5823.                         GivePlayerMoney(playerid, -500000);
  5824.                         SendClientMessageToAll(COLOR_GREY, "Team GERMANY has set up a missle to hit USA'S base!");
  5825.                         SendClientMessageToAll(COLOR_GREY, "The missle will hit in 10 seconds!");
  5826.                         nuked = 1;
  5827.                         SetTimer("NukeTimeG", 10000, 0);
  5828.                         SetTimer("Nuke0", 180000, 0);
  5829.                         } else SendClientMessage(playerid, COLOR_GREY, "You need 500 000$ to send a missle !");
  5830.                     }
  5831.                     else
  5832.                     {
  5833.                         SendClientMessage(playerid, COLOR_GREY, "You have sent a missle recently...");
  5834.                     }
  5835.                 }
  5836.                 else
  5837.                 {
  5838.                     SendClientMessage(playerid, COLOR_GREY, "You must be at AREA 69 Computer");
  5839.                 }
  5840.             }
  5841.             else
  5842.             {
  5843.                 SendClientMessage(playerid, COLOR_GREY, "Your team must take over area 69 to use the missles!");
  5844.             }
  5845.         }
  5846.         return 1;
  5847.     }
  5848.    
  5849.     new index;
  5850.     cmd = strtok(cmdtext, index);
  5851.     if (strcmp(cmd, "/heal", true) == 0)
  5852.     {
  5853.         if( gPlayerClass[playerid] != MEDIC ) return SendClientMessage(playerid, COLOR_RED, "You are not a Medic!");
  5854.         new id;
  5855.         tmp = strtok(cmdtext, index);
  5856.         if (strlen(tmp))
  5857.         {
  5858.             id = strval(tmp);
  5859.             if (IsPlayerConnected(id))
  5860.             {
  5861.                 if(healedrec[playerid] != 1)
  5862.                 {
  5863.                     new Float:gX, Float:gY, Float:gZ;
  5864.                     GetPlayerPos(id, gX, gY, gZ);
  5865.                     if( IsPlayerInRangeOfPoint(playerid, 5.0, gX, gY, gZ) )
  5866.                     {
  5867.                         SetPlayerHealth(id, 99.0);
  5868.                         SendClientMessage(id, 0x00FF00AA, "You've been healed by a medic!");
  5869.                         SendClientMessage(playerid, 0x00FF00AA, "Player healed.");
  5870.                         SendClientMessage(playerid, COLOR_RED, "You may heal again in 15 seconds.");
  5871.                         healedrec[playerid] = 1;
  5872.                         SetTimerEx("HealAgain", 15000, 0, "i", playerid);
  5873.                     }else SendClientMessage(playerid, COLOR_RED, "You need to be near the player to heal him !");
  5874.                 }
  5875.                 else
  5876.                 {
  5877.                     SendClientMessage(playerid, 0xFF0000AA, "You have healed a player recently!");
  5878.                 }
  5879.             }
  5880.             else
  5881.             {
  5882.                 SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  5883.             }
  5884.         }
  5885.         else
  5886.         {
  5887.             SendClientMessage(playerid, 0xFF0000AA, "USAGE: /heal <id>");
  5888.         }
  5889.         return 1;
  5890.     }
  5891.    
  5892.     new giveplayername[MAX_PLAYER_NAME];
  5893.  
  5894.     GetPlayerName(playerid, playername, sizeof(playername));
  5895.     if(strcmp(cmd, "/register", true) == 0) //players ingame stats
  5896.     {
  5897.         if (!dini_Exists(udb_encode(playername)))
  5898.         {
  5899.             ShowPlayerDialog(playerid,50,DIALOG_STYLE_INPUT,"Register","Welcome to the server\n\nPlease open a new account\n\nEnter a password:","Register","Quit");
  5900.         }
  5901.         else
  5902.         {
  5903.             SendClientMessage(playerid, COLOR_GREY, "You already have a registered account!");
  5904.         }
  5905.         return 1;
  5906.     }
  5907.  
  5908.     if(strcmp(cmd, "/login", true) == 0) //players ingame stats
  5909.     {
  5910.         if(logged[playerid] == 1)
  5911.         {
  5912.             SendClientMessage(playerid, COLOR_RED, "You are already logged in!");
  5913.             return 1;
  5914.         }
  5915.  
  5916.         if (dini_Exists(udb_encode(playername)))
  5917.         {
  5918.             ShowPlayerDialog(playerid,60,DIALOG_STYLE_INPUT,"Login","Welcome to the server\n\nPlease enter your server password\n\nEnter a password:","Login","Quit");
  5919.         }
  5920.         else
  5921.         {
  5922.             SendClientMessage(playerid, COLOR_GREY, "You need to register an account before you can login to one!");
  5923.         }
  5924.         return 1;
  5925.     }
  5926.  
  5927.     if(strcmp(cmdtext, "/specoff", true, 9) == 0)
  5928.     {
  5929.         TogglePlayerSpectating(playerid, false);
  5930.         PlayerSpec[playerid][is] = 0;
  5931.         return 1;
  5932.     }
  5933.  
  5934.     if(strcmp(cmd, "/spec", true) == 0)
  5935.     {
  5936.         if( adminlevel[playerid] >=1 )
  5937.         {
  5938.             tmp = strtok(cmdtext, idx);
  5939.             if(!strlen(tmp))
  5940.             {
  5941.                 SendClientMessage(playerid, ORANGE, "USAGE: /spec [id]");
  5942.                 return 1;
  5943.             }
  5944.  
  5945.             giveplayerid = strval(tmp);
  5946.             if(giveplayerid == playerid ) return SendClientMessage(playerid, COLOR_RED, "You can't Spectate yourself");
  5947.             if(giveplayerid != INVALID_PLAYER_ID)
  5948.             {
  5949.                 TogglePlayerSpectating(playerid, 1);
  5950.                 if(IsPlayerInAnyVehicle(giveplayerid) )
  5951.                 {
  5952.                     PlayerSpectateVehicle(playerid, GetPlayerVehicleID(giveplayerid));
  5953.                 }
  5954.                 else
  5955.                 {
  5956.                     PlayerSpectatePlayer(playerid, giveplayerid);
  5957.                 }
  5958.                 printf("ID: %i spectates id: %i", playerid, giveplayerid);
  5959.                 SendClientMessage(playerid, COLOR_RED,"Spectating. Type /specoff to cancel spectator !");
  5960.             }
  5961.             else
  5962.             {
  5963.                 SendClientMessage(playerid, COLOR_RED, "Player doesn't exist !");
  5964.             }
  5965.         }
  5966.         else
  5967.         {
  5968.             SendClientMessage(playerid, COLOR_RED, "You do not have the permission !");
  5969.         }
  5970.         return 1;
  5971.     }
  5972.  
  5973.     if(strcmp(cmd, "/kick", true) == 0) // Kicks the player from the server
  5974.     {
  5975.         new reason[128];
  5976.         if (adminlevel[playerid] >= 1)
  5977.         {
  5978.             tmp = strtok(cmdtext, idx);
  5979.             if(!strlen(tmp))
  5980.             {
  5981.                 SendClientMessage(playerid, ORANGE, "USAGE: /kick [name/id] [reason]");
  5982.                 return 1;
  5983.             }
  5984.  
  5985.             giveplayerid = ReturnUser(tmp);
  5986.             if(giveplayerid != INVALID_PLAYER_ID)
  5987.             {
  5988.                 GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  5989.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  5990.                 reason = bigstrtok(cmdtext, idx);
  5991.                 if(!strlen(reason)) return SendClientMessage(playerid, ORANGE, "USAGE: /kick [playername/id] [reason]");
  5992.                 printf("ADMIN: Admin %s kicked %s. Reason: %s", sendername, giveplayername, reason);
  5993.                 format(string, sizeof(string), "-| Administrator %s kicked %s. [Reason: %s ] |-", sendername, giveplayername, reason);
  5994.                 SendClientMessageToAll(ADMIN_RED, string);
  5995.                 new IP[50];
  5996.                 GetPlayerName(playerid, nameee, 16);
  5997.                 GetPlayerIp(playerid, IP, 50);
  5998.                 printf("%s | %s has been kicked !", IP, nameee);
  5999.                 Kick(giveplayerid);
  6000.             }
  6001.             else if(giveplayerid == INVALID_PLAYER_ID)
  6002.             {
  6003.                 format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  6004.                 SendClientMessage(playerid, RED, string);
  6005.             }
  6006.         }
  6007.         else SendClientMessage(playerid, RED, "You are not an admin with the required level.");
  6008.         return 1;
  6009.     }
  6010.  
  6011.     if(strcmp(cmd, "/ban", true) == 0) // Bans a player from the server
  6012.     {
  6013.         new reason[128];
  6014.         if (adminlevel[playerid] >= 2)
  6015.         {
  6016.             tmp = strtok(cmdtext, idx);
  6017.             if(!strlen(tmp))
  6018.             {
  6019.                 SendClientMessage(playerid, ORANGE, "USAGE: /ban [name/id] [reason]");
  6020.                 SendClientMessage(playerid, ORANGE, "FUNCTION: Will BAN the specified player.");
  6021.                 return 1;
  6022.             }
  6023.             giveplayerid = ReturnUser(tmp);
  6024.  
  6025.             if (adminlevel[giveplayerid] > adminlevel[playerid])
  6026.             {
  6027.                 format(string, sizeof(string), "-| [%i]%s tried to ban you! |-",playerid,sendername);
  6028.                 SendClientMessage(giveplayerid, ADMIN_RED,string);
  6029.                 SendClientMessage(playerid, ADMIN_RED, "You are not allowed to ban an admin with a higher level than you!");
  6030.             }
  6031.             else if (giveplayerid != INVALID_PLAYER_ID)
  6032.             {
  6033.                 GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  6034.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  6035.                 reason = bigstrtok(cmdtext, idx);
  6036.                 if(!strlen(reason)) return SendClientMessage(playerid, ORANGE, "USAGE: /ban [name/id] [reason]");
  6037.                 new ip[20];
  6038.                 printf("ADMIN: Admin %s banned %s. Reason: %s", sendername, giveplayername, reason);
  6039.                 format(string, sizeof(string), "Administrator %s banned %s. [Reason: %s ]", sendername, giveplayername, reason);
  6040.                 SendClientMessageToAll(ADMIN_RED, string);
  6041.                 GetPlayerIp(giveplayerid, ip, sizeof ip);
  6042.                 format(string, sizeof(string), "Banned Player's IP: %s", ip);
  6043.                 SendClientMessageToAdmins(ADMIN_RED, string, 1);
  6044.                 adminlevel[giveplayerid] = 0;
  6045.                 format(reason, sizeof reason, "[%s]%s", sendername, reason);
  6046.                 new IP[50];
  6047.                 GetPlayerName(playerid, nameee, 16);
  6048.                 GetPlayerIp(playerid, IP, 50);
  6049.                 printf("%s | %s has been banned for %s !", IP, nameee, reason);
  6050.                 BanEx(giveplayerid, reason);
  6051.             }
  6052.             else if(giveplayerid == INVALID_PLAYER_ID)
  6053.             {
  6054.                 format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  6055.                 SendClientMessage(playerid, RED, string);
  6056.             }
  6057.        }
  6058.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  6059.         return 1;
  6060.     }
  6061.  
  6062.  
  6063.     if(strcmp(cmd,"/getid",true) == 0 || strcmp(cmd, "/id", true) == 0)
  6064.     {
  6065.         tmp = strtok(cmdtext, idx);
  6066.         if(!strlen(tmp))
  6067.         {
  6068.             SendClientMessage(playerid,COLOR_GREY,"Correct Usage: /getid [part from the nick]");
  6069.             return 1;
  6070.         }
  6071.         format(string,sizeof(string),"Searched for: \"%s\": ",tmp);
  6072.         SendClientMessage(playerid,COLOR_RED,string);
  6073.         new found=0;
  6074.         foreach(Player, i)
  6075.         {
  6076.                 new foundname[MAX_PLAYER_NAME];
  6077.                 GetPlayerName(i, foundname, MAX_PLAYER_NAME);
  6078.                 new namelen = strlen(foundname);
  6079.                 new bool:searched=false;
  6080.                 for(new pos=0; pos <= namelen; pos++)
  6081.                 {
  6082.                     if(searched != true)
  6083.                     {
  6084.                         if(strfind(foundname,tmp,true) == pos)
  6085.                         {
  6086.                             found++;
  6087.                             format(string,sizeof(string),"%d. %s (ID %d)",found,foundname,i);
  6088.                             SendClientMessage(playerid, COLOR_GREEN ,string);
  6089.                             searched = true;
  6090.                     }
  6091.                 }
  6092.             }
  6093.         }
  6094.         return 1;
  6095.     }
  6096.  
  6097.     if(!strcmp(cmdtext, "//", true, 2)) // Admin chat
  6098.     {
  6099.         if (adminlevel[playerid] >= 1)
  6100.         {
  6101.             if(!strlen(cmdtext[2])) return SendClientMessage(playerid, ORANGE, "USAGE: //<text>"), SendClientMessage(playerid, ORANGE, "HELP: Example: //Hi");
  6102.             GetPlayerName(playerid, sendername, sizeof(sendername));
  6103.             format(string, sizeof(string), "Admin [%i]%s: %s" ,playerid,sendername, cmdtext[2]);
  6104.             SendClientMessageToAdmins(DARKPINK, string, 1);
  6105.             return 1;
  6106.         }
  6107.         else return SendClientMessage(playerid, RED, "You are not an admin!");
  6108.     }
  6109.  
  6110.     if(strcmp(cmd, "/slap", true) == 0) // Slap a player
  6111.     {
  6112.         new Float:pX,Float:pY,Float:pZ;
  6113.         if (adminlevel[playerid] >= 1)
  6114.         {
  6115.             tmp = strtok(cmdtext, idx);
  6116.             if(!strlen(tmp))
  6117.             {
  6118.                 SendClientMessage(playerid, ORANGE, "USAGE: /slap [name/id]");
  6119.                 return 1;
  6120.             }
  6121.  
  6122.             giveplayerid = ReturnUser(tmp);
  6123.             if(giveplayerid != INVALID_PLAYER_ID)
  6124.             {
  6125.                 GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  6126.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  6127.                 GetPlayerPos(giveplayerid,pX,pY,pZ);
  6128.                 SetPlayerPos(giveplayerid,pX,pY,pZ+3);
  6129.                 format(string, sizeof(string), "Administrator %s slapped %s",sendername, giveplayername);
  6130.                 SendClientMessageToAdmins(ADMIN_RED, string, 1);
  6131.             }
  6132.             else if(giveplayerid == INVALID_PLAYER_ID)
  6133.             {
  6134.                 format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  6135.                 SendClientMessage(playerid, RED, string);
  6136.             }
  6137.         }
  6138.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  6139.         return 1;
  6140.     }
  6141.  
  6142.     if(strcmp(cmd, "/say", true) == 0) // Publicly says an admin message. Exact same as RCON's 'say' but in a red color.
  6143.     {
  6144.         if (adminlevel[playerid] >= 3)
  6145.         {
  6146.             GetPlayerName(playerid, sendername, sizeof(sendername));
  6147.             new result[128];
  6148.             result = bigstrtok(cmdtext, idx);
  6149.             if(!strlen(result))
  6150.             {
  6151.                 SendClientMessage(playerid, ORANGE, "USAGE: /say [message]");
  6152.                 return 1;
  6153.             }
  6154.             format(string, sizeof(string), "* Admin: %s", result);
  6155.             SendClientMessageToAll(LIGHTRED, string);
  6156.             printf("%s", string);
  6157.         }
  6158.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  6159.         return 1;
  6160.     }
  6161.  
  6162.     if(strcmp(cmd, "/teamspeak", true) == 0) // Publicly says an admin message. Exact same as RCON's 'say' but in a red color.
  6163.     {
  6164.         if (adminlevel[playerid] >= 3)
  6165.         {
  6166.             SendClientMessageToAll(LIGHTRED, "Make the server more fun! Enter our teamspeak server! 174.36.235.156:8767");
  6167.         }
  6168.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  6169.         return 1;
  6170.     }
  6171.  
  6172.     if(strcmp(cmd, "/ann", true) == 0) // Displays a screen message
  6173.     {
  6174.         if (adminlevel[playerid] >= 2)
  6175.         {
  6176.             GetPlayerName(playerid, sendername, sizeof(sendername));
  6177.             new result[128];
  6178.             result = bigstrtok(cmdtext, idx);
  6179.             if(!strlen(result))
  6180.             {
  6181.                 SendClientMessage(playerid, ORANGE, "USAGE: /ann [message] [time in seconds(if non entered, 5 seconds will be the time by default)]");
  6182.                 return 1;
  6183.             }
  6184.             new timexx;
  6185.             tmp = strtok(cmdtext, idx);
  6186.             if (!strlen(tmp)) timexx = 5;
  6187.             else timexx = strval(tmp);
  6188.             format(string, sizeof(string), "~w~%s", result);
  6189.             GameTextForAll(string, timexx*1000, 4);
  6190.             printf("%s", string);
  6191.         }
  6192.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  6193.         return 1;
  6194.     }
  6195.  
  6196.     if(strcmp(cmd, "/crash", true) == 0) // Crashes a player's client
  6197.     {
  6198.    
  6199.         if (adminlevel[playerid] >= 4)
  6200.         {
  6201.             tmp = strtok(cmdtext, idx);
  6202.             if(!strlen(tmp))
  6203.             {
  6204.                 SendClientMessage(playerid, ORANGE, "USAGE: /crash [name/id]");
  6205.                 return 1;
  6206.             }
  6207.             new Float:X,Float:Y,Float:Z;
  6208.             new targetid = ReturnUser(tmp);
  6209.             if(IsPlayerConnected(targetid))
  6210.             {
  6211.                 GetPlayerPos(giveplayerid,X,Y,Z);
  6212.                 new objectcrash = CreatePlayerObject(targetid,666666,X,Y,Z,0,0,0); // double-devil has spoken
  6213.                 SendClientMessage(playerid,GREEN, "Player crashed!");
  6214.                 DestroyPlayerObject(targetid, objectcrash);
  6215.             }
  6216.             else if (!IsPlayerConnected(giveplayerid))
  6217.             {
  6218.                 format(string, sizeof(string), "%d is not an active player.", targetid);
  6219.                 SendClientMessage(playerid, RED, string);
  6220.             }
  6221.         }
  6222.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  6223.         return 1;
  6224.     }
  6225.  
  6226.     if(strcmp(cmd, "/sex", true) == 0)
  6227.     {
  6228.         if (adminlevel[playerid] >= 4)
  6229.         {
  6230.  
  6231.                 SendClientMessageToAll(GREEN, "[COD5]lolumadd is having sex with Windy!");
  6232.             }
  6233.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  6234.         return 1;
  6235.     }
  6236.  
  6237.     if(strcmp(cmd, "/jail", true) == 0) // Jails a player
  6238.     {
  6239.    
  6240.         if (adminlevel[playerid] >= 2)
  6241.         {
  6242.             tmp = strtok(cmdtext, idx);
  6243.             if(!strlen(tmp))
  6244.             {
  6245.                 SendClientMessage(playerid, ORANGE, "USAGE: /jail [name/id] [reason]");
  6246.                 return 1;
  6247.             }
  6248.             new targetid = ReturnUser(tmp);
  6249.             if(IsPlayerConnected(targetid))
  6250.             {
  6251.                 if(targetid != INVALID_PLAYER_ID)
  6252.                 {
  6253.                     if(jail[giveplayerid] == 0)
  6254.                     {
  6255.                         GetPlayerName(targetid, giveplayername, sizeof(giveplayername));
  6256.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  6257.                         new reason[128];
  6258.                         reason = bigstrtok(cmdtext, idx);
  6259.                         if(!strlen(reason)) return SendClientMessage(playerid, ORANGE, "USAGE: /jail [name/id] [reason]");
  6260.                         format(string, sizeof(string), "You got jailed by Admin %s. Reason: %s", sendername, reason);
  6261.                         SendClientMessage(targetid, ADMIN_RED, string);
  6262.                         format(string, sizeof(string), "Administrator %s jailed %s. [ Reason: %s ]",sendername,giveplayername, reason);
  6263.                         SendClientMessageToAll(ADMIN_RED,string);
  6264.                         jail[targetid] = 1;
  6265.                         OnPlayerJailed(targetid);
  6266.                         return 1;
  6267.                     }
  6268.                     else SendClientMessage(playerid, RED, "Player is already jailed!");
  6269.                 }
  6270.                 else
  6271.                 {
  6272.                     format(string, sizeof(string), "%d is not an active player.", targetid);
  6273.                     SendClientMessage(playerid, RED, string);
  6274.                 }
  6275.             }
  6276.             else
  6277.             {
  6278.                 format(string, sizeof(string), "%d is not an active player.", targetid);
  6279.                 SendClientMessage(playerid, RED, string);
  6280.             }
  6281.         }
  6282.         else SendClientMessage(playerid, RED, "You are not an admin with the required level.");
  6283.         return 1;
  6284.     }
  6285.  
  6286.     if(strcmp(cmd, "/unjail", true) == 0) // Unjails a player
  6287.     {
  6288.    
  6289.         if (adminlevel[playerid] >= 2)
  6290.         {
  6291.             tmp = strtok(cmdtext, idx);
  6292.             if(!strlen(tmp))
  6293.             {
  6294.                 SendClientMessage(playerid, ORANGE, "USAGE: /unjail [name/id]");
  6295.                 return 1;
  6296.             }
  6297.  
  6298.             new targetid = ReturnUser(tmp);
  6299.             if(targetid != INVALID_PLAYER_ID)
  6300.             {
  6301.                 if(jail[giveplayerid] == 1)
  6302.                 {
  6303.                     GetPlayerName(targetid, giveplayername, sizeof(giveplayername));
  6304.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  6305.                     format(string, sizeof(string), "Administrator %s unjailed %s",sendername, giveplayername);
  6306.                     SendClientMessageToAll(ADMIN_RED,string);
  6307.                     jail[targetid] = 0;
  6308.                     OnPlayerUnjailed(targetid);
  6309.                 }
  6310.                 else SendClientMessage(playerid, RED, "Player is not jailed!");
  6311.             }
  6312.             else
  6313.             {
  6314.                 format(string, sizeof(string), "%d is not an active player.", targetid);
  6315.                 SendClientMessage(playerid, RED, string);
  6316.             }
  6317.         }
  6318.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  6319.         return 1;
  6320.     }
  6321.     //============[ NEW ADMIN COMMANDS ] ==========
  6322.    
  6323.     // === [Clearchat] ===
  6324.     if(strcmp(cmdtext, "/clearchat", true) == 0)
  6325.     {
  6326.         if(logged[playerid] == 1)
  6327.         {
  6328.             if(adminlevel[playerid] >= 1)
  6329.             {
  6330.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6331.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6332.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6333.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6334.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6335.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6336.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6337.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6338.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6339.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6340.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6341.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6342.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6343.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6344.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6345.                 SendClientMessageToAll(COLOR_SYSTEM, " ");
  6346.                 GameTextForAll("Chat cleared!", 1000,1);
  6347.                 GetPlayerName(playerid, nameee, 30);
  6348.                 printf("[Command] %s has used /clearchat", nameee);
  6349.                 return 1;
  6350.             }
  6351.             else
  6352.             {
  6353.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6354.                 return 1;
  6355.             }
  6356.         }
  6357.         else
  6358.         {
  6359.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6360.         }
  6361.     }
  6362.  
  6363. // === [Disarm] ===
  6364.     if(strcmp(cmd, "/disarm", true) == 0)
  6365.     {
  6366.         tmp = strtok(cmdtext, idx);
  6367.         giveplayerid = strval(tmp);
  6368.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6369.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6370.        
  6371.        
  6372.         giveplayerid = strval(tmp);
  6373.         if(!strlen(tmp) && adminlevel[playerid] >= 1)
  6374.         {
  6375.             SendClientMessage(playerid, COLOR_DBLUE, "USAGE: /disarm [playerid]");
  6376.             return 1;
  6377.         }
  6378.         if(logged[playerid] == 1)
  6379.         {
  6380.             if(adminlevel[playerid] >= 3)
  6381.             {
  6382.                 if(IsPlayerConnected(giveplayerid))
  6383.                 {
  6384.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6385.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  6386.                     ResetPlayerWeapons(giveplayerid);
  6387.                     format(string, sizeof(string), "AdmCMD: Admin %s has disarmed %s.", sendername,giveplayer);
  6388.                     SendClientMessageToAll(COLOR_BLUE, string);
  6389.                     format(string, sizeof(string), "AdmCMD: Admin %s disarmed you.", sendername);
  6390.                     SendClientMessage(giveplayerid, COLOR_BLUE, string);
  6391.                     GetPlayerName(playerid, nameee, 30);
  6392.                     printf("[Command] %s has used /disarm to disarm %s", nameee, giveplayer);
  6393.                 }
  6394.                 else
  6395.                 {
  6396.                     format(string, sizeof(string), "%d is not an active player ID number.", giveplayerid);
  6397.                     SendClientMessage(playerid, COLOR_RED, string);
  6398.                 }
  6399.             }
  6400.             else
  6401.             {
  6402.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6403.                 return 1;
  6404.             }
  6405.         }
  6406.         else
  6407.         {
  6408.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6409.         }
  6410.         return 1;
  6411.     }
  6412. // === [disarmall] ===
  6413.     if(strcmp(cmd, "/disarmall", true) == 0)
  6414.     {
  6415.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6416.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6417.        
  6418.         if(logged[playerid] == 1)
  6419.         {
  6420.             if(adminlevel[playerid] >= 3)
  6421.             {
  6422.                 foreach(Player, i)
  6423.                 {
  6424.                         ResetPlayerWeapons(i);
  6425.                         format(string, sizeof(string), "AdmCMD: Admin %s has disarmed everyone.", sendername);
  6426.                         SendClientMessage(i, COLOR_BLUE, string);
  6427.                         GetPlayerName(playerid, nameee, 30);
  6428.                 }
  6429.                 printf("[Command] %s has used /disarmall to disarm everyone", nameee);
  6430.             }
  6431.             else
  6432.             {
  6433.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6434.                 return 1;
  6435.             }
  6436.         }
  6437.         else
  6438.         {
  6439.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6440.         }
  6441.         return 1;
  6442.     }
  6443.     if(strcmp(cmd, "/armourall", true) == 0)
  6444.     {
  6445.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6446.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6447.         if(logged[playerid] == 1)
  6448.         {
  6449.             if(adminlevel[playerid] >= 2)
  6450.             {
  6451.                 format(string, sizeof(string), "AdmCMD: Admin %s has armoured everyone.", sendername);
  6452.                 SendClientMessageToAll(COLOR_BLUE, string);
  6453.                
  6454.                 GetPlayerName(playerid, nameee, sizeof(nameee));
  6455.                 printf("[Command] %s has used /armourall to armour everyone.", nameee);
  6456.                 foreach(Player, i)
  6457.                 {
  6458.                     SetPlayerArmour(i, 100);
  6459.                 }
  6460.             }
  6461.             else
  6462.             {
  6463.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6464.             }
  6465.         }
  6466.         else
  6467.         {
  6468.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6469.         }
  6470.         return 1;
  6471.     }
  6472.  
  6473.     // === [Akill] ===
  6474.     if(strcmp(cmd, "/akill", true) == 0)
  6475.     {
  6476.         tmp = strtok(cmdtext, idx);
  6477.         giveplayerid = strval(tmp);
  6478.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6479.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6480.        
  6481.        
  6482.         giveplayerid = strval(tmp);
  6483.         if(adminlevel[playerid] < 1)
  6484.         {
  6485.             SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6486.             return 1;
  6487.         }
  6488.         if(!strlen(tmp) && adminlevel[playerid] >= 1)
  6489.         {
  6490.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /akill [playerid]");
  6491.             return 1;
  6492.         }
  6493.         if(logged[playerid] == 1)
  6494.         {
  6495.             if(adminlevel[playerid] >= 1)
  6496.             {
  6497.                 if(IsPlayerConnected(giveplayerid))
  6498.                 {
  6499.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6500.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  6501.                     SetPlayerHealth(giveplayerid, -999);
  6502.                     format(string, sizeof(string), "AdmCMD: You have murdered %s.", giveplayer);
  6503.                     SendClientMessage(playerid, COLOR_BLUE, string);
  6504.                    
  6505.                     GetPlayerName(playerid, nameee, 30);
  6506.                     printf("[Command] %s has used /akill to kill %s", nameee, giveplayer);
  6507.                     return 1;
  6508.                 }
  6509.                 else
  6510.                 {
  6511.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  6512.                     SendClientMessage(playerid, COLOR_RED, string);
  6513.                 }
  6514.             }
  6515.             else
  6516.             {
  6517.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6518.                 return 1;
  6519.             }
  6520.         }
  6521.         else
  6522.         {
  6523.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6524.         }
  6525.     }
  6526.    
  6527. // === [Warn] ===
  6528.     if(strcmp(cmd, "/warn", true) == 0)
  6529.     {
  6530.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6531.        
  6532.         new str[256];
  6533.         tmp = strtok(cmdtext, idx);
  6534.  
  6535.         if(!strlen(tmp) && adminlevel[playerid] >= 1)
  6536.         {
  6537.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /warn [PlayerID] [Reason]");
  6538.             return 1;
  6539.         }
  6540.         giveplayerid = strval(tmp);
  6541.         if(logged[playerid] == 1)
  6542.         {
  6543.             if(adminlevel[playerid] >= 1)
  6544.             {
  6545.                 if(WarnedTimes[giveplayerid] == 0)
  6546.                 {
  6547.                     WarnedTimes[giveplayerid]+=1;
  6548.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6549.                     GetPlayerName(playerid, sendername, sizeof (sendername));
  6550.                     format(str, sizeof (str), "AdmCMD: %s was warned by %s for: %s [1/3 Warnings]", giveplayer, sendername, cmdtext[8]);
  6551.                     SendClientMessageToAll(COLOR_BLUE, str);
  6552.                     print(str);
  6553.                     return 1;
  6554.                 }
  6555.                 if(WarnedTimes[giveplayerid] == 1)
  6556.                 {
  6557.                     WarnedTimes[giveplayerid]+=1;
  6558.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6559.                     GetPlayerName(playerid, sendername, sizeof (sendername));
  6560.                     format(str, sizeof (str), "AdmCMD: %s was warned by %s for: %s [2/3 Warnings]", giveplayer, sendername, cmdtext[8]);
  6561.                     SendClientMessageToAll(COLOR_BLUE, str);
  6562.                     print(str);
  6563.                     return 1;
  6564.                 }
  6565.                 else if(WarnedTimes[giveplayerid] == 2)
  6566.                 {
  6567.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6568.                     GetPlayerName(playerid, sendername, sizeof (sendername));
  6569.                     format(str, sizeof (str), "AdmCMD: %s was kicked by %s for: %s [3/3 Warnings]", giveplayer, sendername, cmdtext[8]);
  6570.                     SendClientMessageToAll(COLOR_BLUE, str);
  6571.                     Kick(giveplayerid);
  6572.                     return 1;
  6573.                 }
  6574.             }
  6575.             else
  6576.             {
  6577.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6578.                 return 1;
  6579.             }
  6580.         }
  6581.         else
  6582.         {
  6583.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6584.         }
  6585.     }
  6586. // === [Freeze] ===
  6587.     if(strcmp(cmd, "/freeze", true) == 0)
  6588.     {
  6589.         tmp = strtok(cmdtext, idx);
  6590.         giveplayerid = strval(tmp);
  6591.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6592.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6593.        
  6594.  
  6595.         giveplayerid = strval(tmp);
  6596.         if(logged[playerid] == 1)
  6597.         {
  6598.             if(adminlevel[playerid] >= 1)
  6599.             {
  6600.                 if(IsPlayerConnected(giveplayerid))
  6601.                 {
  6602.                     if(freeze[giveplayerid] == 1)
  6603.                     {
  6604.                         SendClientMessage(playerid, COLOR_RED, "The player is already frozen!");
  6605.                         return 1;
  6606.                     }
  6607.                     else
  6608.                     {
  6609.                         freeze[giveplayerid] = 1;
  6610.                         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6611.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  6612.                         TogglePlayerControllable(giveplayerid, 0);
  6613.                         format(string, sizeof(string), "AdmCMD: %s was frozen by %s.",giveplayer, sendername);
  6614.                         SendClientMessageToAll(COLOR_BLUE, string);
  6615.                        
  6616.                         GetPlayerName(playerid, nameee, 30);
  6617.                         printf("[Command] %s has used /freeze to freeze %s", nameee, giveplayer);
  6618.                         return 1;
  6619.                     }
  6620.                 }
  6621.                 else
  6622.                 {
  6623.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  6624.                     SendClientMessage(playerid, COLOR_BLUE, string);
  6625.                 }
  6626.             }
  6627.             else
  6628.             {
  6629.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6630.                 return 1;
  6631.             }
  6632.         }
  6633.         else
  6634.         {
  6635.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6636.         }
  6637.         return 1;
  6638.     }
  6639. // === [Unfreeze] ===
  6640.     if(strcmp(cmd, "/unfreeze", true) == 0)
  6641.     {
  6642.         tmp = strtok(cmdtext, idx);
  6643.         giveplayerid = strval(tmp);
  6644.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6645.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6646.        
  6647.        
  6648.         giveplayerid = strval(tmp);
  6649.         if(!strlen(tmp) && adminlevel[playerid] >= 1)
  6650.         {
  6651.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /unfreeze [playerid]");
  6652.             return 1;
  6653.         }
  6654.         if(logged[playerid] == 1)
  6655.         {
  6656.             if(adminlevel[playerid] >= 1)
  6657.             {
  6658.                 if(IsPlayerConnected(giveplayerid))
  6659.                 {
  6660.                     if(freeze[giveplayerid] == 1)
  6661.                     {
  6662.                         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6663.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  6664.                         TogglePlayerControllable(giveplayerid, 1);
  6665.                         freeze[giveplayerid] = 0;
  6666.                         format(string, sizeof(string), "AdmCMD: %s was thawed by %s", giveplayer,sendername);
  6667.                         SendClientMessageToAll(COLOR_BLUE, string);
  6668.                        
  6669.                         GetPlayerName(playerid, nameee, 30);
  6670.                         printf("[Command] %s has used /unfreeze to unfreeze(thaw) %s", nameee, giveplayer);
  6671.                         return 1;
  6672.                     }
  6673.                     else
  6674.                     {
  6675.                         SendClientMessage(playerid, COLOR_RED, "This player can't be thawed, he already is!");
  6676.                         return 1;
  6677.                     }
  6678.                 }
  6679.                 else
  6680.                 {
  6681.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  6682.                     SendClientMessage(playerid, COLOR_RED, string);
  6683.                 }
  6684.             }
  6685.             else
  6686.             {
  6687.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6688.                 return 1;
  6689.             }
  6690.         }
  6691.         else
  6692.         {
  6693.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6694.         }
  6695.         return 1;
  6696.     }
  6697.    
  6698.     // === [Playerinfo] ===
  6699.     if(strcmp(cmd, "/playerinfo", true) == 0 )
  6700.     {
  6701.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6702.        
  6703.         tmp = strtok(cmdtext, idx);
  6704.         if(!strlen(tmp) && adminlevel[playerid] >= 1)
  6705.         {
  6706.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /playerinfo [playerid]");
  6707.             return 1;
  6708.         }
  6709.         giveplayerid = strval(tmp);
  6710.         if(logged[playerid] == 0)
  6711.         {
  6712.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6713.         }
  6714.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6715.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6716.         if(logged[playerid] == 1)
  6717.         {
  6718.             if(adminlevel[playerid] >= 1)
  6719.             {
  6720.                 if(IsPlayerConnected(giveplayerid))
  6721.                 {
  6722.                     new Float:health;
  6723.                     new Float:armour;
  6724.                     new intr = GetPlayerInterior(giveplayerid);
  6725.                     GetPlayerHealth(giveplayerid,health);
  6726.                     GetPlayerArmour(giveplayerid,armour);
  6727.                     new score = GetPlayerScore(giveplayerid);
  6728.                     new skin = GetPlayerSkin(giveplayerid);
  6729.                     new moneyxx = GetPlayerMoney(giveplayerid);
  6730.                     new playerip[100];
  6731.                     GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
  6732.                     new ping = GetPlayerPing(giveplayerid);
  6733.                     new sts4[256];
  6734.                     new sts2[100];
  6735.                     format(sts4, 100, "|| Health: %f || Armour: %f || Interior: %i || Score: %i ||", health, armour, intr, score);
  6736.                     format(sts2, 100, "|| Skin: %i || Money: %i || IP: %s || Ping: %i ||",skin, moneyxx, playerip, ping);
  6737.                     new ns[100];
  6738.                     new nme[20];
  6739.                     GetPlayerName(giveplayerid, nme, 20);
  6740.                     format(ns, 100, "%s's Info:", nme);
  6741.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, " ");
  6742.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, ns);
  6743.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, sts4);
  6744.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, sts2);
  6745.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, " ");
  6746.                     if(logged[giveplayerid] == 0)
  6747.                     {
  6748.                         format(string, sizeof(string),"Information on player %s (ID: %i)(Player isn't logged in) :",giveplayer, giveplayerid);
  6749.                         SendClientMessage(playerid, COLOR_BLUE, string);
  6750.                     }
  6751.                 }
  6752.                 else
  6753.                 {
  6754.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  6755.                     SendClientMessage(playerid, COLOR_RED, string);
  6756.                 }
  6757.             }
  6758.             else
  6759.             {
  6760.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6761.                 return 1;
  6762.             }
  6763.         }
  6764.         else
  6765.         {
  6766.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6767.         }
  6768.         return 1;
  6769.     }
  6770.  
  6771. // === [IP] ===
  6772.     if(strcmp(cmd, "/ip", true) == 0)
  6773.     {
  6774.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6775.        
  6776.         tmp = strtok(cmdtext, idx);
  6777.         if(!strlen(tmp) && adminlevel[playerid] >= 1)
  6778.         {
  6779.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /ip [playerid]");
  6780.             return 1;
  6781.         }
  6782.         giveplayerid = strval(tmp);
  6783.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6784.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6785.         if(logged[playerid] == 1)
  6786.         {
  6787.             if(adminlevel[playerid] >= 1)
  6788.             {
  6789.                 if(IsPlayerConnected(giveplayerid))
  6790.                 {
  6791.                     new playerip[256];
  6792.                     GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
  6793.                     format(string, sizeof(string),"AdmCMD: Checked IP on %s(%i): %s ",giveplayer, giveplayerid, playerip);
  6794.                     SendClientMessage(playerid, COLOR_BLUE, string);
  6795.                    
  6796.                     GetPlayerName(playerid, nameee, 30);
  6797.                     printf("[Command] %s has used /ip to check %s's IP", nameee, giveplayer);
  6798.                 }
  6799.                 else
  6800.                 {
  6801.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  6802.                     SendClientMessage(playerid, COLOR_RED, string);
  6803.                 }
  6804.             }
  6805.             else
  6806.             {
  6807.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6808.                 return 1;
  6809.             }
  6810.         }
  6811.         else
  6812.         {
  6813.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6814.         }
  6815.         return 1;
  6816.     }
  6817. // === [Givemoney] ===
  6818.     if(strcmp(cmd, "/givemoney", true) == 0)
  6819.     {
  6820.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6821.        
  6822.         tmp = strtok(cmdtext, idx);
  6823.         if(!strlen(tmp) && adminlevel[playerid] >= 3)
  6824.         {
  6825.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /givemoney [playerid] [amount]");
  6826.             return 1;
  6827.         }
  6828.         new moneyxx;
  6829.         giveplayerid = strval(tmp);
  6830.         if(logged[playerid] == 0)
  6831.         {
  6832.             SendClientMessage(playerid, COLOR_RED, "You must be logged in to use this command!");
  6833.             return 1;
  6834.         }
  6835.         tmp = strtok(cmdtext, idx);
  6836.         moneyxx = strval(tmp);
  6837.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6838.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6839.         if(logged[playerid] == 1)
  6840.         {
  6841.             if(adminlevel[playerid] >= 3)
  6842.             {
  6843.                 GivePlayerMoney(giveplayerid, moneyxx);
  6844.                 format(string, sizeof(string), "AdmCMD: You sent %s(%i) $%d", giveplayer,giveplayerid, moneyxx);
  6845.                 SendClientMessage(playerid,COLOR_BLUE, string);
  6846.                 format(string, sizeof(string), "AdmCMD: You received $%d from Admin %s", moneyxx,sendername);
  6847.                 SendClientMessage(giveplayerid,COLOR_BLUE, string);
  6848.                 GetPlayerName(playerid, nameee, 30);
  6849.                 printf("[Command] %s has used /givemoney to give %s $%s", nameee, giveplayer, moneyxx);
  6850.             }
  6851.             else
  6852.             {
  6853.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6854.                 return 1;
  6855.             }
  6856.         }
  6857.         else
  6858.         {
  6859.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6860.         }
  6861.         return 1;
  6862.     }
  6863.  
  6864.     // === [Setmoney] ===
  6865.     if(strcmp(cmd, "/setmoney", true) == 0)
  6866.     {
  6867.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6868.        
  6869.         tmp = strtok(cmdtext, idx);
  6870.         if(!strlen(tmp) && adminlevel[playerid] >= 3)
  6871.         {
  6872.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /setmoney [playerid] [amount]");
  6873.             return 1;
  6874.         }
  6875.         new moneyxx;
  6876.         giveplayerid = strval(tmp);
  6877.         if(logged[playerid] == 0)
  6878.         {
  6879.             SendClientMessage(playerid, COLOR_RED, "You must be logged in to use this command!");
  6880.             return 1;
  6881.         }
  6882.         tmp = strtok(cmdtext, idx);
  6883.         moneyxx = strval(tmp);
  6884.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  6885.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6886.         if(logged[playerid] == 1)
  6887.         {
  6888.             if(adminlevel[playerid] >= 3)
  6889.             {
  6890.                 ResetPlayerMoney(giveplayerid);
  6891.                 GivePlayerMoney(giveplayerid, moneyxx);
  6892.                 format(string, sizeof(string), "AdmCMD: You set %s(%i)'s money to $%d", giveplayer,giveplayerid, moneyxx);
  6893.                 SendClientMessage(playerid,COLOR_BLUE, string);
  6894.                 format(string, sizeof(string), "AdmCMD: Admin %s has set Your money to %d", sendername, moneyxx);
  6895.                 SendClientMessage(giveplayerid,COLOR_BLUE, string);
  6896.                
  6897.                 GetPlayerName(playerid, nameee, 30);
  6898.                 printf("[Command] %s has used /setmoney to set %s's money to $%s", nameee, giveplayer, moneyxx);
  6899.             }
  6900.             else
  6901.             {
  6902.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6903.                 return 1;
  6904.             }
  6905.         }
  6906.         else
  6907.         {
  6908.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6909.         }
  6910.         return 1;
  6911.     }
  6912.    
  6913.     // === [Sethealth] ===
  6914.     if(strcmp(cmd,"/sethealth",true) == 0)
  6915.     {
  6916.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6917.        
  6918.         new health;
  6919.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6920.         GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
  6921.         tmp = strtok(cmdtext, idx);
  6922.         if(!strlen(tmp))
  6923.         {
  6924.             SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /sethealth [id] [health]");
  6925.             return 1;
  6926.         }
  6927.         giveplayerid = strval(tmp);
  6928.         tmp = strtok(cmdtext, idx);
  6929.         if(!strlen(tmp))
  6930.         {
  6931.             SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /sethealth [id] [health]");
  6932.             return 1;
  6933.         }
  6934.         health = strval(tmp);
  6935.         if(health < 0 || health > 100)
  6936.         {
  6937.             SendClientMessage(playerid,COLOR_RED,"ERROR: Invalid health.");
  6938.             return 1;
  6939.         }
  6940.         if(logged[playerid] == 1)
  6941.         {
  6942.             if(adminlevel[playerid] >= 2)
  6943.             {
  6944.                 if(IsPlayerConnected(giveplayerid))
  6945.                 {
  6946.                     SetPlayerHealth(giveplayerid,health);
  6947.                     GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
  6948.                     format(string,sizeof(string),"AdmCMD: You have been set %s 's health to %d",giveplayer, health);
  6949.                     SendClientMessage(playerid,COLOR_RED,string);
  6950.                     format(string,sizeof(string),"AdmCMD: Admin %s set your health to %d",sendername, health);
  6951.                     SendClientMessage(giveplayerid,COLOR_RED,string);
  6952.                    
  6953.                     GetPlayerName(playerid, nameee, 30);
  6954.                     printf("[Command] %s has used /sethealth to set %s's health to: %d", nameee, giveplayer, health);
  6955.                 }
  6956.                 else
  6957.                 {
  6958.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  6959.                     SendClientMessage(playerid, COLOR_RED, string);
  6960.                 }
  6961.             }
  6962.             else
  6963.             {
  6964.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  6965.             }
  6966.         }
  6967.         else
  6968.         {
  6969.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  6970.         }
  6971.         return 1;
  6972.     }
  6973.  
  6974. // === [Setscore] ===
  6975.     if(strcmp(cmd,"/setscore",true) == 0)
  6976.     {
  6977.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6978.        
  6979.         new health;
  6980.         GetPlayerName(playerid, sendername, sizeof(sendername));
  6981.         GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
  6982.         tmp = strtok(cmdtext, idx);
  6983.         if(!strlen(tmp))
  6984.         {
  6985.             SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /setscore [id] [score]");
  6986.             return 1;
  6987.         }
  6988.         giveplayerid = strval(tmp);
  6989.         tmp = strtok(cmdtext, idx);
  6990.         if(!strlen(tmp))
  6991.         {
  6992.             SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /setscore [id] [score]");
  6993.             return 1;
  6994.         }
  6995.         health = strval(tmp);
  6996.         if(logged[playerid] == 1)
  6997.         {
  6998.             if(adminlevel[playerid] >= 3)
  6999.             {
  7000.                 if(IsPlayerConnected(giveplayerid))
  7001.                 {
  7002.                     SetPlayerScore(giveplayerid,health);
  7003.                     GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
  7004.                     format(string,sizeof(string),"AdmCMD: You have been set %s 's score to %d",giveplayer, health);
  7005.                     SendClientMessage(playerid,COLOR_RED,string);
  7006.                     format(string,sizeof(string),"AdmCMD: Admin %s set your score to %d",sendername, health);
  7007.                     SendClientMessage(giveplayerid,COLOR_RED,string);
  7008.                    
  7009.                     GetPlayerName(playerid, nameee, 30);
  7010.                     printf("[Command] %s has used /setscore to set %s's score to: %d", nameee, giveplayer, health);
  7011.                 }
  7012.                 else
  7013.                 {
  7014.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  7015.                     SendClientMessage(playerid, COLOR_RED, string);
  7016.                 }
  7017.             }
  7018.             else
  7019.             {
  7020.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7021.             }
  7022.         }
  7023.         else
  7024.         {
  7025.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7026.         }
  7027.         return 1;
  7028.     }
  7029.    
  7030.     // === [Tele] ===
  7031.     if(strcmp(cmd, "/telep", true) == 0)
  7032.     {
  7033.         new telename[MAX_PLAYER_NAME];
  7034.         new teleid;
  7035.         new Float:pX, Float:pY, Float:pZ;
  7036.         tmp = strtok(cmdtext, idx);
  7037.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7038.        
  7039.         if(!strlen(tmp) && adminlevel[playerid] >= 1)
  7040.         {
  7041.             SendClientMessage(playerid, COLOR_DBLUE, "USAGE: /telep [teleportee id] [destination id]");
  7042.             return 1;
  7043.         }
  7044.         giveplayerid = strval(tmp);
  7045.         tmp = strtok(cmdtext, idx);
  7046.         if(!strlen(tmp) && adminlevel[playerid] >= 1)
  7047.         {
  7048.             SendClientMessage(playerid, COLOR_DBLUE, "USAGE: /telep [teleportee id] [destination id]");
  7049.             return 1;
  7050.         }
  7051.         teleid = strval(tmp);
  7052.         if(logged[playerid] == 1)
  7053.         {
  7054.             if(adminlevel[playerid] >= 2)
  7055.             {
  7056.                 if(IsPlayerConnected(giveplayerid) && IsPlayerConnected(teleid))
  7057.                 {
  7058.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  7059.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  7060.                     GetPlayerName(teleid, telename, sizeof(telename));
  7061.                     GetPlayerPos(teleid, pX,pY,pZ);
  7062.                     SetPlayerPos(giveplayerid, pX,pY,pZ);
  7063.                     format(string, sizeof(string), "AdmCMD: You teleported %s to %s.", giveplayer,telename);
  7064.                     SendClientMessage(playerid, COLOR_BLUE, string);
  7065.                     format(string, sizeof(string), "AdmCMD: You have been teleported to %s by Admin %s.", telename,sendername);
  7066.                     SendClientMessage(giveplayerid, COLOR_BLUE, string);
  7067.                    
  7068.                     GetPlayerName(playerid, nameee, 30);
  7069.                     printf("[Command] %s has used /telep to tele %s to %s", nameee, giveplayer, telename);
  7070.                     return 1;
  7071.                 }
  7072.                 else
  7073.                 {
  7074.                     if(!IsPlayerConnected(giveplayerid))
  7075.                     {
  7076.                         format(string, sizeof(string), "ID:%d is not an active player ID number.", giveplayerid);
  7077.                         SendClientMessage(playerid, COLOR_RED, string);
  7078.                     }
  7079.                     if(!IsPlayerConnected(teleid))
  7080.                     {
  7081.                         format(string, sizeof(string), "ID:%d is not an active player ID number.", teleid);
  7082.                         SendClientMessage(playerid, COLOR_RED, string);
  7083.                     }
  7084.                 }
  7085.             }
  7086.             else
  7087.             {
  7088.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7089.             }
  7090.         }
  7091.         else
  7092.         {
  7093.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7094.         }
  7095.         return 1;
  7096.     }
  7097.    
  7098. // === [Explode] ===
  7099.     if(strcmp(cmd, "/explode", true) == 0)
  7100.     {
  7101.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7102.        
  7103.         tmp = strtok(cmdtext, idx);
  7104.         if(!strlen(tmp) && adminlevel[playerid] >= 1)
  7105.         {
  7106.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /explode [playerid]");
  7107.             return 1;
  7108.         }
  7109.         giveplayerid = strval(tmp);
  7110.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  7111.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7112.         if(logged[playerid] == 1)
  7113.         {
  7114.             if(adminlevel[playerid] >= 3)
  7115.             {
  7116.                 if(IsPlayerConnected(giveplayerid))
  7117.                 {
  7118.                     format(string, sizeof(string), "AdmCMD: %s was exploded by %s",giveplayer, sendername);
  7119.                     SendClientMessageToAll(COLOR_BLUE, string);
  7120.                     SetPlayerHealth(giveplayerid, 10);
  7121.                     new Float:boomx, Float:boomy, Float:boomz;
  7122.                     GetPlayerPos(giveplayerid,boomx, boomy, boomz);
  7123.                     CreateExplosion(boomx, boomy , boomz, 7, 10);
  7124.                    
  7125.                     GetPlayerName(playerid, nameee, 30);
  7126.                     printf("[Command] %s has used /explode to explode %s", nameee, giveplayer);
  7127.                 }
  7128.                 else
  7129.                 {
  7130.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  7131.                     SendClientMessage(playerid, COLOR_RED, string);
  7132.                 }
  7133.             }
  7134.             else
  7135.             {
  7136.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7137.             }
  7138.         }
  7139.         else
  7140.         {
  7141.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7142.         }
  7143.         return 1;
  7144.     }
  7145.  
  7146. // === [Asay] ===
  7147.     if(strcmp(cmd, "/asay", true) == 0)
  7148.     {
  7149.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7150.        
  7151.         new length = strlen(cmdtext);
  7152.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7153.         while ((idx < length) && (cmdtext[idx] <= ' '))
  7154.         {
  7155.             idx++;
  7156.         }
  7157.         new offset = idx;
  7158.         new result[64];
  7159.         while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  7160.         {
  7161.             result[idx - offset] = cmdtext[idx];
  7162.             idx++;
  7163.         }
  7164.         result[idx - offset] = EOS;
  7165.         if(!strlen(result) && adminlevel[playerid] >= 1)
  7166.         {
  7167.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /asay [text]");
  7168.             return 1;
  7169.         }
  7170.         if(logged[playerid] == 1)
  7171.         {
  7172.             if(adminlevel[playerid] >= 1)
  7173.             {
  7174.                 format(string, sizeof(string), "Admin: %s", result);
  7175.                 SendClientMessageToAll(COLOR_LIGHTGREEN,string);
  7176.                
  7177.                 GetPlayerName(playerid, nameee, 30);
  7178.                 printf("[Command] %s has used /asay to send the message: %s", nameee, result);
  7179.             }
  7180.             else
  7181.             {
  7182.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7183.                 return 1;
  7184.             }
  7185.         }
  7186.         else
  7187.         {
  7188.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7189.         }
  7190.         return 1;
  7191.     }
  7192.    
  7193.         // === [Time] ===
  7194.     if(strcmp(cmd, "/time", true) == 0)
  7195.     {
  7196.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7197.        
  7198.         tmp = strtok(cmdtext, idx);
  7199.         if(!strlen(tmp))
  7200.         {
  7201.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /time [0-23]");
  7202.             return 1;
  7203.         }
  7204.         new timexx;
  7205.         timexx = strval(tmp);
  7206.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7207.         if(logged[playerid] == 1)
  7208.         {
  7209.             if(adminlevel[playerid] >= 3)
  7210.             {
  7211.                 if(timexx > 23)
  7212.                 {
  7213.                     SendClientMessage(playerid, COLOR_RED, "Invalid time! 0 - 23!");
  7214.                 }
  7215.                 else
  7216.                 {
  7217.                     SetWorldTime(timexx);
  7218.                     hourx = timexx;
  7219.                     foreach(Player, i)
  7220.                     {
  7221.                         SetPlayerTime(i, timexx, 0);
  7222.                     }
  7223.                     format(string, sizeof(string), "AdmCMD: Admin %s set the time to: %d",sendername,timexx);
  7224.                     SendClientMessageToAll(COLOR_BLUE, string);
  7225.                    
  7226.                     GetPlayerName(playerid, nameee, 30);
  7227.                     printf("[Command] %s has used /time to set time to: %s", nameee, timexx);
  7228.                     UpdateTime();
  7229.                 }
  7230.             }
  7231.             else
  7232.             {
  7233.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7234.             }
  7235.         }
  7236.         else
  7237.         {
  7238.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7239.         }
  7240.         return 1;
  7241.     }
  7242.  
  7243. // === [Weather] ===
  7244.     if(strcmp(cmd, "/weather", true) == 0)
  7245.     {
  7246.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7247.        
  7248.         tmp = strtok(cmdtext, idx);
  7249.         if(!strlen(tmp))
  7250.         {
  7251.             SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /weather [weather]");
  7252.             SendClientMessage(playerid, COLOR_DBLUE, "Weather IDs: /weatherids");
  7253.             return 1;
  7254.         }
  7255.         new weather;
  7256.         weather = strval(tmp);
  7257.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7258.         if(logged[playerid] == 1)
  7259.         {
  7260.             if(adminlevel[playerid] >= 2)
  7261.             {
  7262.                 SetWeather(weather);
  7263.                 foreach(Player, i)
  7264.                 {
  7265.                     SetPlayerWeather(i, weather);
  7266.                 }
  7267.                 format(string, sizeof(string), "AdmCMD: Admin %s set the weather to: %d",sendername,weather);
  7268.                 SendClientMessageToAll(COLOR_BLUE, string);
  7269.                 SendClientMessage(playerid, COLOR_DBLUE, "See wheater IDs at: /weatherids");
  7270.                
  7271.                 GetPlayerName(playerid, nameee, 30);
  7272.                 printf("[Command] %s has used /weather to set weather to: %s", nameee, weather);
  7273.             }
  7274.             else
  7275.             {
  7276.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7277.             }
  7278.         }
  7279.         else
  7280.         {
  7281.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7282.         }
  7283.         return 1;
  7284.     }
  7285. // === [Weatherids] ===
  7286.     if(strcmp(cmd, "/weatherids", true) == 0 || strcmp(cmd, "/weathers", true) == 0)
  7287.     {
  7288.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7289.        
  7290.         if(adminlevel[playerid] >= 3)
  7291.         {
  7292.             SendClientMessage(playerid, COLOR_RED, ">>+-=================================== [Weather Ids: ] ================================");
  7293.             SendClientMessage(playerid, COLOR_YELLOW, ">>| 1 - Blue | 2 - Lighter Blue | 3 - Light (No color) | 4 - Even more lighter");
  7294.             SendClientMessage(playerid, COLOR_YELLOW, ">>| 5 - Normal Sun | 7 - (My PC = Beeped) | 8 - Rainy | 9 - Foggy | 10 - Standard weather");
  7295.             SendClientMessage(playerid, COLOR_YELLOW, ">>| 12 - Colourless, with alittle fog | 13 - Less foggy  | 15 - Little fog ");
  7296.             SendClientMessage(playerid, COLOR_YELLOW, ">>| 16 - Rainy | 17 - Hot | 19 - Sandstorm | 20 - Dark | 21 - Some very wierd weather ");
  7297.             SendClientMessage(playerid, COLOR_YELLOW, ">>| 23 - Atmosphere style (?) | 25 - Abit foggy | 27 - Abit \"White\" | 30 - Thunderstorm ");
  7298.             SendClientMessage(playerid, COLOR_YELLOW, ">>| 32 - Foggy | 33 - Hot | 35 - City weather | 37 - Warm | 38 - Even more city weather ");
  7299.             SendClientMessage(playerid, COLOR_YELLOW, ">>| 39 - Industrial weather | 40 - Yellow weather | 42 - Black fog | 43 - Industrial fog ");
  7300.             SendClientMessage(playerid, COLOR_YELLOW, ">>| 44 & 45 - Some wierd weather. -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- (c) IDs by PaoloP");
  7301.             SendClientMessage(playerid, COLOR_RED, ">>+-====================================================================================");
  7302.         }
  7303.         else
  7304.         {
  7305.             SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7306.         }
  7307.         return 1;
  7308.         }
  7309.        
  7310.     if(strcmp(cmd, "/force", true) == 0)
  7311.     {
  7312.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7313.        
  7314.         tmp = strtok(cmdtext, idx);
  7315.         if  (!strlen(tmp))
  7316.         {
  7317.             SendClientMessage(playerid, COLOR_GREEN, "USAGE: /force [playerid]");
  7318.             return 1;
  7319.         }
  7320.         giveplayerid = strval(tmp);
  7321.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7322.         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  7323.         if(logged[playerid] == 1)
  7324.         {
  7325.             if(adminlevel[playerid] >= 1)
  7326.             {
  7327.                 if(IsPlayerConnected(giveplayerid))
  7328.                 {
  7329.                     format(string, sizeof(string), "AdmCMD: You have forced %s(%i) to class selection", giveplayer, giveplayerid);
  7330.                     SendClientMessage(playerid, COLOR_BLUE, string);
  7331.                     SetPlayerHealth(giveplayerid, 0.0);
  7332.                     ForceClassSelection(giveplayerid);
  7333.                     format(string, sizeof(string), "AdmCMD: %s(%i) has forced You to class selection", sendername, playerid);
  7334.                     SendClientMessage(giveplayerid, COLOR_BLUE, string);
  7335.                 }
  7336.                 else
  7337.                 {
  7338.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  7339.                     SendClientMessage(playerid, COLOR_RED, string);
  7340.                 }
  7341.             }
  7342.             else
  7343.             {
  7344.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7345.             }
  7346.         }
  7347.         else
  7348.         {
  7349.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7350.         }
  7351.         return 1;
  7352.     }
  7353.    
  7354.     if(strcmp(cmd, "/setarmour", true) == 0)
  7355.     {
  7356.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7357.        
  7358.         new armor;
  7359.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7360.         GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
  7361.         tmp = strtok(cmdtext, idx);
  7362.         if(!strlen(tmp))
  7363.         {
  7364.             SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /setarmour [id] [armor]");
  7365.             return 1;
  7366.         }
  7367.         giveplayerid = strval(tmp);
  7368.         tmp = strtok(cmdtext, idx);
  7369.         if(!strlen(tmp))
  7370.         {
  7371.             SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /setarmour [id] [armor]");
  7372.             return 1;
  7373.         }
  7374.         armor = strval(tmp);
  7375.         if(armor < 0 || armor > 100)
  7376.         {
  7377.             SendClientMessage(playerid,COLOR_RED,"ERROR: Invalid armor.");
  7378.             return 1;
  7379.         }
  7380.         if(logged[playerid] == 1)
  7381.         {
  7382.             if(adminlevel[playerid] >= 2)
  7383.             {
  7384.                 if(IsPlayerConnected(giveplayerid))
  7385.                 {
  7386.                     SetPlayerArmour(giveplayerid, armor);
  7387.                     GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
  7388.                     format(string,sizeof(string),"AdmCMD: You have been set %s 's armour to %d",giveplayer, armor);
  7389.                     SendClientMessage(playerid,COLOR_RED,string);
  7390.                     format(string,sizeof(string),"AdmCMD: Admin %s set your armour to %d",sendername, armor);
  7391.                     SendClientMessage(giveplayerid,COLOR_RED,string);
  7392.                    
  7393.                     GetPlayerName(playerid, nameee, 30);
  7394.                     printf("[Command] %s has used /setarmor to set %s's armor to: %d", nameee, giveplayer, armor);
  7395.                 }
  7396.                 else
  7397.                 {
  7398.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  7399.                     SendClientMessage(playerid, COLOR_RED, string);
  7400.                 }
  7401.             }
  7402.             else
  7403.             {
  7404.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7405.             }
  7406.         }
  7407.         else
  7408.         {
  7409.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7410.         }
  7411.         return 1;
  7412.     }
  7413.     if(strcmp(cmd, "/healall", true) == 0)
  7414.     {
  7415.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7416.        
  7417.         if(logged[playerid] == 1)
  7418.         {
  7419.             if(adminlevel[playerid] >= 2)
  7420.             {
  7421.                 format(string, sizeof(string), "AdmCMD: %s has healed everyone", sendername);
  7422.                 SendClientMessageToAll(COLOR_BLUE, string);
  7423.                 foreach(Player, i)
  7424.                 {
  7425.                     SetPlayerHealth(i, 100);
  7426.                 }
  7427.             }
  7428.             else
  7429.             {
  7430.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7431.             }
  7432.         }
  7433.         else
  7434.         {
  7435.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7436.         }
  7437.         return 1;
  7438.     }
  7439.    
  7440.     // === [Reloadbans] ===
  7441.     if(strcmp(cmd,"/reloadbans",true) == 0)
  7442.     {
  7443.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7444.        
  7445.         if(logged[playerid] == 1)
  7446.         {
  7447.             if(adminlevel[playerid] == 4)
  7448.             {
  7449.                 SendClientMessage(playerid, COLOR_RED, "You have successfully re-loaded bans!");
  7450.                 SendRconCommand("reloadbans");
  7451.             }
  7452.             else
  7453.             {
  7454.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7455.             }
  7456.         }
  7457.         else
  7458.         {
  7459.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7460.         }
  7461.         return 1;
  7462.     }
  7463. // === [Reloadlogs] ===
  7464.     if(strcmp(cmd,"/reloadlogs",true) == 0)
  7465.     {
  7466.         GetPlayerName(playerid, sendername, sizeof(sendername));
  7467.         if(logged[playerid] == 1)
  7468.         {
  7469.             if(adminlevel[playerid] == 4)
  7470.             {
  7471.                 SendRconCommand("reloadlogs");
  7472.                 SendClientMessage(playerid, COLOR_RED, "You have successfully re-loaded logs!");
  7473.             }
  7474.             else
  7475.             {
  7476.                 SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
  7477.             }
  7478.         }
  7479.         else
  7480.         {
  7481.             SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
  7482.         }
  7483.         return 1;
  7484.     }
  7485.     //============[ End NEW ADMIN COMMANDS ]=======
  7486.     // === [Eject] ===
  7487.     if(strcmp(cmd,"/eject",true) == 0)
  7488.     {
  7489.         if( IsPlayerInAnyVehicle(playerid) )
  7490.         {
  7491.             GetPlayerName(playerid, sendername, sizeof(sendername));
  7492.             GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
  7493.             tmp = strtok(cmdtext, idx);
  7494.             if(!strlen(tmp))
  7495.             {
  7496.                 SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /eject [playerid]");
  7497.                 return 1;
  7498.             }
  7499.  
  7500.             if( GetPlayerVehicleSeat(playerid)  == 0 )
  7501.             {
  7502.                 giveplayerid = strval(tmp);
  7503.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  7504.                 GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
  7505.                 if(IsPlayerConnected(giveplayerid))
  7506.                 {
  7507.                     if(IsPlayerInAnyVehicle(giveplayerid))
  7508.                     {
  7509.                         RemovePlayerFromVehicle(giveplayerid);
  7510.                         format(string, sizeof(string), "%s has ejected You!", sendername);
  7511.                         SendClientMessage(giveplayerid, COLOR_RED, string);
  7512.                         GetPlayerName(playerid, nameee, 30);
  7513.                         printf("[Command] %s has used /eject to eject %s", nameee, giveplayer);
  7514.                         return 1;
  7515.                     }
  7516.                     else
  7517.                     {
  7518.                         format(string, sizeof(string), "Error! %s isn't in a vehicle!");
  7519.                         SendClientMessage(playerid, COLOR_RED, string);
  7520.                         return 1;
  7521.                     }
  7522.                 }
  7523.                 else
  7524.                 {
  7525.                     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  7526.                     SendClientMessage(playerid, COLOR_RED, string);
  7527.                 }
  7528.             }else SendClientMessage(playerid, COLOR_RED, "You are not the driver!");
  7529.         }else SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle!");
  7530.         return 1;
  7531.     }
  7532.  
  7533.  
  7534.  
  7535.     if(strcmp(cmd, "/report", true) == 0) // Available for everyone: reports a player to the admins
  7536.     {
  7537.    
  7538.         tmp = strtok(cmdtext, idx);
  7539.         if(!strlen(tmp))
  7540.         {
  7541.             SendClientMessage(playerid, ORANGE, "USAGE: /report [name/id] [reason]");
  7542.             return 1;
  7543.         }
  7544.         new targetid = ReturnUser(tmp);
  7545.         if(targetid != INVALID_PLAYER_ID)
  7546.         {
  7547.             GetPlayerName(targetid, giveplayername, sizeof(giveplayername));
  7548.             GetPlayerName(playerid, sendername, sizeof(sendername));
  7549.             new reason[128];
  7550.             reason = bigstrtok(cmdtext, idx);
  7551.             if(!strlen(reason)) return SendClientMessage(playerid, ORANGE, "USAGE: /report [playerid] [reason]");
  7552.             format(string, sizeof(string), "%s reported %s [ID: %d] [ Reason: %s ]", sendername,giveplayername,targetid,reason);
  7553.             SendClientMessageToAdmins(ADMIN_RED, string,1);
  7554.             print(string);
  7555.             format(string, sizeof(string), "Your report on '%s' has been sent to the current online admins. Thank you.", giveplayername);
  7556.             SendClientMessage(playerid, GREEN, string);
  7557.         }
  7558.  
  7559.         else if(giveplayerid == INVALID_PLAYER_ID)
  7560.         {
  7561.             format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  7562.             SendClientMessage(playerid, RED, string);
  7563.         }
  7564.         return 1;
  7565.     }
  7566.  
  7567.     if(strcmp(cmd, "/goto", true) == 0) // Teleports to a player
  7568.     {
  7569.         new Float:pX,Float:pY,Float:pZ;
  7570.         if (adminlevel[playerid] >= 1)
  7571.         {
  7572.             tmp = strtok(cmdtext, idx);
  7573.             if(!strlen(tmp))
  7574.             {
  7575.                 SendClientMessage(playerid, ORANGE, "USAGE: /goto [name/id]");
  7576.                 return 1;
  7577.             }
  7578.             giveplayerid = ReturnUser(tmp);
  7579.             if(giveplayerid != INVALID_PLAYER_ID)
  7580.             {
  7581.                 if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  7582.                 {
  7583.                     GetPlayerPos(giveplayerid,pX,pY,pZ);
  7584.                     SetVehiclePos(GetPlayerVehicleID(playerid),pX,pY,pZ+2);
  7585.                 }
  7586.                 else
  7587.                 {
  7588.                     GetPlayerPos(giveplayerid,pX,pY,pZ);
  7589.                     SetPlayerPos(playerid,pX,pY,pZ+2);
  7590.                 }
  7591.                 SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid));
  7592.             }
  7593.             else if(giveplayerid == INVALID_PLAYER_ID)
  7594.             {
  7595.                 format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  7596.                 SendClientMessage(playerid, RED, string);
  7597.             }
  7598.         }
  7599.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  7600.         return 1;
  7601.     }
  7602.  
  7603.     if(strcmp(cmd, "/get", true) == 0) // Teleports the player to your position
  7604.     {
  7605.         new Float:pX,Float:pY,Float:pZ;
  7606.         if (adminlevel[playerid] >= 1)
  7607.         {
  7608.             tmp = strtok(cmdtext, idx);
  7609.             if(!strlen(tmp))
  7610.             {
  7611.                 SendClientMessage(playerid, ORANGE, "USAGE: /get [playername/id]");
  7612.                 return 1;
  7613.             }
  7614.             giveplayerid = ReturnUser(tmp);
  7615.             if(giveplayerid != INVALID_PLAYER_ID)
  7616.             {
  7617.                 if (GetPlayerState(giveplayerid) == PLAYER_STATE_DRIVER)
  7618.                 {
  7619.                     GetPlayerPos(playerid,pX,pY,pZ);
  7620.                     SetVehiclePos(GetPlayerVehicleID(giveplayerid),pX,pY,pZ+2);
  7621.                 }
  7622.                 else
  7623.                 {
  7624.                     GetPlayerPos(playerid,pX,pY,pZ);
  7625.                     SetPlayerPos(giveplayerid,pX,pY,pZ+2);
  7626.                 }
  7627.                 SetPlayerInterior(giveplayerid,GetPlayerInterior(playerid));
  7628.             }
  7629.             else if(giveplayerid == INVALID_PLAYER_ID)
  7630.             {
  7631.                 format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  7632.                 SendClientMessage(playerid, RED, string);
  7633.             }
  7634.         }
  7635.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  7636.         return 1;
  7637.     }
  7638.  
  7639.     if(strcmp(cmd, "/mute", true) == 0) // Mutes the player from talking in the chat box
  7640.     {
  7641.         new reason[128];
  7642.         if (adminlevel[playerid] >= 2)
  7643.         {
  7644.             tmp = strtok(cmdtext, idx);
  7645.             if(!strlen(tmp))
  7646.             {
  7647.                 SendClientMessage(playerid, ORANGE, "USAGE: /mute [name/id] [reason]");
  7648.                 return 1;
  7649.             }
  7650.  
  7651.             giveplayerid = ReturnUser(tmp);
  7652.  
  7653.             if(giveplayerid != INVALID_PLAYER_ID)
  7654.             {
  7655.                 if (mute[giveplayerid] == 0)
  7656.                 {
  7657.                     GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  7658.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  7659.                     reason = bigstrtok(cmdtext, idx);
  7660.                     if(!strlen(reason)) return SendClientMessage(playerid, ORANGE, "USAGE: /mute [name/id] [reason]");
  7661.                     printf("ADMIN: Admin %s muted %s. Reason: %s", sendername, giveplayername, reason);
  7662.                     format(string, sizeof(string), "Administrator %s muted %s. [Reason: %s ]", sendername,giveplayername,reason);
  7663.                     SendClientMessageToAll(ADMIN_RED, string);
  7664.                     mute[giveplayerid] = 1;
  7665.                 }
  7666.                 else if (mute[giveplayerid] == 1) SendClientMessage(playerid, RED, "Player is already muted!");
  7667.             }
  7668.  
  7669.             else if(giveplayerid == INVALID_PLAYER_ID)
  7670.             {
  7671.                 format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  7672.                 SendClientMessage(playerid, RED, string);
  7673.             }
  7674.         }
  7675.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  7676.         return 1;
  7677.     }
  7678.  
  7679.     if(strcmp(cmd, "/unmute", true) == 0) // Unmutes a muted player
  7680.     {
  7681.         if (adminlevel[playerid] >= 2)
  7682.         {
  7683.             tmp = strtok(cmdtext, idx);
  7684.             if(!strlen(tmp))
  7685.             {
  7686.                 SendClientMessage(playerid, ORANGE, "USAGE: /unmute [name/id]");
  7687.                 return 1;
  7688.             }
  7689.  
  7690.             giveplayerid = ReturnUser(tmp);
  7691.  
  7692.             if(giveplayerid != INVALID_PLAYER_ID)
  7693.             {
  7694.                 if (mute[giveplayerid] == 1)
  7695.                 {
  7696.                     GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  7697.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  7698.                     format(string, sizeof(string), "Administrator %s unmuted %s", sendername,giveplayername);
  7699.                     SendClientMessageToAll(ADMIN_RED, string);
  7700.                     mute[giveplayerid] = 0;
  7701.                 }
  7702.                 else if (mute[giveplayerid] == 0) SendClientMessage(playerid, RED, "Player isn't muted.");
  7703.             }
  7704.  
  7705.             else if(giveplayerid == INVALID_PLAYER_ID)
  7706.             {
  7707.                 format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  7708.                 SendClientMessage(playerid, RED, string);
  7709.             }
  7710.         }
  7711.         else SendClientMessage(playerid, RED, "You cannot use this command!");
  7712.         return 1;
  7713.     }
  7714.  
  7715.  
  7716.     if(strcmp(cmd, "/ah", true) == 0 || strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/acommands", true) == 0) // List of admin commands
  7717.     {
  7718.         if( logged[playerid] == 1 )
  7719.         {
  7720.             if (adminlevel[playerid] >= 1)
  7721.             {
  7722.                     SendClientMessage(playerid, YELLOW, "       |- Server Admin Commands -|");
  7723.                     SendClientMessage(playerid, ORANGE, "ADMIN CHAT: //   Example: //hello");
  7724.                     if(adminlevel[playerid] == 1)
  7725.                     {
  7726.                         SendClientMessage(playerid, COLOR_RED, ">>-+== Level 1 Admin commands =====================================================================================");
  7727.                         SendClientMessage(playerid, COLOR_YELLOW, Level1Commands1);
  7728.                         SendClientMessage(playerid, COLOR_YELLOW, Level1Commands2);
  7729.                     }
  7730.                     if(adminlevel[playerid] == 2)
  7731.                     {
  7732.                         SendClientMessage(playerid, COLOR_RED, ">>-+== Level 2 Admin commands =====================================================================================");
  7733.                         SendClientMessage(playerid, COLOR_YELLOW, Level1Commands1);
  7734.                         SendClientMessage(playerid, COLOR_YELLOW, Level1Commands2);
  7735.                         SendClientMessage(playerid, COLOR_YELLOW, Level2Commands1);
  7736.                         SendClientMessage(playerid, COLOR_YELLOW, Level2Commands2);
  7737.                     }
  7738.                     if(adminlevel[playerid] == 3)
  7739.                     {
  7740.                         SendClientMessage(playerid, COLOR_RED, ">>-+== Level 3 Admin commands =====================================================================================");
  7741.                         SendClientMessage(playerid, COLOR_YELLOW, Level1Commands1);
  7742.                         SendClientMessage(playerid, COLOR_YELLOW, Level1Commands2);
  7743.                         SendClientMessage(playerid, COLOR_YELLOW, Level2Commands1);
  7744.                         SendClientMessage(playerid, COLOR_YELLOW, Level2Commands2);
  7745.                         SendClientMessage(playerid, COLOR_YELLOW, Level3Commands1);
  7746.                         SendClientMessage(playerid, COLOR_YELLOW, Level3Commands2);
  7747.                     }
  7748.                     if(adminlevel[playerid] == 4)
  7749.                     {
  7750.                         SendClientMessage(playerid, COLOR_RED, ">>-+== Level 4 Admin commands =====================================================================================");
  7751.                         SendClientMessage(playerid, COLOR_YELLOW, Level1Commands1);
  7752.                         SendClientMessage(playerid, COLOR_YELLOW, Level1Commands2);
  7753.                         SendClientMessage(playerid, COLOR_YELLOW, Level2Commands1);
  7754.                         SendClientMessage(playerid, COLOR_YELLOW, Level2Commands2);
  7755.                         SendClientMessage(playerid, COLOR_YELLOW, Level3Commands1);
  7756.                         SendClientMessage(playerid, COLOR_YELLOW, Level3Commands2);
  7757.                         SendClientMessage(playerid, COLOR_YELLOW, Level4Commands1);
  7758.                     }
  7759.  
  7760.             }
  7761.             else SendClientMessage(playerid, RED, "You are not an admin!");
  7762.         }else SendClientMessage(playerid, RED, "You need to be logged !");
  7763.         return 1;
  7764.     }
  7765.  
  7766.     if(strcmp(cmd, "/adminduty", true) == 0)
  7767.     {
  7768.         if (adminlevel[playerid] >= 1)
  7769.         {
  7770.             if(adminduty[playerid] == 1)
  7771.             {
  7772.                 GetPlayerName(playerid, nameee, sizeof(nameee));
  7773.                 format(string, sizeof(string), "%s is now off admin duty!", nameee);
  7774.                 SendClientMessageToAll(RED, string);
  7775.                 adminduty[playerid] = 0;
  7776.                 SetPlayerHealth(playerid, 0.0);
  7777.             }
  7778.             else if(adminduty[playerid] == 0)
  7779.             {
  7780.                 GetPlayerName(playerid, nameee, sizeof(nameee));
  7781.                 format(string, sizeof(string), "%s is now on admin duty!", nameee);
  7782.                 SendClientMessageToAll(RED, string);
  7783.                 SetPlayerColor(playerid, LIGHTGREEN);
  7784.                 adminduty[playerid] = 1;
  7785.             }
  7786.         }
  7787.         else SendClientMessage(playerid, RED, "You are not an admin!");
  7788.         return 1;
  7789.     }
  7790.  
  7791.     if(strcmp(cmd, "/stats", true) == 0) //players ingame stats
  7792.     {
  7793.         format(string, sizeof(string), "SCORE: %d  RANK: %d  DEATHS: %d  KILLS: %d", GetPlayerScore(playerid), rank[playerid], deaths[playerid], kills[playerid]);
  7794.         SendClientMessage(playerid, WHITE, string);
  7795.         return 1;
  7796.     }
  7797.     return 0;
  7798. }
  7799.  
  7800. public OnPlayerExitVehicle(playerid, vehicleid)
  7801. {
  7802.  
  7803.     TextDrawHideForPlayer(playerid, Text:Textdraw0);
  7804.  
  7805.     if (GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 433 || GetVehicleModel(vehicleid) == 563 || GetVehicleModel(vehicleid) == 511)
  7806.     {
  7807.         CargoBobUser[playerid][vehicleid] =0;
  7808.         BarracksUser[playerid][vehicleid] =0;
  7809.         Driver[vehicleid] = -1;
  7810.     }
  7811.  
  7812.     return 1;
  7813. }
  7814.  
  7815. public OnPlayerStateChange(playerid, newstate, oldstate)
  7816. {
  7817.         if( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER ) LastVehicle[playerid] = GetPlayerVehicleID(playerid);
  7818.  
  7819.  
  7820.         new vehicleid = LastVehicle[playerid];
  7821.         if( oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
  7822.         {
  7823.             if (GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 433 || GetVehicleModel(vehicleid) == 563 || GetVehicleModel(vehicleid) == 511)
  7824.             {
  7825.                 CargoBobUser[playerid][vehicleid] =0;
  7826.                 BarracksUser[playerid][vehicleid] =0;
  7827.             }
  7828.         }
  7829.  
  7830.         if( !IsPlayerAdmin(playerid))
  7831.         {
  7832.             new vehicleidx = GetPlayerVehicleID(playerid);
  7833.             if(newstate == PLAYER_STATE_DRIVER)
  7834.             {
  7835.                 if(GetVehicleModel(vehicleidx) == 425)
  7836.                 {
  7837.                     if(rank[playerid] >= 3)
  7838.                     {
  7839.                         IsInHunter[playerid] = vehicleidx;
  7840.                     }
  7841.                     else
  7842.                     {
  7843.                         new Float:X, Float:Y, Float:Z;
  7844.                         GetPlayerPos(playerid, X, Y, Z);
  7845.                         SetPlayerPos(playerid, X+2.0, Y, Z);
  7846.                         SendClientMessage(playerid, COLOR_RED, "You arent rank 3!");
  7847.                     }
  7848.                 }
  7849.  
  7850.                 if (GetVehicleModel(vehicleidx) == 432)
  7851.                 {
  7852.                     if(rank[playerid] >= 2)
  7853.                     {
  7854.                         IsInRhino[playerid] = vehicleidx;
  7855.                     }
  7856.                     else
  7857.                     {
  7858.                         new Float:X, Float:Y, Float:Z;
  7859.                         GetPlayerPos(playerid, X, Y, Z);
  7860.                         SetPlayerPos(playerid, X+2.0, Y, Z+2.0);
  7861.                         SendClientMessage(playerid, COLOR_RED, "You arent rank 2!");
  7862.                     }
  7863.                 }
  7864.  
  7865.                 if (GetVehicleModel(vehicleidx) == 520)
  7866.                 {
  7867.                     if(rank[playerid] >= 2)
  7868.                     {
  7869.                         if(gPlayerClass[playerid] == PILOT || gPlayerClass[playerid] == ADMIN )
  7870.                         {
  7871.                             //is in the hydra
  7872.                         }
  7873.                         else
  7874.                         {
  7875.                             SendClientMessage(playerid, COLOR_GREY, "You have to be a pilot to drive a hydra!");
  7876.                             new Float:X, Float:Y, Float:Z;
  7877.                             GetPlayerPos(playerid, X, Y, Z);
  7878.                             SetPlayerPos(playerid, X+2.0, Y, Z);
  7879.                         }
  7880.                     }
  7881.                     else
  7882.                     {
  7883.                         new Float:X, Float:Y, Float:Z;
  7884.                         GetPlayerPos(playerid, X, Y, Z);
  7885.                         SetPlayerPos(playerid, X+2.0, Y, Z+2.0);
  7886.                         SendClientMessage(playerid, COLOR_RED, "You arent rank 2!");
  7887.                     }
  7888.                 }
  7889.             }
  7890.         }
  7891.         return 1;
  7892. }
  7893.  
  7894. public OnPlayerEnterCheckpoint(playerid)
  7895. {
  7896.     return 1;
  7897. }
  7898.  
  7899. public OnPlayerLeaveCheckpoint(playerid)
  7900. {
  7901.     return 1;
  7902. }
  7903.  
  7904. public OnPlayerEnterRaceCheckpoint(playerid)
  7905. {
  7906.     return 1;
  7907. }
  7908.  
  7909. public OnPlayerLeaveRaceCheckpoint(playerid)
  7910. {
  7911.     return 1;
  7912. }
  7913.  
  7914. public OnRconCommand(cmd[])
  7915. {
  7916.     return 1;
  7917. }
  7918.  
  7919. public OnPlayerObjectMoved(playerid, objectid)
  7920. {
  7921.     return 1;
  7922. }
  7923.  
  7924. public OnPlayerPickUpPickup(playerid, pickupid)
  7925. {
  7926.  
  7927.         new allp;
  7928.         foreach(Player, i)
  7929.         {
  7930.             allp = i;
  7931.         }
  7932.        
  7933.         if(pickupid == Dispenser[allp] )
  7934.         {
  7935.             if( pickupid != Dispenser[allp] ){ }
  7936.             if( dispout[playerid] == 0 )
  7937.             {
  7938.                 SetTimerEx("DispenserOut", 10000, 0, "i", playerid);
  7939.                 if( gPlayerClass[playerid] == ASSAULT )
  7940.                 {
  7941.                     GivePlayerWeapon(playerid, 30, 50);
  7942.                     GivePlayerWeapon(playerid, 29, 20);
  7943.                     GivePlayerWeapon(playerid, 25, 10);
  7944.                 }
  7945.                 if( gPlayerClass[playerid] == DEMOLITION )
  7946.                 {
  7947.                     GivePlayerWeapon(playerid, 16, 5);
  7948.                     GivePlayerWeapon(playerid, 36, 1);
  7949.                     GivePlayerWeapon(playerid, 24, 20);
  7950.                 }
  7951.                 if( gPlayerClass[playerid] == SNIPER )
  7952.                 {
  7953.                     GivePlayerWeapon(playerid, 34, 20);
  7954.                     GivePlayerWeapon(playerid, 1, 1);
  7955.                     GivePlayerWeapon(playerid, 24, 20);
  7956.                 }
  7957.                 if( gPlayerClass[playerid] == PILOT )
  7958.                 {
  7959.                     GivePlayerWeapon(playerid, 22, 5);
  7960.                 }
  7961.                 if( gPlayerClass[playerid] == MEDIC )
  7962.                 {
  7963.                     GivePlayerWeapon(playerid, 23, 20);
  7964.                     GivePlayerWeapon(playerid, 1, 1);
  7965.                 }
  7966.                 if( gPlayerClass[playerid] == ENGINEER )
  7967.                 {
  7968.                     GivePlayerWeapon(playerid, 27, 20);
  7969.                     GivePlayerWeapon(playerid, 1, 1);
  7970.                     GivePlayerWeapon(playerid, 29, 20);
  7971.                 }
  7972.                 if( gPlayerClass[playerid] ==  PYRO ) //pyro
  7973.                 {
  7974.                     SendClientMessage(playerid, COLOR_GREY, "You chose the pyroman as your class.");
  7975.                     SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  7976.                     gPlayerClass[playerid] = PYRO;
  7977.                     PickedClass[playerid] = 1;
  7978.                     SetPlayerVirtualWorld(playerid, 0);
  7979.                     TogglePlayerControllable(playerid, 1);
  7980.                     if(gTeam[playerid] == TEAM_USA)
  7981.                     {
  7982.                         SetPlayerSkin(playerid, 279);
  7983.                         GivePlayerWeapon(playerid, 16, 20);
  7984.                         GivePlayerWeapon(playerid, 1, 1);
  7985.                         GivePlayerWeapon(playerid, 23, 200);
  7986.                         GivePlayerWeapon(playerid, 37, 550);
  7987.                     }else
  7988.                     if(gTeam[playerid] == TEAM_GERMANY)
  7989.                     {
  7990.                         SetPlayerSkin(playerid, 278);
  7991.                         GivePlayerWeapon(playerid, 16, 20);
  7992.                         GivePlayerWeapon(playerid, 1, 1);
  7993.                         GivePlayerWeapon(playerid, 23, 200);
  7994.                         GivePlayerWeapon(playerid, 37, 250);
  7995.                     }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  7996.                     {
  7997.                         GivePlayerWeapon(playerid, 34, 200);
  7998.                         GivePlayerWeapon(playerid, 1, 1);
  7999.                         GivePlayerWeapon(playerid, 24, 200);
  8000.                     }
  8001.  
  8002.  
  8003.                 }
  8004.  
  8005.                 if( gPlayerClass[playerid] == Esploratore )//Esploratore
  8006.                 {
  8007.                     SendClientMessage(playerid, COLOR_GREY, "You chose the Esploratore as your class.");
  8008.                     SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
  8009.                     gPlayerClass[playerid] = Esploratore;
  8010.                     PickedClass[playerid] = 1;
  8011.                     SetPlayerVirtualWorld(playerid, 0);
  8012.                     TogglePlayerControllable(playerid, 1);
  8013.                     if(gTeam[playerid] == TEAM_USA)
  8014.                     {
  8015.                         SetPlayerSkin(playerid, 128);
  8016.                         SetPlayerArmour(playerid, 25);
  8017.                         GivePlayerWeapon(playerid, 28, 200);
  8018.                         GivePlayerWeapon(playerid, 1, 1);
  8019.                         GivePlayerWeapon(playerid, 22, 200);
  8020.                     }
  8021.                     if(gTeam[playerid] == TEAM_GERMANY)
  8022.                     {
  8023.                         SetPlayerSkin(playerid, 202);
  8024.                         SetPlayerArmour(playerid, 25);
  8025.                         GivePlayerWeapon(playerid, 28, 200);
  8026.                         GivePlayerWeapon(playerid, 1, 1);
  8027.                         GivePlayerWeapon(playerid, 22, 200);
  8028.                     }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  8029.                     {
  8030.                         GivePlayerWeapon(playerid, 34, 200);
  8031.                         GivePlayerWeapon(playerid, 1, 1);
  8032.                         GivePlayerWeapon(playerid, 24, 200);
  8033.                     }
  8034.                 }
  8035.                 if( gPlayerClass[playerid] == ADMIN )
  8036.                 {
  8037.                     GivePlayerWeapon(playerid, 38, 20000);
  8038.                     GivePlayerWeapon(playerid, 22, 20000);
  8039.                 }
  8040.                 dispout[playerid] = 1;
  8041.             } else SendClientMessage(playerid, COLOR_RED, "Dispenser recharging - come back in 10 seconds!");
  8042.         }
  8043.         else if(pickupid == umini)
  8044.         {
  8045.             GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~RAMPAGE~n~KILL 5 PEOPLE IN 2 MINUTES~n~REWARD:3+ SCORE", 5000, 3);
  8046.             SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
  8047.         }
  8048.         else if(pickupid == gmini)
  8049.         {
  8050.             GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~RAMPAGE~n~KILL 5 PEOPLE IN 2 MINUTES~n~REWARD:3+ SCORE", 5000, 3);
  8051.             SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
  8052.         }
  8053.         else if(pickupid == uhit)
  8054.         {
  8055.             GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~HITMAN~n~KILL THE RANDOM PERSON PICKED~n~REWARD:3+ SCORE", 5000, 3);
  8056.             SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
  8057.         }
  8058.         else if(pickupid == ghit)
  8059.         {
  8060.             GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~HITMAN~n~KILL THE RANDOM PERSON PICKED~n~REWARD:3+ SCORE", 5000, 3);
  8061.             SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
  8062.         }
  8063.         else if(pickupid == buyweapon)
  8064.         {
  8065.             GameTextForPlayer(playerid, "~w~TYPE /USECOMPUTER TO ACCESS THE COMPUTER!~w~", 5000, 3);
  8066.         }
  8067.         else if(pickupid == nuke)
  8068.         {
  8069.             GameTextForPlayer(playerid, "~w~TYPE /NUKE TO NUKE YOUR ENEMIES BASE!~w~", 5000, 3);
  8070.         }
  8071.         else if(pickupid == gunshop[1])
  8072.         {
  8073.             SetPlayerInterior(playerid, 4);
  8074.             SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  8075.             SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  8076.             IsInGunShop[playerid] = 1;
  8077.             GunShopID[playerid] = 1;
  8078.         }
  8079.         else if(pickupid == gunshop[2])
  8080.         {
  8081.             SetPlayerInterior(playerid, 4);
  8082.             SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  8083.             SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  8084.             IsInGunShop[playerid] = 1;
  8085.             SetPlayerVirtualWorld(playerid, 0);
  8086.             GunShopID[playerid] = 2;
  8087.         }
  8088.         else if(pickupid == gunshop[3])
  8089.         {
  8090.             SetPlayerInterior(playerid, 4);
  8091.             SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  8092.             SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  8093.             IsInGunShop[playerid] = 1;
  8094.             SetPlayerVirtualWorld(playerid, 0);
  8095.             GunShopID[playerid] = 3;
  8096.         }
  8097.         else if(pickupid == gunshop[4])
  8098.         {
  8099.             SetPlayerInterior(playerid, 4);
  8100.             SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  8101.             SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  8102.             IsInGunShop[playerid] = 1;
  8103.             SetPlayerVirtualWorld(playerid, 0);
  8104.             GunShopID[playerid] = 4;
  8105.         }
  8106.         else if(pickupid == gunshop[5])
  8107.         {
  8108.             GameTextForPlayer(playerid, "~w~TYPE /BUY TO BUY ARMOR AND WEAPONS FROM THE SHOP!~w~", 5000, 3);
  8109.         }else
  8110.         if( pickupid == gunshop[7] )
  8111.         {
  8112.             SetPlayerInterior(playerid, 4);
  8113.             SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  8114.             SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  8115.             IsInGunShop[playerid] = 1;
  8116.             SetPlayerVirtualWorld(playerid, 0);
  8117.             GunShopID[playerid] = 7;
  8118.         }else
  8119.         if( pickupid == gunshop[6] )
  8120.         {
  8121.             SetPlayerInterior(playerid, 4);
  8122.             SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
  8123.             SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
  8124.             IsInGunShop[playerid] = 1;
  8125.             SetPlayerVirtualWorld(playerid, 0);
  8126.             GunShopID[playerid] = 6;
  8127.         }
  8128.         return 1;
  8129. }
  8130.  
  8131. public OnPlayerSelectedMenuRow(playerid, row)
  8132. {
  8133.     return 1;
  8134. }
  8135.  
  8136. public OnPlayerExitedMenu(playerid)
  8137. {
  8138.     return 1;
  8139. }
  8140.  
  8141. public AreaCheck()
  8142. {
  8143.     foreach(Player, i)
  8144.     {
  8145.         if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58))
  8146.         {
  8147.             if(EnteredArea[i] == 0) // if he hasn'td beenterefo re
  8148.             {
  8149.                 if(gTeam[i] == TEAM_USA && CapturedBy == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy == 3 || gTeam[i] == TEAM_USA && CapturedBy == 4)
  8150.                 {
  8151.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8152.                     EnteredArea[i] = 1;
  8153.                 }
  8154.                 else
  8155.                 {
  8156.                     SendClientMessageToAll(COLOR_CON_GREEN, "The bigear is being taken over!");
  8157.                     EnteredArea[i] = 1; // He has entered
  8158.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8159.                     IfCapture[i] = 1;
  8160.                     T1[i] = SetTimer("TakeOver",30000,0);
  8161.                 }
  8162.             }
  8163.         }
  8164.         else
  8165.         {
  8166.             EnteredArea[i] = 0; // When he leaves, he's no longer in the area
  8167.             KillTimer(T1[i]);
  8168.         }
  8169.     }
  8170.    
  8171.     foreach(Player, i)
  8172.     {
  8173.         if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556))
  8174.         {
  8175.             if(EnteredArea2[i] == 0) // if he hasn't entered before
  8176.             {
  8177.                 if(gTeam[i] == TEAM_USA && CapturedBy2 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy2 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy2 == 3 || gTeam[i] == TEAM_USA && CapturedBy2 == 4)
  8178.                 {
  8179.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8180.                     EnteredArea2[i] = 1;
  8181.                 }
  8182.                 else
  8183.                 {
  8184.                     EnteredArea2[i] = 1; // He has entered
  8185.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8186.                     T2[i]= SetTimer("TakeOver",30000,0);
  8187.                     SendClientMessageToAll(COLOR_CON_GREEN, "The resturant is being taken over!");
  8188.                 }
  8189.             }
  8190.         }
  8191.         else
  8192.         {
  8193.             EnteredArea2[i] = 0; // When he leaves, he's no longer in the area
  8194.             KillTimer(T2[i]);
  8195.         }
  8196.     }
  8197.    
  8198.     foreach(Player, i)
  8199.     {
  8200.         if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166))
  8201.         {
  8202.             if(EnteredArea3[i] == 0) // if he hasn't entered before
  8203.             {
  8204.                 if(gTeam[i] == TEAM_USA && CapturedBy3 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy3 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy3 == 3 || gTeam[i] == TEAM_USA && CapturedBy3 == 4)
  8205.                 {
  8206.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8207.                     EnteredArea3[i] = 1;
  8208.                 }
  8209.                 else
  8210.                 {
  8211.                     EnteredArea3[i] = 1; // He has entered
  8212.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8213.                     T3[i] = SetTimer("TakeOver",30000,0);
  8214.                     SendClientMessageToAll(COLOR_CON_GREEN, "The airfield is being taken over!");
  8215.                 }
  8216.             }
  8217.         }
  8218.         else
  8219.         {
  8220.             EnteredArea3[i] = 0; // When he leaves, he's no longer in the area
  8221.             KillTimer(T3[i]);
  8222.         }
  8223.     }
  8224.    
  8225.     foreach(Player, i)
  8226.     {
  8227.         if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34))
  8228.         {
  8229.             if(EnteredArea4[i] == 0) // if he hasn't entered before
  8230.             {
  8231.                 if(gTeam[i] == TEAM_USA && CapturedBy4 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy4 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy4 == 3 || gTeam[i] == TEAM_USA && CapturedBy4 == 4)
  8232.                 {
  8233.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8234.                     EnteredArea4[i] = 1;
  8235.                 }
  8236.                 else
  8237.                 {
  8238.                     EnteredArea4[i] = 1; // He has entered
  8239.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8240.                     T4[i] = SetTimer("TakeOver",30000,0);
  8241.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Electric Field is being taken over!");
  8242.                 }
  8243.             }
  8244.         }
  8245.         else
  8246.         {
  8247.             EnteredArea4[i] = 0; // When he leaves, he's no longer in the area
  8248.             KillTimer(T4[i]);
  8249.         }
  8250.     }
  8251.    
  8252.     foreach(Player, i)
  8253.     {
  8254.         if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306))
  8255.         {
  8256.             if(EnteredArea5[i] == 0) // if he hasn't entered before
  8257.             {
  8258.                 if(gTeam[i] == TEAM_USA && CapturedBy5 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy5 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy5 == 3 || gTeam[i] == TEAM_USA && CapturedBy5 == 4)
  8259.                 {
  8260.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8261.                     EnteredArea5[i] = 1;
  8262.                 }
  8263.                 else
  8264.                 {
  8265.                     EnteredArea5[i] = 1; // He has entered
  8266.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8267.                     T5[i] = SetTimer("TakeOver",30000,0);
  8268.                     SendClientMessageToAll(COLOR_CON_GREEN, "Area 69 is being taken over!");
  8269.                 }
  8270.             }
  8271.         }
  8272.         else
  8273.         {
  8274.             EnteredArea5[i] = 0; // When he leaves, he's no longer in the area
  8275.             KillTimer(T5[i]);
  8276.         }
  8277.     }
  8278.    
  8279.     foreach(Player, i)
  8280.     {
  8281.         if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715))
  8282.         {
  8283.             if(EnteredArea6[i] == 0) // if he hasn't entered before
  8284.             {
  8285.                 if(gTeam[i] == TEAM_USA && CapturedBy6 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy6 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy6 == 3 || gTeam[i] == TEAM_USA && CapturedBy6 == 4)
  8286.                 {
  8287.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8288.                     EnteredArea6[i] = 1;
  8289.                 }
  8290.                 else
  8291.                 {
  8292.                     EnteredArea6[i] = 1; // He has entered
  8293.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8294.                     T6[i] = SetTimer("TakeOver",30000,0);
  8295.                     SendClientMessageToAll(COLOR_CON_GREEN, "The gas station is being taken over!");
  8296.                 }
  8297.             }
  8298.         }
  8299.         else
  8300.         {
  8301.             EnteredArea6[i] = 0; // When he leaves, he's no longer in the area
  8302.             KillTimer(T6[i]);
  8303.         }
  8304.     }
  8305.    
  8306.     foreach(Player, i)
  8307.     {
  8308.         if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09))
  8309.         {
  8310.             if(EnteredArea7[i] == 0) // if he hasn't entered before
  8311.             {
  8312.                 if(gTeam[i] == TEAM_USA && CapturedBy7 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy7 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy7 == 3 || gTeam[i] == TEAM_USA && CapturedBy7 == 4)
  8313.                 {
  8314.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8315.                     EnteredArea9[i] = 1;
  8316.                 }
  8317.                 else
  8318.                 {
  8319.                     EnteredArea7[i] = 1; // He has entered
  8320.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8321.                     T7[i] = SetTimer("TakeOver",30000,0);
  8322.                     SendClientMessageToAll(COLOR_CON_GREEN, "The oil mine is being taken over!");
  8323.                 }
  8324.             }
  8325.         }
  8326.         else
  8327.         {
  8328.             EnteredArea7[i] = 0; // When he leaves, he's no longer in the area
  8329.             KillTimer(T7[i]);
  8330.         }
  8331.     }
  8332.    
  8333.     foreach(Player, i)
  8334.     {
  8335.         if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244))
  8336.         {
  8337.             if(EnteredArea8[i] == 0) // if he hasn't entered before
  8338.             {
  8339.                 if(gTeam[i] == TEAM_USA && CapturedBy8 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy8 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy8 == 3 || gTeam[i] == TEAM_USA && CapturedBy8 == 4)
  8340.                 {
  8341.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8342.                     EnteredArea8[i] = 1;
  8343.                 }
  8344.                 else
  8345.                 {
  8346.                     EnteredArea8[i] = 1; // He has entered
  8347.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8348.                     T8[i] = SetTimer("TakeOver",30000,0);
  8349.                     SendClientMessageToAll(COLOR_CON_GREEN, "The train refueling station is being taken over!");
  8350.                 }
  8351.             }
  8352.         }
  8353.         else
  8354.         {
  8355.             EnteredArea8[i] = 0; // When he leaves, he's no longer in the area
  8356.             KillTimer(T8[i]);
  8357.         }
  8358.     }
  8359.    
  8360.     foreach(Player, i)
  8361.     {
  8362.         if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729))
  8363.         {
  8364.             if(EnteredArea9[i] == 0) // if he hasn't entered before
  8365.             {
  8366.                 if(gTeam[i] == TEAM_USA && CapturedBy9 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy9 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy9 == 3 || gTeam[i] == TEAM_USA && CapturedBy9 == 4)
  8367.                 {
  8368.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8369.                     EnteredArea9[i] = 1;
  8370.                 }
  8371.                 else
  8372.                 {
  8373.                     EnteredArea9[i] = 1; // He has entered
  8374.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8375.                     T9[i] = SetTimer("TakeOver",30000,0);
  8376.                     SendClientMessageToAll(COLOR_CON_GREEN, "The damm is being taken over!");
  8377.                 }
  8378.             }
  8379.         }
  8380.         else
  8381.         {
  8382.             EnteredArea9[i] = 0; // When he leaves, he's no longer in the area
  8383.             KillTimer(T9[i]);
  8384.         }
  8385.     }
  8386.    
  8387.     foreach(Player, i)
  8388.     {
  8389.         if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186))
  8390.         {
  8391.             if(EnteredArea10[i] == 0) // if he hasn't entered before
  8392.             {
  8393.                 if(gTeam[i] == TEAM_USA && CapturedBy10 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy10 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy10 == 3 || gTeam[i] == TEAM_USA && CapturedBy10 == 4)
  8394.                 {
  8395.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8396.                     EnteredArea10[i] = 1;
  8397.                 }
  8398.                 else
  8399.                 {
  8400.                     EnteredArea10[i] = 1; // He has entered
  8401.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8402.                     T10[i] = SetTimer("TakeOver",30000,0);
  8403.                     SendClientMessageToAll(COLOR_CON_GREEN, "The old town is being taken over!");
  8404.                 }
  8405.             }
  8406.         }
  8407.         else
  8408.         {
  8409.             EnteredArea10[i] = 0; // When he leaves, he's no longer in the area
  8410.             KillTimer(T10[i]);
  8411.         }
  8412.     }
  8413.    
  8414.     foreach(Player, i)
  8415.     {
  8416.         if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017))
  8417.         {
  8418.             if(EnteredArea11[i] == 0) // if he hasn't entered before
  8419.             {
  8420.                 if(gTeam[i] == TEAM_USA && CapturedBy11 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy11 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy11 == 3 || gTeam[i] == TEAM_USA && CapturedBy11 == 4)
  8421.                 {
  8422.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8423.                     EnteredArea11[i] = 1;
  8424.                 }
  8425.                 else
  8426.                 {
  8427.                     EnteredArea11[i] = 1; // He has entered
  8428.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8429.                     T11[i] = SetTimer("TakeOver",30000,0);
  8430.                     SendClientMessageToAll(COLOR_CON_GREEN, "The University is being taken over!");
  8431.                 }
  8432.             }
  8433.         }
  8434.         else
  8435.         {
  8436.             EnteredArea11[i] = 0; // When he leaves, he's no longer in the area
  8437.             KillTimer(T11[i]);
  8438.         }
  8439.     }
  8440.    
  8441.     foreach(Player, i)
  8442.     {
  8443.         if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502))
  8444.         {
  8445.             if(EnteredArea12[i] == 0) // if he hasn't entered before
  8446.             {
  8447.                 if(gTeam[i] == TEAM_USA && CapturedBy12 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy12 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy12 == 3 || gTeam[i] == TEAM_USA && CapturedBy12 == 4)
  8448.                 {
  8449.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8450.                     EnteredArea12[i] = 1;
  8451.                 }
  8452.                 else
  8453.                 {
  8454.                     EnteredArea12[i] = 1; // He has entered
  8455.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8456.                     T12[i] = SetTimer("TakeOver",30000,0);
  8457.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Oil Pump is being taken over!");
  8458.                 }
  8459.             }
  8460.         }
  8461.         else
  8462.         {
  8463.             EnteredArea12[i] = 0; // When he leaves, he's no longer in the area
  8464.             KillTimer(T12[i]);
  8465.         }
  8466.     }
  8467.    
  8468.     foreach(Player, i)
  8469.     {
  8470.         if(IsPlayerInArea(i, -1237.855, 1763.359, -1156.11, 1868.46))
  8471.         {
  8472.             if(EnteredArea13[i] == 0) // if he hasn't entered before
  8473.             {
  8474.                 if(gTeam[i] == TEAM_USA && CapturedBy13 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy13 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy13 == 3 || gTeam[i] == TEAM_USA && CapturedBy13 == 4)
  8475.                 {
  8476.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8477.                     EnteredArea13[i] = 1;
  8478.                 }
  8479.                 else
  8480.                 {
  8481.                     EnteredArea13[i] = 1; // He has entered
  8482.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8483.                     T13[i] = SetTimer("TakeOver",30000,0);
  8484.                     SendClientMessageToAll(COLOR_CON_GREEN, "The CluckinBell is being taken over!");
  8485.                 }
  8486.             }
  8487.         }
  8488.         else
  8489.         {
  8490.             EnteredArea13[i] = 0; // When he leaves, he's no longer in the area
  8491.             KillTimer(T13[i]);
  8492.         }
  8493.     }
  8494.    
  8495.     foreach(Player, i)
  8496.     {
  8497.         if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536))
  8498.         {
  8499.             if(EnteredArea14[i] == 0) // if he hasn't entered before
  8500.             {
  8501.                 if(gTeam[i] == TEAM_USA && CapturedBy14 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy14 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy14 == 3 || gTeam[i] == TEAM_USA && CapturedBy11 == 4)
  8502.                 {
  8503.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8504.                     EnteredArea14[i] = 1;
  8505.                 }
  8506.                 else
  8507.                 {
  8508.                     EnteredArea14[i] = 1; // He has entered
  8509.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8510.                     T14[i] = SetTimer("TakeOver",30000,0);
  8511.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Beach Shack is being taken over!");
  8512.                 }
  8513.             }
  8514.         }
  8515.         else
  8516.         {
  8517.             EnteredArea14[i] = 0; // When he leaves, he's no longer in the area
  8518.             KillTimer(T14[i]);
  8519.         }
  8520.     }
  8521.    
  8522.     foreach(Player, i)
  8523.     {
  8524.         if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676))
  8525.         {
  8526.             if(EnteredArea15[i] == 0) // if he hasn't entered before
  8527.             {
  8528.                 if(gTeam[i] == TEAM_USA && CapturedBy15 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy15 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy15 == 3 || gTeam[i] == TEAM_USA && CapturedBy15 == 4)
  8529.                 {
  8530.                     SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
  8531.                     EnteredArea15[i] = 1;
  8532.                 }
  8533.                 else
  8534.                 {
  8535.                     EnteredArea15[i] = 1; // He has entered
  8536.                     SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
  8537.                     T15[i] = SetTimer("TakeOver",30000,0);
  8538.                     SendClientMessageToAll(COLOR_CON_GREEN, "The Diner is being taken over!");
  8539.                 }
  8540.             }
  8541.         }
  8542.         else
  8543.         {
  8544.             EnteredArea15[i] = 0; // When he leaves, he's no longer in the area
  8545.             KillTimer(T15[i]);
  8546.         }
  8547.     }
  8548.    
  8549.  
  8550.     return 1;
  8551. }
  8552.  
  8553.  
  8554. public OnPlayerUpdate(playerid)
  8555. {
  8556.     return 1;
  8557. }
  8558.  
  8559. stock ResetDispenser(playerid)
  8560. {
  8561.     if( EngineerI[playerid] == 0 )
  8562.     {
  8563.         EngineerI[playerid] = 1;
  8564.         DestroyObject(Dispenser[playerid]);
  8565.         SendClientMessage(playerid, COLOR_YELLOW, "Dispenser Detonated ! You can now place another 1.");
  8566.     }else SendClientMessage(playerid, COLOR_RED, "Dispenser not placed !");
  8567.     return 1;
  8568. }
  8569.  
  8570. stock PlaceDispenser(playerid ,Float:xx, Float:yy, Float:zz)
  8571. {
  8572.     if( EngineerI[playerid] == 1 )
  8573.     {
  8574.         if( GetPlayerMoney(playerid) >= 10000 )
  8575.         {
  8576.             EngineerI[playerid] = 0;
  8577.             SetPlayerMoney(playerid, GetPlayerMoney(playerid) - 10000);
  8578.             SetTimerEx("DispeClean", 2 * 60 * 1000, 0, "i", playerid);
  8579.             Dispenser[playerid] = CreatePickup(920,23,xx, yy, zz);
  8580.             SendClientMessage(playerid, COLOR_YELLOW, "Dispenser placed, grab it for ammo ! It will self-destruct in 2 minutes!");
  8581.         }else SendClientMessage(playerid, COLOR_RED, "You need 10 000$ for a dispenser !");
  8582.     }else SendClientMessage(playerid, COLOR_RED, "Not enough Dispensers !");
  8583.  
  8584.     return 1;
  8585. }
  8586.  
  8587. stock IsObjectInRangeOfPlayer(objectid, playerid)
  8588. {
  8589.     new Float:pX, Float:pY, Float:pZ;
  8590.     GetPlayerPos(playerid, pX, pY, pZ);
  8591.     new Float:oX, Float:oY, Float:oZ;
  8592.     GetObjectPos(objectid, oX, oY, oZ);
  8593.     if( (pX - oX <= 5) && (pY - oY <= 5) && (pZ - oZ <= 1) )
  8594.     {
  8595.         return 1;
  8596.     }
  8597.     return 0;
  8598. }
  8599.  
  8600. stock IsPlayerInArea(playerid,Float:min_x,Float:min_y,Float:max_x,Float:max_y)
  8601. {
  8602.     new Float:X,Float:Y,Float:Z;
  8603.     GetPlayerPos(playerid, X, Y, Z);
  8604.     if((X <= max_x && X >= min_x) && (Y <= max_y && Y >= min_y)) return 1;
  8605.  
  8606.     return 0;
  8607. }
  8608.  
  8609. public TakeOver()
  8610. {
  8611.     foreach(Player, i)
  8612.     {
  8613.         if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_USA)
  8614.         {
  8615.             if(CapturedBy != 1)
  8616.             {
  8617.                 if( IfCapture[0] == 1 ) return 1;
  8618.                 IfCapture[0] = 0;
  8619.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy", 1);
  8620.                 uscore++;
  8621.               //  SetTimer("ScoreText", 5000, 0);
  8622.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8623.                 CapturedBy = 1;
  8624.                 if(CapturedBy != 1) SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Big Ear!");
  8625.                 GangZoneHideForAll(Ear);
  8626.                 GangZoneShowForAll(EarU, COLOR_BLUE);
  8627.                 GangZoneHideForAll(EarG);
  8628.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  8629.                 CheckForLevelUpdate(i);
  8630.             }
  8631.         }
  8632.         else if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_GERMANY)
  8633.         {
  8634.             if(CapturedBy != 2)
  8635.             {
  8636.                 {
  8637.                     if( IfCapture[0] == 1 ) return 1;
  8638.                     IfCapture[0] = 0;
  8639.                     dini_IntSet("/Variables/Variables.ini", "CapturedBy", 2);
  8640.                     gscore++;
  8641.                    // SetTimer("ScoreText", 5000, 0);
  8642.                     SetPlayerScore(i, GetPlayerScore(i) + 2);
  8643.                     CapturedBy = 2;
  8644.                     if(CapturedBy != 2) SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Big Ear!");
  8645.                     GangZoneHideForAll(Ear);
  8646.                     GangZoneShowForAll(EarG, COLOR_RED);
  8647.                     GangZoneHideForAll(EarU);
  8648.                     dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  8649.                     CheckForLevelUpdate(i);
  8650.                 }
  8651.             }
  8652.         }
  8653.         else if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_GERMANY)
  8654.         {
  8655.             if(CapturedBy != 2)
  8656.             {
  8657.                 {
  8658.                     if( IfCapture[0] == 1 ) return 1;
  8659.                     IfCapture[0] = 0;
  8660.                     dini_IntSet("/Variables/Variables.ini", "CapturedBy", 2);
  8661.                     gscore++;
  8662.                   //  SetTimer("ScoreText", 5000, 0);
  8663.                     SetPlayerScore(i, GetPlayerScore(i) + 2);
  8664.                     CapturedBy = 2;
  8665.                     if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured Big Ear!");
  8666.                     GangZoneHideForAll(Ear);
  8667.                     GangZoneShowForAll(EarG, COLOR_RED);
  8668.                     GangZoneHideForAll(EarU);
  8669.                     dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  8670.                     CheckForLevelUpdate(i);
  8671.                 }
  8672.             }
  8673.         }
  8674.     }
  8675.  
  8676.     foreach(Player, i)
  8677.     {
  8678.         if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_USA)
  8679.         {
  8680.             if(CapturedBy2 != 1)
  8681.             {
  8682.                 if( IfCapture[2] == 1 ) return 1;
  8683.                 IfCapture[2] = 0;
  8684.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 1);
  8685.                 uscore++;
  8686.                 //SetTimer("ScoreText", 5000, 0);
  8687.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8688.                 CapturedBy2 = 1;
  8689.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the resturant!");
  8690.                 GangZoneHideForAll(Resturant);
  8691.                 GangZoneShowForAll(ResturantU, COLOR_BLUE);
  8692.                 GangZoneHideForAll(ResturantG);
  8693.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  8694.                 CheckForLevelUpdate(i);
  8695.             }
  8696.         }
  8697.         else if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_GERMANY)
  8698.         {
  8699.             if(CapturedBy2 != 2)
  8700.             {
  8701.                 if( IfCapture[2] == 1 ) return 1;
  8702.                 IfCapture[2] = 0;
  8703.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 2);
  8704.                 gscore++;
  8705.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8706.                 CapturedBy2 = 2;
  8707.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured resturant!");
  8708.                 GangZoneHideForAll(Resturant);
  8709.                 GangZoneShowForAll(ResturantG, COLOR_RED);
  8710.                 GangZoneHideForAll(ResturantU);
  8711.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  8712.                 CheckForLevelUpdate(i);
  8713.             }
  8714.         }
  8715.     }
  8716.  
  8717.     foreach(Player, i)
  8718.     {
  8719.         if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_USA)
  8720.         {
  8721.             if(CapturedBy3 != 1)
  8722.             {
  8723.                 if( IfCapture[3] == 1 ) return 1;
  8724.                 IfCapture[3] = 0;
  8725.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 1);
  8726.                 //SetTimer("ScoreText", 5000, 0);
  8727.                 uscore++;
  8728.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8729.                 CapturedBy3 = 1;
  8730.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the airfield!");
  8731.                 GangZoneHideForAll(Airfield);
  8732.                 GangZoneShowForAll(AirfieldU, COLOR_BLUE);
  8733.                 GangZoneHideForAll(AirfieldG);
  8734.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  8735.                 CheckForLevelUpdate(i);
  8736.             }
  8737.         }
  8738.         else if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_GERMANY)
  8739.         {
  8740.             if(CapturedBy3 != 2)
  8741.             {
  8742.                 if( IfCapture[3] == 1 ) return 1;
  8743.                 IfCapture[3] = 0;
  8744.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 2);
  8745.                 //SetTimer("ScoreText", 5000, 0);
  8746.                 gscore++;
  8747.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8748.                 CapturedBy3 = 2;
  8749.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured airfield!");
  8750.                 GangZoneHideForAll(Airfield);
  8751.                 GangZoneShowForAll(AirfieldG, COLOR_RED);
  8752.                 GangZoneHideForAll(AirfieldU);
  8753.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  8754.                 CheckForLevelUpdate(i);
  8755.             }
  8756.         }
  8757.     }
  8758.  
  8759.     foreach(Player, i)
  8760.     {
  8761.         if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_USA)
  8762.         {
  8763.             if(CapturedBy4 != 1)
  8764.             {
  8765.                 if( IfCapture[4] == 1 ) return 1;
  8766.                 IfCapture[4] = 0;
  8767.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 1);
  8768.                 uscore++;
  8769.                 //SetTimer("ScoreText", 5000, 0);
  8770.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8771.                 CapturedBy4 = 1;
  8772.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Electric Field!");
  8773.                 GangZoneHideForAll(Oil);
  8774.                 GangZoneShowForAll(OilU, COLOR_BLUE);
  8775.                 GangZoneHideForAll(OilG);
  8776.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  8777.                 CheckForLevelUpdate(i);
  8778.             }
  8779.         }
  8780.         else if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_GERMANY)
  8781.         {
  8782.             if(CapturedBy4 != 2)
  8783.             {
  8784.                 if( IfCapture[4] == 1 ) return 1;
  8785.                 IfCapture[4] = 0;
  8786.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 2);
  8787.                 gscore++;
  8788.                 //SetTimer("ScoreText", 5000, 0);
  8789.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8790.                 CapturedBy4 = 2;
  8791.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured Electric Field!");
  8792.                 GangZoneHideForAll(Oil);
  8793.                 GangZoneShowForAll(OilG, COLOR_RED);
  8794.                 GangZoneHideForAll(OilU);
  8795.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  8796.                 CheckForLevelUpdate(i);
  8797.             }
  8798.         }
  8799.     }
  8800.  
  8801.     foreach(Player, i)
  8802.     {
  8803.         if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_USA)
  8804.         {
  8805.             if(CapturedBy5 != 1)
  8806.             {
  8807.                 if( IfCapture[5] == 1 ) return 1;
  8808.                 IfCapture[5] = 0;
  8809.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 1);
  8810.                 //SetTimer("ScoreText", 5000, 0);
  8811.                 uscore++;
  8812.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8813.                 CapturedBy5 = 1;
  8814.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured area 69!");
  8815.                 GangZoneHideForAll(A);
  8816.                 GangZoneShowForAll(AU, COLOR_BLUE);
  8817.                 GangZoneHideForAll(AG);
  8818.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  8819.                 CheckForLevelUpdate(i);
  8820.             }
  8821.         }
  8822.         else if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_GERMANY)
  8823.         {
  8824.             if(CapturedBy5 != 2)
  8825.             {
  8826.                 if( IfCapture[5] == 1 ) return 1;
  8827.                 IfCapture[5] = 0;
  8828.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 2);
  8829.                 gscore++;
  8830.                 //SetTimer("ScoreText", 5000, 0);
  8831.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8832.                 CapturedBy5 = 2;
  8833.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured area 69!");
  8834.                 GangZoneHideForAll(A);
  8835.                 GangZoneShowForAll(AG, COLOR_RED);
  8836.                 GangZoneHideForAll(AU);
  8837.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  8838.                 CheckForLevelUpdate(i);
  8839.             }
  8840.         }
  8841.     }
  8842.  
  8843.     foreach(Player, i)
  8844.     {
  8845.         if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_USA)
  8846.         {
  8847.             if(CapturedBy6 != 1)
  8848.             {
  8849.                 if( IfCapture[6] == 1 ) return 1;
  8850.                 IfCapture[6] = 0;
  8851.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 1);
  8852.                 uscore++;
  8853.                 //SetTimer("ScoreText", 5000, 0);
  8854.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8855.                 CapturedBy6 = 1;
  8856.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the gas station!");
  8857.                 GangZoneHideForAll(Gas);
  8858.                 GangZoneShowForAll(GasU, COLOR_BLUE);
  8859.                 GangZoneHideForAll(GasG);
  8860.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  8861.                 CheckForLevelUpdate(i);
  8862.             }
  8863.         }
  8864.         else if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_GERMANY)
  8865.         {
  8866.             if(CapturedBy6 != 2)
  8867.             {
  8868.                 if( IfCapture[6] == 1 ) return 1;
  8869.                 IfCapture[6] = 0;
  8870.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 2);
  8871.                 gscore++;
  8872.                 //SetTimer("ScoreText", 5000, 0);
  8873.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8874.                 CapturedBy6 = 2;
  8875.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured gas station!");
  8876.                 GangZoneHideForAll(Gas);
  8877.                 GangZoneShowForAll(GasG, COLOR_RED);
  8878.                 GangZoneHideForAll(GasU);
  8879.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  8880.                 CheckForLevelUpdate(i);
  8881.             }
  8882.         }
  8883.     }
  8884.  
  8885.     foreach(Player, i)
  8886.     {
  8887.         if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_USA)
  8888.         {
  8889.             if(CapturedBy7 != 1)
  8890.             {
  8891.                 if( IfCapture[7] == 1 ) return 1;
  8892.                 IfCapture[7] = 0;
  8893.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 1);
  8894.                 uscore++;
  8895.                 //SetTimer("ScoreText", 5000, 0);
  8896.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8897.                 CapturedBy7 = 1;
  8898.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Oil Station!");
  8899.                 GangZoneHideForAll(OS);
  8900.                 GangZoneShowForAll(OSU, COLOR_BLUE);
  8901.                 GangZoneHideForAll(OSG);
  8902.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  8903.                 CheckForLevelUpdate(i);
  8904.             }
  8905.         }
  8906.         else if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_GERMANY)
  8907.         {
  8908.             if(CapturedBy7 != 2)
  8909.             {
  8910.                     if( IfCapture[7] == 1 ) return 1;
  8911.                     IfCapture[7] = 0;
  8912.                     dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 2);
  8913.                     gscore++;
  8914.                     //SetTimer("ScoreText", 5000, 0);
  8915.                     SetPlayerScore(i, GetPlayerScore(i) + 2);
  8916.                     CapturedBy7 = 2;
  8917.                     if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured Oil Station!");
  8918.                     GangZoneHideForAll(OS);
  8919.                     GangZoneShowForAll(OSG, COLOR_RED);
  8920.                     GangZoneHideForAll(OSU);
  8921.                     dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  8922.                     CheckForLevelUpdate(i);
  8923.             }
  8924.         }
  8925.     }
  8926.  
  8927.     foreach(Player, i)
  8928.     {
  8929.         if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_USA)
  8930.         {
  8931.             if(CapturedBy8 != 1)
  8932.             {
  8933.                 if( IfCapture[8] == 1 ) return 1;
  8934.                 IfCapture[8] = 0;
  8935.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 1);
  8936.                 uscore++;
  8937.                 //SetTimer("ScoreText", 5000, 0);
  8938.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8939.                 CapturedBy8 = 1;
  8940.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Train refueling station!");
  8941.                 GangZoneHideForAll(T);
  8942.                 GangZoneShowForAll(TU, COLOR_BLUE);
  8943.                 GangZoneHideForAll(TG);
  8944.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  8945.                 CheckForLevelUpdate(i);
  8946.             }
  8947.         }
  8948.         else if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_GERMANY)
  8949.         {
  8950.             if(CapturedBy8 != 2)
  8951.             {
  8952.                     if( IfCapture[8] == 1 ) return 1;
  8953.                     IfCapture[8] = 0;
  8954.                     dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 2);
  8955.                     gscore++;
  8956.                     //SetTimer("ScoreText", 5000, 0);
  8957.                     SetPlayerScore(i, GetPlayerScore(i) + 2);
  8958.                     CapturedBy8 = 2;
  8959.                     if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured Train refueling station!");
  8960.                     GangZoneHideForAll(T);
  8961.                     GangZoneShowForAll(TG, COLOR_RED);
  8962.                     GangZoneHideForAll(TU);
  8963.                     dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  8964.                     CheckForLevelUpdate(i);
  8965.             }
  8966.         }
  8967.     }
  8968.  
  8969.     foreach(Player, i)
  8970.     {
  8971.         if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_USA)
  8972.         {
  8973.             if(CapturedBy9 != 1)
  8974.             {
  8975.                 if( IfCapture[9] == 1 ) return 1;
  8976.                 IfCapture[9] = 0;
  8977.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 1);
  8978.                 uscore++;
  8979.                 //SetTimer("ScoreText", 5000, 0);
  8980.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  8981.                 CapturedBy9 = 1;
  8982.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the damm");
  8983.                 GangZoneHideForAll(D);
  8984.                 GangZoneShowForAll(DU, COLOR_BLUE);
  8985.                 GangZoneHideForAll(DG);
  8986.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  8987.                 CheckForLevelUpdate(i);
  8988.             }
  8989.         }
  8990.         else if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_GERMANY)
  8991.         {
  8992.             if(CapturedBy9 != 2)
  8993.             {
  8994.                     if( IfCapture[9] == 1 ) return 1;
  8995.                     IfCapture[9] = 0;
  8996.                     dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 2);
  8997.                     gscore++;
  8998.                     //SetTimer("ScoreText", 5000, 0);
  8999.                     SetPlayerScore(i, GetPlayerScore(i) + 2);
  9000.                     CapturedBy9 = 2;
  9001.                     if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the damm!");
  9002.                     GangZoneHideForAll(D);
  9003.                     GangZoneShowForAll(DG, COLOR_RED);
  9004.                     GangZoneHideForAll(DU);
  9005.                     dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  9006.                     CheckForLevelUpdate(i);
  9007.             }
  9008.         }
  9009.     }
  9010.  
  9011.     foreach(Player, i)
  9012.     {
  9013.         if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_USA)
  9014.         {
  9015.             if(CapturedBy10 != 1)
  9016.             {
  9017.                 if( IfCapture[10] == 1 ) return 1;
  9018.                 IfCapture[10] = 0;
  9019.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 1);
  9020.                 uscore++;
  9021.                 //SetTimer("ScoreText", 5000, 0);
  9022.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9023.                 CapturedBy10 = 1;
  9024.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the old town!");
  9025.                 GangZoneHideForAll(OT);
  9026.                 GangZoneShowForAll(OTU, COLOR_BLUE);
  9027.                 GangZoneHideForAll(OTG);
  9028.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  9029.                 CheckForLevelUpdate(i);
  9030.             }
  9031.         }
  9032.         else if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_GERMANY)
  9033.         {
  9034.             if(CapturedBy10 != 2)
  9035.             {
  9036.                 if( IfCapture[10] == 1 ) return 1;
  9037.                 IfCapture[10] = 0;
  9038.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 2);
  9039.                 gscore++;
  9040.                 //SetTimer("ScoreText", 5000, 0);
  9041.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9042.                 CapturedBy10 = 2;
  9043.                 if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured old town!");
  9044.                 GangZoneHideForAll(OT);
  9045.                 GangZoneShowForAll(OTG, COLOR_RED);
  9046.                 GangZoneHideForAll(OTU);
  9047.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  9048.                 CheckForLevelUpdate(i);
  9049.             }
  9050.         }
  9051.     }
  9052.     foreach(Player, i)
  9053.     {
  9054.         if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_USA)
  9055.         {
  9056.             if(CapturedBy11 != 1)
  9057.             {
  9058.                 if( IfCapture[11] == 1 ) return 1;
  9059.                 IfCapture[11] = 0;
  9060.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 1);
  9061.                 uscore++;
  9062.                 //SetTimer("ScoreText", 5000, 0);
  9063.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9064.                 CapturedBy11 = 1;
  9065.                 if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the University!");
  9066.                 GangZoneHideForAll(University);
  9067.                 GangZoneShowForAll(University, COLOR_BLUE);
  9068.                 GangZoneHideForAll(University);
  9069.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  9070.                 CheckForLevelUpdate(i);
  9071.             }
  9072.         }else if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_GERMANY)
  9073.         {
  9074.             if(CapturedBy11 != 2)
  9075.             {
  9076.                 if( IfCapture[11] == 1 ) return 1;
  9077.                 IfCapture[11] = 0;
  9078.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 2);
  9079.                 gscore++;
  9080.                 //SetTimer("ScoreText", 5000, 0);
  9081.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9082.                 CapturedBy11 = 2;
  9083.                 if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the University!");
  9084.                 GangZoneHideForAll(University);
  9085.                 GangZoneShowForAll(UniversityG, COLOR_RED);
  9086.                 GangZoneHideForAll(UniversityU);
  9087.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  9088.                 CheckForLevelUpdate(i);
  9089.             }
  9090.         }
  9091.     }
  9092.    
  9093.     foreach(Player, i)
  9094.     {
  9095.         if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_USA)
  9096.         {
  9097.             if(CapturedBy12 != 1)
  9098.             {
  9099.                 if( IfCapture[12] == 1 ) return 1;
  9100.                 IfCapture[12] = 0;
  9101.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 1);
  9102.                 uscore++;
  9103.                 //SetTimer("ScoreText", 5000, 0);
  9104.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9105.                 CapturedBy12 = 1;
  9106.                 if(CapturedBy12 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the OilPump!");
  9107.                 GangZoneHideForAll(OilPump);
  9108.                 GangZoneShowForAll(OilPumpU, COLOR_BLUE);
  9109.                 GangZoneHideForAll(OilPumpG);
  9110.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  9111.                 CheckForLevelUpdate(i);
  9112.             }
  9113.         }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_GERMANY)
  9114.         {
  9115.             if(CapturedBy12 != 2)
  9116.             {
  9117.                 if( IfCapture[12] == 1 ) return 1;
  9118.                 IfCapture[12] = 0;
  9119.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 2);
  9120.                 gscore++;
  9121.                 //SetTimer("ScoreText", 5000, 0);
  9122.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9123.                 CapturedBy12 = 2;
  9124.                 if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the OilPump!");
  9125.                 GangZoneHideForAll(OilPump);
  9126.                 GangZoneShowForAll(OilPumpG, COLOR_RED);
  9127.                 GangZoneHideForAll(OilPumpU);
  9128.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  9129.                 CheckForLevelUpdate(i);
  9130.             }
  9131.         }
  9132.     }
  9133.  
  9134.     foreach(Player, i)
  9135.     {
  9136.         if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_USA)
  9137.         {
  9138.             if(CapturedBy13 != 1)
  9139.             {
  9140.                 if( IfCapture[13] == 1 ) return 1;
  9141.                 IfCapture[13] = 0;
  9142.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 1);
  9143.                 uscore++;
  9144.                 //SetTimer("ScoreText", 5000, 0);
  9145.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9146.                 CapturedBy13 = 1;
  9147.                 if(CapturedBy13 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the CluckinBell!");
  9148.                 GangZoneHideForAll(Cluck);
  9149.                 GangZoneShowForAll(CluckU, COLOR_BLUE);
  9150.                 GangZoneHideForAll(CluckG);
  9151.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  9152.                 CheckForLevelUpdate(i);
  9153.             }
  9154.         }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_GERMANY)
  9155.         {
  9156.             if(CapturedBy13 != 2)
  9157.             {
  9158.                 if( IfCapture[13] == 1 ) return 1;
  9159.                 IfCapture[13] = 0;
  9160.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 2);
  9161.                 gscore++;
  9162.                 //SetTimer("ScoreText", 5000, 0);
  9163.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9164.                 CapturedBy13 = 2;
  9165.                 if(CapturedBy13 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the CluckinBell!");
  9166.                 GangZoneHideForAll(Cluck);
  9167.                 GangZoneShowForAll(CluckG, COLOR_RED);
  9168.                 GangZoneHideForAll(CluckU);
  9169.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  9170.                 CheckForLevelUpdate(i);
  9171.             }
  9172.         }
  9173.     }
  9174.    
  9175.     foreach(Player, i)
  9176.     {
  9177.         if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_USA)
  9178.         {
  9179.             if(CapturedBy14 != 1)
  9180.             {
  9181.                 if( IfCapture[14] == 1 ) return 1;
  9182.                 IfCapture[14] = 0;
  9183.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 1);
  9184.                 uscore++;
  9185.                 //SetTimer("ScoreText", 5000, 0);
  9186.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9187.                 CapturedBy14 = 1;
  9188.                 if(CapturedBy14 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the BeachShack!");
  9189.                 GangZoneHideForAll(Beach);
  9190.                 GangZoneShowForAll(BeachU, COLOR_BLUE);
  9191.                 GangZoneHideForAll(BeachG);
  9192.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  9193.                 CheckForLevelUpdate(i);
  9194.             }
  9195.         }else if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_GERMANY)
  9196.         {
  9197.             if(CapturedBy14 != 2)
  9198.             {
  9199.                 if( IfCapture[14] == 1 ) return 1;
  9200.                 IfCapture[14] = 0;
  9201.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 2);
  9202.                 gscore++;
  9203.                 //SetTimer("ScoreText", 5000, 0);
  9204.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9205.                 CapturedBy14 = 2;
  9206.                 if(CapturedBy14 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the BeachShack!");
  9207.                 GangZoneHideForAll(Beach);
  9208.                 GangZoneShowForAll(BeachG, COLOR_RED);
  9209.                 GangZoneHideForAll(BeachU);
  9210.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  9211.                 CheckForLevelUpdate(i);
  9212.             }
  9213.         }
  9214.     }
  9215.    
  9216.     foreach(Player, i)
  9217.     {
  9218.         if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_USA)
  9219.         {
  9220.             if(CapturedBy15 != 1)
  9221.             {
  9222.                 if( IfCapture[15] == 1 ) return 1;
  9223.                 IfCapture[15] = 0;
  9224.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 1);
  9225.                 uscore++;
  9226.                 //SetTimer("ScoreText", 5000, 0);
  9227.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9228.                 CapturedBy15 = 1;
  9229.                 if(CapturedBy15 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Diner!");
  9230.                 GangZoneHideForAll(Diner);
  9231.                 GangZoneShowForAll(DinerU, COLOR_BLUE);
  9232.                 GangZoneHideForAll(DinerG);
  9233.                 dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
  9234.                 CheckForLevelUpdate(i);
  9235.             }
  9236.         }else if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_GERMANY)
  9237.         {
  9238.             if(CapturedBy15 != 2)
  9239.             {
  9240.                 if( IfCapture[15] == 1 ) return 1;
  9241.                 IfCapture[15] = 0;
  9242.                 dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 2);
  9243.                 gscore++;
  9244.                 //SetTimer("ScoreText", 5000, 0);
  9245.                 SetPlayerScore(i, GetPlayerScore(i) + 2);
  9246.                 CapturedBy15 = 2;
  9247.                 if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Diner!");
  9248.                 GangZoneHideForAll(Diner);
  9249.                 GangZoneShowForAll(DinerG, COLOR_RED);
  9250.                 GangZoneHideForAll(DinerU);
  9251.                 dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
  9252.                 CheckForLevelUpdate(i);
  9253.             }
  9254.         }
  9255.     }
  9256.     return 1;
  9257. }
  9258.  
  9259.  
  9260.  
  9261. public SendPlayerFormattedText(playerid, const string[], define)
  9262. {
  9263.         new tmpbuf[256];
  9264.         format(tmpbuf, sizeof(tmpbuf), string, define);
  9265.         SendClientMessage(playerid, 0x8CFFA9FF, tmpbuf);
  9266. }
  9267.  
  9268. SendUSAMessage(color, text[])
  9269. {
  9270.     foreach(Player, i)
  9271.     {
  9272.         if (gTeam[i] == TEAM_USA)
  9273.         {
  9274.             SendClientMessage(i, color, text);
  9275.         }
  9276.     }
  9277.     return 1;
  9278. }
  9279. SendGERMANYMessage(color, text[])
  9280. {
  9281.     foreach(Player, i)
  9282.     {
  9283.         if (gTeam[i] == TEAM_GERMANY)
  9284.         {
  9285.             SendClientMessage(i, color, text);
  9286.         }
  9287.     }
  9288.     return 1;
  9289. }
  9290. SendMERCMessage(color, text[])
  9291. {
  9292.     foreach(Player, i)
  9293.     {
  9294.         if (gTeam[i] == TEAM_MERC)
  9295.         {
  9296.             SendClientMessage(i, color, text);
  9297.         }
  9298.     }
  9299.     return 1;
  9300. }
  9301. SendRUSSIAMessage(color, text[])
  9302. {
  9303.     foreach(Player, i)
  9304.     {
  9305.         if (gTeam[i] == TEAM_RUSSIA)
  9306.         {
  9307.             SendClientMessage(i, color, text);
  9308.         }
  9309.     }
  9310.     return 1;
  9311. }
  9312. SendJAPANMessage(color, text[])
  9313. {
  9314.     foreach(Player, i)
  9315.     {
  9316.         if (gTeam[i] == TEAM_JAPAN)
  9317.         {
  9318.             SendClientMessage(i, color, text);
  9319.         }
  9320.     }
  9321.     return 1;
  9322. }
  9323.  
  9324. /*
  9325. SendSquadMessage(teamid, color, text[])
  9326. {
  9327.     for(new i = 0; i < MAX_PLAYERS; i ++)
  9328.     {
  9329.         if(IsPlayerConnected(i))
  9330.         {
  9331.             if(PlayerSquad[i] == teamid)
  9332.             {
  9333.                 SendClientMessage(i, color, text);
  9334.             }
  9335.         }
  9336.     }
  9337.     return 1;
  9338. }
  9339. */
  9340.  
  9341.  
  9342. stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  9343. {
  9344.     new Float:oldposx, Float:oldposy, Float:oldposz;
  9345.     new Float:tempposx, Float:tempposy, Float:tempposz;
  9346.     GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  9347.     tempposx = (oldposx -x);
  9348.     tempposy = (oldposy -y);
  9349.     tempposz = (oldposz -z);
  9350.     if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  9351.     {
  9352.         return 1;
  9353.     }
  9354.     return 0;
  9355. }
  9356.  
  9357. forward mission(playerid);
  9358.  
  9359. public mission(playerid)
  9360. {
  9361.     if(kills[playerid] != 6)
  9362.     {
  9363.         SendClientMessage(playerid, COLOR_WHITE, "You failed the mission. . . .");
  9364.     }
  9365.     return 1;
  9366. }
  9367.  
  9368. RandomPlayerID()
  9369. {
  9370.     new playerid, connected;
  9371.     for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(playerid) == 1) connected++;
  9372.     if(connected == 0) return -1;
  9373.     start:
  9374.     playerid = random(MAX_PLAYERS);
  9375.     if(IsPlayerConnected(playerid) == 0) goto start;
  9376.     return playerid;
  9377. }
  9378.  
  9379. forward Hitman(playerid);
  9380.  
  9381. public Hitman(playerid)
  9382. {
  9383.     new rand = RandomPlayerID();
  9384.     if(gTeam[playerid] == TEAM_USA && gTeam[rand] == TEAM_USA)
  9385.     {
  9386.         SetTimerEx("Hitman", 100, 0, "i", playerid);
  9387.     }
  9388.     else if(gTeam[playerid] == TEAM_USA && gTeam[rand] == TEAM_GERMANY)
  9389.     {
  9390.         new randplayern[MAX_PLAYER_NAME];
  9391.         randperson[rand] = GetPlayerName(rand, randplayern, sizeof(randplayern));
  9392.         new string[128];
  9393.         format(string, sizeof(string), "Find and destroy %s!", randplayern);
  9394.         SendClientMessage(playerid, COLOR_WHITE, string);
  9395.     }
  9396.     return 1;
  9397. }
  9398.      
  9399. forward HitmanG(playerid);
  9400.  
  9401. public HitmanG(playerid)
  9402. {
  9403.     new rand = RandomPlayerID();
  9404.     if(gTeam[playerid] == TEAM_GERMANY && gTeam[rand] == TEAM_GERMANY)
  9405.     {
  9406.         SetTimerEx("HitmanG", 100, 0, "i", playerid);
  9407.     }
  9408.     else if(gTeam[playerid] == TEAM_GERMANY && gTeam[rand] == TEAM_USA)
  9409.     {
  9410.         new randplayern[MAX_PLAYER_NAME];
  9411.         randperson[rand] = GetPlayerName(rand, randplayern, sizeof(randplayern));
  9412.         new string[128];
  9413.         format(string, sizeof(string), "Find and destroy %s!", randplayern);
  9414.         SendClientMessage(playerid, COLOR_WHITE, string);
  9415.     }
  9416.     return 1;
  9417. }
  9418.  
  9419.  
  9420. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  9421. {
  9422.  
  9423.             if (GetVehicleModel(PlayerBarracks[playerid]) == 433)
  9424.             {
  9425.                     new vehicleid = PlayerBarracks[playerid];
  9426.                     if (IsInBarracks[playerid] == true)
  9427.                     {
  9428.                         if (newkeys & KEY_SECONDARY_ATTACK)
  9429.                         {
  9430.  
  9431.                             LastVehicle[playerid] = PlayerBarracks[playerid];
  9432.                             Barracks[vehicleid][seats] = Barracks[vehicleid][seats] - 1;
  9433.                             new Float:X,Float:Y,Float:Z,Float:Ang;
  9434.                             GetVehiclePos(vehicleid, X, Y, Z);
  9435.                             GetVehicleZAngle(vehicleid, Ang);
  9436.                             X += (2 * floatsin(-Ang, degrees));
  9437.                             Y += (2 * floatcos(-Ang, degrees));
  9438.                             SetPlayerPos(playerid, X, Y, Z);
  9439.                             X += (2 * floatsin(-(Ang-45.0), degrees));
  9440.                             Y += (2 * floatcos(-(Ang-45.0), degrees));
  9441.                             SetPlayerPos(playerid, X, Y, Z);
  9442.                             SetPlayerFacingAngle(playerid, Ang);
  9443.                             cbx[playerid] = X;
  9444.                             cby[playerid] = Y-2;
  9445.                             cbz[playerid] = Z;
  9446.                             cba[playerid] = Ang;
  9447.                             TogglePlayerSpectating(playerid, false);
  9448.                             SetTimerEx("ExitCB", 500, 0, "i", playerid);
  9449.                             GivePlayerWeapon(playerid, 46, 1);
  9450.                             SetCameraBehindPlayer(playerid);
  9451.                             IsInBarracks[playerid] = false;
  9452.                             PlayerBarracks[playerid] = 0;
  9453.                         }
  9454.                     }
  9455.             }
  9456.  
  9457.  
  9458.             if (GetVehicleModel(PlayerCargoB[playerid]) == 548|| GetVehicleModel(PlayerCargoB[playerid]) == 563|| GetVehicleModel(PlayerCargoB[playerid]) == 511 )
  9459.             {
  9460.                 new vehicleid = PlayerCargoB[playerid];
  9461.                 if (IsInCargoB[playerid] == true)
  9462.                 {
  9463.                     if (newkeys & KEY_SECONDARY_ATTACK)
  9464.                     {
  9465.                         LastVehicle[playerid] = PlayerCargoB[playerid];
  9466.                         CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] - 1;
  9467.                         new Float:X,Float:Y,Float:Z,Float:Ang;
  9468.                         GetVehiclePos(vehicleid, X, Y, Z);
  9469.                         GetVehicleZAngle(vehicleid, Ang);
  9470.                         TogglePlayerSpectating(playerid, false);
  9471.                         X += (2 * floatsin(-Ang, degrees));
  9472.                         Y += (2 * floatcos(-Ang, degrees));
  9473.                         SetPlayerPos(playerid, X, Y, Z);
  9474.                         X += (2 * floatsin(-(Ang-45.0), degrees));
  9475.                         Y += (2 * floatcos(-(Ang-45.0), degrees));
  9476.                         SetPlayerPos(playerid, X, Y, Z);
  9477.                         SetPlayerFacingAngle(playerid, Ang);
  9478.                         cbx[playerid] = X;
  9479.                         cby[playerid] = Y-2;
  9480.                         cbz[playerid] = Z;
  9481.                         cba[playerid] = Ang;
  9482.                         SetTimerEx("ExitCB", 500, 0, "i", playerid);
  9483.                         SetPlayerFacingAngle(playerid, Ang);
  9484.                         SetCameraBehindPlayer(playerid);
  9485.                         IsInCargoB[playerid] = false;
  9486.                         PlayerCargoB[playerid] = 0;
  9487.                        
  9488.                     }
  9489.                 }
  9490.             }
  9491.    
  9492.    
  9493.             if(gPlayerClass[playerid] == DEMOLITION)
  9494.             {
  9495.                 if((newkeys & KEY_CROUCH) && (newkeys & KEY_FIRE) )
  9496.                 {
  9497.                     if(pSpawned[playerid] == 1)
  9498.                     {
  9499.                         if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  9500.                         {
  9501.                             if( hasbombs[playerid] == 1)
  9502.                             {
  9503.                                 if(Planted[playerid] == 1)
  9504.                                 {
  9505.                                     GivePlayerWeapon(playerid, 40, 1);
  9506.                                     ClearAnimations(playerid);
  9507.                                     ApplyAnimation(playerid,"PED","bomber",4.0,0,0,0,0,1000);
  9508.                                     SetTimerEx("Explode", 1200, 0, "i", playerid);
  9509.                                     SetPlayerArmedWeapon(playerid, 0);
  9510.                                     return 1;
  9511.                                 }
  9512.                                 if(Planted[playerid] == 0)
  9513.                                 {
  9514.                                     GetPlayerPos(playerid, bx[playerid], by[playerid], bz[playerid]);
  9515.                                     C4[playerid] = CreateObject(1252, bx[playerid], by[playerid], bz[playerid]-1, -87.6624853592, 0.000000, 0.000000);
  9516.                                     Planted[playerid] = 1;
  9517.                                     ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
  9518.                                     SendClientMessage(playerid,COLOR_YELLOW,"Bomb Planted, Press 'CROUCH + FIRE' to detonate it.");
  9519.                                     return 1;
  9520.                                 }
  9521.                             } else SendClientMessage(playerid, COLOR_GREY, "You need to be on the explosive class!");
  9522.                         } else SendClientMessage(playerid,COLOR_GREY,"You cannot plant a bomb in a car");
  9523.                     } else SendClientMessage(playerid,COLOR_GREY,"You must spawn before planting a bomb");
  9524.                 }
  9525.             }
  9526.             return 1;
  9527. }
  9528.  
  9529. public Explode(playerid)
  9530. {
  9531.     DestroyObject(C4[playerid]);
  9532.     CreateExplosion(bx[playerid], by[playerid], bz[playerid], 6, ExplosionRadius);
  9533.     GameTextForPlayer(playerid, "~R~Bomb Detonated", 2000, 3);
  9534.     Planted[playerid] = 0;
  9535.     return 1;
  9536. }
  9537.  
  9538. public GetClosestPlayer(p1)
  9539. {
  9540.     new x,Float:dis,Float:dis2,player;
  9541.     player = -1;
  9542.     dis = 99999.99;
  9543.     for (x=0;x<MAX_PLAYERS;x++)
  9544.     {
  9545.         if(IsPlayerConnected(x))
  9546.         {
  9547.             if(x != p1)
  9548.             {
  9549.                 dis2 = GetDistanceBetweenPlayers(x,p1);
  9550.                 if(dis2 < dis && dis2 != -1.00)
  9551.                 {
  9552.                     dis = dis2;
  9553.                     player = x;
  9554.                 }
  9555.             }
  9556.         }
  9557.     }
  9558.     return player;
  9559. }
  9560.  
  9561. public Float:GetDistanceBetweenPlayers(p1,p2)
  9562. {
  9563.     new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  9564.     if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
  9565.     {
  9566.         return -1.00;
  9567.     }
  9568.     GetPlayerPos(p1,x1,y1,z1);
  9569.     GetPlayerPos(p2,x2,y2,z2);
  9570.     return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  9571. }
  9572.  
  9573. forward Nuke0();
  9574. public Nuke0()
  9575. {
  9576.     nuked = 0;
  9577.     return 1;
  9578. }
  9579.  
  9580. forward NukeTime(playerid);
  9581. public NukeTime(playerid)
  9582. {
  9583.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  9584.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  9585.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  9586.     CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
  9587.     CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
  9588.     CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
  9589.     CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
  9590.     CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
  9591.    
  9592.    
  9593.    
  9594.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  9595.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  9596.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  9597.    
  9598.    
  9599.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  9600.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  9601.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  9602.     CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
  9603.     CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
  9604.     CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
  9605.     CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
  9606.     CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
  9607.  
  9608.  
  9609.  
  9610.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  9611.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  9612.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  9613.    
  9614.    
  9615.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  9616.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  9617.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  9618.     CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
  9619.     CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
  9620.     CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
  9621.     CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
  9622.     CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
  9623.  
  9624.  
  9625.  
  9626.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  9627.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  9628.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  9629.    
  9630.    
  9631.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  9632.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  9633.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  9634.     CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
  9635.     CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
  9636.     CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
  9637.     CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
  9638.     CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
  9639.  
  9640.  
  9641.  
  9642.     CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
  9643.     CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
  9644.     CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
  9645.     return 1;
  9646. }
  9647.  
  9648. forward NukeTimeG(playerid);
  9649. public NukeTimeG(playerid)
  9650. {
  9651.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  9652.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  9653.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  9654.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  9655.     CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
  9656.     CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
  9657.     CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
  9658.     CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
  9659.     CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
  9660.    
  9661.    
  9662.    
  9663.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  9664.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  9665.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  9666.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  9667.    
  9668.    
  9669.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  9670.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  9671.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  9672.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  9673.     CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
  9674.     CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
  9675.     CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
  9676.     CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
  9677.     CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
  9678.  
  9679.  
  9680.  
  9681.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  9682.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  9683.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  9684.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  9685.    
  9686.    
  9687.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  9688.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  9689.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  9690.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  9691.     CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
  9692.     CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
  9693.     CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
  9694.     CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
  9695.     CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
  9696.  
  9697.  
  9698.  
  9699.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  9700.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  9701.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  9702.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  9703.    
  9704.    
  9705.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  9706.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  9707.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  9708.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  9709.     CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
  9710.     CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
  9711.     CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
  9712.     CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
  9713.     CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
  9714.  
  9715.  
  9716.  
  9717.     CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
  9718.     CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
  9719.     CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
  9720.     CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
  9721.     return 1;
  9722. }
  9723.  
  9724. forward HealAgain(playerid);
  9725. public HealAgain(playerid)
  9726. {
  9727.     healedrec[playerid] = 0;
  9728.     return 1;
  9729. }
  9730.  
  9731. forward SettingPlayerTeam();
  9732. public SettingPlayerTeam()
  9733. {
  9734.     foreach(Player, playerid)
  9735.     {
  9736.         SetPlayerTeam(playerid, gTeam[playerid]);
  9737.     }
  9738.     return 1;
  9739. }
  9740.  
  9741. forward restorerepair(playerid);
  9742. public restorerepair(playerid)
  9743. {
  9744.     repair[playerid] = 0;
  9745.     return 1;
  9746. }
  9747.  
  9748. forward restoreammo(playerid);
  9749. public restoreammo(playerid)
  9750. {
  9751.     ammoo[playerid] = 0;
  9752.     return 1;
  9753. }
  9754.  
  9755.  
  9756. ReturnUser(text[], playerid = INVALID_PLAYER_ID)
  9757. {
  9758.     new pos = 0;
  9759.     while (text[pos] < 0x21)
  9760.     {
  9761.         if (text[pos] == 0) return INVALID_PLAYER_ID;
  9762.         pos++;
  9763.     }
  9764.     new userid = INVALID_PLAYER_ID;
  9765.     if ((text[pos]))
  9766.     {
  9767.         userid = strval(text[pos]);
  9768.         if (userid >=0 && userid < MAX_PLAYERS)
  9769.         {
  9770.             if(!IsPlayerConnected(userid))
  9771.                 userid = INVALID_PLAYER_ID;
  9772.             else return userid;
  9773.             return playerid;
  9774.         }
  9775.     }
  9776.     new len = strlen(text[pos]);
  9777.     new count = 0;
  9778.     new pname[MAX_PLAYER_NAME];
  9779.     for (new i = 0; i < MAX_PLAYERS; i++)
  9780.     {
  9781.         if (IsPlayerConnected(i))
  9782.         {
  9783.             GetPlayerName(i, pname, sizeof (pname));
  9784.             if (strcmp(pname, text[pos], true, len) == 0)
  9785.             {
  9786.                 if (len == strlen(pname)) return i;
  9787.                 else
  9788.                 {
  9789.                     count++;
  9790.                     userid = i;
  9791.                 }
  9792.             }
  9793.         }
  9794.     }
  9795.     if (count != 1)
  9796.     {
  9797.         if (playerid != INVALID_PLAYER_ID)
  9798.         {
  9799.             if (count) SendClientMessage(playerid, YELLOW, "There are multiple users, enter full playername.");
  9800.             else SendClientMessage(playerid, RED, "Playername not found.");
  9801.         }
  9802.         userid = INVALID_PLAYER_ID;
  9803.     }
  9804.     return userid;
  9805. }
  9806.  
  9807. stock IsNumeric(const string[])
  9808. {
  9809.     for (new i = 0, j = strlen(string); i < j; i++)
  9810.     if (string[i] > '9' || string[i] < '0')
  9811.     return 0;
  9812.     return 1;
  9813. }
  9814.  
  9815. stock sscanf(string[], format[], {Float,_}:...)
  9816. {
  9817.     #if defined isnull
  9818.         if (isnull(string))
  9819.     #else
  9820.         if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
  9821.     #endif
  9822.         {
  9823.             return format[0];
  9824.         }
  9825.     #pragma tabsize 4
  9826.     new
  9827.         formatPos = 0,
  9828.         stringPos = 0,
  9829.         paramPos = 2,
  9830.         paramCount = numargs(),
  9831.         delim = ' ';
  9832.     while (string[stringPos] && string[stringPos] <= ' ')
  9833.     {
  9834.         stringPos++;
  9835.     }
  9836.     while (paramPos < paramCount && string[stringPos])
  9837.     {
  9838.         switch (format[formatPos++])
  9839.         {
  9840.             case '\0':
  9841.             {
  9842.                 return 0;
  9843.             }
  9844.             case 'i', 'd':
  9845.             {
  9846.                 new
  9847.                     neg = 1,
  9848.                     num = 0,
  9849.                     ch = string[stringPos];
  9850.                 if (ch == '-')
  9851.                 {
  9852.                     neg = -1;
  9853.                     ch = string[++stringPos];
  9854.                 }
  9855.                 do
  9856.                 {
  9857.                     stringPos++;
  9858.                     if ('0' <= ch <= '9')
  9859.                     {
  9860.                         num = (num * 10) + (ch - '0');
  9861.                     }
  9862.                     else
  9863.                     {
  9864.                         return -1;
  9865.                     }
  9866.                 }
  9867.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  9868.                 setarg(paramPos, 0, num * neg);
  9869.             }
  9870.             case 'h', 'x':
  9871.             {
  9872.                 new
  9873.                     num = 0,
  9874.                     ch = string[stringPos];
  9875.                 do
  9876.                 {
  9877.                     stringPos++;
  9878.                     switch (ch)
  9879.                     {
  9880.                         case 'x', 'X':
  9881.                         {
  9882.                             num = 0;
  9883.                             continue;
  9884.                         }
  9885.                         case '0' .. '9':
  9886.                         {
  9887.                             num = (num << 4) | (ch - '0');
  9888.                         }
  9889.                         case 'a' .. 'f':
  9890.                         {
  9891.                             num = (num << 4) | (ch - ('a' - 10));
  9892.                         }
  9893.                         case 'A' .. 'F':
  9894.                         {
  9895.                             num = (num << 4) | (ch - ('A' - 10));
  9896.                         }
  9897.                         default:
  9898.                         {
  9899.                             return -1;
  9900.                         }
  9901.                     }
  9902.                 }
  9903.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  9904.                 setarg(paramPos, 0, num);
  9905.             }
  9906.             case 'c':
  9907.             {
  9908.                 setarg(paramPos, 0, string[stringPos++]);
  9909.             }
  9910.             case 'f':
  9911.             {
  9912.                 setarg(paramPos, 0, _:floatstr(string[stringPos]));
  9913.             }
  9914.             case 'p':
  9915.             {
  9916.                 delim = format[formatPos++];
  9917.                 continue;
  9918.             }
  9919.             case '\'':
  9920.             {
  9921.                 new
  9922.                     end = formatPos - 1,
  9923.                     ch;
  9924.                 while ((ch = format[++end]) && ch != '\'') {}
  9925.                 if (!ch)
  9926.                 {
  9927.                     return -1;
  9928.                 }
  9929.                 format[end] = '\0';
  9930.                 if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
  9931.                 {
  9932.                     if (format[end + 1])
  9933.                     {
  9934.                         return -1;
  9935.                     }
  9936.                     return 0;
  9937.                 }
  9938.                 format[end] = '\'';
  9939.                 stringPos = ch + (end - formatPos);
  9940.                 formatPos = end + 1;
  9941.             }
  9942.             case 'u':
  9943.             {
  9944.                 new
  9945.                     end = stringPos - 1,
  9946.                     id = 0,
  9947.                     bool:num = true,
  9948.                     ch;
  9949.                 while ((ch = string[++end]) && ch != delim)
  9950.                 {
  9951.                     if (num)
  9952.                     {
  9953.                         if ('0' <= ch <= '9')
  9954.                         {
  9955.                             id = (id * 10) + (ch - '0');
  9956.                         }
  9957.                         else
  9958.                         {
  9959.                             num = false;
  9960.                         }
  9961.                     }
  9962.                 }
  9963.                 if (num && IsPlayerConnected(id))
  9964.                 {
  9965.                     setarg(paramPos, 0, id);
  9966.                 }
  9967.                 else
  9968.                 {
  9969.                     #if !defined foreach
  9970.                         #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  9971.                         #define __SSCANF_FOREACH__
  9972.                     #endif
  9973.                     string[end] = '\0';
  9974.                     num = false;
  9975.                     new
  9976.                         name[MAX_PLAYER_NAME];
  9977.                     id = end - stringPos;
  9978.                     foreach (Player, playerid)
  9979.                     {
  9980.                         GetPlayerName(playerid, nameee, sizeof (name));
  9981.                         if (!strcmp(name, string[stringPos], true, id))
  9982.                         {
  9983.                             setarg(paramPos, 0, playerid);
  9984.                             num = true;
  9985.                             break;
  9986.                         }
  9987.                     }
  9988.                     if (!num)
  9989.                     {
  9990.                         setarg(paramPos, 0, INVALID_PLAYER_ID);
  9991.                     }
  9992.                     string[end] = ch;
  9993.                     #if defined __SSCANF_FOREACH__
  9994.                         #undef foreach
  9995.                         #undef __SSCANF_FOREACH__
  9996.                     #endif
  9997.                 }
  9998.                 stringPos = end;
  9999.             }
  10000.             case 's', 'z':
  10001.             {
  10002.                 new
  10003.                     i = 0,
  10004.                     ch;
  10005.                 if (format[formatPos])
  10006.                 {
  10007.                     while ((ch = string[stringPos++]) && ch != delim)
  10008.                     {
  10009.                         setarg(paramPos, i++, ch);
  10010.                     }
  10011.                     if (!i)
  10012.                     {
  10013.                         return -1;
  10014.                     }
  10015.                 }
  10016.                 else
  10017.                 {
  10018.                     while ((ch = string[stringPos++]))
  10019.                     {
  10020.                         setarg(paramPos, i++, ch);
  10021.                     }
  10022.                 }
  10023.                 stringPos--;
  10024.                 setarg(paramPos, i, '\0');
  10025.             }
  10026.             default:
  10027.             {
  10028.                 continue;
  10029.             }
  10030.         }
  10031.         while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
  10032.         {
  10033.             stringPos++;
  10034.         }
  10035.         while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
  10036.         {
  10037.             stringPos++;
  10038.         }
  10039.         paramPos++;
  10040.     }
  10041.     do
  10042.     {
  10043.         if ((delim = format[formatPos++]) > ' ')
  10044.         {
  10045.             if (delim == '\'')
  10046.             {
  10047.                 while ((delim = format[formatPos++]) && delim != '\'') {}
  10048.             }
  10049.             else if (delim != 'z')
  10050.             {
  10051.                 return delim;
  10052.             }
  10053.         }
  10054.     }
  10055.     while (delim > ' ');
  10056.     return 0;
  10057. }
  10058.  
  10059. stock CheckForLevelUpdate(playerid)
  10060. {
  10061.     if ( GetPlayerScore(playerid) >= 50 )
  10062.     {
  10063.         if( rank[playerid] < 1 )
  10064.         {
  10065.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10066.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10067.             SendClientMessage(playerid, COLOR_CON_GREEN, "*You are a Private!");
  10068.             rank[playerid] = 1;
  10069.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10070.             GivePlayerMoney(playerid, 5000);
  10071.         }
  10072.     }
  10073.    
  10074.     if ( GetPlayerScore(playerid) >= 100 )
  10075.     {
  10076.         if( rank[playerid] < 2 )
  10077.         {
  10078.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10079.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10080.             SendClientMessage(playerid, COLOR_CON_GREEN, "**You are a Corporal!");
  10081.             rank[playerid] = 2;
  10082.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10083.             GivePlayerMoney(playerid, 10000);
  10084.         }
  10085.     }
  10086.    
  10087.     if ( GetPlayerScore(playerid) >= 250 )
  10088.     {
  10089.         if( rank[playerid] < 3 )
  10090.         {
  10091.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10092.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10093.             SendClientMessage(playerid, COLOR_CON_GREEN, "***You are a Sergeant!");
  10094.             rank[playerid] = 3;
  10095.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10096.             GivePlayerMoney(playerid, 15000);
  10097.         }
  10098.     }
  10099.    
  10100.     if ( GetPlayerScore(playerid) >= 500  )
  10101.     {
  10102.         if( rank[playerid] < 4 )
  10103.         {
  10104.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10105.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10106.             SendClientMessage(playerid, COLOR_CON_GREEN, "****You are a Lieutenant!");
  10107.             rank[playerid] = 4;
  10108.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10109.             GivePlayerMoney(playerid, 20000);
  10110.         }
  10111.     }
  10112.    
  10113.     if ( GetPlayerScore(playerid) >= 750 )
  10114.     {
  10115.         if( rank[playerid] < 5 )
  10116.         {
  10117.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10118.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10119.             SendClientMessage(playerid, COLOR_CON_GREEN, "*****You are a Captain!");
  10120.             rank[playerid] = 5;
  10121.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10122.             GivePlayerMoney(playerid, 25000);
  10123.         }
  10124.     }
  10125.    
  10126.     if ( GetPlayerScore(playerid) >= 1000 )
  10127.     {
  10128.         if( rank[playerid] < 6 )
  10129.         {
  10130.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10131.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10132.             SendClientMessage(playerid, COLOR_CON_GREEN, "******You are a Major!");
  10133.             SendClientMessage(playerid, COLOR_CON_GREEN,"Congratulations! You recieved all the badges!");
  10134.             SendClientMessage(playerid, COLOR_CON_GREEN,"You may still recieve ranks but you will not gain anymore badges.");
  10135.             rank[playerid] = 6;
  10136.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10137.             GivePlayerMoney(playerid, 30000);
  10138.         }
  10139.     }
  10140.    
  10141.     if ( GetPlayerScore(playerid) >= 1250)
  10142.     {
  10143.         if( rank[playerid] < 7 )
  10144.         {
  10145.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10146.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10147.             SendClientMessage(playerid, COLOR_CON_GREEN, "*******You are a Colonel!");
  10148.             rank[playerid] = 7;
  10149.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10150.             GivePlayerMoney(playerid, 35000);
  10151.         }
  10152.     }
  10153.    
  10154.     if ( GetPlayerScore(playerid) >= 1500 )
  10155.     {
  10156.         if( rank[playerid] < 8 )
  10157.         {
  10158.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10159.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10160.             SendClientMessage(playerid, COLOR_CON_GREEN, "********You are a Lieutenant General!");
  10161.             rank[playerid] = 8;
  10162.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10163.             GivePlayerMoney(playerid, 40000);
  10164.         }
  10165.     }
  10166.    
  10167.     if ( GetPlayerScore(playerid) >= 2000 )
  10168.     {
  10169.         if( rank[playerid] < 9 )
  10170.         {
  10171.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10172.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10173.             SendClientMessage(playerid, COLOR_CON_GREEN, "*********You are a Major General!");
  10174.             rank[playerid] = 9;
  10175.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10176.             GivePlayerMoney(playerid, 45000);
  10177.         }
  10178.     }
  10179.    
  10180.     if ( GetPlayerScore(playerid) >= 2250 )
  10181.     {
  10182.         if( rank[playerid] < 10 )
  10183.         {
  10184.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10185.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10186.             SendClientMessage(playerid, COLOR_CON_GREEN, "**********You are a General!");
  10187.             rank[playerid] = 10;
  10188.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10189.             GivePlayerMoney(playerid, 50000);
  10190.         }
  10191.     }
  10192.    
  10193.     if ( GetPlayerScore(playerid) >= 4500 )
  10194.     {
  10195.         if( rank[playerid] < 11 )
  10196.         {
  10197.             PlayerPlaySound(playerid, 1150, 0, 0, 0);
  10198.             SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
  10199.             SendClientMessage(playerid, COLOR_CON_GREEN, "***********You are a the General of The Army!");
  10200.             SendClientMessage(playerid, COLOR_CON_GREEN, "Congratulations! You recieved all of the ranks!");
  10201.             rank[playerid] = 11;
  10202.             SetPlayerWantedLevel(playerid, rank[playerid]);
  10203.             GivePlayerMoney(playerid, 100000);
  10204.         }
  10205.     }
  10206.    
  10207.     if( rank[playerid] > 11 ) rank[playerid] = 11;
  10208.     return 1;
  10209. }
  10210.  
  10211. stock RestoreClassWeapons(playerid)
  10212. {
  10213.                     if(gPlayerClass[playerid] == 0)
  10214.                     {
  10215.                         if(gTeam[playerid] == TEAM_USA)
  10216.                         {
  10217.                             GivePlayerWeapon(playerid, 24, 200);
  10218.                             GivePlayerWeapon(playerid, 31, 500);
  10219.                             GivePlayerWeapon(playerid, 25, 100);
  10220.                         }else
  10221.                         if(gTeam[playerid] == TEAM_GERMANY)
  10222.                         {
  10223.                             GivePlayerWeapon(playerid, 24, 200);
  10224.                             GivePlayerWeapon(playerid, 31, 500);
  10225.                             GivePlayerWeapon(playerid, 25, 100);
  10226.                            
  10227.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  10228.                         {
  10229.                             GivePlayerWeapon(playerid, 34, 200);
  10230.                             GivePlayerWeapon(playerid, 1, 1);
  10231.                             GivePlayerWeapon(playerid, 24, 200);
  10232.                         }
  10233.  
  10234.                     }
  10235.                     if(gPlayerClass[playerid] == 1)
  10236.                     {
  10237.                         if( rank[playerid] >= 1 )
  10238.                         {
  10239.                             if(gTeam[playerid] == TEAM_USA)
  10240.                             {
  10241.                                 GivePlayerWeapon(playerid, 16, 50);
  10242.                                 GivePlayerWeapon(playerid, 36, 5);
  10243.                                 GivePlayerWeapon(playerid, 24, 200);
  10244.                             }else
  10245.                             if(gTeam[playerid] == TEAM_GERMANY)
  10246.                             {
  10247.                                 GivePlayerWeapon(playerid, 16, 50);
  10248.                                 GivePlayerWeapon(playerid, 36, 5);
  10249.                                 GivePlayerWeapon(playerid, 24, 200);
  10250.                             }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  10251.                             {
  10252.                                 GivePlayerWeapon(playerid, 34, 200);
  10253.                                 GivePlayerWeapon(playerid, 1, 1);
  10254.                                 GivePlayerWeapon(playerid, 24, 200);
  10255.                             }
  10256.                         }else SendClientMessage(playerid, COLOR_RED, "You need to be rank 1 to be able to use Demolition !");
  10257.                     }
  10258.  
  10259.                     if(gPlayerClass[playerid] == 2)
  10260.                     {
  10261.                         if(gTeam[playerid] == TEAM_USA)
  10262.                         {
  10263.                             GivePlayerWeapon(playerid, 34, 200);
  10264.                             GivePlayerWeapon(playerid, 1, 1);
  10265.                             GivePlayerWeapon(playerid, 24, 200);
  10266.                         }else
  10267.                         if(gTeam[playerid] == TEAM_GERMANY)
  10268.                         {
  10269.                             GivePlayerWeapon(playerid, 34, 200);
  10270.                             GivePlayerWeapon(playerid, 1, 1);
  10271.                             GivePlayerWeapon(playerid, 24, 200);
  10272.                         }
  10273.                         else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  10274.                         {
  10275.                             GivePlayerWeapon(playerid, 34, 200);
  10276.                             GivePlayerWeapon(playerid, 1, 1);
  10277.                             GivePlayerWeapon(playerid, 24, 200);
  10278.                         }
  10279.                     }
  10280.                     if(gPlayerClass[playerid] == 3)
  10281.                     {
  10282.                         if(gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA)
  10283.                         {
  10284.                             SendClientMessage(playerid, COLOR_GREY, "You cant be a pilot on russia or japan!");
  10285.                             TogglePlayerControllable(playerid, 1);
  10286.                             return 1;
  10287.                         }
  10288.  
  10289.                         if(rank[playerid] >= 3)
  10290.                         {
  10291.                             if(gTeam[playerid] == TEAM_USA)
  10292.                             {
  10293.                                 GivePlayerWeapon(playerid, 22, 50);
  10294.                             }
  10295.                             if(gTeam[playerid] == TEAM_GERMANY)
  10296.                             {
  10297.                                 GivePlayerWeapon(playerid, 22, 50);
  10298.                             }
  10299.                         }
  10300.                     }
  10301.  
  10302.                     if(gPlayerClass[playerid] == 4)
  10303.                     {
  10304.                         if(gTeam[playerid] == TEAM_USA)
  10305.                         {
  10306.                             GivePlayerWeapon(playerid, 23, 200);
  10307.                             GivePlayerWeapon(playerid, 1, 1);
  10308.                             SetPlayerSkin(playerid, 275);
  10309.                         }else
  10310.                         if(gTeam[playerid] == TEAM_GERMANY)
  10311.                         {
  10312.                             GivePlayerWeapon(playerid, 1, 1);
  10313.                             GivePlayerWeapon(playerid, 23, 200);
  10314.                             SetPlayerSkin(playerid, 70);
  10315.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  10316.                         {
  10317.                             GivePlayerWeapon(playerid, 34, 200);
  10318.                             GivePlayerWeapon(playerid, 1, 1);
  10319.                             GivePlayerWeapon(playerid, 24, 200);
  10320.                         }
  10321.                     }
  10322.  
  10323.                     if(gPlayerClass[playerid] == 5)
  10324.                     {
  10325.                         if(gTeam[playerid] == TEAM_USA)
  10326.                         {
  10327.                             GivePlayerWeapon(playerid, 27, 200);
  10328.                             GivePlayerWeapon(playerid, 1, 1);
  10329.                             GivePlayerWeapon(playerid, 29, 200);
  10330.                         }else
  10331.                         if(gTeam[playerid] == TEAM_GERMANY)
  10332.                         {
  10333.                             GivePlayerWeapon(playerid, 27, 200);
  10334.                             GivePlayerWeapon(playerid, 1, 1);
  10335.                             GivePlayerWeapon(playerid, 29, 200);
  10336.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  10337.                         {
  10338.                             GivePlayerWeapon(playerid, 34, 200);
  10339.                             GivePlayerWeapon(playerid, 1, 1);
  10340.                             GivePlayerWeapon(playerid, 24, 200);
  10341.                         }
  10342.                     }
  10343.  
  10344.                     if( gPlayerClass[playerid] == 6 ) //pyro
  10345.                     {
  10346.                         if(gTeam[playerid] == TEAM_USA)
  10347.                         {
  10348.                             GivePlayerWeapon(playerid, 16, 20);
  10349.                             GivePlayerWeapon(playerid, 1, 1);
  10350.                             GivePlayerWeapon(playerid, 23, 200);
  10351.                             GivePlayerWeapon(playerid, 37, 550);
  10352.                         }else
  10353.                         if(gTeam[playerid] == TEAM_GERMANY)
  10354.                         {
  10355.                             GivePlayerWeapon(playerid, 16, 20);
  10356.                             GivePlayerWeapon(playerid, 1, 1);
  10357.                             GivePlayerWeapon(playerid, 23, 200);
  10358.                             GivePlayerWeapon(playerid, 37, 550);
  10359.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  10360.                         {
  10361.                             GivePlayerWeapon(playerid, 34, 200);
  10362.                             GivePlayerWeapon(playerid, 1, 1);
  10363.                             GivePlayerWeapon(playerid, 24, 200);
  10364.                         }
  10365.  
  10366.  
  10367.                     }
  10368.  
  10369.                     if( gPlayerClass[playerid] == 7 )//Esploratore
  10370.                     {
  10371.                         if(gTeam[playerid] == TEAM_USA)
  10372.                         {
  10373.                             SetPlayerArmour(playerid, 25);
  10374.                             GivePlayerWeapon(playerid, 28, 200);
  10375.                             GivePlayerWeapon(playerid, 1, 1);
  10376.                             GivePlayerWeapon(playerid, 22, 200);
  10377.                         }else
  10378.                         if(gTeam[playerid] == TEAM_GERMANY)
  10379.                         {
  10380.                             SetPlayerArmour(playerid, 25);
  10381.                             GivePlayerWeapon(playerid, 28, 200);
  10382.                             GivePlayerWeapon(playerid, 1, 1);
  10383.                             GivePlayerWeapon(playerid, 22, 200);
  10384.                         }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
  10385.                         {
  10386.                             GivePlayerWeapon(playerid, 34, 200);
  10387.                             GivePlayerWeapon(playerid, 1, 1);
  10388.                             GivePlayerWeapon(playerid, 24, 200);
  10389.                         }
  10390.                     }
  10391.                     if( gPlayerClass[playerid] == ADMIN )
  10392.                     {
  10393.                         GivePlayerWeapon(playerid, 38, 20000);
  10394.                         GivePlayerWeapon(playerid, 22, 20000);
  10395.                         SetPlayerArmour(playerid, 100);
  10396.                     }
  10397.                    
  10398.                     if(gPlayerClass[playerid] == GENERAL)
  10399.                     {
  10400.                         SetPlayerArmour(playerid, 95);
  10401.                         GivePlayerWeapon(playerid, 31, 200);
  10402.                         GivePlayerWeapon(playerid, 27, 200);
  10403.                         GivePlayerWeapon(playerid, 28, 200);
  10404.                     }
  10405.  
  10406.                     return 1;
  10407. }
  10408.  
  10409. stock PlayerName(playerid)
  10410. {
  10411.     new UserName[MAX_PLAYER_NAME];
  10412.     GetPlayerName(playerid, UserName, sizeof(UserName));
  10413.     return UserName;
  10414. }
  10415.  
  10416. stock bigstrtok(const string[], &idx)
  10417. {
  10418.     new length = strlen(string);
  10419.     while ((idx < length) && (string[idx] <= ' '))
  10420.     {
  10421.         idx++;
  10422.     }
  10423.     new offset = idx;
  10424.     new result[128];
  10425.     while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  10426.     {
  10427.         result[idx - offset] = string[idx];
  10428.         idx++;
  10429.     }
  10430.     result[idx - offset] = EOS;
  10431.     return result;
  10432. }
  10433.  
  10434. public SendClientMessageToAdmins(color,string[],alevel)
  10435. {
  10436.     foreach(Player, i)
  10437.     {
  10438.         if (adminlevel[i] >= alevel)
  10439.         {
  10440.             SendClientMessage(i, color, string);
  10441.             printf("%s", string);
  10442.         }
  10443.     }
  10444.     return 1;
  10445. }
  10446.  
  10447. public BanLog(string[])
  10448. {
  10449.     new entry[128];
  10450.     format(entry, sizeof(entry), "%s\r\n",string);
  10451.     new File:hFile;
  10452.     hFile = fopen("ban.log", io_append);
  10453.     if (hFile)
  10454.     {
  10455.         fwrite(hFile, entry);
  10456.         fclose(hFile);
  10457.     }
  10458. }
  10459.  
  10460. OnPlayerJailed(playerid)
  10461. {
  10462.     SetPlayerInterior(playerid, 6);
  10463.     SetPlayerPos(playerid, 264.3700,77.5700,1001.0391);
  10464.     SetPlayerFacingAngle(playerid, 272.6900);
  10465.     TogglePlayerControllable(playerid, 0);
  10466.     return 1;
  10467. }
  10468.  
  10469. OnPlayerUnjailed(playerid)
  10470. {
  10471.     SetPlayerInterior(playerid, 0);
  10472.     SpawnPlayer(playerid);
  10473.     return 1;
  10474. }
  10475.  
  10476. public Message()
  10477. {
  10478.     SendClientMessageToAll(WHITE, "If you want your stats, including deaths and kills to be saved type /register [password]");
  10479.     return 1;
  10480. }
  10481.  
  10482. public RankRefresh()
  10483. {
  10484.     //rank refresh
  10485.     foreach(Player, i)
  10486.     {
  10487.         if( GetPlayerWantedLevel(i) != rank[i] ) SetPlayerWantedLevel(i, rank[i]);
  10488.     }
  10489.     return 0;
  10490. }
  10491.  
  10492. stock cTogglePlayerSpectating(playerid, bool:tg)
  10493. {
  10494.     TogglePlayerSpectating(playerid, tg);
  10495.     if( tg == 0 )
  10496.     {
  10497.         SetPlayerPos(playerid, PlayerSpec[playerid][Xspc], PlayerSpec[playerid][Yspc], PlayerSpec[playerid][Zspc]);
  10498.         PlayerSpec[playerid] = 0;
  10499.         SetPlayerInterior(playerid, PlayerSpec[playerid][intspc]);
  10500.     }
  10501.     else if( tg == 1 )
  10502.     {
  10503.         new Float:X, Float:Y, Float:Z;
  10504.         GetPlayerPos(playerid, X, Y, Z);
  10505.         PlayerSpec[playerid][intspc] = GetPlayerInterior(playerid);
  10506.         PlayerSpec[playerid][Xspc] = X;
  10507.         PlayerSpec[playerid][Yspc] = Y;
  10508.         PlayerSpec[playerid][Zspc] = Z;
  10509.         PlayerSpec[playerid][is] = 1;
  10510.     }
  10511.     return 1;
  10512. }
  10513.  
  10514. stock AddIpToList(playerid, reason[])
  10515. {
  10516.     new ip[50];
  10517.     GetPlayerIp(playerid, ip, sizeof(ip));
  10518.     new entry[128];
  10519.     format(entry, sizeof(entry), "%s    -   %s\r\n", ip, reason);
  10520.     new File:hFile;
  10521.     hFile = fopen("bannedips.cfg", io_append);
  10522.     if (hFile)
  10523.     {
  10524.         fwrite(hFile, entry);
  10525.         fclose(hFile);
  10526.     }
  10527.     return 1;
  10528. }
  10529.  
  10530.  
  10531. stock CheckForJetpackHack(playerid)
  10532. {
  10533.     if( adminlevel[playerid] > 0 )
  10534.     {
  10535.    
  10536.     }else
  10537.     {
  10538.         GetPlayerName(playerid, nameee, 16);
  10539.         new strr[100];
  10540.         format(strr, 100, "*ANTI-HACK: Player %s has been banned for JETPACK !", nameee);
  10541.         SendClientMessageToAll(COLOR_RED, strr);
  10542.         new IP[50]; GetPlayerIp(playerid, IP, 50);
  10543.         printf("%s | (%i)%s has been banned for usage of JETPACK", IP, playerid, nameee);
  10544.         if( GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK ) BanEx(playerid, "Jetpack Ban");
  10545.         return 1;
  10546.     }
  10547.     return 1;
  10548. }
  10549.  
  10550. stock CheckForMinigun(playerid)
  10551. {
  10552.     if( adminlevel[playerid] < 1 )
  10553.     {
  10554.         if( GetPlayerWeapon(playerid) == 38 )
  10555.         {
  10556.             GetPlayerName(playerid, nameee, 16);
  10557.             new strr[100];
  10558.             format(strr, 100, "*ANTI-HACK: Player %s has been banned for MINIGUN !", nameee);
  10559.             SendClientMessageToAll(COLOR_RED, strr);
  10560.             BanEx(playerid, "Minigun Ban");
  10561.         }
  10562.     }
  10563.     return 1;
  10564. }
  10565.  
  10566. /*
  10567. stock GetTeamColor(playerid)
  10568. {
  10569.     new color;
  10570.     if(gTeam[playerid] == TEAM_USA)
  10571.     {
  10572.         color = COLOR_BLUE;
  10573.     }
  10574.     if(gTeam[playerid] == TEAM_GERMANY)
  10575.     {
  10576.         color = COLOR_RED;
  10577.     }
  10578.     if(gTeam[playerid] == TEAM_RUSSIA)
  10579.     {
  10580.         color = COLOR_ORANGE;
  10581.     }
  10582.     if(gTeam[playerid] == TEAM_JAPAN)
  10583.     {
  10584.         color = COLOR_WHITE;
  10585.     }
  10586.     if(gTeam[playerid] == TEAM_MERC)
  10587.     {
  10588.         color = COLOR_YELLOW;
  10589.     }
  10590.     return color;
  10591. }
  10592. */
  10593.  
  10594. Vip(playerid)
  10595. {
  10596.     new ArmiVip;
  10597.     ArmiVip = dini_Int(udb_encode(playername), "ArmiVip");
  10598.     if(ArmiVip == 1)
  10599.     {
  10600.         SetPlayerArmour(playerid, 100);
  10601.     }
  10602.     return 1;
  10603. }
  10604.  
  10605. stock GetAdminLevel(playerid)
  10606. {
  10607.     return adminlevel[playerid];
  10608. }
  10609.  
  10610. stock GetFileDataFromSelectLine(filename[], line, result[])
  10611. {
  10612.     new File:FileHandle;
  10613.     new LineData[1024 char];
  10614.     new LoadCount = 0;
  10615.  
  10616.     if(!fexist(filename))
  10617.     {
  10618.         printf("Could not open \"%s\" ",filename);
  10619.  
  10620.         return false;
  10621.     }
  10622.  
  10623.     FileHandle = fopen(filename, io_read);
  10624.  
  10625.     while(fread(FileHandle, LineData))
  10626.     {
  10627.         if(LoadCount == (line - 1))
  10628.         {
  10629.             if(LineData[0] == 0)
  10630.             {
  10631.                 continue;
  10632.             }
  10633.  
  10634.             if((LineData[strlen(LineData) - 1] == '\n') || (LineData[strlen(LineData) - 1] == '\r'))
  10635.             {
  10636.                 LineData[strlen(LineData) - 1] = 0;
  10637.  
  10638.                 if((LineData[strlen(LineData) - 2] == '\n') || (LineData[strlen(LineData) - 2] == '\r'))
  10639.                 {
  10640.                     LineData[strlen(LineData) - 2] = 0;
  10641.                 }
  10642.  
  10643.                 if(LineData[0] == 0)
  10644.                 {
  10645.                     continue;
  10646.                 }
  10647.             }
  10648.             format(result, sizeof(LineData), "%s", LineData);
  10649.  
  10650.             fclose(FileHandle);
  10651.             return true;
  10652.         }
  10653.         LoadCount += 1;
  10654.     }
  10655.     fclose(FileHandle);
  10656.     return false;
  10657. }
  10658.  
  10659. stock GetPlayerSpeed(playerid)
  10660. {
  10661.     new v;
  10662.     for(new i=0;i<MAX_CHECKS;i++)
  10663.         v+=Speed[playerid][i];
  10664.     v/=MAX_CHECKS;
  10665.     return v;
  10666. }
  10667.  
  10668. stock IsPlayerInPlane(playerid)
  10669. {
  10670.     new m=GetVehicleModel(GetPlayerVehicleID(playerid));
  10671.     for(new i=0;i<sizeof(Planes);i++)
  10672.         if(m==Planes[i])
  10673.             return true;
  10674.     return false;
  10675. }
  10676.  
  10677.  
  10678. public MutePlayer(playerid,time,reason[])
  10679. {
  10680.     if(IsPlayerConnected(playerid) && time)
  10681.     {
  10682.         Muted[playerid]=time;
  10683.         new string[128];
  10684.         format(string, sizeof(string), "Muting player '%s' (%d) for %d second(s). Reason: %s", ReturnPlayerName(playerid),playerid,time,reason);
  10685.         return 1;
  10686.     }
  10687.     return 0;
  10688. }
  10689.  
  10690. public SpamUpdate()
  10691. {
  10692.     new reason[64];
  10693.     foreach(Player, i)
  10694.     {
  10695.         if(Messages[i])
  10696.         {
  10697.             if(!Muted[i])
  10698.             {
  10699.                 if(Messages[i]>15)
  10700.                 {
  10701.                     format(reason,sizeof(reason),"Extreme spam [%d messages/second]",Messages[i]);
  10702.                     SendClientMessageToAll(RED, reason);
  10703.                     Kick(i);
  10704.                     continue;
  10705.                 }
  10706.                 else if(Messages[i]>10)
  10707.                 {
  10708.                     format(reason,sizeof(reason),"Massive spam [%d messages/second]",Messages[i]);
  10709.                     SendClientMessageToAll(RED, reason);
  10710.                     Kick(i);
  10711.                     continue;
  10712.                 }
  10713.                 else if(Messages[i]>4)
  10714.                 {
  10715.                     format(reason,sizeof(reason),"Spam [%d messages/second]",Messages[i]);
  10716.                     SendClientMessageToAll(RED, reason);
  10717.                     MutePlayer(i,2*60,reason);
  10718.                 }
  10719.                 Messages[i]--;
  10720.             }
  10721.  
  10722.             if(Commands[i])
  10723.             {
  10724.                 if(Commands[i]>15)
  10725.                 {
  10726.                     format(reason,sizeof(reason),"Extreme command spam [%d commands/second]",Commands[i]);
  10727.                     SendClientMessageToAll(RED, reason);
  10728.                     Kick(i);
  10729.                     continue;
  10730.                 }
  10731.                 else if(Commands[i]>5)
  10732.                 {
  10733.                     format(reason,sizeof(reason),"Massive command spam [%d commands/second]",Commands[i]);
  10734.                     SendClientMessageToAll(RED, reason);
  10735.                     Kick(i);
  10736.                     continue;
  10737.                 }
  10738.                 Commands[i]--;
  10739.             }
  10740.         }
  10741.     }
  10742.     return 1;
  10743. }
  10744.  
  10745. stock ReturnPlayerName(playerid)
  10746. {
  10747.     new name[MAX_PLAYER_NAME];
  10748.     GetPlayerName(playerid,name,sizeof(name));
  10749.     return name;
  10750. }
  10751.  
  10752. stock GetPlayerSpeedSpeedo(playerid, bool:kmh) // by misco
  10753. {
  10754.     new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
  10755.     if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
  10756.     rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
  10757.     return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
  10758. }
  10759.  
  10760. public VHPBarUpdate()
  10761. {
  10762.     for(new i=0; i<MAX_PLAYERS; i++)
  10763.     {
  10764.         TextDrawHideForPlayer(i,vehiclehpbar[0]);
  10765.         TextDrawHideForPlayer(i,vehiclehpbar[1]);
  10766.         TextDrawHideForPlayer(i,vehiclehpbar[2]);
  10767.         TextDrawHideForPlayer(i,vehiclehpbar[3]);
  10768.         TextDrawHideForPlayer(i,vehiclehpbar[4]);
  10769.         TextDrawHideForPlayer(i,vehiclehpbar[5]);
  10770.         TextDrawHideForPlayer(i,vehiclehpbar[6]);
  10771.         TextDrawHideForPlayer(i,vehiclehpbar[7]);
  10772.         TextDrawHideForPlayer(i,vehiclehpbar[8]);
  10773.         TextDrawHideForPlayer(i,vehiclehpbar[9]);
  10774.         TextDrawHideForPlayer(i,vehiclehpbar[10]);
  10775.         TextDrawHideForPlayer(i,vehiclehpbar[11]);
  10776.         if(IsPlayerInAnyVehicle(i) == 1)
  10777.         {
  10778.             new vehicleid;
  10779.             vehicleid = GetPlayerVehicleID(i);
  10780.             new Float:vhp;
  10781.             GetVehicleHealth(vehicleid,vhp);
  10782.             if(vhp >= 0 && vhp <= 249)
  10783.             {
  10784.                 TextDrawShowForPlayer(i,vehiclehpbar[0]);
  10785.             }
  10786.             if(vhp >= 250 && vhp <= 317)
  10787.             {
  10788.                 TextDrawShowForPlayer(i,vehiclehpbar[1]);
  10789.             }
  10790.             else if(vhp >= 318 && vhp <= 385)
  10791.             {
  10792.                 TextDrawShowForPlayer(i,vehiclehpbar[2]);
  10793.             }
  10794.             else if(vhp >= 386 && vhp <= 453)
  10795.             {
  10796.                 TextDrawShowForPlayer(i,vehiclehpbar[3]);
  10797.             }
  10798.             else if(vhp >= 454 && vhp <= 521)
  10799.             {
  10800.                 TextDrawShowForPlayer(i,vehiclehpbar[4]);
  10801.             }
  10802.             else if(vhp >= 522 && vhp <= 589)
  10803.             {
  10804.                 TextDrawShowForPlayer(i,vehiclehpbar[5]);
  10805.             }
  10806.             else if(vhp >= 590 && vhp <= 657)
  10807.             {
  10808.                 TextDrawShowForPlayer(i,vehiclehpbar[6]);
  10809.             }
  10810.             else if(vhp >= 658 && vhp <= 725)
  10811.             {
  10812.                 TextDrawShowForPlayer(i,vehiclehpbar[7]);
  10813.             }
  10814.             else if(vhp >= 726 && vhp <= 793)
  10815.             {
  10816.                 TextDrawShowForPlayer(i,vehiclehpbar[8]);
  10817.             }
  10818.             else if(vhp >= 794 && vhp <= 861)
  10819.             {
  10820.                 TextDrawShowForPlayer(i,vehiclehpbar[9]);
  10821.             }
  10822.             else if(vhp >= 862 && vhp <= 929)
  10823.             {
  10824.                 TextDrawShowForPlayer(i,vehiclehpbar[10]);
  10825.             }
  10826.             else if(vhp >= 930 && vhp <= 1000)
  10827.             {
  10828.                 TextDrawShowForPlayer(i,vehiclehpbar[11]);
  10829.             }
  10830.         }
  10831.     }
  10832.     return 1;
  10833. }
  10834.  
  10835. #define TogglePlayerSpectating cTogglePlayerSpectating
Advertisement
Add Comment
Please, Sign In to add comment