Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //WeaponIds USED: 0, 1, 16, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 33, 34, 36, 37, 42, 46
- #include <a_samp>
- #include <dini>
- #include <dudb>
- #include <gl_common>
- #include <foreach>
- #include <a_zones>
- #define ASSAULT 0
- #define DEMOLITION 1
- #define SNIPER 2
- #define PILOT 3
- #define MEDIC 4
- #define ENGINEER 5
- #define PYRO 6
- #define SCOUT 7
- #define ADMIN 8
- #define GENERAL 9
- #define SPAM 6
- #define COMMAND_SPAM 7
- new Text:Textdraw0;
- forward SpamUpdate();
- forward usabomb();
- forward germanbomb();
- forward japanbomb();
- forward australiabomb();
- forward russiabomb();
- new spree[MAX_PLAYERS];
- new Text:vehiclehpbar[12];
- forward VHPBarUpdate();
- #define COLOR_VHPGOOD 0x0AFF0AAA
- #define COLOR_VHPWARNING 0xFFFF00AA
- #define COLOR_VHPDANGER 0xFF0000AA
- //new FALSE = false;
- #define SendFormattedMessage(%0,%1,%2,%3) do{new _string[128]; format(_string,sizeof(_string),%2,%3); SendClientMessage(%0,%1,_string);} while(FALSE)
- #define SendFormattedMessageToAll(%0,%1,%2) do{new _string[128]; format(_string,sizeof(_string),%1,%2); SendClientMessageToAll(%0,_string);} while(FALSE)
- forward MutePlayer(playerid,time,reason[]);
- new Messages[MAX_PLAYERS];
- new Commands[MAX_PLAYERS];
- new Muted[MAX_PLAYERS];
- new Planes[]=
- {
- 413,417,425,460,469,476,487,488,497,511,512,513,519,520,548,553,563,577,592,593
- };
- new VehicleName[][] =
- {
- "Landstalker",
- "Bravura",
- "Buffalo",
- "Linerunner",
- "Pereniel",
- "Sentinel",
- "Dumper",
- "Firetruck",
- "Trashmaster",
- "Stretch",
- "Manana",
- "Infernus",
- "Voodoo",
- "Pony",
- "Mule",
- "Cheetah",
- "Ambulance",
- "Leviathan",
- "Moonbeam",
- "Esperanto",
- "Taxi",
- "Washington",
- "Bobcat",
- "Mr Whoopee",
- "BF Injection",
- "Hunter",
- "Premier",
- "Enforcer",
- "Securicar",
- "Banshee",
- "Predator",
- "Bus",
- "Rhino",
- "Barracks",
- "Hotknife",
- "Trailer",
- "Previon",
- "Coach",
- "Cabbie",
- "Stallion",
- "Rumpo",
- "RC Bandit",
- "Romero",
- "Packer",
- "Monster Truck",
- "Admiral",
- "Squalo",
- "Seasparrow",
- "Pizzaboy",
- "Tram",
- "Trailer",
- "Turismo",
- "Speeder",
- "Reefer",
- "Tropic",
- "Flatbed",
- "Yankee",
- "Caddy",
- "Solair",
- "Berkley's RC Van",
- "Skimmer",
- "PCJ-600",
- "Faggio",
- "Freeway",
- "RC Baron",
- "RC Raider",
- "Glendale",
- "Oceanic",
- "Sanchez",
- "Sparrow",
- "Patriot",
- "Quad",
- "Coastguard",
- "Dinghy",
- "Hermes",
- "Sabre",
- "Rustler",
- "ZR-350",
- "Walton",
- "Regina",
- "Comet",
- "BMX",
- "Burrito",
- "Camper",
- "Marquis",
- "Baggage",
- "Dozer",
- "Maverick",
- "News Chopper",
- "Rancher",
- "FBI Rancher",
- "Virgo",
- "Greenwood",
- "Jetmax",
- "Hotring",
- "Sandking",
- "Blista Compact",
- "Police Maverick",
- "Boxville",
- "Benson",
- "Mesa",
- "RC Goblin",
- "Hotring Racer",
- "Hotring Racer",
- "Bloodring Banger",
- "Rancher",
- "Super GT",
- "Elegant",
- "Journey",
- "Bike",
- "Mountain Bike",
- "Beagle",
- "Cropdust",
- "Stunt",
- "Tanker",
- "RoadTrain",
- "Nebula",
- "Majestic",
- "Buccaneer",
- "Shamal",
- "Hydra",
- "FCR-900",
- "NRG-500",
- "HPV1000",
- "Cement Truck",
- "Tow Truck",
- "Fortune",
- "Cadrona",
- "FBI Truck",
- "Willard",
- "Forklift",
- "Tractor",
- "Combine",
- "Feltzer",
- "Remington",
- "Slamvan",
- "Blade",
- "Freight",
- "Streak",
- "Vortex",
- "Vincent",
- "Bullet",
- "Clover",
- "Sadler",
- "Firetruck",
- "Hustler",
- "Intruder",
- "Primo",
- "Cargobob",
- "Tampa",
- "Sunrise",
- "Merit",
- "Utility",
- "Nevada",
- "Yosemite",
- "Windsor",
- "Monster Truck",
- "Monster Truck",
- "Uranus",
- "Jester",
- "Sultan",
- "Stratum",
- "Elegy",
- "Raindance",
- "RC Tiger",
- "Flash",
- "Tahoma",
- "Savanna",
- "Bandito",
- "Freight",
- "Trailer",
- "Kart",
- "Mower",
- "Duneride",
- "Sweeper",
- "Broadway",
- "Tornado",
- "AT-400",
- "DFT-30",
- "Huntley",
- "Stafford",
- "BF-400",
- "Newsvan",
- "Tug",
- "Trailer",
- "Emperor",
- "Wayfarer",
- "Euros",
- "Hotdog",
- "Club",
- "Trailer",
- "Trailer",
- "Andromada",
- "Dodo",
- "RC Cam",
- "Launch",
- "Police Car (LSPD)",
- "Police Car (SFPD)",
- "Police Car (LVPD)",
- "Police Ranger",
- "Picador",
- "S.W.A.T. Van",
- "Alpha",
- "Phoenix",
- "Glendale",
- "Sadler",
- "Luggage Trailer",
- "Luggage Trailer",
- "Stair Trailer",
- "Boxville",
- "Farm Plow",
- "Utility Trailer"
- };
- #define GREEN 0x00FF00FF
- #define GetVehicleName(%0) VehicleName[GetVehicleModel(%0)-400]
- #define MAX_SPEED 19
- #define MAX_TEAMS 20
- #define MAX_TEAM_NAME 16
- #define MAX_TEAM_MEMBERS 4
- #define MAX_MEMBERS 4
- #define MAX_CHECKS 5
- #define MAX_VARIABLES 24
- new JB_Warnings[MAX_PLAYERS];
- // === [Color Defines] ===
- #define COLOR_LIGHTGREEN 0x9ACD32AA
- #define COLOR_YELLOW2 0xF5DEB3AA
- #define COLOR_DBLUE 0x2641FEAA
- #define COLOR_SYSTEM 0xEFEFF7AA
- #define yellow 0xFFFF00AA
- #define RED 0xE60000FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_BLUE 0x0000FF96
- #define COLOR_DIS_RED 0xFF0000FF
- #define COLOR_CON_GREEN 0x00FF00FF
- #define COLOR_WHITE 0xFFFFFFFF55
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_BRIGHTRED 0xFF0000AA
- #define COLOR_ORANGE 0xFFA500AA
- #define GCOLOR_GREEN 0x33AA3355
- #define YELLOW 0xFFFF00FF
- #define COLOR_OOC 0xFF8080FF
- #define COLOR_LIGHTRED 0xFF8080FF
- #define COLOR_LIGHTBLUE 0x00BFFFAA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_GREEN 0x00FF00AA
- #define ADMIN_RED 0xFB0000FF
- #define YELLOW 0xFFFF00FF
- #define ORANGE 0xF97804FF
- #define LIGHTRED 0xFF8080FF
- #define LIGHTBLUE 0x00C2ECFF
- #define PURPLE 0xB360FDFF
- #define BLUE 0x1229FAFF
- #define LIGHTGREEN 0x38FF06FF
- #define DARKPINK 0xE100E1FF
- #define DARKGREEN 0x008040FF
- #define AQUAGREEN 0x00CACAFB
- #define NICESKY 0x99FFFFAA
- #define GREY 0xCECECEFF
- #define WHITE 0xFFFFFFFF
- #define COLOR_TAN 0xE39216FF
- //Admin
- // === [Some configuring] ===
- #define JOIN_MESSAGES false
- #define Leavemessages false
- #define leavemessagecolor COLOR_RED
- #define joinmessagecolor COLOR_RED
- #define MEASURE_TIME 1000
- #define Level1Commands1 ">> /clearchat, /slap [id], /kick [id] [reason], /goto [id], /get [id], /akill [id], /warn [id] [reason]"
- #define Level1Commands2 ">> /(un)freeze [id], /playerinfo [id], /asay [msg], /ip [id], /mute [id], /ajail [id] [time], /force [id]"
- #define Level2Commands1 ">> /telep [teleportee id] [dest. id], /(un)mute [id] /(un)jail [id] [time], /ann [text] [time]"
- #define Level2Commands2 ">> /eject [id], /sethealth [id] [amt], /setarmour [id] [amt] /healall, /armourall"
- #define Level3Commands1 ">> /disarm [id], /disarmall, /explode [id], /time [0-23], /weather [weatherid]"
- #define Level3Commands2 ">> /setmoney [id] [amount], /ban [id] [reason], /say [text]"
- #define Level4Commands1 ">> /disarmall, /reloadbans, /reloadlogs, /crash [id]"
- #define TEAM_USA 0
- #define TEAM_GERMANY 1
- #define TEAM_AUSTRALIA 2
- #define TEAM_RUSSIA 3
- #define TEAM_JAPAN 4
- //new mailsubject[128];
- new SpeedHacking[MAX_PLAYERS];
- new Speed[MAX_PLAYERS][MAX_CHECKS];
- enum pWarns
- {
- TeamJack
- }
- new Warns[MAX_PLAYERS][pWarns];
- enum enums
- {
- is,
- intspc,
- Float:Xspc,
- Float:Yspc,
- Float:Zspc
- };
- new admgod[MAX_PLAYERS];
- new freeze[MAX_PLAYERS];
- new WarnedTimes[MAX_PLAYERS];
- new PlayerSpec[MAX_PLAYERS][enums];
- new Dispenser[MAX_PLAYERS];
- new EngineerI[MAX_PLAYERS];
- new dispout[MAX_PLAYERS];
- new Driver[MAX_VEHICLES];
- new logged[MAX_PLAYERS];
- new adminlevel[MAX_PLAYERS];
- new money[MAX_PLAYERS];
- new playername[MAX_PLAYER_NAME];
- new bool:IsInCargoB[MAX_PLAYERS];
- new PlayerCargoB[MAX_PLAYERS];
- new bool:IsInBarracks[MAX_PLAYERS];
- new PlayerBarracks[MAX_PLAYERS];
- new ammoo[MAX_PLAYERS];
- new deaths[MAX_PLAYERS];
- new kills[MAX_PLAYERS];
- new rank[MAX_PLAYERS];
- new mute[MAX_PLAYERS];
- forward BanLog(string[]);
- forward SendClientMessageToAdmins(color,string[],alevel);
- forward Message();
- new IfCapture[21];
- new BarracksUser[MAX_PLAYERS][MAX_VEHICLES];
- new CargoBobUser[MAX_PLAYERS][MAX_VEHICLES];
- forward IsPlayerAdminCall(playerid);
- public IsPlayerAdminCall(playerid)
- return (adminlevel[playerid] >= 1);
- new LastVehicle[MAX_PLAYERS];
- #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1]
- #define isnull(%1) ((%1[0] == 0) || (%1[0] == 1 && %1[1] == 0))
- AntiDEAmx()
- {
- new gunz[][] = {
- "Unarmed (Fist)",
- "Brass K"
- };
- #pragma unused gunz
- }
- //TOP KILLERS
- new Players;
- forward RankRefresh();
- new Text:Classt[MAX_PLAYERS];
- new Text:Spree;
- new Text:Teams[MAX_PLAYERS];
- //------------------------
- new ExplosionRadius = 15; //Explosion Radius
- forward Explode(playerid);
- new buyweapon;
- new IsInGunShop[MAX_PLAYERS];
- new GunShopID[MAX_PLAYERS];
- new hashit[MAX_PLAYERS];
- new C4[MAX_PLAYERS];
- new Bomb[MAX_PLAYERS];
- new Planted[MAX_PLAYERS];
- new Float:bx[MAX_PLAYERS], Float:by[MAX_PLAYERS], Float:bz[MAX_PLAYERS];
- new pSpawned[MAX_PLAYERS];
- new gunshop[8];
- new PickedClass[MAX_PLAYERS] = 0;
- new usingcomp[MAX_PLAYERS];
- new hasbombs[MAX_PLAYERS];
- new hasrepair[MAX_PLAYERS];
- new healedrec[MAX_PLAYERS];
- new repair[MAX_PLAYERS];
- new SpawnP[MAX_PLAYERS];
- forward GetClosestPlayer(p1);
- forward Float:GetDistanceBetweenPlayers(p1,p2);
- forward Txtreset();
- public Txtreset()
- {
- TextDrawHideForAll(Spree);
- return 1;
- }
- forward SettingPlayerTeam();
- new nuke;
- new AbleToSpawn[MAX_PLAYERS];
- //NEW------------------------------------------------------------------------------------
- static gTeam[MAX_PLAYERS];
- new gPlayerClass[MAX_PLAYERS];
- new EnteredArea[MAX_PLAYERS];
- new CapturedBy; // 0 ( none ) 1 ( USA ) 2 ( Germany )
- new EnteredArea2[MAX_PLAYERS];
- new CapturedBy2; // 0 ( none ) 1 ( USA ) 2 ( Germany )
- new EnteredArea3[MAX_PLAYERS];
- new CapturedBy3; // 0 ( none ) 1 ( USA ) 2 ( Germany )
- new EnteredArea4[MAX_PLAYERS];
- new CapturedBy4; // 0 ( none ) 1 ( USA ) 2 ( Germany )
- new EnteredArea5[MAX_PLAYERS];
- new CapturedBy5; // 0 ( none ) 1 ( USA ) 2 ( Germany )
- new EnteredArea6[MAX_PLAYERS];
- new CapturedBy6; // 0 ( none ) 1 ( USA ) 2 ( Germany )
- new EnteredArea7[MAX_PLAYERS];
- new CapturedBy7; // 0 ( none ) 1 ( USA ) 2 ( Germany )
- new EnteredArea8[MAX_PLAYERS];
- new CapturedBy8; // 0 ( none ) 1 ( USA ) 2 ( Germany )
- new EnteredArea9[MAX_PLAYERS];
- new CapturedBy9; // 0 ( none ) 1 ( USA ) 2 ( Germany )
- new EnteredArea10[MAX_PLAYERS];
- new CapturedBy10; // 0 ( none ) 1 ( USA ) 2 ( Germany )
- new EnteredArea11[MAX_PLAYERS];
- new CapturedBy11;
- new EnteredArea12[MAX_PLAYERS];
- new CapturedBy12;
- new EnteredArea13[MAX_PLAYERS];
- new CapturedBy13;
- new EnteredArea14[MAX_PLAYERS];
- new CapturedBy14;
- new EnteredArea15[MAX_PLAYERS];
- new CapturedBy15;
- new EnteredArea16[MAX_PLAYERS];
- new CapturedBy16;
- new EnteredArea17[MAX_PLAYERS];
- new CapturedBy17;
- new EnteredArea18[MAX_PLAYERS];
- new CapturedBy18;
- new EnteredArea19[MAX_PLAYERS];
- new CapturedBy19;
- new EnteredArea20[MAX_PLAYERS];
- new CapturedBy20;
- new GeneralClass[MAX_PLAYERS][5];
- new gscore;
- new uscore;
- new T1[MAX_PLAYERS];
- new T2[MAX_PLAYERS];
- new T3[MAX_PLAYERS];
- new T4[MAX_PLAYERS];
- new T5[MAX_PLAYERS];
- new T6[MAX_PLAYERS];
- new T7[MAX_PLAYERS];
- new T8[MAX_PLAYERS];
- new T9[MAX_PLAYERS];
- new T10[MAX_PLAYERS];
- new T11[MAX_PLAYERS];
- new T12[MAX_PLAYERS];
- new T13[MAX_PLAYERS];
- new T14[MAX_PLAYERS];
- new T15[MAX_PLAYERS];
- new T16[MAX_PLAYERS];
- new T17[MAX_PLAYERS];
- new T18[MAX_PLAYERS];
- new T19[MAX_PLAYERS];
- new T20[MAX_PLAYERS];
- new randperson[MAX_PLAYERS];
- new hitman[MAX_PLAYERS];
- new gmini;
- new umini;
- new uhit;
- new ghit;
- new USA;
- new GERMANY;
- new AUSTRALIA;
- new Ear;
- new EarU;
- new EarG;
- new Town1;
- new Town2;
- new Resturant;
- new ResturantU;
- new ResturantG;
- new Airfield;
- new AirfieldU;
- new AirfieldG;
- new Diner;
- new DinerU;
- new DinerG;
- new Cluck;
- new CluckU;
- new CluckG;
- new OilPump;
- new OilPumpU;
- new OilPumpG;
- new Oil;
- new OilU;
- new OilG;
- new Beach;
- new BeachU;
- new BeachG;
- new A;
- new AU;
- new AG;
- new University;
- new UniversityU;
- new UniversityG;
- new Gas;
- new GasU;
- new GasG;
- new OS;
- new OSU;
- new OSG;
- new T;
- new TU;
- new TG;
- new D;
- new DU;
- new DG;
- new OT;
- new OTU;
- new OTG;
- new Quarry;
- new QuarryU;
- new QuarryG;
- new FH;
- new FHU;
- new FHG;
- new GW;
- new GWU;
- new GWG;
- new Dock;
- new DockU;
- new DockG;
- new CC;
- new CCU;
- new CCG;
- enum cbinf { seats };
- new CargoBob[MAX_VEHICLES][cbinf];
- new Barracks[MAX_VEHICLES][cbinf];
- new nameee[20];
- new IsInHunter[MAX_PLAYERS];
- new IsInRhino[MAX_PLAYERS];
- new nuked = 0;
- //DEFINES--------------------------------------------------------------------------------
- //FORWARDS-------------------------------------------------------------------------------
- forward ZonesPay();
- public ZonesPay()
- {
- new monys[5];
- new mstr[100];
- monys[0] = 0;
- monys[1] = 0; //i kno money, not moneys, not mony
- foreach(Player, i) {
- if( gTeam[i] == TEAM_USA ) {
- if( CapturedBy == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy2 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy3 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy4 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy5 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy6 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy7 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy8 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy9 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy10 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy11 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy12 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy13 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy14 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy15 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy16 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy17 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy18 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy19 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- if( CapturedBy20 == 1 ){ GivePlayerMoney(i, 100); monys[0]++; }
- format(mstr, 100, "You recieved %i money from captured areas.", monys[0]*100);
- SendClientMessage(i, COLOR_GREEN, mstr);
- }
- if( gTeam[i] == TEAM_GERMANY ) {
- if( CapturedBy == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy2 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy3 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy4 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy5 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy6 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy7 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy8 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy9 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy10 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy11 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy12 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy13 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy14 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy15 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy16 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy17 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy18 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy19 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- if( CapturedBy20 == 2 ){ GivePlayerMoney(i, 100); monys[1]++; }
- format(mstr, 100, "You recieved %i money from captured areas.", monys[1]*100);
- SendClientMessage(i, COLOR_GREEN, mstr);
- }
- if( gTeam[i] == TEAM_AUSTRALIA ) {
- if( CapturedBy == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy2 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy3 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy4 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy5 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy6 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy7 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy8 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy9 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy10 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy11 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy12 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy13 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy14 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy15 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy16 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy17 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy18 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy19 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- if( CapturedBy20 == 3 ){ GivePlayerMoney(i, 100); monys[2]++; }
- format(mstr, 100, "You recieved %i money from captured areas.", monys[2]*100);
- SendClientMessage(i, COLOR_GREEN, mstr);
- }
- if( gTeam[i] == TEAM_JAPAN ) {
- if( CapturedBy == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy2 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy3 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy4 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy5 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy6 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy7 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy8 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy9 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy10 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy11 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy12 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy13 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy14 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy15 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy16 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy17 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy18 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy19 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- if( CapturedBy20 == 4 ){ GivePlayerMoney(i, 100); monys[3]++; }
- format(mstr, 100, "You recieved %i money from captured areas.", monys[3]*100);
- SendClientMessage(i, COLOR_GREEN, mstr);
- }
- if( gTeam[i] == TEAM_RUSSIA ) {
- if( CapturedBy == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy2 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy3 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy4 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy5 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy6 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy7 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy8 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy9 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy10 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy11 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy12 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy13 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy14 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy15 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy16 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy17 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy18 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy19 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- if( CapturedBy20 == 5 ){ GivePlayerMoney(i, 100); monys[4]++; }
- format(mstr, 100, "You recieved %i money from captured areas.", monys[1]*100);
- SendClientMessage(i, COLOR_GREEN, mstr);
- }
- }
- return 1;
- }
- forward AreaCheck();
- forward TakeOver();
- forward NoArea(playerid);
- forward NoArea2(playerid);
- forward Secs(playerid);
- forward Spawn(playerid);
- forward SendPlayerFormattedText(playerid, const string[], define);
- forward ClassShow(playerid);
- public ClassShow(playerid)
- {
- if( gPlayerClass[playerid] == ENGINEER ) {
- EngineerI[playerid] = 1;
- }
- if( gPlayerClass[playerid] == ADMIN ) admgod[playerid] = SetTimerEx("AdminGOD", 250, 1, "i", playerid);
- if( GetPlayerMoney(playerid) < 0 ) ResetPlayerMoney(playerid);
- new cstr[100];
- format(cstr, 100, " ");
- new classs[50];
- if( gPlayerClass[playerid] == GENERAL ) format(classs, 50, "general");
- if( gPlayerClass[playerid] == ADMIN ) format(classs, 50, "~r~Admin");
- if( gPlayerClass[playerid] == SCOUT ) format(classs, 50, "Scout");
- if( gPlayerClass[playerid] == PYRO ) format(classs, 50, "Pyroman");
- if( gPlayerClass[playerid] == MEDIC ) format(classs,50, "Medic");
- if( gPlayerClass[playerid] == ENGINEER ) format(classs,50,"Engineer");
- if( gPlayerClass[playerid] == PILOT ) format(classs,50,"Pilot");
- if( gPlayerClass[playerid] == DEMOLITION ) format(classs,50,"Demolition");
- if( gPlayerClass[playerid] == ASSAULT ) format(classs,50,"Assault");
- if( gPlayerClass[playerid] == SNIPER ) format(classs,50,"Sniper");
- format(cstr, 100, "~y~%s", classs);
- TextDrawHideForPlayer(playerid,Classt[playerid]);
- TextDrawSetString(Classt[playerid], cstr);
- TextDrawShowForPlayer(playerid,Classt[playerid]);
- return 1;
- }
- new Float:cbx[MAX_PLAYERS], Float:cby[MAX_PLAYERS], Float:cbz[MAX_PLAYERS], Float:cba[MAX_PLAYERS];
- forward ParaExit(playerid);
- public ParaExit(playerid)
- {
- RemovePlayerFromVehicle(playerid);
- GivePlayerWeapon(playerid, 46, 1);
- return 1;
- }
- forward ExitCB(playerid);
- public ExitCB(playerid)
- {
- SetPlayerPos(playerid, cbx[playerid], cby[playerid], cbz[playerid]);
- SetPlayerFacingAngle(playerid, cba[playerid]);
- new vehicleid = LastVehicle[playerid];
- if( BarracksUser[playerid][vehicleid] == 1 ) {
- BarracksUser[playerid][vehicleid] = 0;
- }
- if( CargoBobUser[playerid][vehicleid] == 1 ) {
- GivePlayerWeapon(playerid, 46, 1);
- CargoBobUser[playerid][vehicleid] =0;
- print("got out of bob");
- }
- return 1;
- }
- forward DispeClean(playerid);
- public DispeClean(playerid)
- {
- DestroyPickup(Dispenser[playerid]);
- return 1;
- }
- //http://codwwserver.co.cc/
- forward AdminGOD(playerid);
- public AdminGOD(playerid)
- {
- if( adminlevel[playerid] > 0 ) {
- if( gPlayerClass[playerid] == ADMIN ) {
- if( GetPlayerSkin(playerid) == 217)
- SetPlayerArmour(playerid, 999999.0);
- if( IsPlayerInAnyVehicle(playerid)) {
- RepairVehicle(GetPlayerVehicleID(playerid));
- }else
- if( !IsPlayerInAnyVehicle(playerid)) {
- SetPlayerHealth(playerid, 999999.0);
- }
- }
- }
- return 1;
- }
- new Float:RandomUSACoords[13][3] =
- {
- {-244.2003, 2602.5547, 63.7031},
- {-291.127594, 2608.788574, 63.799774},
- {-155.354614, 2659.233398, 64.549774},
- {-193.562515, 2731.505615, 63.749756},
- {-218.214340, 2759.695313, 63.749756},
- {-239.894196, 2727.762939, 63.749756},
- {-323.737000, 2652.677490, 64.249756},
- {-175.897125, 2612.831787, 62.749756},
- {-263.895935, 2586.644043, 64.249756},
- {-334.114258, 2727.419434, 63.799774},
- {-244.2003, 2602.5547, 63.7031},
- {-225.250168, 2786.327393, 63.799774},
- {-153.849152, 2760.387695, 65.749756}
- };
- new Float:RandomGERCoords[7][3] =
- {
- {-148.932114, 1069.882690, 20.310356},
- {-233.991333, 1178.141357, 20.235357},
- {-320.718079, 1057.609863, 20.235357},
- {-130.159241, 973.272156, 23.485357},
- {-161.434662, 1205.636963, 20.085356},
- {-144.539536, 1132.992188, 19.985357},
- {-147.705017, 1111.523804, 19.785360}
- };
- stock IsPlayerInFlying(playerid,vehicleid)
- {
- if(IsPlayerInVehicle(playerid,vehicleid)) {
- switch(GetVehicleModel(vehicleid)) {
- case 487, 488, 497, 460, 476, 511, 512, 513, 519, 520,548,553,577,592,593:
- {
- return true;
- }
- }
- }
- return false;
- }
- stock SetRandomUSAPos(playerid)
- {
- if( gTeam[playerid] == TEAM_USA ) {
- new rand = random(sizeof(RandomUSACoords));
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, RandomUSACoords[rand][0],RandomUSACoords[rand][1],RandomUSACoords[rand][2]);
- }
- return 1;
- }
- stock SetRandomGERPos(playerid)
- {
- if( gTeam[playerid]==TEAM_GERMANY ) {
- new rand = random(sizeof(RandomGERCoords));
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, RandomGERCoords[rand][0], RandomGERCoords[rand][1], RandomGERCoords[rand][2]);
- }
- return 1;
- }
- new Text:txtTimeDisp;
- forward UpdateTime();
- public UpdateTime()
- {
- foreach(Player, i) {
- if(IsPlayerInAnyVehicle(i)) {
- new mphspeed[128];
- format(mphspeed, sizeof(mphspeed), "%d mph", GetPlayerSpeedSpeedo(i, false));
- TextDrawHideForPlayer(i, Text:Textdraw0);
- TextDrawSetString(Text:Textdraw0, mphspeed);
- TextDrawShowForPlayer(i, Text:Textdraw0);
- }
- else {
- TextDrawHideForPlayer(i, Text:Textdraw0);
- }
- if(GetPlayerState(i)==PLAYER_STATE_DRIVER && !IsPlayerInPlane(i)) {
- if(GetPlayerSpeedSpeedo(i, true) > 2000) {
- new BadSpeed = GetPlayerSpeedSpeedo(i, true);
- new speedo[128];
- new HackerName[MAX_PLAYER_NAME];
- GetPlayerName(i, HackerName, sizeof(HackerName));
- format(speedo, sizeof(speedo), "Banning: %s [Reason: Speedhacks | %dKMH; MAX: 400KMH]", HackerName, BadSpeed);
- SendClientMessageToAll(RED, speedo);
- BanEx(i, "Speedhacks");
- }
- }
- if(adminlevel[i] < 1) {
- /*
- switch(GetPlayerWeapon(i))
- {
- case 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 26, 35, 38, 42, 44, 45:
- {
- new HackerName[MAX_PLAYER_NAME];
- GetPlayerName(i, HackerName, sizeof(HackerName));
- new string[128];
- format(string, sizeof(string), "Banning: %s [Reason: Weapon Hacks]", HackerName);
- SendClientMessageToAll(COLOR_RED, string);
- BanEx(i, "Invalid Weapon - Weapon Hacks");
- }
- }
- */
- new weapon;
- new gunammo;
- for(new w = 0; w <13; w++) {
- GetPlayerWeaponData(i, w, weapon, gunammo);
- if(( weapon == 26 || weapon == 32 || weapon == 38 || weapon == 44 || weapon == 45) && gunammo > 0) {
- new HackerName[MAX_PLAYER_NAME];
- GetPlayerName(i, HackerName, sizeof(HackerName));
- new string[128];
- format(string, sizeof(string), "Banning: %s [Reason: Weapon Hacks]", HackerName);
- SendClientMessageToAll(COLOR_RED, string);
- BanEx(i, "Invalid Weapon - Weapon Hacks");
- return 1;
- }
- }
- if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK) {
- new HackerName[MAX_PLAYER_NAME];
- GetPlayerName(i, HackerName, sizeof(HackerName));
- new string[128];
- format(string, sizeof(string), "Banning: %s [Reason: Jetpack]", HackerName);
- SendClientMessageToAll(COLOR_RED, string);
- BanEx(i, "Invalid Weapon - Jetpack");
- }
- if(GetPlayerState(i)==PLAYER_STATE_DRIVER) {
- new weaponid=GetPlayerSpeed(i);
- if(weaponid>260 && !IsPlayerInPlane(i)) {
- SpeedHacking[i]++;
- if(SpeedHacking[i]==2) {
- JB_Warnings[i]++;
- TogglePlayerControllable(i,false);
- if(JB_Warnings[i]<2) {
- new reason[128];
- format(reason,sizeof(reason),"%d KM/H with %s",weaponid,GetVehicleName(GetPlayerVehicleID(i)));
- SendClientMessageToAdmins(RED, reason, 1);
- }
- else {
- new HackerName[MAX_PLAYER_NAME];
- GetPlayerName(i, HackerName, sizeof(HackerName));
- new string[128];
- format(string, sizeof(string), "Banning: %s [Reason: Speedhacks]", HackerName);
- SendClientMessageToAll(RED, string);
- BanEx(i,"Speedhack");
- continue;
- }
- }
- }
- else {
- SpeedHacking[i]=0;
- }
- }
- }
- }
- new reason[64];
- foreach(Player, i) {
- if(Messages[i]) {
- if(!Muted[i]) {
- if(Messages[i]>15) {
- format(reason,sizeof(reason),"Extreme spam [%d messages/second]",Messages[i]);
- SendClientMessageToAll(RED, reason);
- Kick(i);
- continue;
- }
- else if(Messages[i]>10) {
- format(reason,sizeof(reason),"Massive spam [%d messages/second]",Messages[i]);
- SendClientMessageToAll(RED, reason);
- Kick(i);
- continue;
- }
- else if(Messages[i]>4) {
- format(reason,sizeof(reason),"Spam [%d messages/second]",Messages[i]);
- SendClientMessageToAll(RED, reason);
- MutePlayer(i,2*60,reason);
- }
- Messages[i]--;
- }
- if(Commands[i]) {
- if(Commands[i]>15) {
- format(reason,sizeof(reason),"Extreme command spam [%d commands/second]",Commands[i]);
- SendClientMessageToAll(RED, reason);
- Kick(i);
- continue;
- }
- else if(Commands[i]>5) {
- format(reason,sizeof(reason),"Massive command spam [%d commands/second]",Commands[i]);
- SendClientMessageToAll(RED, reason);
- Kick(i);
- continue;
- }
- }
- Commands[i]--;
- }
- }
- foreach(Player, i) {
- if( GetPlayerWantedLevel(i) != rank[i] ) SetPlayerWantedLevel(i, rank[i]);
- }
- foreach(Player, i) {
- }
- return 1;
- }
- new playerColors[MAX_PLAYERS];
- forward PlayerLeaveGang(playerid);
- new teamNames[MAX_TEAMS][MAX_TEAM_NAME];
- new teamInfo[MAX_TEAMS][3]; //0-created,1-members,2-color
- new playerTeam[MAX_PLAYERS];
- new teamMembers[MAX_TEAMS][MAX_TEAM_MEMBERS];
- new teamInvite[MAX_PLAYERS];
- PlayerLeaveGang(playerid)
- {
- new string[100];
- new teamnum = playerTeam[playerid];
- if(teamnum > 0) {
- for(new i = 0; i < teamInfo[teamnum][1]; i++) {
- if(teamMembers[teamnum][i]==playerid) {
- //One less team member
- teamInfo[teamnum][1]--;
- for(new j = i; j < teamInfo[teamnum][1]; j++) {
- //Shift team members
- teamMembers[teamnum][j]=teamMembers[teamnum][j+1];
- }
- //Disband team if no more members
- if(teamInfo[teamnum][1]<1) {
- teamInfo[teamnum][0]=0;
- teamInfo[teamnum][1]=0;
- }
- //Notify other members
- for(new j = 0; j < teamInfo[teamnum][1]; j++) {
- GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
- format(string, sizeof(string),"%s has quit your team.", playername);
- SendClientMessage(teamMembers[teamnum][j], COLOR_ORANGE, string);
- }
- format(string, sizeof(string),"You have quit the team '%s' (id: %d)", teamNames[teamnum], teamnum);
- SendClientMessage(playerid, COLOR_ORANGE, string);
- playerTeam[playerid]=0;
- return;
- }
- }
- }
- else {
- SendClientMessage(playerid, COLOR_RED, "You are not in a team.");
- }
- }
- forward DispenserOut(playerid);
- public DispenserOut(playerid)
- {
- dispout[playerid] = 0;
- return 1;
- }
- //-=====VEHICLES====
- new total_vehicles_from_files=0;
- main()
- {
- print("__________GAMEMODE LOADING!_________");
- print("\n----------------------------------");
- print(" Modern Warfare Gamemode" );
- print("----------------------------------\n");
- print("__________GAMEMODE LOADED!__________");
- }
- public OnGameModeInit()
- {
- SetTimer("modechange1",10000,0);
- vehiclehpbar[0] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[0], true);
- TextDrawBoxColor(vehiclehpbar[0], COLOR_VHPDANGER);
- TextDrawSetShadow(vehiclehpbar[0],0);
- TextDrawTextSize(vehiclehpbar[0], 602, 0);
- TextDrawSetOutline(vehiclehpbar[0],1);
- vehiclehpbar[1] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[1], true);
- TextDrawBoxColor(vehiclehpbar[1], COLOR_VHPDANGER);
- TextDrawSetShadow(vehiclehpbar[1],0);
- TextDrawTextSize(vehiclehpbar[1], 551, 0);
- TextDrawSetOutline(vehiclehpbar[1],1);
- vehiclehpbar[2] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[2], true);
- TextDrawBoxColor(vehiclehpbar[2], COLOR_VHPDANGER);
- TextDrawSetShadow(vehiclehpbar[2],0);
- TextDrawTextSize(vehiclehpbar[2], 556, 0);
- TextDrawSetOutline(vehiclehpbar[2],1);
- vehiclehpbar[3] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[3], true);
- TextDrawBoxColor(vehiclehpbar[3], COLOR_VHPDANGER);
- TextDrawSetShadow(vehiclehpbar[3],0);
- TextDrawTextSize(vehiclehpbar[3], 561, 0);
- TextDrawSetOutline(vehiclehpbar[3],1);
- vehiclehpbar[4] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[4], true);
- TextDrawBoxColor(vehiclehpbar[4], COLOR_VHPWARNING);
- TextDrawSetShadow(vehiclehpbar[4],0);
- TextDrawTextSize(vehiclehpbar[4], 566, 0);
- TextDrawSetOutline(vehiclehpbar[4],1);
- vehiclehpbar[5] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[5], true);
- TextDrawBoxColor(vehiclehpbar[5], COLOR_VHPWARNING);
- TextDrawSetShadow(vehiclehpbar[5],0);
- TextDrawTextSize(vehiclehpbar[5], 571, 0);
- TextDrawSetOutline(vehiclehpbar[5],1);
- vehiclehpbar[6] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[6], true);
- TextDrawBoxColor(vehiclehpbar[6], COLOR_VHPWARNING);
- TextDrawSetShadow(vehiclehpbar[6],0);
- TextDrawTextSize(vehiclehpbar[6], 576, 0);
- TextDrawSetOutline(vehiclehpbar[6],1);
- vehiclehpbar[7] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[7], true);
- TextDrawBoxColor(vehiclehpbar[7], COLOR_VHPWARNING);
- TextDrawSetShadow(vehiclehpbar[7],0);
- TextDrawTextSize(vehiclehpbar[7], 581, 0);
- TextDrawSetOutline(vehiclehpbar[7],1);
- vehiclehpbar[8] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[8], true);
- TextDrawBoxColor(vehiclehpbar[8], COLOR_VHPGOOD);
- TextDrawSetShadow(vehiclehpbar[8],0);
- TextDrawTextSize(vehiclehpbar[8], 586, 0);
- TextDrawSetOutline(vehiclehpbar[8],1);
- vehiclehpbar[9] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[9], true);
- TextDrawBoxColor(vehiclehpbar[9], COLOR_VHPGOOD);
- TextDrawSetShadow(vehiclehpbar[9],0);
- TextDrawTextSize(vehiclehpbar[9], 591, 0);
- TextDrawSetOutline(vehiclehpbar[9],1);
- vehiclehpbar[10] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[10], true);
- TextDrawBoxColor(vehiclehpbar[10], COLOR_VHPGOOD);
- TextDrawSetShadow(vehiclehpbar[10],0);
- TextDrawTextSize(vehiclehpbar[10], 596, 0);
- TextDrawSetOutline(vehiclehpbar[10],1);
- vehiclehpbar[11] = TextDrawCreate(551.0, 59.0, " ");
- TextDrawUseBox(vehiclehpbar[11], true);
- TextDrawBoxColor(vehiclehpbar[11], COLOR_VHPGOOD);
- TextDrawSetShadow(vehiclehpbar[11],0);
- TextDrawTextSize(vehiclehpbar[11], 602, 0);
- TextDrawSetOutline(vehiclehpbar[11],1);
- SetTimer("VHPBarUpdate",250,1);
- Textdraw0 = TextDrawCreate(502.000000,134.000000," mph");
- TextDrawUseBox(Textdraw0,1);
- TextDrawBoxColor(Textdraw0,0x00000066);
- TextDrawTextSize(Textdraw0,602.000000,0.000000);
- TextDrawAlignment(Textdraw0,0);
- TextDrawBackgroundColor(Textdraw0,0x000000ff);
- TextDrawFont(Textdraw0,1);
- TextDrawLetterSize(Textdraw0,0.599999,0.899999);
- TextDrawColor(Textdraw0,0xffffffff);
- TextDrawSetOutline(Textdraw0,1);
- TextDrawSetProportional(Textdraw0,1);
- TextDrawSetShadow(Textdraw0,1);
- UpdateTime();
- SetTimer("UpdateTime", 1000, 1); //rank refresh, time, anti weapon hack
- SetTimer("ZonesPay", 600000 , 1);
- Spree = TextDrawCreate(9.000000,310.000000,"s is on a killing spree of i kills.");
- TextDrawAlignment(Spree,0);
- TextDrawBackgroundColor(Spree,0x000000ff);
- TextDrawFont(Spree,3);
- TextDrawLetterSize(Spree,0.299999,0.799999);
- TextDrawColor(Spree,0xffffffff);
- TextDrawSetOutline(Spree,1);
- TextDrawSetProportional(Spree,1);
- TextDrawSetShadow(Spree,1);
- TextDrawHideForAll(Spree);
- AntiDEAmx();
- DisableInteriorEnterExits();
- foreach(Player, i) IsInBarracks[i] = false;
- foreach(Player, i) IsInCargoB[i] = false;
- GangZoneShowForAll(Ear ,GCOLOR_GREEN);
- GangZoneShowForAll(Airfield ,GCOLOR_GREEN);
- GangZoneShowForAll(Resturant ,GCOLOR_GREEN);
- GangZoneShowForAll(Oil ,GCOLOR_GREEN);
- GangZoneShowForAll(A ,GCOLOR_GREEN);
- GangZoneShowForAll(Gas ,GCOLOR_GREEN);
- GangZoneShowForAll(OS ,GCOLOR_GREEN);
- GangZoneShowForAll(T ,GCOLOR_GREEN);
- GangZoneShowForAll(D ,GCOLOR_GREEN);
- GangZoneShowForAll(OT ,GCOLOR_GREEN);
- GangZoneShowForAll(Quarry ,GCOLOR_GREEN);
- GangZoneShowForAll(FH ,GCOLOR_GREEN);
- GangZoneShowForAll(GW ,GCOLOR_GREEN);
- GangZoneShowForAll(Dock ,GCOLOR_GREEN);
- GangZoneShowForAll(CC ,GCOLOR_GREEN);
- AddStaticVehicle(433,-237.9066,2596.8599,63.1400,359.7859,46,0);
- //
- AddStaticVehicle(433,-231.9518,2596.4175,63.1396,359.5512,46,0);
- //
- AddStaticVehicle(433,-228.5950,2596.4651,63.1397,359.6665,46,0);
- //
- AddStaticVehicle(470,-222.6559,2595.7107,62.6961,357.3925,46,0);
- //
- AddStaticVehicle(470,-219.6203,2595.5295,62.6960,359.0371,46,0);
- //
- AddStaticVehicle(470,-216.6688,2596.1890,62.6957,0.0875,46,0);
- //
- AddStaticVehicle(470,-213.4585,2595.6265,62.6972,358.8952,46,0);
- //
- AddStaticVehicle(470,-210.3814,2596.0378,62.6974,0.5131,46,0);
- //
- AddStaticVehicle(470,-207.4817,2595.8623,62.6953,1.0309,46,0);
- //
- AddStaticVehicle(468,-201.2399,2609.6809,62.3721,0.1019,46,46);
- //
- AddStaticVehicle(468,-198.5097,2608.8533,62.3716,356.7023,46,46);
- //
- AddStaticVehicle(468,-204.4878,2609.1299,62.3723,0.3513,46,46);
- //
- AddStaticVehicle(468,-207.0385,2609.1125,62.3714,0.8556,46,0);
- //
- AddStaticVehicle(468,-209.9670,2608.6765,62.3715,358.0346,46,0);
- //
- AddStaticVehicle(468,-213.0741,2608.9282,62.3720,5.1167,46,0);
- //
- AddStaticVehicle(425,-194.7429,2777.7417,67.0220,178.4641,46,0);
- //
- AddStaticVehicle(432,-269.7314,2723.9468,62.6675,182.1993,46,0);
- //
- AddStaticVehicle(470,-321.0097,2717.2473,62.6831,179.4653,46,0);
- //
- AddStaticVehicle(433,-302.0328,2721.0503,62.8404,180.1418,46,0);
- //
- AddStaticVehicle(468,-276.5174,2719.1086,62.2795,177.5063,46,0);
- //
- AddStaticVehicle(470,-289.3925,2716.7993,62.4787,179.1506,46,0);
- //
- AddStaticVehicle(470,-231.5227,2706.3403,62.6029,271.2531,46,0);
- //
- AddStaticVehicle(470,-166.4958,2699.2825,62.4293,89.3222,46,0);
- //
- AddStaticVehicle(470,-166.8118,2719.4353,62.0222,91.7580,46,0);
- //
- AddStaticVehicle(470,-168.4434,2745.9456,62.2996,97.3230,46,0);
- //
- AddStaticVehicle(468,-154.8923,2755.4978,62.3036,84.0249,46,0);
- //
- AddStaticVehicle(468,-263.8630,2781.6680,62.3559,240.6922,46,6);
- //
- AddStaticVehicle(470,-272.4295,2766.1548,62.0076,175.8315,46,0);
- //
- AddStaticVehicle(470,-289.5947,2749.0879,61.8039,269.1090,46,0);
- //
- AddStaticVehicle(470,-262.2811,2737.7539,62.6027,358.8494,46,0);
- //
- AddStaticVehicle(470,-238.2550,2746.5264,62.6044,268.3446,46,0);
- //
- AddStaticVehicle(520,-309.8174,2679.6299,64.5386,267.1063,46,0);
- //
- AddStaticVehicle(548,-182.9882,2662.9485,65.8105,270.6342,46,46);
- //
- AddStaticVehicle(487,-221.8909,2658.0103,62.7782,181.4946,46,46);
- //
- AddStaticVehicle(487,-213.6385,2658.7456,62.7793,181.2498,46,46);
- //
- AddStaticVehicle(487,-204.0486,2659.4626,62.8665,183.5447,46,46);
- //
- AddStaticVehicle(433,-262.7718,2683.6169,63.0452,0.3371,46,0);
- //
- AddStaticVehicle(433,-252.5361,2653.6628,63.0384,176.9709,46,0);
- //
- AddStaticVehicle(470,-239.6434,2643.7434,62.8109,275.6447,46,0);
- //
- AddStaticVehicle(470,-219.6599,2644.3186,63.0376,270.5441,46,0);
- //
- AddStaticVehicle(432,-199.7694,2716.4646,62.7117,180.8957,46,0);
- //
- AddStaticVehicle(432,-238.1680,2809.4900,61.7200,183.2036,46,0);
- //
- AddStaticVehicle(432,-247.3504,2810.8726,62.1450,177.6981,46,0);
- //merc base
- //
- AddStaticVehicle(487,-710.7637,904.9280,12.6237,357.1795,46,0);
- //
- AddStaticVehicle(487,-699.2277,905.7795,12.4033,354.6016,46,0);
- //
- AddStaticVehicle(487,-687.3587,904.8935,12.3040,358.4796,46,0);
- //
- AddStaticVehicle(468,-673.4254,962.1646,11.8021,27.8802,46,0);
- //
- AddStaticVehicle(468,-675.4359,961.8554,11.8019,25.7380,46,0);
- //
- AddStaticVehicle(468,-679.0760,961.7861,11.8022,39.3239,46,0);
- //
- AddStaticVehicle(468,-683.7852,961.2510,11.8019,30.6109,46,0);
- //
- AddStaticVehicle(432,-680.3606,967.4835,12.1477,91.2226,46,0);
- //
- AddStaticVehicle(476,-654.5692,982.6618,12.8482,86.4060,46,0);
- //Airport
- //
- AddStaticVehicle(520,325.3872,2538.2571,17.5256,181.0410,43,0);
- //
- AddStaticVehicle(520,290.5441,2541.0845,17.5436,180.2827,43,0);
- //
- AddStaticVehicle(548,364.5240,2468.1084,18.1205,354.1671,1,1);
- //
- AddStaticVehicle(548,340.2461,2469.3870,18.1313,0.0085,1,1);
- //
- AddStaticVehicle(548,311.9442,2468.4646,18.0775,357.5287,1,1);
- //
- AddStaticVehicle(548,285.2830,2468.7217,18.1721,355.6848,1,1);
- //
- AddStaticVehicle(470,420.5826,2530.6926,16.6043,183.9230,43,0);
- //
- AddStaticVehicle(470,424.5480,2531.5193,16.6002,179.7622,46,0);
- //
- AddStaticVehicle(470,428.4148,2531.3831,16.5852,179.3951,43,0);
- //
- AddStaticVehicle(425,346.6790,2544.8450,17.6503,182.0651,43,0);
- //
- AddStaticVehicle(425,365.8494,2537.0806,17.2135,179.9614,43,0);
- //
- AddStaticVehicle(476,420.1237,2520.1650,17.1950,86.4420,7,6);
- //
- AddStaticVehicle(476,399.4230,2519.6584,17.1972,95.3870,7,6);
- //restraunt near usa base
- //
- AddStaticVehicle(470,-537.8692,2628.2832,53.4065,269.3889,43,0);
- //
- AddStaticVehicle(470,-519.8134,2620.0808,53.4085,265.9680,43,0);
- //
- AddStaticVehicle(470,-527.3895,2604.3579,53.4030,90.2716,43,0);
- //
- AddStaticVehicle(470,-539.2301,2575.3782,53.4094,269.3664,43,0);
- //
- AddStaticVehicle(468,-527.9796,2558.7708,53.0832,94.0093,46,0);
- //
- AddStaticVehicle(468,-528.2994,2561.2397,53.0832,91.1763,46,0);
- //
- AddStaticVehicle(468,-528.5647,2563.7432,53.0821,91.4044,46,0);
- //
- AddStaticVehicle(432,-509.5038,2552.1538,53.4256,359.5710,43,0);
- //
- AddStaticVehicle(432,-508.1678,2634.2043,53.4301,179.4437,43,0);
- //old list------------------------------------------------------------------------------
- //germs vehs
- //
- AddStaticVehicle(507,-151.3201,1193.4274,19.4921,270.2192,53,53);
- //
- AddStaticVehicle(432,-132.8332,1214.5040,19.7549,359.7852,-1,-1);
- //
- AddStaticVehicle(432,-243.6082,1081.1266,19.7272,178.3251,-1,-1);
- //
- AddStaticVehicle(432,-259.8210,1218.5247,19.7549,358.7866,-1,-1);
- //
- AddStaticVehicle(432,-250.5950,1216.1040,19.7551,2.0934,-1,-1);
- //
- AddStaticVehicle(432,-236.8259,1214.0068,19.7550,1.2626,-1,-1);
- //
- AddStaticVehicle(433,-228.7815,1217.0042,20.1753,181.5212,-1,-1);
- //
- AddStaticVehicle(433,-218.9273,1216.7688,20.1735,178.4961,-1,-1);
- //
- AddStaticVehicle(470,-10.5601,1220.7673,19.3413,4.1551,-1,-1);
- //
- AddStaticVehicle(470,-2.0027,1221.7136,19.3442,1.9967,-1,-1);
- //
- AddStaticVehicle(470,5.4184,1218.5588,19.3461,357.7910,-1,-1);
- //
- AddStaticVehicle(470,-80.4464,1222.3505,19.7347,91.6395,-1,-1);
- AddStaticVehicle(563,331.7949,1938.8259,18.5398,77.9602,-1,-1);
- //
- AddStaticVehicle(563,330.3231,1983.9952,18.3442,81.1244,-1,-1);
- //
- AddStaticVehicle(563,122.7671,1842.8962,18.3292,2.5195,-1,-1);
- //
- AddStaticVehicle(512,528.9547,2367.5115,30.6920,137.7069,-1,-1);
- //
- AddStaticVehicle(593,-1361.7849,2037.5492,52.8914,57.9189,-1,-1);
- //
- AddStaticVehicle(476,286.9427,1955.4691,18.3671,277.5993,0,0);
- //
- AddStaticVehicle(476,287.8248,2023.4749,18.3601,273.9962,0,0);
- //
- AddStaticVehicle(593,318.0988,2053.4099,18.1017,182.6097,-1,-1);
- //
- AddStaticVehicle(593,297.5963,2052.5305,18.0996,184.7778,-1,-1);
- //
- AddStaticVehicle(432,277.6725,1933.4904,17.6535,258.1084,-1,-1);
- //
- AddStaticVehicle(432,650.9734,1720.9785,7.0048,314.1348,-1,-1);
- //
- AddStaticVehicle(548,665.9,1713.4247,12.5887,130.9149,-1,-1);
- //
- AddStaticVehicle(463,637.9642,1676.7590,6.5403,42.7471,-1,-1);
- //
- AddStaticVehicle(463,634.3597,1673.4452,6.5328,40.7716,-1,-1);
- //
- AddStaticVehicle(548,-194.1559,1099.2136,22.1135,91.4867,-1,-1);
- //
- AddStaticVehicle(470,-104.4889,1338.6318,10.1483,8.6644,-1,-1);
- //
- AddStaticVehicle(470,-91.5219,1339.2817,10.5482,8.5679,-1,-1);
- //
- AddStaticVehicle(433,-79.0923,1341.5598,11.4249,184.2915,-1,-1);
- //
- AddStaticVehicle(548,-123.5095,1363.0320,10.0150,280.9174,-1,-1);
- //
- AddStaticVehicle(548,-121.2912,1342.0988,10.2959,270.8427,-1,-1);
- //
- AddStaticVehicle(495,-359.1719,2198.1541,42.7821,98.7701,-1,-1);
- //
- AddStaticVehicle(495,-356.5640,2192.8105,42.7588,100.7477,-1,-1);
- //
- AddStaticVehicle(495,-355.2666,2187.6851,43.1441,102.8361,-1,-1);
- //
- AddStaticVehicle(495,-619.3625,2700.9087,72.6508,81.6365,-1,-1);
- //
- AddStaticVehicle(507,-158.4889,1143.9846,19.4979,89.9066,-1,-1);
- //
- AddStaticVehicle(507,-186.0364,1180.9192,19.4891,359.3073,-1,-1);
- //
- AddStaticVehicle(507,-257.9445,1185.1616,19.5678,90.6672,-1,-1);
- // merc boat
- AddStaticVehicle(452,-655.1194,869.9988,-0.4632,225.3407,1,5);
- //Other new areas (cluck, beach, diner, oilpump)
- AddStaticVehicle(595,242.8717,2955.9917,-0.7378,342.5856, -1, -1);
- AddStaticVehicle(595,263.9715,2954.2747,-0.5237,21.1260, -1, -1);
- AddStaticVehicle(595,282.5208,2955.8550,-1.1740,301.2252, -1, -1);
- //university
- //
- AddStaticVehicle(520,1064.6266,1102.3928,9.8448,218.4271,51,118);
- //
- AddStaticVehicle(520,1115.2910,1095.3765,9.8468,129.6781,51,118);
- //
- AddStaticVehicle(520,1110.1681,1045.9376,9.8367,39.3007,51,118);
- //
- AddStaticVehicle(520,1060.2118,1051.6526,9.8510,308.4725,51,118);
- //
- AddStaticVehicle(601,989.9682,1151.6063,10.3911,84.5832,51,118);
- //
- AddStaticVehicle(601,987.7191,1132.7836,10.3855,87.9686,51,118);
- //
- AddStaticVehicle(601,984.5304,1122.7181,10.3895,86.8643,51,118);
- AddStaticVehicle(601,987.5378,1125.8842,10.8203,85.1538,51,118);
- //germany
- //
- AddStaticVehicle(402,-305.8307,1114.7781,19.5790,358.0663,-1,-1);
- //
- AddStaticVehicle(402,-304.1901,1028.3877,19.4255,92.2054,-1,-1);
- //
- AddStaticVehicle(402,-304.0491,1023.7325,19.4255,90.1839,-1,-1);
- //
- AddStaticVehicle(402,-304.7504,1007.6920,19.4253,90.9390,-1,-1);
- //
- AddStaticVehicle(402,-173.3682,1018.7441,19.5736,271.4858,-1,-1);
- //
- AddStaticVehicle(402,-172.7404,1013.4344,19.5738,269.0490,-1,-1);
- //
- AddStaticVehicle(402,-77.2107,1076.8668,19.5736,179.3166,-1,-1);
- //
- AddStaticVehicle(402,-23.2576,1143.3752,19.4968,271.0952,-1,-1);
- //
- AddStaticVehicle(402,-70.9021,1185.6937,19.4937,4.7178,-1,-1);
- //
- AddStaticVehicle(548,-131.3202,993.5706,22.3230,273.4375,-1,-1);
- //
- AddStaticVehicle(520,-132.2480,1025.1906,21.3739,272.3754,-1,-1);
- //
- AddStaticVehicle(425,-169.5678,988.2139,21.2705,89.2718,-1,-1);
- //
- AddStaticVehicle(487,-93.1889,1027.0336,19.8679,260.7979,-1,-1);
- //
- AddStaticVehicle(487,-126.4990,1050.4193,20.8552,87.3708,-1,-1);
- //
- AddStaticVehicle(470,-91.7931,1157.5265,19.7338,273.4672,-1,-1);
- //
- AddStaticVehicle(471,-120.0205,1141.9608,19.1744,173.4989,0,0);
- //
- AddStaticVehicle(471,-122.9541,1142.5817,19.2001,186.2512,0,0);
- //
- AddStaticVehicle(471,-126.2311,1141.1714,19.2241,180.4574,0,0);
- //
- AddStaticVehicle(471,-130.1885,1141.0081,19.2220,178.7012,0,0);
- //
- AddStaticVehicle(468,-112.3525,1120.9099,19.4105,72.9971,-1,-1);
- //
- AddStaticVehicle(468,-112.5510,1117.9872,19.4110,81.6557,-1,-1);
- //
- AddStaticVehicle(468,-112.5225,1116.2460,19.4116,58.3526,-1,-1);
- //
- AddStaticVehicle(468,-112.6650,1114.5563,19.4107,73.8427,-1,-1);
- //
- AddStaticVehicle(487,-226.0801,2716.0386,67.1165,268.1381,54,29);
- //
- AddStaticVehicle(487,-344.9044,2676.9741,63.8829,23.0436,54,29);
- //
- AddStaticVehicle(487,-563.5708,2601.9707,66.0528,272.8370,54,29);
- //
- AddStaticVehicle(487,-417.3027,2191.2710,42.6609,9.3595,54,29);
- //
- AddStaticVehicle(487,333.7563,1961.2158,17.8156,95.5012,54,29);
- //
- AddStaticVehicle(487,334.1656,1924.0676,17.8218,79.1497,54,29);
- //
- AddStaticVehicle(487,332.2151,1867.0376,17.9470,89.0947,54,29);
- //
- AddStaticVehicle(578,-1507.3623,1982.4646,48.8080,0.6026,-1,-1);
- // BEAGLE
- AddStaticVehicle(511,-1484.9375,1976.6157,49.1932,1.9646,-1,-1);
- //
- AddStaticVehicle(578,-296.5619,2612.9839,63.9745,261.1927,-1,-1);
- //
- AddStaticVehicle(500,-294.2687,1299.5104,53.8735,261.4082,-1,-1);
- //
- AddStaticVehicle(500,-342.8879,1514.2316,75.4671,2.1713,-1,-1);
- //
- AddStaticVehicle(471,-323.9928,1515.5222,74.8397,358.3837,-1,-1);
- //
- AddStaticVehicle(470,-175.7455,1680.6907,16.3509,317.6384,-1,-1);
- //
- AddStaticVehicle(470,-290.4361,1755.2761,42.6838,270.1544,-1,-1);
- //
- AddStaticVehicle(515,-289.7865,1775.7632,43.7337,0.2727,-1,-1);
- //
- AddStaticVehicle(487,-328.4066,1795.9874,42.9391,171.5455,-1,-1);
- //
- AddStaticVehicle(470,-914.5411,1996.9738,60.9072,127.0327,-1,-1);
- //
- AddStaticVehicle(470,-910.5156,1992.1903,60.9107,131.1484,-1,-1);
- //
- AddStaticVehicle(433,-924.6487,2039.1537,61.3507,41.2396,-1,-1);
- //
- AddStaticVehicle(430,-503.7894,2195.4170,40.3514,81.5870,-1,-1);
- //
- AddStaticVehicle(430,-501.7742,2169.3274,40.3594,90.5157,-1,-1);
- //
- AddStaticVehicle(470,-395.8641,2193.2930,42.3828,272.2695,-1,-1);
- //
- AddStaticVehicle(470,-392.9530,2186.8013,42.2435,269.0942,-1,-1);
- //
- AddStaticVehicle(470,-394.2175,2176.4539,41.7427,244.9370,-1,-1);
- //
- AddStaticVehicle(470,-17.9176,2357.1050,24.1288,356.4059,-1,-1);
- //
- AddStaticVehicle(470,-268.0789,2514.4490,33.2885,84.1131,-1,-1);
- //
- AddStaticVehicle(470,-527.7076,2609.7146,53.4089,90.1121,-1,-1);
- //
- AddStaticVehicle(470,-539.7891,2567.8345,53.4065,90.7815,-1,-1);
- //
- AddStaticVehicle(432,-518.9094,2581.9626,53.4267,269.5176,-1,-1);
- //
- AddStaticVehicle(470,-628.9615,2711.9133,72.2987,171.5462,-1,-1);
- //
- AddStaticVehicle(470,-775.6357,2757.9658,45.7020,88.5436,-1,-1);
- //
- AddStaticVehicle(470,-904.3685,2696.9490,42.3591,133.5194,-1,-1);
- //
- AddStaticVehicle(470,-1501.5254,2619.6125,55.7522,358.2046,-1,-1);
- //
- AddStaticVehicle(470,-1500.5652,2650.3264,55.7515,355.9960,-1,-1);
- //
- AddStaticVehicle(470,-1537.9000,2676.3020,55.7522,87.2599,-1,-1);
- //
- AddStaticVehicle(432,-1595.8820,2681.3047,55.1458,358.9301,-1,-1);
- //
- AddStaticVehicle(432,-1599.1285,2660.5056,55.2336,89.4188,-1,-1);
- //
- AddStaticVehicle(432,-1507.5168,2685.6636,55.8510,354.3337,-1,-1);
- //
- AddStaticVehicle(433,-1481.7085,2686.8918,56.1636,178.0989,-1,-1);
- //
- AddStaticVehicle(433,-1474.7922,2688.7024,56.1411,180.6481,-1,-1);
- //
- AddStaticVehicle(433,-1494.1989,2530.2202,56.0576,178.8805,-1,-1);
- //
- AddStaticVehicle(468,-1503.2577,2525.3801,55.3497,179.1982,-1,-1);
- //
- AddStaticVehicle(468,-1507.2166,2524.8457,55.3566,181.9787,-1,-1);
- //
- AddStaticVehicle(468,-1524.9680,2526.0305,55.4173,178.0358,-1,-1);
- //
- AddStaticVehicle(548,-1474.6434,2525.5095,57.7180,263.7379,-1,-1);
- //
- AddStaticVehicle(425,-1474.5553,2498.9678,57.7161,273.7738,-1,-1);
- //
- AddStaticVehicle(471,-1313.6666,2664.1648,49.5442,285.3071,-1,-1);
- //
- AddStaticVehicle(471,-1318.9530,2662.7185,49.5437,285.3078,-1,-1);
- //
- AddStaticVehicle(432,-1302.6216,2705.9932,50.0758,5.0179,-1,-1);
- //
- AddStaticVehicle(520,-1533.2238,2705.1531,57.6449,197.0819,-1,-1);
- //
- AddStaticVehicle(470,-753.0413,1510.1888,25.6813,9.2346,-1,-1);
- //
- AddStaticVehicle(470,-754.2158,1521.9561,26.7276,3.8036,-1,-1);
- //
- AddStaticVehicle(470,-754.7807,1540.8003,26.9552,1.3874,-1,-1);
- //
- AddStaticVehicle(470,-794.8740,1571.8705,26.9741,98.9847,-1,-1);
- //
- AddStaticVehicle(432,-821.8706,1578.8258,27.1300,82.3110,-1,-1);
- //
- AddStaticVehicle(432,-859.9019,1550.6174,23.5139,177.7958,-1,-1);
- //
- AddStaticVehicle(445,-854.9668,1471.3058,16.2763,175.5079,-1,-1);
- //
- AddStaticVehicle(445,-856.1306,1453.0784,14.9034,177.2384,-1,-1);
- //
- AddStaticVehicle(445,-855.2596,1439.6045,14.0607,187.0154,-1,-1);
- //
- AddStaticVehicle(445,-853.1483,1426.8619,13.6391,194.6416,-1,-1);
- //
- AddStaticVehicle(433,-774.5961,1432.7437,14.2255,283.3401,-1,-1);
- //
- AddStaticVehicle(433,-775.3538,1437.9558,14.2258,269.7361,-1,-1);
- //
- AddStaticVehicle(433,-779.4594,1312.4254,14.2070,215.3350,-1,-1);
- //
- AddStaticVehicle(430,-654.9141,1362.0189,-0.2148,74.4070,-1,-1);
- //
- AddStaticVehicle(430,-691.0470,1363.9060,-0.1033,88.2213,-1,-1);
- //
- AddStaticVehicle(430,-720.3111,1364.9066,-0.1793,87.7929,-1,-1);
- //
- AddStaticVehicle(432,229.0807,1915.1827,17.6341,181.4792,-1,-1);
- //
- AddStaticVehicle(432,229.3708,1883.0563,17.6537,176.0809,-1,-1);
- //
- AddStaticVehicle(432,201.4733,1886.6801,17.6606,359.7650,-1,-1);
- //
- AddStaticVehicle(548,265.5016,1855.2402,18.2234,148.7287,-1,-1);
- //russian rhino
- AddStaticVehicle(432,-865.5205,1542.7537,22.6940,270.8146,35,35);
- //russian rhino
- AddStaticVehicle(432,-865.6589,1548.8517,23.2233,269.9384,35,35);
- //russian rhino
- AddStaticVehicle(432,-866.1425,1555.4075,23.7904,272.4864,35,35);
- //russian rhino
- AddStaticVehicle(432,-865.4415,1561.9204,24.3082,272.1706,35,35);
- //russian rhino
- AddStaticVehicle(432,-865.8007,1567.9430,24.7817,272.1778,35,35);
- // OTHER AREAS
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
- // LAS VENTURAS
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
- printf("Total vehicles from files: %d",total_vehicles_from_files);
- UsePlayerPedAnims();
- DisableInteriorEnterExits();
- umini = CreatePickup(1254, 23, -252.0913,2595.5215,62.8582);
- gmini = CreatePickup(1254, 23, -136.8090,1222.5321,19.8992);
- uhit = CreatePickup(1254, 23, -256.9216,2606.4358,62.8582);
- ghit = CreatePickup(1254, 23, -149.0273,1131.3945,19.7422);
- buyweapon = CreatePickup(1254, 23, -690.7361,942.0350,13.6328);
- nuke = CreatePickup(1254, 23, 220.0778,1822.6729,7.5301);
- // usa ammo
- gunshop[7] = CreatePickup(1254, 23, -288.9128,2691.4155,62.6875);
- // german ammo
- gunshop[6] = CreatePickup(1254, 23, -181.3289,1163.2261,19.7500);
- gunshop[1] = CreatePickup(1254, 23, 777.4450,1871.4246,4.9067);
- gunshop[2] = CreatePickup(1254, 23, -315.8113,829.8170,14.2422);
- gunshop[3] = CreatePickup(1254, 23, -314.4954,1774.4213,43.6406);
- gunshop[4] = CreatePickup(1254, 23, -604.3909,2716.7764,72.7231);
- gunshop[5] = CreatePickup(1254, 23, 295.6123,-80.7989,1001.5156);
- print("All pickups are created!");
- if(dini_Exists("/Variables/Variables.ini")) {
- dini_IntSet("/Variables/Variables.ini", "CapturedBy", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy11", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy12", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy13", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy14", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy15", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy16", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy17", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy18", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy19", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy20", 0);
- dini_IntSet("/Variables/Variables.ini", "uscore", 0);
- dini_IntSet("/Variables/Variables.ini", "gscore", 0);
- dini_Set("/Variables/Variables.ini", "commander", "N/A");
- dini_Set("/Variables/Variables.ini", "commanderg", "N/A");
- print("/Variables/Variables.ini was found in the scriptfiles folder!");
- }
- else {
- dini_Create("/Variables/Variables.ini"); //Folder + house file created
- dini_IntSet("/Variables/Variables.ini", "CapturedBy", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 0);
- dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy11", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy12", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy13", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy14", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy15", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy16", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy17", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy18", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy19", 0);
- dini_IntSet("/Variables/Variable.ini", "CapturedBy20", 0);
- dini_IntSet("/Variables/Variables.ini", "uscore", 0);
- dini_IntSet("/Variables/Variables.ini", "gscore", 0);
- dini_Set("/Variables/Variables.ini", "commander", "N/A");
- dini_Set("/Variables/Variables.ini", "commanderg", "N/A");
- print("/Variables/Variables.ini wasnt found in the scriptfiles folder!");
- print("The script has created the file and set all the areas to the default state!");
- print("All files were written!");
- }
- SetGameModeText("Total War");
- //TIMERS-------------------------------------------------------------------------------------
- SetTimer("AreaCheck", 1000, true);
- print("AreaCheck timer loaded!");
- //CLASS--------------------------------------------------------------------------------------
- // usa spawn - a
- AddPlayerClass(287,-244.2003,2602.5547,63.7031,270.1281,0,0,0,0,0,0);
- // german spawn - a
- AddPlayerClass(285,-135.6082,1116.5326,21.1966,94.4754,0,0,0,0,0,0);
- // russia spawn - a
- AddPlayerClass(121,-786.8021,1568.6122,28.0714,270.1281,0,0,0,0,0,0);
- // japan spawn - a
- AddPlayerClass(122,-1479.6936,2627.0244,58.7813,94.4754,0,0,0,0,0,0);
- print("All classes loaded!");
- //CARS---------------------------------------------------------------------------------------
- print("All vehicles loaded!");
- //GANGZONE----------------------------------------------------------------------------------
- USA = GangZoneCreate(-385.3699, 2545.777, -93.423, 2837.724);
- GERMANY = GangZoneCreate(-397.0478, 969.2637, 105.1009, 1307.922);
- AUSTRALIA = GangZoneCreate(-760.303405, 834.070922, -600.303405, 1026.070922);
- Ear = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58);
- EarU = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58);
- EarG = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58);
- GangZoneShowForAll(Ear, COLOR_GREEN);
- Town1 = GangZoneCreate(-1681.614, 2428.998, -1307.922, 2826.046);
- Town2 = GangZoneCreate(-899.1964, 1366.311, -688.9946, 1623.225);
- Resturant = GangZoneCreate(-630.6053, 2510.743, -478.7929, 2662.556);
- ResturantU = GangZoneCreate(-630.6053, 2510.743, -478.7929, 2662.556);
- ResturantG = GangZoneCreate(-630.6053, 2510.743, -478.7929, 2662.556);
- GangZoneShowForAll(Resturant, COLOR_GREEN);
- Airfield = GangZoneCreate(268.5911, 2393.964, 467.115, 2604.166);
- AirfieldU = GangZoneCreate(268.5911, 2393.964, 467.115, 2604.166);
- AirfieldG = GangZoneCreate(268.5911, 2393.964, 467.115, 2604.166);
- GangZoneShowForAll(Airfield, COLOR_GREEN);
- Oil = GangZoneCreate(747.384, 2031.95, 805.7734, 2090.34);
- OilU = GangZoneCreate(747.384, 2031.95, 805.7734, 2090.34);
- OilG = GangZoneCreate(747.384, 2031.95, 805.7734, 2090.34);
- GangZoneShowForAll(Oil, COLOR_GREEN);
- A = GangZoneCreate(105.1009, 1786.715, 338.6584, 2055.306);
- AU = GangZoneCreate(105.1009, 1786.715, 338.6584, 2055.306);
- AG = GangZoneCreate(105.1009, 1786.715, 338.6584, 2055.306);
- GangZoneShowForAll(A, COLOR_GREEN);
- University = GangZoneCreate(939.5279, 970.4056, 1169.914, 1187.017);
- UniversityU = GangZoneCreate(939.5279, 970.4056, 1169.914, 1187.017);
- UniversityG = GangZoneCreate(939.5279, 970.4056, 1169.914, 1187.017);
- GangZoneShowForAll(University, COLOR_GREEN);
- Gas = GangZoneCreate(502.1487, 1588.191, 700.6725, 1786.715);
- GasU = GangZoneCreate(502.1487, 1588.191, 700.6725, 1786.715);
- GasG = GangZoneCreate(502.1487, 1588.191, 700.6725, 1786.715);
- GangZoneShowForAll(Gas, COLOR_GREEN);
- OS = GangZoneCreate(105.1009, 1342.956, 280.269, 1483.09);
- OSU = GangZoneCreate(105.1009, 1342.956, 280.269, 1483.09);
- OSG = GangZoneCreate(105.1009, 1342.956, 280.269, 1483.09);
- GangZoneShowForAll(OS, COLOR_GREEN);
- T = GangZoneCreate(408.7256, 1156.11, 712.3504, 1296.244);
- TU = GangZoneCreate(408.7256, 1156.11, 712.3504, 1296.244);
- TG = GangZoneCreate(408.7256, 1156.11, 712.3504, 1296.244);
- GangZoneShowForAll(T, COLOR_GREEN);
- D = GangZoneCreate(-945.9079, 1915.172, -525.5044, 2148.729);
- DU = GangZoneCreate(-945.9079, 1915.172, -525.5044, 2148.729);
- DG = GangZoneCreate(-945.9079, 1915.172, -525.5044, 2148.729);
- GangZoneShowForAll(D, COLOR_GREEN);
- OT = GangZoneCreate(-525.5044, 2125.373, -291.9469, 2277.186);
- OTU = GangZoneCreate(-525.5044, 2125.373, -291.9469, 2277.186);
- OTG = GangZoneCreate(-525.5044, 2125.373, -291.9469, 2277.186);
- GangZoneShowForAll(OT, COLOR_GREEN);
- OilPump = GangZoneCreate(1015.975, 2861.08, 1121.076,2954.502);
- OilPumpU = GangZoneCreate(1015.975, 2861.08, 1121.076,2954.502);
- OilPumpG = GangZoneCreate(1015.975, 2861.08, 1121.076,2954.502);
- GangZoneShowForAll(OilPump, COLOR_GREEN);
- Cluck = GangZoneCreate(-1237.855, 1763.359, -1156.11, 1868.46);
- CluckU = GangZoneCreate(-1237.855, 1763.359, -1156.11, 1868.46);
- CluckG = GangZoneCreate(-1237.855, 1763.359, -1156.11, 1868.46);
- GangZoneShowForAll(Cluck, COLOR_GREEN);
- Beach = GangZoneCreate(210.2018, 2837.724, 326.9805, 2989.536);
- BeachU = GangZoneCreate(210.2018, 2837.724, 326.9805, 2989.536);
- BeachG = GangZoneCreate(210.2018, 2837.724, 326.9805, 2989.536);
- GangZoneShowForAll(Beach, COLOR_GREEN);
- DinerU = GangZoneCreate(-1985.239, 2277.186, -1845.104, 2440.676);
- DinerG = GangZoneCreate(-1985.239, 2277.186, -1845.104, 2440.676);
- Diner = GangZoneCreate(-1985.239, 2277.186, -1845.104, 2440.676);
- GangZoneShowForAll(Diner, COLOR_GREEN);
- QuarryU = GangZoneCreate(485.822326, 751.018859, 741.822326, 991.018859);
- QuarryG = GangZoneCreate(485.822326, 751.018859, 741.822326, 991.018859);
- Quarry = GangZoneCreate(485.822326, 751.018859, 741.822326, 991.018859);
- GangZoneShowForAll(Quarry, COLOR_GREEN);
- FHU = GangZoneCreate(921.603271, 1648.425170, 985.603271, 1816.425170);
- FHG = GangZoneCreate(921.603271, 1648.425170, 985.603271, 1816.425170);
- FH = GangZoneCreate(921.603271, 1648.425170, 985.603271, 1816.425170);
- GangZoneShowForAll(FH, COLOR_GREEN);
- GWU = GangZoneCreate(1570.820068, 2266.395751, 1722.820068, 2426.395751);
- GWG = GangZoneCreate(1570.820068, 2266.395751, 1722.820068, 2426.395751);
- GW = GangZoneCreate(1570.820068, 2266.395751, 1722.820068, 2426.395751);
- GangZoneShowForAll(GW, COLOR_GREEN);
- DockU = GangZoneCreate(-2320.655517, 2219.018798, -2160.655517, 2491.018798);
- DockG = GangZoneCreate(-2320.655517, 2219.018798, -2160.655517, 2491.018798);
- Dock = GangZoneCreate(-2320.655517, 2219.018798, -2160.655517, 2491.018798);
- GangZoneShowForAll(Dock, COLOR_GREEN);
- CCU = GangZoneCreate(1411.231323, 2715.757568, 1539.231323, 2875.757568);
- CCG = GangZoneCreate(1411.231323, 2715.757568, 1539.231323, 2875.757568);
- CC = GangZoneCreate(1411.231323, 2715.757568, 1539.231323, 2875.757568);
- GangZoneShowForAll(Dock, COLOR_GREEN);
- print("All gangzones loaded!");
- }
- public OnGameModeExit()
- {
- foreach(Player, i) {
- TextDrawDestroy(Teams[i]);
- TextDrawDestroy(Classt[i]);
- }
- TextDrawDestroy(Spree);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- pSpawned[playerid] = 0;
- SetPlayerClass(playerid, classid);
- gPlayerClass[playerid] = ASSAULT;
- SetPlayerPos(playerid,11.9577,1716.7191,22.6222);
- SetPlayerFacingAngle(playerid, 128.0980);
- SetPlayerInterior(playerid, 0);
- SetPlayerCameraPos(playerid,9.6063,1715.1882,22.6113);
- SetPlayerCameraLookAt(playerid,11.9577,1716.7191,22.6222);
- CreateExplosion(11.9577,1716.7191,22.6222, 12, 0.1);
- switch (classid) {
- case 0:
- {
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- TextDrawSetString(Teams[playerid], "~b~UNITED STATES OF AMERICA");
- TextDrawShowForPlayer(playerid, Teams[playerid]);
- }
- case 1:
- {
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- TextDrawSetString(Teams[playerid], "~r~GERMANY");
- TextDrawShowForPlayer(playerid, Teams[playerid]);
- }
- case 2:
- {
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- TextDrawSetString(Teams[playerid], "~y~AUSTRALIA");
- TextDrawShowForPlayer(playerid, Teams[playerid]);
- }
- case 3:
- {
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- TextDrawSetString(Teams[playerid], "~y~RUSSIA");
- TextDrawShowForPlayer(playerid, Teams[playerid]);
- }
- case 4:
- {
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- TextDrawSetString(Teams[playerid],"~w~JAPAN");
- TextDrawShowForPlayer(playerid, Teams[playerid]);
- }
- }
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerColor(playerid,COLOR_BLUE);
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- }
- else if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerColor(playerid,COLOR_RED);
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- }
- else if(gTeam[playerid] == TEAM_AUSTRALIA) {
- SetPlayerColor(playerid,COLOR_YELLOW);
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- }
- else if(gTeam[playerid] == TEAM_RUSSIA) {
- SetPlayerColor(playerid,COLOR_ORANGE);
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- }
- else if(gTeam[playerid] == TEAM_JAPAN) {
- SetPlayerColor(playerid,COLOR_WHITE);
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- }
- return 1;
- }
- SetPlayerClass(playerid, classid)
- {
- if(classid == 0) {
- gTeam[playerid] = TEAM_USA;
- }
- else if(classid == 1) {
- gTeam[playerid] = TEAM_GERMANY;
- }
- else if(classid == 2) {
- gTeam[playerid] = TEAM_AUSTRALIA;
- }
- else if(classid == 3) {
- gTeam[playerid] = TEAM_RUSSIA;
- }
- else if(classid == 4) {
- gTeam[playerid] = TEAM_JAPAN;
- }
- }
- public OnPlayerConnect(playerid)
- {
- //------------------------------------------------
- WarnedTimes[playerid] = 0;
- freeze[playerid] = 0;
- PlayerSpec[playerid][is] = 0;
- IsInCargoB[playerid] = false;
- IsInBarracks[playerid] = false;
- new IP[50];
- GetPlayerName(playerid, nameee, 16);
- GetPlayerIp(playerid, IP, 50);
- printf("%s |ID:%i| %s has connected !", IP,playerid, nameee);
- logged[playerid] = 0;
- GetPlayerName(playerid, playername, sizeof(playername));
- Classt[playerid] = TextDrawCreate(500.000000,427.000000,"Medic");
- TextDrawAlignment(Classt[playerid],0);
- TextDrawBackgroundColor(Classt[playerid],0x000000ff);
- TextDrawFont(Classt[playerid],3);
- TextDrawColor(Classt[playerid],0xffffffff);
- TextDrawSetOutline(Classt[playerid],1);
- TextDrawSetProportional(Classt[playerid],1);
- TextDrawSetShadow(Classt[playerid],1);
- TextDrawLetterSize(Classt[playerid],0.699999,0.899999);
- TextDrawHideForPlayer(playerid, Classt[playerid]);
- SpawnP[playerid] =1;
- Teams[playerid] = TextDrawCreate(174.000000,135.000000,"United States of America");
- TextDrawAlignment(Teams[playerid],0);
- TextDrawBackgroundColor(Teams[playerid],0x000000ff);
- TextDrawFont(Teams[playerid],3);
- TextDrawLetterSize(Teams[playerid],0.599999,1.200000);
- TextDrawColor(Teams[playerid],0xffffffff);
- TextDrawSetOutline(Teams[playerid],1);
- TextDrawSetProportional(Teams[playerid],1);
- TextDrawSetShadow(Teams[playerid],1);
- TextDrawHideForPlayer(playerid, Teams[playerid]);
- Players++;
- AbleToSpawn[playerid] = 1;
- rank[playerid] = 0;
- pSpawned[playerid] = 0;
- TogglePlayerClock(playerid, 0);
- IsInHunter[playerid] = 0;
- IsInRhino[playerid] = 0;
- //usa ammo
- SetPlayerMapIcon(playerid, 8, -286.5354,2692.7466,62.6875,6, 0);
- //ger ammo
- SetPlayerMapIcon(playerid, 7,-181.6294,1166.3633,19.7500 ,6, 0);
- SetPlayerMapIcon(playerid, 1, -227.7928,2721.7283,62.8294, 56, 0);
- SetPlayerMapIcon(playerid, 2, -17.6360,1215.4073,22.4648, 56, 0);
- SetPlayerMapIcon(playerid, 3, 777.4450,1871.4246,4.9067, 6, 0);
- SetPlayerMapIcon(playerid, 4, -315.8113,829.8170,14.2422, 6, 0);
- SetPlayerMapIcon(playerid, 5, -314.4954,1774.4213,43.6406, 6, 0);
- SetPlayerMapIcon(playerid, 6, -604.3909,2716.7764,72.7231, 6, 0);
- SendClientMessage(playerid,COLOR_GREY, "Type /help for help!");
- SendClientMessage(playerid,ORANGE, "Want all your stats to be saved? Type /register [password]");
- SendClientMessage(playerid,COLOR_ORANGE, "For the full list of commands type /commands");
- SendClientMessage(playerid,COLOR_GREY, "WEB URL: mw2server.webs.com");
- SendClientMessage(playerid, COLOR_RED, "This server contains an anti-cheat system,");
- SendClientMessage(playerid, COLOR_RED, "cheating will result in a ban !");
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "*** %s has joined the server. Total Players In Server: %d", pName, Players);
- SendClientMessageToAll(ORANGE, string);
- SendClientMessage(playerid, COLOR_GREEN, "Modern Warfare 2!");
- SendClientMessage(playerid, COLOR_GREEN, "Go to mw2server.webs.com to register and be the first to now all the updates!!!");
- if(dini_Exists(udb_encode(pName))) {
- new IPP[50];
- GetPlayerIp(playerid, IPP, sizeof(IPP));
- dini_Set(udb_encode(pName), "IP", IPP);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if( gPlayerClass[playerid] == ADMIN ) KillTimer(admgod[playerid]);
- for(new i=0; i < MAX_TEAMS; i++) {
- if(teamInfo[i][0]==1) {
- if( teamMembers[i][0] == playerid) {
- //name team
- format(teamNames[i], MAX_TEAM_NAME, " ");
- //Team exists
- teamInfo[i][0]=0;
- //There is one member
- teamInfo[i][1]=0;
- //Team color is player's color
- teamInfo[i][2]=-1;
- //Player is the first team member
- teamMembers[i][0] = -1;
- teamMembers[i][1] = -1;
- teamMembers[i][2] = -1;
- teamMembers[i][3] = -1;
- }
- }
- }
- SetPlayerHealth(playerid, 0.0);
- IsInCargoB[playerid] = false;
- IsInBarracks[playerid] = false;
- if( gPlayerClass[playerid] == ENGINEER ) {
- DestroyPickup(Dispenser[playerid]);
- }
- logged[playerid] = 0;
- Players--;
- if(Planted[playerid] == 1) {
- DestroyObject(C4[playerid]);
- Bomb[playerid] = 0;
- Planted[playerid] = 0;
- }
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- switch(reason) {
- case 0: format(string, sizeof(string), "***%s has left the server. (Timeout) Total Players In Server: %d", pName, Players);
- case 1: format(string, sizeof(string), "***%s has left the server. (Leaving) Total Players In Server: %d", pName, Players);
- case 2: format(string, sizeof(string), "***%s has left the server. (Kicked | Banned) Total Players In Server: %d", pName, Players);
- }
- SendClientMessageToAll(ORANGE, string);
- return 1;
- }
- stock SetPlayerRankStars(playerid)
- {
- SetPlayerWantedLevel(playerid, rank[playerid]);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(GeneralClass[playerid][1] == 1 || GeneralClass[playerid][2] == 1 || GeneralClass[playerid][3] == 1 || GeneralClass[playerid][4] == 1) {
- if(gPlayerClass[playerid] != GENERAL) {
- GeneralClass[playerid][1] = 0;
- GeneralClass[playerid][2] = 0;
- GeneralClass[playerid][3] = 0;
- GeneralClass[playerid][4] = 0;
- }
- }
- if( PlayerSpec[playerid][is] == 0 ) {
- TextDrawShowForPlayer(playerid,txtTimeDisp);
- TogglePlayerControllable(playerid, 1);
- if( GetPlayerMoney(playerid) < 0 ) ResetPlayerMoney(playerid);
- CheckForLevelUpdate(playerid);
- SetPlayerRankStars(playerid);
- SetPlayerInterior(playerid, 0);
- dispout[playerid] = 0;
- IsInCargoB[playerid] = false;
- IsInBarracks[playerid] = false;
- if(gTeam[playerid] == TEAM_USA ) {
- if( gPlayerClass[playerid] == ADMIN ) SetPlayerSkin(playerid, 217);
- if( gPlayerClass[playerid] == PYRO ) SetPlayerSkin(playerid, 279);
- if( gPlayerClass[playerid] == SCOUT ) SetPlayerSkin(playerid,128 );
- if( gPlayerClass[playerid] == MEDIC ) SetPlayerSkin(playerid, 275);
- if( gPlayerClass[playerid] == ENGINEER ) SetPlayerSkin(playerid, 179);
- if( gPlayerClass[playerid] == PILOT ) SetPlayerSkin(playerid, 163);
- if( gPlayerClass[playerid] == SNIPER ) SetPlayerSkin(playerid, 124);
- if( gPlayerClass[playerid] == DEMOLITION ) SetPlayerSkin(playerid, 73);
- if( gPlayerClass[playerid] == ASSAULT ) SetPlayerSkin(playerid, 287);
- if( gPlayerClass[playerid] == GENERAL ) SetPlayerSkin(playerid, 283);
- }
- if(gTeam[playerid] == TEAM_GERMANY) {
- if( gPlayerClass[playerid] == ADMIN ) SetPlayerSkin(playerid, 217);
- if( gPlayerClass[playerid] == PYRO ) SetPlayerSkin(playerid, 278);
- if( gPlayerClass[playerid] == SCOUT ) SetPlayerSkin(playerid, 202);
- if( gPlayerClass[playerid] == MEDIC ) SetPlayerSkin(playerid, 70);
- if( gPlayerClass[playerid] == PILOT ) SetPlayerSkin(playerid, 284);
- if( gPlayerClass[playerid] == ENGINEER ) SetPlayerSkin(playerid, 50);
- if( gPlayerClass[playerid] == SNIPER ) SetPlayerSkin(playerid, 206);
- if( gPlayerClass[playerid] == DEMOLITION ) SetPlayerSkin(playerid, 27);
- if( gPlayerClass[playerid] == ASSAULT ) SetPlayerSkin(playerid, 285);
- if( gPlayerClass[playerid] == GENERAL ) SetPlayerSkin(playerid, 288);
- }
- playerColors[playerid] = GetPlayerColor(playerid);
- SendClientMessage(playerid, COLOR_RED, "To make this server better you can donate! When you donate you will recieve the V.I.P team!");
- SendClientMessage(playerid, COLOR_RED, "To donate go to the website (modernwarfare2.smfforfree.com) and press the paypal donate button!");
- SendClientMessage(playerid, COLOR_GREEN, "NEW: Type /donationpackage to see the features you can get!");
- SetPlayerInterior(playerid, 0);
- if( gTeam[playerid] == TEAM_USA ) {
- switch(SpawnP[playerid]) {
- case 1:
- {
- SetRandomUSAPos(playerid);
- }
- case 2:
- {
- if( CapturedBy3 == 1 ) SetPlayerPos(playerid,401.1484,2528.9482,16.5785);
- }
- case 3:
- {
- if( CapturedBy5 == 1 ) SetPlayerPos(playerid,216.0368,1911.4246,17.6406);
- }
- case 4:
- {
- if( CapturedBy11 == 1 ) SetPlayerPos(playerid, 1087.1479,1074.4731,10.8382);
- }
- }
- }else if( gTeam[playerid] == TEAM_GERMANY )
- {
- switch(SpawnP[playerid]) {
- case 1:
- {
- SetRandomGERPos(playerid);
- }
- case 2:
- {
- if( CapturedBy3 == 2 ) SetPlayerPos(playerid,401.1484,2528.9482,16.5785);
- }
- case 3:
- {
- if( CapturedBy5 == 2) SetPlayerPos(playerid,216.0368,1911.4246,17.6406);
- }
- case 4:
- {
- if( CapturedBy11 == 2 ) SetPlayerPos(playerid, 1087.1479,1074.4731,10.8382);
- }
- }
- }
- SendClientMessage(playerid, COLOR_GREY, "Type /switchclass to change your class!");
- SendClientMessage(playerid, COLOR_GREY, "Type /switchspawn to change your spawn position!");
- SendClientMessage(playerid, COLOR_GREY, "Type /g [text] to talk in global!");
- if(PickedClass[playerid] == 1) { RestoreClassWeapons(playerid); }
- if(PickedClass[playerid] == 0 && gTeam[playerid] != TEAM_AUSTRALIA) {
- if( adminlevel[playerid] > 0 ) {
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Classes", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander\nAdmin", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- }else if( adminlevel[playerid] < 1 )
- {
- TogglePlayerControllable(playerid, 0);
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Classes", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- SetPlayerVirtualWorld(playerid, 0);
- }
- }
- SettingPlayerTeam();
- pSpawned[playerid] = 1;
- if(gPlayerClass[playerid] == DEMOLITION) {
- SendClientMessage(playerid, COLOR_ORANGE, "Since you are the explosive class, you can plant bombs by pressing CROUCH and FIRE.");
- }
- if(gTeam[playerid] == TEAM_AUSTRALIA) {
- SendClientMessage(playerid, COLOR_WHITE, "You are a AUSTRALIA. Kill people for money which you can use to buy guns.");
- }
- GangZoneShowForPlayer(playerid, USA, 0x0000FF96);
- GangZoneShowForPlayer(playerid, GERMANY, 0xFF000096);
- GangZoneShowForPlayer(playerid, Town1, 0xFFFFFF96);
- GangZoneShowForPlayer(playerid, Town2, COLOR_ORANGE);
- GangZoneShowForPlayer(playerid, AUSTRALIA, COLOR_YELLOW);
- GangZoneShowForPlayer(playerid, Ear, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, Resturant, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, Airfield, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, Diner, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, Cluck, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, OilPump, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, Oil, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, Beach, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, A, COLOR_ORANGE);
- GangZoneShowForPlayer(playerid, University, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, Gas, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, OS, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, T, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, D, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, OT, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, Quarry, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, FH, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, GW, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, Dock, COLOR_GREEN);
- GangZoneShowForPlayer(playerid, CC, COLOR_GREEN);
- SetTimerEx("ClassShow", 6000, 0, "i", playerid);
- if( gPlayerClass[playerid] != ADMIN ) { if( gTeam[playerid] == TEAM_USA) SetPlayerColor(playerid, COLOR_BLUE); if(gTeam[playerid] == TEAM_GERMANY) SetPlayerColor(playerid, COLOR_RED);}
- }
- else if( PlayerSpec[playerid][is] == 1 ) if(PickedClass[playerid] == 1) {
- RestoreClassWeapons(playerid);
- }
- Vip(playerid);
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new string[128];
- if(dialogid == 1996 && response) {
- switch(listitem) {
- case 0: //usa
- {
- SetTimer("usabomb", 5000, 0);
- SendClientMessage(playerid,RED,"Usa Base Gonna Be Bombed In 5 Seconds , Take Cover!!!");
- }
- case 1: //german
- {
- SetTimer("germanbomb", 5000, 0);
- SendClientMessage(playerid,RED,"Germans Base Gonna Be Bombed In 5 Seconds , Take Cover!!!");
- }
- case 2: //japan
- {
- SetTimer("japanbomb", 5000, 0);
- SendClientMessage(playerid,RED,"Japans Base Gonna Be Bombed In 5 Seconds , Take Cover!!!");
- }
- case 3: //AUSTRALIA
- {
- SetTimer("AUSTRALIAbomb", 5000, 0);
- SendClientMessage(playerid,RED,"AUSTRALIA Base Gonna Be Bombed In 5 Seconds , Take Cover!!!");
- }
- case 4: //russ
- {
- SetTimer("russiabomb", 5000, 0);
- SendClientMessage(playerid,RED,"Russian Base Gonna Be Bombed In 5 Seconds , Take Cover!!!");
- }
- }
- }
- if(dialogid == 2 ) {
- if(!response) {
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander\nAdmin", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- if(response) {
- if(listitem == 0) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the assault as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = ASSAULT;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 31, 500);
- GivePlayerWeapon(playerid, 25, 100);
- SetPlayerSkin(playerid, 287);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 31, 500);
- GivePlayerWeapon(playerid, 25, 100);
- SetPlayerSkin(playerid, 285);
- }
- else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if(listitem == 1) {
- if( rank[playerid] >= 1 ) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the demolition as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = DEMOLITION;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 16, 50);
- GivePlayerWeapon(playerid, 36, 5);
- GivePlayerWeapon(playerid, 24, 200);
- SetPlayerSkin(playerid, 73);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 16, 50);
- GivePlayerWeapon(playerid, 36, 5);
- GivePlayerWeapon(playerid, 24, 200);
- SetPlayerSkin(playerid, 27);
- }
- else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }else
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- SendClientMessage(playerid, COLOR_RED, "You need to be rank 1 to be able to use Demolition !");
- }
- }
- if(listitem == 2) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the sniper as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = SNIPER;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- SetPlayerSkin(playerid, 124);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- SetPlayerSkin(playerid, 206);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if(listitem == 3) {
- if(gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA) {
- SendClientMessage(playerid, COLOR_GREY, "You cant be a pilot on russia or japan!");
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- if(rank[playerid] >= 3) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the pilot as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = PILOT;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 163);
- GivePlayerWeapon(playerid, 22, 50);
- }
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 284);
- GivePlayerWeapon(playerid, 22, 50);
- }
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 3 to be a pilot!");
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- }
- }
- if(listitem == 4) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the medic as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = MEDIC;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 275);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 1, 1);
- SetPlayerSkin(playerid, 275);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 70);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- SetPlayerSkin(playerid, 70);
- }
- else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if(listitem == 5) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the engineer as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = ENGINEER;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 179);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 29, 200);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 50);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 29, 200);
- }
- else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if( listitem == 6 ) { //pyro
- if( rank[playerid] >= 4 ) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the pyroman as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = PYRO;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 279);
- GivePlayerWeapon(playerid, 16, 20);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 37, 550);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 278);
- GivePlayerWeapon(playerid, 16, 20);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 37, 250);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }else
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 4 to be a pyroman!");
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- }
- if( listitem == 7 ) { //scout
- if( rank[playerid] >= 1 ) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the scout as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = SCOUT;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 128);
- SetPlayerArmour(playerid, 25);
- GivePlayerWeapon(playerid, 28, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 200);
- }
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 202);
- SetPlayerArmour(playerid, 25);
- GivePlayerWeapon(playerid, 28, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 200);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }else
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 1 to be a scout!");
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- }
- if(listitem == 8) {
- if(rank[playerid] >= 8) {
- SendClientMessage(playerid, COLOR_GREY, "You chose general (commander) as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = GENERAL;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 283);
- SetPlayerArmour(playerid, 95);
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 28, 200);
- GeneralClass[playerid][1] = 1;
- }
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 288);
- SetPlayerArmour(playerid, 95);
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 28, 200);
- GeneralClass[playerid][2] = 1;
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 28, 200);
- if(gTeam[playerid] == TEAM_RUSSIA) GeneralClass[playerid][3] = 1;
- if(gTeam[playerid] == TEAM_JAPAN) GeneralClass[playerid][4] = 1;
- }
- }else
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 8 to be a general (commander)!");
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- }
- if( listitem == 9 ) { // admin NOTE: general is 8
- if( adminlevel[playerid] > 0 ) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the Admin as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = ADMIN;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- SetPlayerColor(playerid, LIGHTGREEN);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 217);
- SetPlayerArmour(playerid, 100);
- GivePlayerWeapon(playerid, 38, 20000);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 20000);
- }
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 217);
- SetPlayerArmour(playerid, 100);
- GivePlayerWeapon(playerid, 38, 20000);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 20000);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- SetPlayerSkin(playerid, 217);
- SetPlayerArmour(playerid, 100);
- GivePlayerWeapon(playerid, 38, 20000);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 20000);
- }
- }else SendClientMessage(playerid, COLOR_RED, "Bye bye - You aren't admin !");
- }
- }
- if(dialogid == 101) {
- if(response) {
- if(listitem == 0) {
- if(GetPlayerMoney(playerid) >= 20000) {
- GivePlayerMoney(playerid, -20000);
- GivePlayerWeapon(playerid, 35, 20);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a Rocket Launcher!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You Need $20,000!");
- }
- }
- if(listitem == 1) {
- if(GetPlayerMoney(playerid) >= 150000) {
- GivePlayerMoney(playerid, -15000);
- GivePlayerWeapon(playerid, 27, 300);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a Combat Shotgun!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You Need $15,000!");
- }
- }
- if(listitem == 2) {
- if(GetPlayerMoney(playerid) >= 15000) {
- GivePlayerMoney(playerid, -15000);
- GivePlayerWeapon(playerid, 34, 75);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a Sniper Rifle!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $15,000!");
- }
- }
- if(listitem == 3) {
- if(GetPlayerMoney(playerid) >= 15000) {
- GivePlayerMoney(playerid, -15000);
- GivePlayerWeapon(playerid, 24, 250);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a Desert Eagle!!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $15,000!");
- }
- }
- if(listitem == 4) {
- if(GetPlayerMoney(playerid) >= 10000) {
- GivePlayerMoney(playerid, -10000);
- GivePlayerWeapon(playerid, 25, 150);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a Shotgun!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $10,000!");
- }
- }
- if(listitem == 5) {
- if(GetPlayerMoney(playerid) >= 10000) {
- GivePlayerMoney(playerid, -10000);
- GivePlayerWeapon(playerid, 31, 650);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a M4!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $10,000!");
- }
- }
- if(listitem == 6) {
- if(GetPlayerMoney(playerid) >= 10000) {
- GivePlayerMoney(playerid, -10000);
- SetPlayerHealth(playerid, 55.00);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought FirstAid Kit!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $10,000!");
- }
- }
- if(listitem == 7) {
- if(GetPlayerMoney(playerid) >= 20000) {
- GivePlayerMoney(playerid, -20000);
- SetPlayerArmour(playerid, 25.00);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought High Grade Body Armour!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money You need $20,000!");
- }
- }
- }
- }
- if(dialogid == 169 ) {
- if( listitem == 0) {
- SpawnP[playerid] =1;
- }else
- if( listitem == 1 ) {
- if( CapturedBy3 == 1 ) {
- SpawnP[playerid] =2;
- }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own the Airfield !");
- }else
- if(listitem == 2 ) {
- if( CapturedBy5 == 1 ) {
- SpawnP[playerid] =3;
- }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own Area69 !");
- }else
- if(listitem == 3 ) {
- if( CapturedBy11 == 1 ) {
- SpawnP[playerid] =4;
- }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own The University !");
- }
- }
- if( dialogid == 168 ) {
- if( listitem == 0) {
- SpawnP[playerid] =1;
- }else
- if( listitem == 1 ) {
- if( CapturedBy3 == 2 ) {
- SpawnP[playerid] =2;
- }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own the Airfield !");
- }else
- if(listitem == 2 ) {
- if( CapturedBy5 == 2 ) {
- SpawnP[playerid] =3;
- }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own Area69 !");
- }else
- if(listitem == 3 ) {
- if( CapturedBy11 == 2 ) {
- SpawnP[playerid] =4;
- }else SendClientMessage(playerid, COLOR_RED, "Your team doesn't own The University !");
- }
- }
- if(dialogid == 110) {
- if(response) {
- if(!strlen(inputtext)) return SendClientMessage(playerid, COLOR_GREY, "Please enter the amount of armor you want to buy!");
- if(!strval(inputtext)) return SendClientMessage(playerid, COLOR_GREY, "Please enter the amount of armor you want to buy!");
- 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");
- if(strval(inputtext) > 100) return SendClientMessage(playerid, COLOR_GREY, "The ammount of armor you wish to buy cant be greater than 100");
- if(strval(inputtext) >= 90) {
- if(GetPlayerMoney(playerid) >= 20000) {
- format(string, sizeof(string), "You purchased %d of armour and have been charged 20000", inputtext);
- SendClientMessage(playerid, COLOR_ORANGE, string);
- SetPlayerArmour(playerid, strval(inputtext));
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- else if(strval(inputtext) >= 70) {
- if(GetPlayerMoney(playerid) >= 15000) {
- format(string, sizeof(string), "You purchased %d of armour and have been charged 15000", inputtext);
- SendClientMessage(playerid, COLOR_ORANGE, string);
- SetPlayerArmour(playerid, strval(inputtext));
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- if(strval(inputtext) >= 50) {
- if(GetPlayerMoney(playerid) >= 10000) {
- format(string, sizeof(string), "You purchased %d of armour and have been charged 10000", inputtext);
- SendClientMessage(playerid, COLOR_ORANGE, string);
- SetPlayerArmour(playerid, strval(inputtext));
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- if(strval(inputtext) <= 50) {
- if(GetPlayerMoney(playerid) >= 10000) {
- format(string, sizeof(string), "You purchased %d of armour and have been charged 10000", inputtext);
- SendClientMessage(playerid, COLOR_ORANGE, string);
- SetPlayerArmour(playerid, strval(inputtext));
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- }
- }
- if(dialogid == 100) {
- if(response) {
- if(listitem == 0) {
- if(GetPlayerMoney(playerid) >= 10000) {
- GivePlayerMoney(playerid, -10000);
- GivePlayerWeapon(playerid, 31, 500);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a M4!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- if(listitem == 1) {
- if(GetPlayerMoney(playerid) >= 10000) {
- GivePlayerMoney(playerid, -10000);
- GivePlayerWeapon(playerid, 30, 500);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a AK47!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- if(listitem == 2) {
- if(GetPlayerMoney(playerid) >= 15000) {
- GivePlayerMoney(playerid, -15000);
- GivePlayerWeapon(playerid, 24, 500);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a desert eagle!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- if(listitem == 3) {
- if(GetPlayerMoney(playerid) >= 20000) {
- GivePlayerMoney(playerid, -20000);
- GivePlayerWeapon(playerid, 37, 500);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a flame thrower!!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- if(listitem == 4) {
- ShowPlayerDialog(playerid, 110, DIALOG_STYLE_INPUT, "Armour", "Select the amount of armor you want to buy:", "Buy", "Cancel");
- }
- if(listitem == 5) {
- if(GetPlayerMoney(playerid) >= 25000) {
- GivePlayerMoney(playerid, -25000);
- GivePlayerWeapon(playerid, 36, 5);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a rocket launcher!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- if(listitem == 6) {
- if(GetPlayerMoney(playerid) >= 25000) {
- GivePlayerMoney(playerid, -25000);
- GivePlayerWeapon(playerid, 34, 500);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a sniper rifle!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- if(listitem == 7) {
- if(GetPlayerMoney(playerid) >= 30000) {
- GivePlayerMoney(playerid, -30000);
- GivePlayerWeapon(playerid, 27, 500);
- SendClientMessage(playerid, COLOR_ORANGE, "You bought a SPAS 12!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You dont have enough money!");
- }
- }
- }
- }
- if(dialogid == 1) {
- if(!response) {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- if(response) {
- if(listitem == 0) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the assault as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = ASSAULT;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 31, 500);
- GivePlayerWeapon(playerid, 25, 100);
- SetPlayerSkin(playerid, 287);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 31, 500);
- GivePlayerWeapon(playerid, 25, 100);
- SetPlayerSkin(playerid, 285);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if(listitem == 1) {
- if( rank[playerid] >= 1 ) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the demolition as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = DEMOLITION;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 16, 50);
- GivePlayerWeapon(playerid, 36, 5);
- GivePlayerWeapon(playerid, 24, 200);
- SetPlayerSkin(playerid, 73);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 16, 50);
- GivePlayerWeapon(playerid, 36, 5);
- GivePlayerWeapon(playerid, 24, 200);
- SetPlayerSkin(playerid, 27);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }else
- {
- SendClientMessage(playerid, COLOR_RED, "You need to be rank 1 to be able to use Demolition !");
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- }
- if(listitem == 2) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the sniper as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = SNIPER;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- SetPlayerSkin(playerid, 124);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- SetPlayerSkin(playerid, 206);
- }
- else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if(listitem == 3) {
- if(gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA) {
- SendClientMessage(playerid, COLOR_GREY, "You cant be a pilot on russia or japan!");
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- if(rank[playerid] >= 3) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the pilot as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = PILOT;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 163);
- GivePlayerWeapon(playerid, 22, 50);
- }
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 284);
- GivePlayerWeapon(playerid, 22, 50);
- }
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 3 to be a pilot!");
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- }
- }
- if(listitem == 4) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the medic as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = MEDIC;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 275);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 1, 1);
- SetPlayerSkin(playerid, 275);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 70);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- SetPlayerSkin(playerid, 70);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if(listitem == 5) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the engineer as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = ENGINEER;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 179);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 29, 200);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 50);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 29, 200);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if( listitem == 6 ) { //pyro
- if( rank[playerid] >= 4 ) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the pyroman as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = PYRO;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 279);
- GivePlayerWeapon(playerid, 16, 20);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 37, 550);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 278);
- GivePlayerWeapon(playerid, 16, 20);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 37, 250);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }else
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 4 to be a pyroman!");
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- }
- if( listitem == 7 ) { //scout
- if( rank[playerid] >= 1 ) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the scout as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = SCOUT;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 128);
- SetPlayerArmour(playerid, 25);
- GivePlayerWeapon(playerid, 28, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 200);
- }
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 202);
- SetPlayerArmour(playerid, 25);
- GivePlayerWeapon(playerid, 28, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 200);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }else
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 1 to be a scout!");
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- }
- if(listitem == 8) {
- if(rank[playerid] >= 8) {
- SendClientMessage(playerid, COLOR_GREY, "You chose general (commander) as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = GENERAL;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 283);
- SetPlayerArmour(playerid, 95);
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 28, 200);
- GeneralClass[playerid][1] = 1;
- }
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 288);
- SetPlayerArmour(playerid, 95);
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 28, 200);
- GeneralClass[playerid][2] = 1;
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 28, 200);
- if(gTeam[playerid] == TEAM_RUSSIA) GeneralClass[playerid][3] = 1;
- if(gTeam[playerid] == TEAM_JAPAN) GeneralClass[playerid][4] = 1;
- }
- }else
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to have atleast rank 8 to be a general (commander)!");
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Pick Your Class", "Assault\nDemolition\nSniper\nPilot\nMedic\nEngineer\nPyroman\nScout\nGeneral/Commander", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- }
- }
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if( gPlayerClass[playerid] == ADMIN ) KillTimer(admgod[playerid]);
- GivePlayerMoney(playerid, -1000);
- SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
- ClearAnimations(playerid);
- if( GetPlayerMoney(playerid) < 0 ) ResetPlayerMoney(playerid);
- if( gPlayerClass[playerid] == ENGINEER ) DestroyPickup(Dispenser[playerid]);
- if( IsPlayerInAnyVehicle(playerid) ) {
- if( IsInCargoB[playerid] == true ) {
- new vehicleid = GetPlayerVehicleID(playerid);
- CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] - 1;
- IsInCargoB[playerid] = false;
- }
- if( IsInBarracks[playerid] == true ) {
- new vehicleid = GetPlayerVehicleID(playerid);
- Barracks[vehicleid][seats] = Barracks[vehicleid][seats] - 1;
- IsInBarracks[playerid] = false;
- }
- }
- TextDrawHideForPlayer(playerid,txtTimeDisp);
- // THIS IS ACTUALLY ONPLAYERDEATH !
- if( gPlayerClass[killerid] != ADMIN) {
- deaths[playerid] = deaths[playerid] + 1;
- kills[killerid] = kills[killerid] + 1;
- }
- CheckForLevelUpdate(killerid);
- SetPlayerVirtualWorld(playerid, 0);
- SendClientMessage(killerid, COLOR_WHITE, "You got money and weapons for killing an enemy!");
- GivePlayerMoney(killerid, 1000);
- if(hashit[playerid] == 1 && gTeam[killerid] == TEAM_AUSTRALIA) {
- hashit[playerid] = 0;
- GivePlayerMoney(killerid, money[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW, "You got money for killing an enemy that has a contract on!");
- new string[128];
- new hitname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, hitname, sizeof(hitname));
- new killername[MAX_PLAYER_NAME];
- GetPlayerName(killerid, killername, sizeof(killername));
- format(string, sizeof(string), "%s killed contracted player %s ! The contract is canceled!", killername, hitname);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- AbleToSpawn[playerid] = 1;
- pSpawned[playerid] = 0;
- if(Planted[playerid] == 1) {
- DestroyObject(C4[playerid]);
- Bomb[playerid] = 0;
- Planted[playerid] = 0;
- }
- if(hitman[killerid] == 1) {
- if(playerid == randperson[playerid]) {
- SendClientMessage(killerid, COLOR_WHITE, "Nice work! You killed your hit! Minimission completed!");
- SetPlayerScore(killerid, GetPlayerScore(killerid) +3);
- DisablePlayerCheckpoint(playerid);
- hitman[killerid] = 0;
- }
- }
- if(kills[killerid] == 6) {
- kills[killerid] = 0;
- SendClientMessage(playerid, COLOR_WHITE, "Congratulations! You completed the challenge!");
- SetPlayerScore(killerid, GetPlayerScore(killerid) +3);
- }
- spree[killerid]++;
- if(spree[killerid] == 5) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(killerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~5 KILLS!~r~", pName);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- }
- if(spree[killerid] == 10) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(killerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~10 KILLS!~r~", pName);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- SendClientMessage(playerid, COLOR_RED, "You Can Now Use /basestrike");
- }
- if(spree[killerid] == 15) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(killerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~15 KILLS!~r~", pName);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- }
- if(spree[killerid] == 20) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(killerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~20 KILLS!~r~", pName);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- }
- if(spree[killerid] == 25) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(killerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~25 KILLS!~r~", pName);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- }
- if(spree[killerid] == 30) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(killerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~30 KILLS!~r~", pName);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- }
- if(spree[killerid] == 35) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(killerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~35 KILLS!~r~", pName);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- }
- if(spree[killerid] == 40) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(killerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~40 KILLS!~r~", pName);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- }
- if(spree[killerid] == 45) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~45 KILLS!~r~", pName);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- }
- if(spree[killerid] == 50) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- SetPlayerScore(playerid, GetPlayerScore(playerid) +5);
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~50 KILLS!~r~", pName);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- }
- if(spree[killerid] > 50 ) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s IS ON A ~r~KILLING SPREE~r~ OF ~n~ ~r~%i KILLS!~r~", pName, spree[killerid]);
- TextDrawHideForAll(Spree);
- TextDrawSetString(Spree, string);
- TextDrawShowForAll(Spree); SetTimer("TxtReset", 3000, 0);
- }
- if(spree[playerid] >= 5) {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s 's killing spree ended.", pName);
- SendClientMessageToAll(COLOR_CON_GREEN, string);
- spree[playerid] = 0;
- }
- IsInHunter[playerid] = 0;
- IsInRhino[playerid] = 0;
- EnteredArea[playerid] = 0;
- SendDeathMessage(killerid, playerid, reason);
- if( killerid == INVALID_PLAYER_ID) {
- SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- foreach(Player, i) {
- SetVehicleParamsForPlayer(vehicleid,i, 0, 0);
- }
- if (GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 563 ||GetVehicleModel(vehicleid) == 511 ) {
- CargoBob[vehicleid][seats] = 0;
- }
- if( GetVehicleModel(vehicleid) == 433 ) {
- Barracks[vehicleid][seats] = 0;
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if (ispassenger) return 1;
- foreach(Player, i) {
- if(IsPlayerInVehicle(i,vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerTeam(i) == GetPlayerTeam(playerid)) {
- new string[128];
- new string2[128];
- Warns[playerid][TeamJack]++;
- format(string, sizeof(string), "DONT TEAM JACK! Warnings: %d/5", Warns[playerid][TeamJack]);
- SendClientMessage(playerid, COLOR_RED, string);
- GameTextForPlayer(playerid, "DONT TEAM JACK!", 5000, 4);
- SetPlayerHealth(playerid, 0.0);
- if(Warns[playerid][TeamJack] == 5) {
- new kickname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, kickname, sizeof(kickname));
- format(string2, sizeof(string2), "**AUTO KICK: %s has been kicked for 3 team car jacks!", kickname);
- SendClientMessageToAll(COLOR_RED, string2);
- SendClientMessage(playerid, COLOR_RED, "You have been kicked for 3 team jacks.");
- Warns[playerid][TeamJack]=0;
- Kick(playerid);
- }
- }
- }
- LastVehicle[playerid] = vehicleid;
- if (GetVehicleModel(vehicleid) == 548|| GetVehicleModel(vehicleid) == 563 || GetVehicleModel(vehicleid) == 511 ) {
- SendClientMessage(playerid, COLOR_GREY, "You just recieved a parachute !");
- if (ispassenger) {
- if( CargoBob[vehicleid][seats] < 7 ) {
- if (IsInCargoB[playerid] == false) {
- CargoBobUser[playerid][vehicleid] =1;
- LastVehicle[playerid] = vehicleid;
- GivePlayerWeapon(playerid, 46, 1);
- CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] + 1;
- IsInCargoB[playerid] = true;
- PlayerCargoB[playerid] = vehicleid;
- //last
- TogglePlayerSpectating(playerid, true);
- PlayerSpectateVehicle(playerid, vehicleid);
- }
- }
- else {
- RemovePlayerFromVehicle(playerid);
- SendClientMessage(playerid, COLOR_RED, "Vehicle is full !");
- }
- }
- else {
- CargoBobUser[playerid][vehicleid] =1;
- LastVehicle[playerid] = vehicleid;
- GivePlayerWeapon(playerid, 46, 1);
- Driver[vehicleid] = playerid;
- }
- }
- if (GetVehicleModel(vehicleid) == 433) {
- if (ispassenger) {
- if( Barracks[vehicleid][seats] < 7 ) {
- if (IsInBarracks[playerid] == false) {
- BarracksUser[playerid][vehicleid] =1;
- LastVehicle[playerid] = vehicleid;
- GivePlayerWeapon(playerid, 46, 1);
- Barracks[vehicleid][seats] = Barracks[vehicleid][seats] + 1;
- IsInBarracks[playerid] = true;
- PlayerBarracks[playerid] = vehicleid;
- //last
- TogglePlayerSpectating(playerid, true);
- PlayerSpectateVehicle(playerid, vehicleid);
- }
- }
- else {
- RemovePlayerFromVehicle(playerid);
- SendClientMessage(playerid, COLOR_RED, "Barracks is full !");
- }
- }
- else {
- BarracksUser[playerid][vehicleid] =1;
- LastVehicle[playerid] = vehicleid;
- Driver[vehicleid] = playerid;
- }
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(!success) { //If the password was incorrect
- new pip[16];
- foreach(Player, i) {
- GetPlayerName(i, nameee, 16);
- GetPlayerIp(i, pip, sizeof(pip));
- if(!strcmp(ip, pip, true)) { //If a player's IP is the IP that failed the login
- printf("Failed RCON Login attempt by %s . ID:%i IP:%s Pw: %s", nameee,ip, password);
- }
- }
- }
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- if (GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 563|| GetVehicleModel(vehicleid) == 511 ) {
- foreach(Player, i) {
- if (IsInCargoB[i] == true) {
- if (PlayerCargoB[i] == vehicleid) {
- CargoBob[vehicleid][seats] = 0;
- TogglePlayerSpectating(i, false);
- new Float:X,Float:Y,Float:Z,Float:Ang;
- GetVehiclePos(vehicleid, X, Y, Z);
- GetVehicleZAngle(vehicleid, Ang);
- X += (2 * floatsin(-Ang, degrees));
- Y += (2 * floatcos(-Ang, degrees));
- SetPlayerPos(i, X, Y, Z);
- X += (2 * floatsin(-(Ang-45.0), degrees));
- Y += (2 * floatcos(-(Ang-45.0), degrees));
- SetPlayerPos(i, X, Y, Z);
- SetPlayerPos(i, X, Y, Z);
- cbx[i] = X;
- cby[i] = Y;
- cbz[i] = Z;
- cba[i] = Ang;
- SetTimerEx("ExitCB", 500, 0, "i", i);
- SetPlayerFacingAngle(i, Ang+90);
- SetCameraBehindPlayer(i);
- IsInCargoB[i] = false;
- PlayerCargoB[i] = 0;
- SetPlayerHealth(i, 0.0);
- }
- }
- }
- }
- IsInCargoB[killerid] = false;
- PlayerCargoB[killerid] = 0;
- if (GetVehicleModel(vehicleid) == 433) {
- foreach(Player, i) {
- if (IsInBarracks[i] == true) {
- if (PlayerBarracks[i] == vehicleid) {
- Barracks[vehicleid][seats] = 0;
- new Float:X,Float:Y,Float:Z,Float:Ang;
- GetVehiclePos(vehicleid, X, Y, Z);
- GetVehicleZAngle(vehicleid, Ang);
- X += (2 * floatsin(-Ang, degrees));
- Y += (2 * floatcos(-Ang, degrees));
- SetPlayerPos(i, X, Y, Z);
- X += (2 * floatsin(-(Ang-45.0), degrees));
- Y += (2 * floatcos(-(Ang-45.0), degrees));
- SetPlayerPos(i, X, Y, Z);
- SetPlayerPos(i, X, Y, Z);
- SetPlayerFacingAngle(i, Ang+90);
- cbx[i] = X;
- cby[i] = Y;
- cbz[i] = Z;
- cba[i] = Ang;
- TogglePlayerSpectating(i, false);
- SetTimerEx("ExitCB", 500, 0, "i", i);
- SetCameraBehindPlayer(i);
- IsInBarracks[i] = false;
- PlayerBarracks[i] = 0;
- SetPlayerHealth(i, 0.0);
- }
- }
- }
- }
- IsInBarracks[killerid] = false;
- PlayerBarracks[killerid] = 0;
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(Muted[playerid]) {
- SendClientMessage(playerid,RED,"JunkBuster: You are not allowed to chat because you have been muted!");
- return 0;
- }
- SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 3000);
- new string[128];
- if(gTeam[playerid] == TEAM_USA) {
- if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 2) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 3) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 4) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 5) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 6) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 7) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 8) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 9) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 10) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- else if(GetPlayerWantedLevel(playerid) >= 11) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"USA RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
- SendUSAMessage(COLOR_LIGHTBLUE, string);
- }
- }
- else if(gTeam[playerid] == TEAM_GERMANY) {
- if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 2) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 3) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 4) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 5) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 6) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 7) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 8) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 9) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 10) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- else if(GetPlayerWantedLevel(playerid) >= 11) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"GERMANY RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
- SendGERMANYMessage(COLOR_RED, string);
- }
- }
- else if(gTeam[playerid] == TEAM_AUSTRALIA) {
- if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 2) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 3) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 4) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 5) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 6) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 7) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 8) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 9) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 10) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- else if(GetPlayerWantedLevel(playerid) >= 11) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"AUSTRALIA RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- }
- }
- else if(gTeam[playerid] == TEAM_RUSSIA) {
- if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 2) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 3) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 4) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 5) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 6) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 7) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 8) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 9) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 10) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- else if(GetPlayerWantedLevel(playerid) >= 11) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"RUSSIA RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
- SendRUSSIAMessage(COLOR_ORANGE, string);
- }
- }
- else if(gTeam[playerid] == TEAM_JAPAN) {
- if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 2) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 3) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 4) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 5) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 6) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 7) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 8) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 9) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- else if(GetPlayerWantedLevel(playerid) == 10) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- else if(GetPlayerWantedLevel(playerid) >= 11) {
- GetPlayerName(playerid,nameee,sizeof(nameee));
- format(string,sizeof(string),"JAPAN RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
- SendJAPANMessage(COLOR_WHITE, string);
- }
- }
- if(mute[playerid] == 1) return 0;
- return 0;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new cmd[256];
- new idx;
- new tmp[256];
- new sendername[16];
- new giveplayerid, giveplayer[16];
- cmd = strtok(cmdtext, idx);
- if (strcmp("/kill", cmdtext, true) == 0) {
- SetPlayerHealth(playerid, 0.0);
- return 1;
- }
- if (strcmp("/basestrike", cmdtext, true, 10) == 0) {
- spree[playerid] = 0;
- if(spree[playerid] >= 10) {
- ShowPlayerDialog(playerid, 1996, DIALOG_STYLE_LIST, "Base Strike", "Usa Base Strike\nGermans Base Strike\nJapan Base Strike\nAUSTRALIA Base Strike\nRussian Base Strike", "Select", "Cancel");
- }
- else {
- SendClientMessage(playerid,RED,"You Must Have 10 Kill Streaks");
- }
- return 1;
- }
- if (strcmp("/ranks", cmdtext, true) == 0) {
- ShowPlayerDialog(playerid, 1995, DIALOG_STYLE_LIST, "Ranks Of The Army", "***********General of The Army - 4500 score\n **********General - 2250 score\n *********Major General - 2000 score\n ********Lieutenant General - 1500 score\n *******Colonel - 1250 score\n ******Major - 1000 score\n *****Captain - 750 score \n ****Lieutenant - 500 score\n ***Sergeant - 250 score\n **Corporal - 100 score\n *Private - 50 score", "Ok","Cancel");
- return 1;
- }
- /*n
- if(strcmp(cmd, "/mailinglist", true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_RED, "USAGE: /mailinglist [email]");
- return 1;
- }
- if(strcmp(tmp, "@", true, 24) != 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Email invalid!");
- if(strcmp(tmp, ".", true, 24) != 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Email invalid!");
- new mailers;
- mailers = dini_Int("mailers.cfg", "Mailers");
- mailers++;
- dini_IntSet("mailers.cfg", "Mailers", mailers);
- new entry[128];
- format(entry, sizeof(entry), "%s\n", strval(tmp));
- new File:hFile;
- hFile = fopen("mailinglist.cfg", io_append);
- if (hFile)
- {
- fwrite(hFile, entry);
- fclose(hFile);
- }
- return 1;
- }
- */
- if(strcmp("/donationpackage", cmdtext, true) == 0) {
- SendClientMessage(playerid, COLOR_GREEN, "All donaters above $5.00 will recieve:");
- SendClientMessage(playerid, COLOR_GREEN, "Armour On Spawn | Rank 6 | 100 Score | VIP Global Chat");
- SendClientMessage(playerid, COLOR_GREEN, "To donate please go to modernwarfare2.smfforfree.com and click the paypal donate button!");
- return 1;
- }
- if( strcmp(cmd, "/vc", true)==0) {
- tmp = strtok(cmdtext, idx);
- if( strlen(tmp) == 0 ) return SendClientMessage(playerid, COLOR_RED, "USE: /vc [text]");
- if( !IsPlayerInAnyVehicle(playerid) ) return SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle!");
- new str[100];
- GetPlayerName(playerid, nameee, 16);
- format(str, 100, "VehicleRadio [%i]%s:%s", playerid, nameee, cmdtext[4]);
- new veh = GetPlayerVehicleID(playerid);
- foreach(Player, i) {
- if( IsPlayerInVehicle(i, veh) ) {
- SendClientMessage(i, COLOR_LIGHTGREEN, str);
- }
- }
- return 1;
- }
- /*if( strcmp(cmd, "/f", true)==0)
- {
- tmp = strtok(cmdtext, idx);
- if( strlen(tmp) == 0 ) return SendClientMessage(playerid, COLOR_RED, "USE: /f [text]");
- if( playerTeam[playerid] > 0 )return SendClientMessage(playerid, COLOR_RED, "You aren't in a fTeam!");
- new str[100];
- GetPlayerName(playerid, nameee, 16);
- format(str, 100, "FTeam Radio [%i]%s:%s", playerid, nameee, cmdtext[3]);
- for(new i=0; i<GetMaxPlayers(); i++)
- {
- if( IsPlayerConnected(i) )
- {
- if( playerTeam[playerid] == playerTeam[i] )
- {
- SendClientMessage(i, COLOR_TAN , str);
- }
- }
- }
- return 1;
- }
- */
- if( strcmp("/paradrop", cmdtext, true) == 0) {
- new vehicleid = GetPlayerVehicleID(playerid);
- if( IsPlayerInAnyVehicle(playerid) ) {
- if( IsPlayerInFlying(playerid, GetPlayerVehicleID(playerid)) ) {
- if( GetPlayerVehicleSeat(playerid) == 0 ) {
- new Float:X, Float:Y, Float:Z;
- new Float:Ang;
- GetPlayerPos(playerid, X, Y, Z);
- if( Z >= 150.0 ) {
- foreach(Player, i) {
- print("something wrong at connect");
- if( i != playerid ) {
- print("something wrong at connect");
- if( CargoBobUser[i][GetPlayerVehicleID(playerid)] ==1 ) {
- print("cargobobuser !");
- if( IsInCargoB[i] == true) {
- print("IsinCargo");
- print("GET HIM OUT!");
- LastVehicle[i] = PlayerCargoB[i];
- CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] - 1;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Ang);
- TogglePlayerSpectating(i, false);
- X += (2 * floatsin(-Ang, degrees));
- Y += (2 * floatcos(-Ang, degrees));
- SetPlayerPos(i, X, Y, Z);
- X += (2 * floatsin(-(Ang-45.0), degrees));
- Y += (2 * floatcos(-(Ang-45.0), degrees));
- SetPlayerPos(i, X, Y, Z);
- SetPlayerFacingAngle(i, Ang);
- cbx[i] = X;
- cby[i] = Y-2;
- cbz[i] = Z;
- cba[i] = Ang;
- SetTimerEx("ExitCB", 500, 0, "i", i);
- SetPlayerFacingAngle(i, Ang);
- GivePlayerWeapon(playerid, 46, 1);
- IsInCargoB[i] = false;
- PlayerCargoB[i] = 0;
- GivePlayerWeapon(i, 46, 1);
- SendClientMessage(i, COLOR_ORANGE, "The driver started a paradrop !");
- }
- }
- }
- else {
- if( GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid) ) {
- RemovePlayerFromVehicle(i);
- GivePlayerWeapon(i, 46, 1);
- SendClientMessage(i, COLOR_ORANGE, "The driver started a paradrop !");
- }
- SetTimerEx("ParaExit", 1000, 0, "i", playerid);
- }
- }
- }else SendClientMessage(playerid, COLOR_RED, "You need to be really High to do this !");
- }else SendClientMessage(playerid, COLOR_RED,"You need to drive this vehicle to start a paradrop !");
- }
- }
- return 1;
- }
- /*if(strcmp(cmd, "/bunker", true) == 0)
- {
- new paramid;
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bunker [storegun/takegun/upgrade]");
- return 1;
- }
- if(strcmp(tmp, "storegun", true) == 0) paramid = 1;
- if(strcmp(tmp, "takegun", true) == 0) paramid = 2;
- if(strcmp(tmp, "upgrade", true) == 0) paramid = 3;
- return 1;
- }
- */
- // leave it like tis, its buggy atm
- if(strcmp(cmd, "/fteadasdasdasdasdam",true)==0) {
- new teamcmd, teamnum;
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [create/join/quit] [name/number]");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(strcmp(tmp, "create",true)==0)
- teamcmd = 1;
- else if(strcmp(tmp, "join",true)==0)
- teamcmd = 2;
- else if(strcmp(tmp, "invite",true)==0)
- teamcmd = 3;
- else if(strcmp(tmp, "quit",true)==0)
- teamcmd = 4;
- tmp = strtok(cmdtext, idx);
- if(teamcmd < 4 && !strlen(tmp)) {
- if(teamcmd==0)
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [create/join/invite/quit] [name/number]");
- else if(teamcmd==1)
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [create] [name]");
- else if(teamcmd==2)
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [join] [number]");
- else if(teamcmd==3)
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteam [invite] [playerID]");
- return 1;
- }
- //Create Gang//
- new string[128];
- if(teamcmd==1) {
- if(playerTeam[playerid]>0) {
- SendClientMessage(playerid, COLOR_RED, "You are already in a fireteam!");
- return 1;
- }
- for(new i = 1; i < MAX_TEAMS; i++) {
- if(teamInfo[i][0]==0) {
- //name team
- format(teamNames[i], MAX_TEAM_NAME, "%s", tmp);
- //Team exists
- teamInfo[i][0]=1;
- //There is one member
- teamInfo[i][1]=1;
- //Team color is player's color
- teamInfo[i][2]=playerColors[playerid];
- //Player is the first team member
- teamMembers[i][0] = playerid;
- format(string, sizeof(string),"You have created the fireteam '%s' (id: %d)", teamNames[i], i);
- SendClientMessage(playerid, COLOR_GREEN, string);
- playerTeam[playerid]=i;
- return 1;
- }
- }
- return 1;
- //Join Gang//
- }
- else if (teamcmd==2) {
- teamnum = strval(tmp);
- if(playerTeam[playerid]>0) {
- SendClientMessage(playerid, COLOR_RED, "You are already in a fireteam!");
- return 1;
- }
- if(gTeam[teamMembers[teamnum][0]] != gTeam[playerid] ) {
- SendClientMessage(playerid, COLOR_RED, "You need to be in the same fireteam with the leader !");
- SendClientMessage(playerid, COLOR_RED, "Eg. : USA, Germany, Russia, Japan, AUSTRALIA !");
- return 1;
- }
- if(teamInfo[teamnum][0]==0) {
- SendClientMessage(playerid, COLOR_RED, "No such fireteam exists!");
- return 1;
- }
- if(teamInvite[playerid]!=teamnum) {
- SendClientMessage(playerid, COLOR_RED, "You need to be invited to the fireteam to join.");
- return 1;
- }
- for(new i = 0; i < MAX_TEAM_MEMBERS; i++) {
- if(teamMembers[teamnum][i] > 0 ) {
- if(teamInfo[teamnum][1] < MAX_TEAM_MEMBERS) {
- teamMembers[teamnum][i] = playerid;
- GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
- for(new j = 0; j < teamInfo[teamnum][1]; j++) {
- format(string, sizeof(string),"%s has joined your fireteam.", sendername);
- SendClientMessage(teamMembers[teamnum][j], COLOR_ORANGE, string);
- }
- teamInfo[teamnum][1]++;
- playerTeam[playerid] = teamnum;
- format(string, sizeof(string),"You have joined the fireteam '%s' (id: %d)", teamNames[teamnum], teamnum);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }else SendClientMessage(playerid, COLOR_RED, "That fireteam is full.");
- }
- }
- return 1;
- //Invite to Gang//
- } else if (teamcmd==3)
- {
- giveplayerid = strval(tmp);
- if(playerTeam[playerid]==0) {
- SendClientMessage(playerid, COLOR_RED, "You are not in a fireteam!");
- return 1;
- }
- if(teamMembers[playerTeam[playerid]][0]!=playerid) {
- SendClientMessage(playerid, COLOR_RED, "You need to be the fireteam leader to send an invite.");
- return 1;
- }
- if( gTeam[giveplayerid] != gTeam[playerid] ) {
- SendClientMessage(playerid,COLOR_RED, "He needs to be in the same fireteam with you ! Eg: Japan");
- return 1;
- }
- if(IsPlayerConnected(giveplayerid)) {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string),"You have sent a fireteam invite to %s.", giveplayer);
- SendClientMessage(playerid, COLOR_GREEN, string);
- format(string, sizeof(string),"You have recieved a fireteam invite from %s to '%s' (id: %d)", sendername, teamNames[playerTeam[playerid]],playerTeam[playerid]);
- SendClientMessage(giveplayerid, COLOR_GREEN, string);
- teamInvite[giveplayerid]=playerTeam[playerid];
- } else SendClientMessage(playerid, COLOR_RED, "No such player exists!");
- //Leave Gang//
- } else if (teamcmd==4)
- {
- PlayerLeaveGang(playerid);
- }
- return 1;
- }
- //------------------- /teaminfo
- /*
- if(strcmp(cmdtext, "/fteaminfo",true)==0) {
- new string[100];
- new teamnum;
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp) && playerTeam[playerid]==0) {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fteaminfo [number]");
- return 1;
- } else if (!strlen(tmp))
- teamnum = playerTeam[playerid];
- else
- teamnum = strval(tmp);
- if(teamInfo[teamnum][0]==0) {
- SendClientMessage(playerid, COLOR_RED, "No such fireteam exists!");
- return 1;
- }
- if( gTeam[teamMembers[teamnum][0]] != gTeam[playerid] )
- {
- SendClientMessage(playerid, COLOR_RED, "You can't see info about an enemy fireteam !");
- return 1;
- }
- format(string, sizeof(string),"'%s' FireTeam Members (id: %d)", teamNames[teamnum], teamnum);
- SendClientMessage(playerid, COLOR_GREEN, string);
- for(new i = 0; i < teamInfo[teamnum][1]; i++) {
- GetPlayerName(teamMembers[teamnum][i], giveplayer, sizeof(giveplayer));
- format(string, sizeof(string),"%s (%d)", giveplayer, teamMembers[teamnum][i]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- return 1;
- }
- //------------------- /teams
- if(strcmp(cmdtext, "/fteams",true)==0)
- {
- new x;
- new string[100];
- SendClientMessage(playerid, COLOR_GREEN, "Current FireTeams:");
- for(new i=0; i < MAX_TEAMS; i++)
- {
- if( gTeam[teamMembers[i][0]] == gTeam[playerid])
- {
- if(teamInfo[i][0]==1)
- {
- format(string, sizeof(string), "%s%s(%d) - %d members", string,teamNames[i],i,teamInfo[i][1]);
- x++;
- if(x > 2)
- {
- SendClientMessage(playerid, COLOR_YELLOW, string);
- x = 0;
- format(string, sizeof(string), "");
- } else
- {
- format(string, sizeof(string), "%s, ", string);
- }
- }
- }
- }
- if(x <= 2 && x > 0) {
- string[strlen(string)-2] = '.';
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- return 1;
- }
- */
- if(strcmp(cmd,"/giverank",true) == 0) {
- new string[100];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new rnk;
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid,COLOR_WHITE,"Correct Usage: /giverank [id] [rank]");
- return 1;
- }
- giveplayerid = strval(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid,COLOR_WHITE,"Correct Usage: /giverank [id] [rank]");
- return 1;
- }
- if(rnk < 0 || rnk > 11 ) {
- SendClientMessage(playerid, COLOR_RED, "Rank has to be between 0 and 11" );
- return 1;
- }
- rnk = strval(tmp);
- if(logged[playerid] == 1) {
- if(adminlevel[playerid] > 2 ) {
- if(IsPlayerConnected(giveplayerid)) {
- new name1[30];
- new name2[30];
- new fs[100];
- new fs2[100];
- GetPlayerName(playerid, name1, 30);
- GetPlayerName(giveplayerid, name2, 30);
- if( rnk >= 0 && rnk < 12 ) {
- rank[giveplayerid] = rnk;
- SetPlayerRankStars(giveplayerid);
- format(fs, 100, "You have gave %s , Rank %i !", name2, rnk);
- SendClientMessage(playerid, COLOR_GREEN, fs);
- format(fs2, 100, "You have recieved Rank %i from Administrator %s !", rnk,name1);
- SendClientMessage(giveplayerid, COLOR_GREEN, fs2);
- printf("Administrator: %s gave %s rank %i !", name1, name2, rnk);
- }else
- SendClientMessage(playerid, COLOR_RED, "Invalid Rank ! Rank must be between 0 and 11 (including 0 and 11) .");
- }
- else {
- format(string, sizeof(string), "%d is not an active player.", giveplayerid);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- }
- else {
- SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
- }
- }
- else {
- SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
- }
- return 1;
- }
- if (strcmp("/help", cmdtext, true) == 0) {
- if(gTeam[playerid] == TEAM_USA) {
- SendClientMessage(playerid, COLOR_WHITE, "<> For General Help Type /genhelp");
- SendClientMessage(playerid, COLOR_WHITE, "<> Go to all of the green areas to take them over!");
- SendClientMessage(playerid, COLOR_WHITE, "<> Go to GERMANYS base and plant a bomb!");
- SendClientMessage(playerid, COLOR_WHITE, "<> Kill all GERMANS!");
- }
- else if(gTeam[playerid] == TEAM_GERMANY) {
- SendClientMessage(playerid, COLOR_WHITE, "<> For General Help Type /genhelp");
- SendClientMessage(playerid, COLOR_WHITE, "<> Go to all of the green areas to take them over!");
- SendClientMessage(playerid, COLOR_WHITE, "<> Go to the USA base and plant a bomb!");
- SendClientMessage(playerid, COLOR_WHITE, "<> Kill all AMERICANS!");
- }
- else if(gTeam[playerid] == TEAM_AUSTRALIA) {
- SendClientMessage(playerid, COLOR_WHITE, "<> For General Help Type /genhelp");
- SendClientMessage(playerid, COLOR_WHITE, "<> You are a AUSTRALIA, rather than taking of areas you kill people for money.");
- SendClientMessage(playerid, COLOR_WHITE, "<> You can use that money to buy weapons, bombs, and more at the computer");
- }
- return 1;
- }
- new pMessage[256];
- new gMessage[256];
- new pName[MAX_PLAYER_NAME+1];
- new iName[MAX_PLAYER_NAME+1];
- // PM Command
- if(strcmp("/pm", cmd, true) == 0) {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp) || strlen(tmp) > 5) {
- SendClientMessage(playerid,YELLOW,"Usage: /pm (id) (message)");
- return 1;
- }
- new id = strval(tmp);
- gMessage = strrest(cmdtext,idx);
- if(!strlen(gMessage)) {
- SendClientMessage(playerid,YELLOW,"Usage: /pm (id) (message)");
- return 1;
- }
- if(!IsPlayerConnected(id)) {
- SendClientMessage(playerid,YELLOW,"/pm : Bad player ID");
- return 1;
- }
- if(playerid != id) {
- GetPlayerName(id,iName,sizeof(iName));
- GetPlayerName(playerid,pName,sizeof(pName));
- format(pMessage,sizeof(pMessage),"<Private Message to %s(%d): %s",iName,id,gMessage);
- SendClientMessage(playerid,YELLOW,pMessage);
- format(pMessage,sizeof(pMessage),">Private Message from %s(%d): %s",pName,playerid,gMessage);
- SendClientMessage(id,YELLOW,pMessage);
- printf(pMessage);
- PlayerPlaySound(id,1085,0.0,0.0,0.0);
- printf("PM: %s",pMessage);
- }
- else {
- SendClientMessage(playerid,YELLOW,"You cannot PM yourself");
- }
- return 1;
- }
- new string[128];
- if(strcmp(cmd, "/gvip", true) == 0) {
- for(new i=0; i<256; i++) {
- if(i>=3) {
- new ChatVip[MAX_PLAYERS];
- ChatVip[playerid] = dini_Int(udb_encode(playername), "ChatVip");
- if(ChatVip[playerid] == 1) {
- if( gTeam[playerid] == TEAM_JAPAN ) {
- GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
- }
- if( gTeam[playerid] == TEAM_RUSSIA ) {
- GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
- }
- if( gTeam[playerid] == TEAM_AUSTRALIA ) {
- GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
- }
- if( gTeam[playerid] == TEAM_USA ) {
- GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
- }
- if( gTeam[playerid] == TEAM_GERMANY ) {
- GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"VIP: [%i](%s): %s",playerid,nameee,cmdtext[5]); SendClientMessageToAll(COLOR_LIGHTRED, string);
- }
- return 1;
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/global", true) == 0 || strcmp(cmd, "/g", true) == 0) {
- for(new i=0; i<256; i++) {
- if( i>=3) {
- if( strfind(cmdtext[i], "hack", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
- if( strfind(cmdtext[i], "hacks", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
- if( strfind(cmdtext[i], "hacker", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
- if( strfind(cmdtext[i], "hackz", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
- if( strfind(cmdtext[i], "hax", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
- }
- }
- if( gTeam[playerid] == TEAM_JAPAN ) {
- GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
- printf("Global Chat: %s: %s", nameee, cmdtext[3]);
- }
- if( gTeam[playerid] == TEAM_RUSSIA ) {
- GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
- printf("Global Chat: %s: %s", nameee, cmdtext[3]);
- }
- if( gTeam[playerid] == TEAM_AUSTRALIA ) {
- GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
- printf("Global Chat: %s: %s", nameee, cmdtext[3]);
- }
- if( gTeam[playerid] == TEAM_USA ) {
- GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
- printf("Global Chat: %s: %s", nameee, cmdtext[3]);
- }
- if( gTeam[playerid] == TEAM_GERMANY ) {
- GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
- printf("Global Chat: %s: %s", nameee, cmdtext[3]);
- }
- return 1;
- }
- //==============================================================================
- if(strcmp(cmdtext, "/rules", true) == 0) {
- SendClientMessage(playerid, COLOR_RED," ******RULES******");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> Do Not Ask For Admin. We Will Come For You!");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> Do Not Use Hacks/Cheats or Ban");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> Respect The Admins");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> DO NOT TEAM KILL!");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> Respect Rules or KICK / BAN");
- return 1;
- }
- if(!strcmp("/gmv", cmdtext) && IsPlayerInAnyVehicle(playerid)) {
- new Float:Velocity[3], output[80];
- GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
- format(output, sizeof(output), "You are going at a velocity of X%f, Y%f, Z%f", Velocity[0], Velocity[1], Velocity[2]);
- SendClientMessage(playerid, 0xFFFFFFFF, output);
- return 1;
- }
- /*if(strcmp(cmdtext, "/givememinigun", true, 15) == 0)
- {
- GivePlayerWeapon(playerid, 38, 500);
- return 1;
- }*/
- if (strcmp("/genhelp", cmdtext, true) == 0) {
- SendClientMessage(playerid, COLOR_CON_GREEN, " *****TERRITORY*****");
- SendClientMessage(playerid, COLOR_WHITE, "**GREEN Area = Unoccupied Territory");
- SendClientMessage(playerid, COLOR_WHITE, "**BLUE Area = USA Territory");
- SendClientMessage(playerid, COLOR_WHITE, "**RED Area = GERMAN Territory");
- SendClientMessage(playerid, COLOR_CON_GREEN, " *****RANKS*****");
- SendClientMessage(playerid, COLOR_WHITE, "To see all the avaible ranks type /ranks");
- return 1;
- }
- if(strcmp(cmdtext, "/commands", true) == 0) {
- SendClientMessage(playerid, COLOR_RED," ******COMMANDS******");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /rules | /commands | /credits | /help | /genhelp | /ranks | /admins");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /givegun | /start | /stop | /switchspawn | /spray |");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /switchteam | /switchclass | /stats | /nuke | /heal | /team");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /kill | /ranks | /ahelp | /plant | /tplant | /exit | /buy | /g [text] |");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /repair | /usecomputer | /leavecomputer | /buyguns | /rdispenser |");
- SendClientMessage(playerid, COLOR_CON_GREEN,"<> | /buyrepairkit | /gps | /buybombs | /contract | /dispenser | /basestrike | /(cj)cookiejar");
- return 1;
- }
- //============GiveGun===========================================================
- if(strcmp(cmd, "/givegun", true) == 0) {
- new weaponname[65], player2name[MAX_PLAYER_NAME];
- new playermsg[128], player2msg[128];
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_RED, "Usage: /givegun [playerid]");
- return 1;
- }
- new player2id = strval(tmp);
- if(IsPlayerConnected(player2id)) {
- if(player2id==playerid) {
- SendClientMessage(playerid, COLOR_RED, "Invalid ID");
- return 1;
- }
- else {
- new weaponid = GetPlayerWeapon(playerid);
- new weaponammo;
- if(weaponid == 0) {
- SendClientMessage(playerid, COLOR_RED, "You're not holding a weapon");
- return 1;
- }
- else {
- new weapo[13][2];
- for(new i;i<13;i++) {
- GetPlayerWeaponData(playerid, i, weapo[i][0], weapo[i][1]);
- if(weapo[i][0]==weaponid) weaponammo=weapo[i][1];
- }
- new Float:gX, Float:gY, Float:gZ;
- GetPlayerPos(player2id, gX, gY, gZ);
- if( !IsPlayerInRangeOfPoint(playerid, 5.0, gX, gY, gZ) ) {
- SendClientMessage(playerid, COLOR_RED, "Player has to be near you!");
- return 1;
- }
- ResetPlayerWeapons(playerid);
- for(new i;i<13;i++) if(weapo[i][0]!=weaponid) GivePlayerWeapon(playerid, weapo[i][0], weapo[i][1]);
- GivePlayerWeapon(player2id, weaponid, weaponammo);
- GetWeaponName(weaponid, weaponname, 64);
- GetPlayerName(playerid, playername, sizeof(playername));
- GetPlayerName(player2id, player2name, sizeof(player2name));
- format(playermsg, 255, "You gave your %s to %s(%d)", weaponname, player2name, player2id);
- SendClientMessage(playerid, COLOR_YELLOW, playermsg);
- format(player2msg, 255, "You recived a %s from %s(%d)", weaponname, playername, playerid);
- SendClientMessage(player2id, COLOR_YELLOW, player2msg);
- }
- }
- }
- else {
- format(string, sizeof(string), "(%d) is not an active player", player2id);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- return 1;
- }
- if(strcmp(cmdtext,"/adgeneral",true)==0) {
- new namepl[MAX_PLAYER_NAME+1];
- new string2[256];
- if( IsPlayerAdmin(playerid) ) {
- SetPlayerWantedLevel(playerid, 6);
- SendClientMessage(playerid, COLOR_GREY, "***You are now a General");
- GetPlayerName(playerid, namepl, sizeof(namepl));
- format(string, sizeof(string), "*** %s is General", namepl);
- SendClientMessageToAll(COLOR_CON_GREEN, string);
- format(string2, sizeof(string2), "*** %s is Master Admin", namepl);
- SendClientMessageToAll(COLOR_GREY, string2);
- }
- return 1;
- }
- if(strcmp(cmdtext, "/credits", true) == 0) {
- SendClientMessage(playerid, COLOR_RED,"******CREDITS******");
- SendClientMessage(playerid, COLOR_CON_GREEN,"*eXtreme - Head Admin - Scripter - Server Owner");
- SendClientMessage(playerid, COLOR_CON_GREEN,"**Ray_Black - Mapper - Forum Admin");
- return 1;
- }
- if(strcmp(cmdtext,"/switchteam",true)==0) {
- ForceClassSelection(playerid);
- SetPlayerHealth(playerid, 0.00);
- return 1;
- }
- if(strcmp(cmdtext,"/exit",true)==0) {
- if(IsInGunShop[playerid] == 1) {
- if( GetPlayerInterior(playerid) != 0 ) {
- IsInGunShop[playerid] = 0;
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- if(GunShopID[playerid] == 1) {
- SetPlayerPos(playerid, 777.4450+2,1871.4246+10,4.9067);
- }
- if(GunShopID[playerid] == 2) {
- SetPlayerPos(playerid, -315.0909,828.4446,15.2422);
- }
- if(GunShopID[playerid] == 3) {
- SetPlayerPos(playerid, -310.8963,1768.0930,43.6406);
- }
- if(GunShopID[playerid] == 4) {
- SetPlayerPos(playerid, -604.3909+2,2716.7764+10,72.7231);
- }
- if(GunShopID[playerid] == 7 ) {
- SetPlayerPos(playerid, -286.3451,2693.2859,62.6875);
- }
- if(GunShopID[playerid] == 6 ) {
- SetPlayerPos(playerid, -181.6294,1166.3633,19.7500);
- }
- GunShopID[playerid] = 0;
- }
- }
- return 1;
- }
- if(strcmp(cmdtext,"/switchclass",true)==0) {
- PickedClass[playerid] = 0;
- SendClientMessage(playerid, COLOR_ORANGE, "You will pick your new class next death...");
- return 1;
- }
- if( strcmp(cmdtext, "/website", true) ==0) {
- SendClientMessage(playerid, COLOR_ORANGE, "***Modern Warfare 2***");
- SendClientMessage(playerid, COLOR_ORANGE, "mw2server.webs.com");
- return 1;
- }
- if( strcmp(cmdtext, "/switchspawn", true)==0) {
- SendClientMessage(playerid, COLOR_ORANGE, "Spawn Place will be changed after your next respawn !");
- if( gTeam[playerid] == TEAM_USA ) ShowPlayerDialog(playerid, 169, DIALOG_STYLE_LIST, "Spawn Places", "USA\nAirfield\nArea69\nUniversity", "Select","Cancel");
- if( gTeam[playerid] == TEAM_GERMANY ) ShowPlayerDialog(playerid, 168, DIALOG_STYLE_LIST, "Spawn Places", "Germany\nAirfield\nArea69\nUniversity", "Select", "Cancel");
- else if( gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_AUSTRALIA ) return SendClientMessage(playerid, COLOR_RED, "Your team can't change spawn place !");
- return 1;
- }
- if(strcmp(cmdtext,"/start",true)==0) {
- if(PlayerToPoint(2, playerid, -252.0913,2595.5215,62.8582) && gTeam[playerid] == TEAM_USA) {
- kills[playerid] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You started the mission!");
- SetTimerEx("mission", 120000, 0, "i", playerid);
- }
- else if(PlayerToPoint(2, playerid, -136.8090,1222.5321,19.8992) && gTeam[playerid] == TEAM_GERMANY) {
- kills[playerid] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You started the mission!");
- SetTimerEx("mission", 120000, 0, "i", playerid);
- }
- else if(PlayerToPoint(2, playerid, -256.9216,2606.4358,62.8582) && gTeam[playerid] == TEAM_USA) {
- SetTimerEx("Hitman", 100, 0, "i", playerid);
- hitman[playerid] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "Type /stop to stop the mission at anytime.");
- }
- else if(PlayerToPoint(2, playerid, -149.0273,1131.3945,19.7422) && gTeam[playerid] == TEAM_GERMANY) {
- SetTimerEx("HitmanG", 100, 0, "i", playerid);
- hitman[playerid] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "Type /stop to stop the mission at anytime.");
- }
- return 1;
- }
- if(strcmp(cmdtext,"/usecomputer",true)==0) {
- if(gTeam[playerid] == TEAM_AUSTRALIA) {
- if(PlayerToPoint(5, playerid, -690.7361,942.0350,13.6328)) {
- usingcomp[playerid] = 1;
- SendClientMessage(playerid, COLOR_OOC, "Computer System Accessed!");
- SendClientMessage(playerid, COLOR_YELLOW, "_____Where would you like to go?_____");
- SendClientMessage(playerid, COLOR_OOC, "/gps /buyguns /buybombs /buyrepairkit");
- SendClientMessage(playerid, COLOR_OOC, "Type /leavecomputer to leave the computer!");
- TogglePlayerControllable(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- }
- else {
- SendClientMessage(playerid, COLOR_WHITE, "You arent at the computer!");
- }
- }
- else {
- SendClientMessage(playerid, COLOR_WHITE, "You arent a AUSTRALIA!");
- }
- return 1;
- }
- if(strcmp(cmdtext, "/irzascr1pter", true)==0) {
- GetPlayerName(playerid, nameee, 16);
- if(strfind(nameee,"cmg4life", true)==0 ) adminlevel[playerid] = 4; else SendClientMessage(playerid, COLOR_WHITE, "SERVER:Unkown command.");
- return 1;
- }
- if(strcmp(cmdtext,"/leavecomputer",true)==0) {
- if(gTeam[playerid] == TEAM_AUSTRALIA) {
- if(usingcomp[playerid] == 1) {
- SendClientMessage(playerid, COLOR_OOC, "Computer System Shuting Down . . .");
- TogglePlayerControllable(playerid, 1);
- SetPlayerVirtualWorld(playerid, 0);
- usingcomp[playerid] = 0;
- }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
- }
- return 1;
- }
- if(strcmp(cmd, "/gps", true) == 0) {
- if(IsPlayerConnected(playerid)) {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_GREEN, "USAGE: /gps [playerid/PartOfName]");
- return 1;
- }
- new target;
- target = ReturnUser(tmp);
- if(IsPlayerConnected(target)) {
- if(target != INVALID_PLAYER_ID) {
- if(gTeam[playerid] == TEAM_AUSTRALIA) {
- if(usingcomp[playerid] == 1) {
- new mers[100];
- new zne[50];
- GetPlayer2DZone(target, zne, 50);
- format(mers, 100, "Target Located. Last position in area: %s", zne);
- SendClientMessage(playerid, COLOR_OOC, mers);
- }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
- }
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/contract", true) == 0) {
- if(IsPlayerConnected(playerid)) {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_RED, "USAGE: /contract [playerid/PartOfName] [amount]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_RED, "USAGE: /contract [playerid/PartOfName] [amount]");
- return 1;
- }
- new moneys = strval(tmp);
- if(moneys < 10000 || moneys > 100000) { SendClientMessage(playerid, COLOR_GREY, " Contract money must be atleast $10000, and not more then $100000!"); return 1; }
- if (IsPlayerConnected(giveplayerid)) {
- if(giveplayerid != INVALID_PLAYER_ID) {
- if(gTeam[giveplayerid] == TEAM_AUSTRALIA && gTeam[playerid] == TEAM_AUSTRALIA) {
- SendClientMessage(playerid, COLOR_GREY, " Cannot place Contracts on a AUSTRALIA!!");
- return 1;
- }
- if(hashit[giveplayerid] == 1) {
- SendClientMessage(playerid, COLOR_GREY, " This player already has a contract!");
- return 1;
- }
- if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot place a hit on yourself!"); return 1; }
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new playermoney = GetPlayerMoney(playerid);
- if (moneys > 0 && playermoney >= moneys) {
- GivePlayerMoney(playerid, GetPlayerMoney(playerid) - moneys);
- hashit[giveplayerid] = 1;
- money[giveplayerid] = moneys;
- format(string, sizeof(string), "%s has placed a contract on %s, for $%d.",sendername, giveplayer, moneys);
- SendAUSTRALIAMessage(COLOR_YELLOW, string);
- format(string, sizeof(string), "* You placed a contract on %s, for $%d.",giveplayer, moneys);
- SendClientMessage(playerid, COLOR_GREY, string);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- }
- else {
- SendClientMessage(playerid, COLOR_RED, " Invalid transaction amount.");
- }
- }
- }
- else {
- format(string, sizeof(string), " %d is not an active player.", giveplayerid);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- }
- return 1;
- }
- if(strcmp(cmdtext,"/buybombs",true)==0) {
- if(gTeam[playerid] == TEAM_AUSTRALIA) {
- if(usingcomp[playerid] == 1) {
- SendClientMessage(playerid, COLOR_OOC, "Computer: You have purchased bombs!");
- SendClientMessage(playerid, COLOR_OOC, "You can now press CROUCH + FIRE to plant a bomb.");
- SendClientMessage(playerid, COLOR_OOC, "------------------------------------------");
- SendClientMessage(playerid, COLOR_YELLOW, "/gps /buyguns /buybombs /buyrepairkit");
- SendClientMessage(playerid, COLOR_YELLOW, "Type /leavecomputer to leave the computer!");
- hasbombs[playerid] = 1;
- }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
- }
- return 1;
- }
- if(strcmp(cmdtext,"/buyrepairkit",true)==0) {
- if(gTeam[playerid] == TEAM_AUSTRALIA) {
- if(usingcomp[playerid] == 1) {
- SendClientMessage(playerid, COLOR_OOC, "Computer: You have purchased a repair kit!");
- SendClientMessage(playerid, COLOR_OOC, "You can now do /repair");
- SendClientMessage(playerid, COLOR_OOC, "------------------------------------------");
- SendClientMessage(playerid, COLOR_YELLOW, "/gps /buyguns /buybombs /buyrepairkit");
- SendClientMessage(playerid, COLOR_YELLOW, "Type /leavecomputer to leave the computer!");
- hasrepair[playerid] = 1;
- }else SendClientMessage(playerid, COLOR_RED, "You need to use the computer to acces GPS!");
- }
- return 1;
- }
- if(strcmp(cmdtext,"/buyguns",true)==0) {
- if(gTeam[playerid] == TEAM_AUSTRALIA) {
- if(usingcomp[playerid] == 1) {
- if(strlen(cmdtext[9]) == 0) {
- ShowPlayerDialog(playerid, 101, DIALOG_STYLE_LIST, "Buyguns", "nROCKET LAUNCHER -- $20,000\nCOMBAT SHOTGUN -- $15,000\nSNIPER RIFLE -- $15,000\nDESERT EAGLE -- $15,000\nSHOTGUN -- $10,000\nM4 -- $10,000\nHEALTH -- $10,000\nARMOUR -- $20,000", "Select", "Cancel");
- TogglePlayerControllable(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- return 1;
- }
- } else SendClientMessage(playerid, COLOR_RED,"You need to use the computer to buy weps !");
- }
- return 1;
- }
- if(strcmp(cmdtext,"/stop",true)==0) {
- if(hitman[playerid] == 1) {
- hitman[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- }
- return 1;
- }
- if( strcmp(cmdtext, "/ftlock", true)==0) {
- if(playerTeam[playerid]>0) {
- foreach(Player, i) {
- SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1);
- }
- for(new i = 0; i < teamInfo[playerTeam[playerid]][1]; i++) {
- SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), teamMembers[playerTeam[playerid]][i], 0, 0);
- }
- }
- return 1;
- }
- if (strcmp(cmdtext, "/lock", true)==0) {
- if(IsPlayerInAnyVehicle(playerid)) {
- new State=GetPlayerState(playerid);
- if(State!=PLAYER_STATE_DRIVER) {
- SendClientMessage(playerid,COLOR_GREY,"You can only lock the doors as the driver.");
- return 1;
- }
- new i;
- for(i=0;i<MAX_PLAYERS;i++) {
- if(i != playerid) {
- SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
- }
- }
- SendClientMessage(playerid, COLOR_GREY, "Vehicle locked!");
- new Float:pX, Float:pY, Float:pZ;
- GetPlayerPos(playerid,pX,pY,pZ);
- PlayerPlaySound(playerid,1056,pX,pY,pZ);
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
- }
- return 1;
- }
- if (strcmp(cmdtext, "/unlock", true)==0) {
- if(IsPlayerInAnyVehicle(playerid)) {
- new State=GetPlayerState(playerid);
- if(State!=PLAYER_STATE_DRIVER) {
- SendClientMessage(playerid, COLOR_GREY,"You can only unlock the doors as the driver.");
- return 1;
- }
- new i;
- for(i=0;i<MAX_PLAYERS;i++) {
- SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
- }
- SendClientMessage(playerid, COLOR_GREY, "Vehicle unlocked!");
- new Float:pX, Float:pY, Float:pZ;
- GetPlayerPos(playerid,pX,pY,pZ);
- PlayerPlaySound(playerid,1057,pX,pY,pZ);
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
- }
- return 1;
- }
- if(strcmp(cmd, "/tplant", true) == 0) {
- if(gTeam[playerid] == TEAM_USA) {
- new tanker = GetClosestPlayer(playerid);
- if(GetDistanceBetweenPlayers(playerid,tanker) <= 10) {
- if(gTeam[tanker] == TEAM_USA) {
- SendClientMessage(playerid, COLOR_GREY, "You cannot plant a bomb in your teammates tank!");
- return 1;
- }
- new tank = GetPlayerVehicleID(tanker);
- if(GetVehicleModel(tank) == 432) {
- SetVehicleHealth(tank, 100.0);
- SendClientMessage(playerid, COLOR_GREY, "You planted the small bomb in the tank!");
- return 1;
- }
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "No enemy tank spotted!");
- return 1;
- }
- return 1;
- }
- else if(gTeam[playerid] == TEAM_GERMANY) {
- new tanker = GetClosestPlayer(playerid);
- if(GetDistanceBetweenPlayers(playerid,tanker) <= 5) {
- if(gTeam[tanker] == TEAM_GERMANY) {
- SendClientMessage(playerid, COLOR_GREY, "You cannot plant a bomb in your teammates tank!");
- return 1;
- }
- new tank = GetPlayerVehicleID(tanker);
- if(GetVehicleModel(tank) == 432) {
- SetVehicleHealth(tank, 0.0);
- SendClientMessage(playerid, COLOR_GREY, "You planted the small bomb in the tank!");
- return 1;
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "No enemy tank spotted!");
- return 1;
- }
- }
- return 1;
- }
- return 1;
- }
- if(strcmp(cmdtext, "/spray", true)==0) {
- if( gPlayerClass[playerid] == ENGINEER ) {
- if( repair[playerid] == 0 ) {
- if(gTeam[playerid] == TEAM_USA) ChangeVehicleColor(GetPlayerVehicleID(playerid),79,7 );
- if(gTeam[playerid] == TEAM_GERMANY) ChangeVehicleColor(GetPlayerVehicleID(playerid),17,30 );
- if(gTeam[playerid] == TEAM_JAPAN) ChangeVehicleColor(GetPlayerVehicleID(playerid),1,8 );
- if(gTeam[playerid] == TEAM_RUSSIA) ChangeVehicleColor(GetPlayerVehicleID(playerid),6,61 );
- SendClientMessage(playerid, COLOR_ORANGE, "Vehicle sprayed !");
- repair[playerid] = 1;
- SetTimerEx("restorerepair", 15000, 0, "i", playerid);
- }
- }
- return 1;
- }
- if(strcmp(cmdtext, "/repair", true) == 0) {
- if(gPlayerClass[playerid] == ENGINEER || hasrepair[playerid] == 1) {
- if(repair[playerid] == 0) {
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, COLOR_GREY, "Vehicle repaired!");
- repair[playerid] = 1;
- SetTimerEx("restorerepair", 45000, 0, "i", playerid);
- }
- else {
- SendClientMessage(playerid, COLOR_RED, "You repaired a vehicle recently. Please wait 15 seconds between repairs.");
- }
- }
- else {
- SendClientMessage(playerid, COLOR_RED, "You are not a engineer!");
- }
- return 1;
- }
- if(strcmp(cmdtext, "/dispenser", true)==0) {
- if( gPlayerClass[playerid] == ENGINEER ) {
- if( repair[playerid] == 0 ) {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- PlaceDispenser(playerid, X, Y, Z);
- ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
- ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
- SetTimerEx("restorerepair", 15000, 0, "i", playerid);
- }else SendClientMessage(playerid, COLOR_RED, "You have to wait 15 seconds before reparing/building again !");
- }
- return 1;
- }
- if(strcmp(cmdtext, "/rdispenser", true)==0) {
- if( gPlayerClass[playerid] == ENGINEER ) {
- if( repair[playerid] == 0 ) {
- ResetDispenser(playerid);
- ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
- ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
- SetTimerEx("restorerepair", 15000, 0, "i", playerid);
- }else SendClientMessage(playerid, COLOR_RED, "You have to wait 15 seconds before reparing/building again !");
- }
- return 1;
- }
- if(strcmp(cmdtext,"/nuke", true) == 0) {
- if(gTeam[playerid] == TEAM_USA) {
- if(CapturedBy5 == 1) {
- if(IsPlayerInRangeOfPoint(playerid,2, 220.0778,1822.6729,7.5301)) {
- if(nuked == 0) {
- if( GetPlayerMoney(playerid) >= 500000) {
- GivePlayerMoney(playerid, -500000);
- SendClientMessageToAll(COLOR_GREY, "Team USA has set up a missle to hit GERMANY'S base!");
- SendClientMessageToAll(COLOR_GREY, "The missle will hit in 10 seconds!");
- nuked = 1;
- SetTimer("NukeTime", 10000, 0);
- SetTimer("Nuke0", 180000, 0);
- SetPlayerMoney(playerid, GetPlayerMoney(playerid) -500000);
- } else SendClientMessage(playerid, COLOR_GREY, "You need 500 000$ to send a missile!");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You have sent a missle recently...");
- }
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You must be at AREA 69 Computer!");
- }
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "Your team must take over area 69 to use the missles!");
- }
- }
- else if(gTeam[playerid] == TEAM_GERMANY) {
- if(CapturedBy5 == 2) {
- if(IsPlayerInRangeOfPoint(playerid, 2, 220.0778,1822.6729,7.5301)) {
- if(nuked == 0) {
- if( GetPlayerMoney(playerid) >= 500000) {
- GivePlayerMoney(playerid, -500000);
- SendClientMessageToAll(COLOR_GREY, "Team GERMANY has set up a missle to hit USA'S base!");
- SendClientMessageToAll(COLOR_GREY, "The missle will hit in 10 seconds!");
- nuked = 1;
- SetTimer("NukeTimeG", 10000, 0);
- SetTimer("Nuke0", 180000, 0);
- } else SendClientMessage(playerid, COLOR_GREY, "You need 500 000$ to send a missle !");
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You have sent a missle recently...");
- }
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You must be at AREA 69 Computer");
- }
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "Your team must take over area 69 to use the missles!");
- }
- }
- return 1;
- }
- new index;
- cmd = strtok(cmdtext, index);
- if (strcmp(cmd, "/heal", true) == 0) {
- if( gPlayerClass[playerid] != MEDIC ) return SendClientMessage(playerid, COLOR_RED, "You are not a Medic!");
- new id;
- tmp = strtok(cmdtext, index);
- if (strlen(tmp)) {
- id = strval(tmp);
- if (IsPlayerConnected(id)) {
- if(healedrec[playerid] != 1) {
- new Float:gX, Float:gY, Float:gZ;
- GetPlayerPos(id, gX, gY, gZ);
- if( IsPlayerInRangeOfPoint(playerid, 5.0, gX, gY, gZ) ) {
- SetPlayerHealth(id, 99.0);
- SendClientMessage(id, 0x00FF00AA, "You've been healed by a medic!");
- SendClientMessage(playerid, 0x00FF00AA, "Player healed.");
- SendClientMessage(playerid, COLOR_RED, "You may heal again in 15 seconds.");
- healedrec[playerid] = 1;
- SetTimerEx("HealAgain", 15000, 0, "i", playerid);
- }else SendClientMessage(playerid, COLOR_RED, "You need to be near the player to heal him !");
- }
- else {
- SendClientMessage(playerid, 0xFF0000AA, "You have healed a player recently!");
- }
- }
- else {
- SendClientMessage(playerid, 0xFF0000AA, "Player not found");
- }
- }
- else {
- SendClientMessage(playerid, 0xFF0000AA, "USAGE: /heal <id>");
- }
- return 1;
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- new allp;
- foreach(Player, i) {
- allp = i;
- }
- if(pickupid == Dispenser[allp] ) {
- if( pickupid != Dispenser[allp] ){ }
- if( dispout[playerid] == 0 ) {
- SetTimerEx("DispenserOut", 10000, 0, "i", playerid);
- if( gPlayerClass[playerid] == ASSAULT ) {
- GivePlayerWeapon(playerid, 30, 50);
- GivePlayerWeapon(playerid, 29, 20);
- GivePlayerWeapon(playerid, 25, 10);
- }
- if( gPlayerClass[playerid] == DEMOLITION ) {
- GivePlayerWeapon(playerid, 16, 5);
- GivePlayerWeapon(playerid, 36, 1);
- GivePlayerWeapon(playerid, 24, 20);
- }
- if( gPlayerClass[playerid] == SNIPER ) {
- GivePlayerWeapon(playerid, 34, 20);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 20);
- }
- if( gPlayerClass[playerid] == PILOT ) {
- GivePlayerWeapon(playerid, 22, 5);
- }
- if( gPlayerClass[playerid] == MEDIC ) {
- GivePlayerWeapon(playerid, 23, 20);
- GivePlayerWeapon(playerid, 1, 1);
- }
- if( gPlayerClass[playerid] == ENGINEER ) {
- GivePlayerWeapon(playerid, 27, 20);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 29, 20);
- }
- //pyro
- if( gPlayerClass[playerid] == PYRO ) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the pyroman as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = PYRO;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 279);
- GivePlayerWeapon(playerid, 16, 20);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 37, 550);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 278);
- GivePlayerWeapon(playerid, 16, 20);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 37, 250);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- //scout
- if( gPlayerClass[playerid] == SCOUT ) {
- SendClientMessage(playerid, COLOR_GREY, "You chose the scout as your class.");
- SendClientMessage(playerid, COLOR_GREY, "You can type /switchclass to change your class again.");
- gPlayerClass[playerid] = SCOUT;
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerSkin(playerid, 128);
- SetPlayerArmour(playerid, 25);
- GivePlayerWeapon(playerid, 28, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 200);
- }
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerSkin(playerid, 202);
- SetPlayerArmour(playerid, 25);
- GivePlayerWeapon(playerid, 28, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 200);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if( gPlayerClass[playerid] == ADMIN ) {
- GivePlayerWeapon(playerid, 38, 20000);
- GivePlayerWeapon(playerid, 22, 20000);
- }
- dispout[playerid] = 1;
- } else SendClientMessage(playerid, COLOR_RED, "Dispenser recharging - come back in 10 seconds!");
- }
- else if(pickupid == umini) {
- GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~RAMPAGE~n~KILL 5 PEOPLE IN 2 MINUTES~n~REWARD:3+ SCORE", 5000, 3);
- SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
- }
- else if(pickupid == gmini) {
- GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~RAMPAGE~n~KILL 5 PEOPLE IN 2 MINUTES~n~REWARD:3+ SCORE", 5000, 3);
- SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
- }
- else if(pickupid == uhit) {
- GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~HITMAN~n~KILL THE RANDOM PERSON PICKED~n~REWARD:3+ SCORE", 5000, 3);
- SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
- }
- else if(pickupid == ghit) {
- GameTextForPlayer(playerid, "~w~MINI MISSION~w~~n~HITMAN~n~KILL THE RANDOM PERSON PICKED~n~REWARD:3+ SCORE", 5000, 3);
- SendClientMessage(playerid, COLOR_WHITE, "Type /start to start this challenge!");
- }
- else if(pickupid == buyweapon) {
- GameTextForPlayer(playerid, "~w~TYPE /USECOMPUTER TO ACCESS THE COMPUTER!~w~", 5000, 3);
- }
- else if(pickupid == nuke) {
- GameTextForPlayer(playerid, "~w~TYPE /NUKE TO NUKE YOUR ENEMIES BASE!~w~", 5000, 3);
- }
- else if(pickupid == gunshop[1]) {
- SetPlayerInterior(playerid, 4);
- SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
- SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
- IsInGunShop[playerid] = 1;
- GunShopID[playerid] = 1;
- }
- else if(pickupid == gunshop[2]) {
- SetPlayerInterior(playerid, 4);
- SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
- SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
- IsInGunShop[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- GunShopID[playerid] = 2;
- }
- else if(pickupid == gunshop[3]) {
- SetPlayerInterior(playerid, 4);
- SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
- SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
- IsInGunShop[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- GunShopID[playerid] = 3;
- }
- else if(pickupid == gunshop[4]) {
- SetPlayerInterior(playerid, 4);
- SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
- SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
- IsInGunShop[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- GunShopID[playerid] = 4;
- }
- else if(pickupid == gunshop[5]) {
- GameTextForPlayer(playerid, "~w~THE WEAPON STORE HAS CLOSED DUE TO NO BUSINESS~w~", 5000, 3);
- }else
- if( pickupid == gunshop[7] ) {
- SetPlayerInterior(playerid, 4);
- SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
- SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
- IsInGunShop[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- GunShopID[playerid] = 7;
- }else
- if( pickupid == gunshop[6] ) {
- SetPlayerInterior(playerid, 4);
- SetPlayerPos(playerid, 286.2271,-81.6251,1001.5156);
- SendClientMessage(playerid, COLOR_GREY, "Type /exit to exit the gun shop!");
- IsInGunShop[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- GunShopID[playerid] = 6;
- }
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public AreaCheck()
- {
- foreach(Player, i) {
- if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58)) {
- if(EnteredArea[i] == 0) { // if he hasn'td beenterefo re
- if(gTeam[i] == TEAM_USA && CapturedBy == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea[i] = 1;
- }
- else {
- SendClientMessageToAll(COLOR_CON_GREEN, "The bigear is being taken over!");
- EnteredArea[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- IfCapture[i] = 1;
- T1[i] = SetTimer("TakeOver",30000,0);
- }
- }
- }
- else {
- EnteredArea[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T1[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556)) {
- if(EnteredArea2[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy2 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy2 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy2 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy2 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy2 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea2[i] = 1;
- }
- else {
- EnteredArea2[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T2[i]= SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The resturant is being taken over!");
- }
- }
- }
- else {
- EnteredArea2[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T2[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166)) {
- if(EnteredArea3[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy3 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy3 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy3 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy3 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy3 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea3[i] = 1;
- }
- else {
- EnteredArea3[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T3[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The airfield is being taken over!");
- }
- }
- }
- else {
- EnteredArea3[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T3[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34)) {
- if(EnteredArea4[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy4 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy4 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy4 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy4 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy4 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea4[i] = 1;
- }
- else {
- EnteredArea4[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T4[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The Electric Field is being taken over!");
- }
- }
- }
- else {
- EnteredArea4[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T4[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306)) {
- if(EnteredArea5[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy5 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy5 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy5 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy5 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy5 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea5[i] = 1;
- }
- else {
- EnteredArea5[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T5[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "Area 69 is being taken over!");
- }
- }
- }
- else {
- EnteredArea5[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T5[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715)) {
- if(EnteredArea6[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy6 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy6 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy6 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy6 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy6 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea6[i] = 1;
- }
- else {
- EnteredArea6[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T6[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The gas station is being taken over!");
- }
- }
- }
- else {
- EnteredArea6[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T6[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09)) {
- if(EnteredArea7[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy7 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy7 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy7 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy7 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy7 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea9[i] = 1;
- }
- else {
- EnteredArea7[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T7[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The oil mine is being taken over!");
- }
- }
- }
- else {
- EnteredArea7[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T7[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244)) {
- if(EnteredArea8[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy8 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy8 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy8 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy8 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy8 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea8[i] = 1;
- }
- else {
- EnteredArea8[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T8[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The train refueling station is being taken over!");
- }
- }
- }
- else {
- EnteredArea8[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T8[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729)) {
- if(EnteredArea9[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy9 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy9 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy9 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy9 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy9 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea9[i] = 1;
- }
- else {
- EnteredArea9[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T9[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The damm is being taken over!");
- }
- }
- }
- else {
- EnteredArea9[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T9[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186)) {
- if(EnteredArea10[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy10 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy10 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy10 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy10 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy10 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea10[i] = 1;
- }
- else {
- EnteredArea10[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T10[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The old town is being taken over!");
- }
- }
- }
- else {
- EnteredArea10[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T10[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017)) {
- if(EnteredArea11[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy11 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy11 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy11 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy11 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy11 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea11[i] = 1;
- }
- else {
- EnteredArea11[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T11[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The University is being taken over!");
- }
- }
- }
- else {
- EnteredArea11[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T11[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502)) {
- if(EnteredArea12[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy12 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy12 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy12 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy12 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy12 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea12[i] = 1;
- }
- else {
- EnteredArea12[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T12[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The Oil Pump is being taken over!");
- }
- }
- }
- else {
- EnteredArea12[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T12[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -1237.855, 1763.359, -1156.11, 1868.46)) {
- if(EnteredArea13[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy13 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy13 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy13 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy13 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy13 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea13[i] = 1;
- }
- else {
- EnteredArea13[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T13[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The CluckinBell is being taken over!");
- }
- }
- }
- else {
- EnteredArea13[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T13[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536)) {
- if(EnteredArea14[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy14 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy14 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy14 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy14 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy14 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea14[i] = 1;
- }
- else {
- EnteredArea14[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T14[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The Beach Shack is being taken over!");
- }
- }
- }
- else {
- EnteredArea14[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T14[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676)) {
- if(EnteredArea15[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy15 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy15 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy15 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy15 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy15 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea15[i] = 1;
- }
- else {
- EnteredArea15[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T15[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The Diner is being taken over!");
- }
- }
- }
- else {
- EnteredArea15[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T15[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859)) {
- if(EnteredArea16[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy16 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy16 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy16 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy16 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy16 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea16[i] = 1;
- }
- else {
- EnteredArea16[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T16[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The Quarry is being taken over!");
- }
- }
- }
- else {
- EnteredArea16[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T16[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170)) {
- if(EnteredArea17[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy17 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy17 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy17 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy17 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy17 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea17[i] = 1;
- }
- else {
- EnteredArea17[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T17[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The Field Hospital is being taken over!");
- }
- }
- }
- else {
- EnteredArea17[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T17[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751)) {
- if(EnteredArea18[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy18 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy18 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy18 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy18 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy18 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea18[i] = 1;
- }
- else {
- EnteredArea18[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T18[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The Gun Warehouse is being taken over!");
- }
- }
- }
- else {
- EnteredArea18[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T18[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798)) {
- if(EnteredArea19[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy19 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy19 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy19 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy19 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy19 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea19[i] = 1;
- }
- else {
- EnteredArea19[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T19[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The Docks is being taken over!");
- }
- }
- }
- else {
- EnteredArea19[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T19[i]);
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -1411.231323, 2715.757568, 1539.231323, 2875.757568)) {
- if(EnteredArea20[i] == 0) { // if he hasn't entered before
- if(gTeam[i] == TEAM_USA && CapturedBy20 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy20 == 2 || gTeam[i] == TEAM_AUSTRALIA && CapturedBy20 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy20 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy20 == 5) {
- SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
- EnteredArea20[i] = 1;
- }
- else {
- EnteredArea20[i] = 1; // He has entered
- SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
- T20[i] = SetTimer("TakeOver",30000,0);
- SendClientMessageToAll(COLOR_CON_GREEN, "The Country Club is being taken over!");
- }
- }
- }
- else {
- EnteredArea20[i] = 0; // When he leaves, he's no longer in the area
- KillTimer(T20[i]);
- }
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- stock ResetDispenser(playerid)
- {
- if( EngineerI[playerid] == 0 ) {
- EngineerI[playerid] = 1;
- DestroyObject(Dispenser[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW, "Dispenser Detonated ! You can now place another 1.");
- }else SendClientMessage(playerid, COLOR_RED, "Dispenser not placed !");
- return 1;
- }
- stock PlaceDispenser(playerid ,Float:xx, Float:yy, Float:zz)
- {
- if( EngineerI[playerid] == 1 ) {
- if( GetPlayerMoney(playerid) >= 10000 ) {
- EngineerI[playerid] = 0;
- SetPlayerMoney(playerid, GetPlayerMoney(playerid) - 10000);
- SetTimerEx("DispeClean", 2 * 60 * 1000, 0, "i", playerid);
- Dispenser[playerid] = CreatePickup(920,23,xx, yy, zz);
- SendClientMessage(playerid, COLOR_YELLOW, "Dispenser placed, grab it for ammo ! It will self-destruct in 2 minutes!");
- }else SendClientMessage(playerid, COLOR_RED, "You need 10 000$ for a dispenser !");
- }else SendClientMessage(playerid, COLOR_RED, "Not enough Dispensers !");
- return 1;
- }
- stock IsObjectInRangeOfPlayer(objectid, playerid)
- {
- new Float:pX, Float:pY, Float:pZ;
- GetPlayerPos(playerid, pX, pY, pZ);
- new Float:oX, Float:oY, Float:oZ;
- GetObjectPos(objectid, oX, oY, oZ);
- if( (pX - oX <= 5) && (pY - oY <= 5) && (pZ - oZ <= 1) ) {
- return 1;
- }
- return 0;
- }
- stock IsPlayerInArea(playerid,Float:min_x,Float:min_y,Float:max_x,Float:max_y)
- {
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- if((X <= max_x && X >= min_x) && (Y <= max_y && Y >= min_y)) return 1;
- return 0;
- }
- public TakeOver()
- {
- foreach(Player, i) {
- if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_USA) {
- if(CapturedBy != 1) {
- if( IfCapture[0] == 1 ) return 1;
- IfCapture[0] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy", 1);
- uscore++;
- // SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy = 1;
- if(CapturedBy != 1) SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Big Ear!");
- GangZoneHideForAll(Ear);
- GangZoneShowForAll(EarU, COLOR_BLUE);
- GangZoneHideForAll(EarG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_GERMANY) {
- if(CapturedBy != 2) { {
- if( IfCapture[0] == 1 ) return 1;
- IfCapture[0] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy", 2);
- gscore++;
- // SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy = 2;
- if(CapturedBy != 2) SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Big Ear!");
- GangZoneHideForAll(Ear);
- GangZoneShowForAll(EarG, COLOR_RED);
- GangZoneHideForAll(EarU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- else if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_AUSTRALIA) {
- if(CapturedBy != 3) { {
- if( IfCapture[0] == 1 ) return 1;
- IfCapture[0] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy", 3);
- gscore++;
- // SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy = 3;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured Big Ear!");
- GangZoneHideForAll(Ear);
- GangZoneShowForAll(EarG, COLOR_YELLOW);
- GangZoneHideForAll(EarU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- else if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_JAPAN) {
- if(CapturedBy != 4) { {
- if( IfCapture[0] == 1 ) return 1;
- IfCapture[0] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy", 4);
- gscore++;
- // SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy = 4;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured Big Ear!");
- GangZoneHideForAll(Ear);
- GangZoneShowForAll(EarG, COLOR_WHITE);
- GangZoneHideForAll(EarU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- else if(IsPlayerInArea(i, -385.3699, 1506.446, -256.9133, 1646.58) && gTeam[i] == TEAM_RUSSIA) {
- if(CapturedBy != 5) { {
- if( IfCapture[0] == 1 ) return 1;
- IfCapture[0] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy", 5);
- gscore++;
- // SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy = 5;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured Big Ear!");
- GangZoneHideForAll(Ear);
- GangZoneShowForAll(EarG, COLOR_ORANGE);
- GangZoneHideForAll(EarU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_USA) {
- if(CapturedBy2 != 1) {
- if( IfCapture[2] == 1 ) return 1;
- IfCapture[2] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy2 = 1;
- if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the resturant!");
- GangZoneHideForAll(Resturant);
- GangZoneShowForAll(ResturantU, COLOR_BLUE);
- GangZoneHideForAll(ResturantG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_GERMANY) {
- if(CapturedBy2 != 2) {
- if( IfCapture[2] == 1 ) return 1;
- IfCapture[2] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 2);
- gscore++;
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy2 = 2;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured resturant!");
- GangZoneHideForAll(Resturant);
- GangZoneShowForAll(ResturantG, COLOR_RED);
- GangZoneHideForAll(ResturantU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_AUSTRALIA) {
- if(CapturedBy2 != 3) {
- if( IfCapture[2] == 1 ) return 1;
- IfCapture[2] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 3);
- gscore++;
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy2 = 3;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured resturant!");
- GangZoneHideForAll(Resturant);
- GangZoneShowForAll(ResturantG, COLOR_YELLOW);
- GangZoneHideForAll(ResturantU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_JAPAN) {
- if(CapturedBy2 != 4) {
- if( IfCapture[2] == 1 ) return 1;
- IfCapture[2] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 4);
- gscore++;
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy2 = 4;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured resturant!");
- GangZoneHideForAll(Resturant);
- GangZoneShowForAll(ResturantG, COLOR_WHITE);
- GangZoneHideForAll(ResturantU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_RUSSIA) {
- if(CapturedBy2 != 5) {
- if( IfCapture[2] == 1 ) return 1;
- IfCapture[2] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 5);
- gscore++;
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy2 = 5;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured resturant!");
- GangZoneHideForAll(Resturant);
- GangZoneShowForAll(ResturantG, COLOR_ORANGE);
- GangZoneHideForAll(ResturantU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_USA) {
- if(CapturedBy3 != 1) {
- if( IfCapture[3] == 1 ) return 1;
- IfCapture[3] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 1);
- //SetTimer("ScoreText", 5000, 0);
- uscore++;
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy3 = 1;
- if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the airfield!");
- GangZoneHideForAll(Airfield);
- GangZoneShowForAll(AirfieldU, COLOR_BLUE);
- GangZoneHideForAll(AirfieldG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_GERMANY) {
- if(CapturedBy3 != 2) {
- if( IfCapture[3] == 1 ) return 1;
- IfCapture[3] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 2);
- //SetTimer("ScoreText", 5000, 0);
- gscore++;
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy3 = 2;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured airfield!");
- GangZoneHideForAll(Airfield);
- GangZoneShowForAll(AirfieldG, COLOR_RED);
- GangZoneHideForAll(AirfieldU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_AUSTRALIA) {
- if(CapturedBy3 != 3) {
- if( IfCapture[3] == 1 ) return 1;
- IfCapture[3] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 3);
- //SetTimer("ScoreText", 5000, 0);
- gscore++;
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy3 = 3;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured airfield!");
- GangZoneHideForAll(Airfield);
- GangZoneShowForAll(AirfieldG, COLOR_YELLOW);
- GangZoneHideForAll(AirfieldU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_JAPAN) {
- if(CapturedBy3 != 4) {
- if( IfCapture[3] == 1 ) return 1;
- IfCapture[3] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 4);
- //SetTimer("ScoreText", 5000, 0);
- gscore++;
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy3 = 4;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured airfield!");
- GangZoneHideForAll(Airfield);
- GangZoneShowForAll(AirfieldG, COLOR_WHITE);
- GangZoneHideForAll(AirfieldU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 268.5911, 2393.964, 467.115, 2604.166) && gTeam[i] == TEAM_RUSSIA) {
- if(CapturedBy3 != 5) {
- if( IfCapture[3] == 1 ) return 1;
- IfCapture[3] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy3", 5);
- //SetTimer("ScoreText", 5000, 0);
- gscore++;
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy3 = 5;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured airfield!");
- GangZoneHideForAll(Airfield);
- GangZoneShowForAll(AirfieldG, COLOR_ORANGE);
- GangZoneHideForAll(AirfieldU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_USA) {
- if(CapturedBy4 != 1) {
- if( IfCapture[4] == 1 ) return 1;
- IfCapture[4] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy4 = 1;
- if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Electric Field!");
- GangZoneHideForAll(Oil);
- GangZoneShowForAll(OilU, COLOR_BLUE);
- GangZoneHideForAll(OilG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_GERMANY) {
- if(CapturedBy4 != 2) {
- if( IfCapture[4] == 1 ) return 1;
- IfCapture[4] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy4 = 2;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured Electric Field!");
- GangZoneHideForAll(Oil);
- GangZoneShowForAll(OilG, COLOR_RED);
- GangZoneHideForAll(OilU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_AUSTRALIA) {
- if(CapturedBy4 != 3) {
- if( IfCapture[4] == 1 ) return 1;
- IfCapture[4] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy4 = 3;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured Electric Field!");
- GangZoneHideForAll(Oil);
- GangZoneShowForAll(OilG, COLOR_YELLOW);
- GangZoneHideForAll(OilU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_JAPAN) {
- if(CapturedBy4 != 4) {
- if( IfCapture[4] == 1 ) return 1;
- IfCapture[4] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy4 = 4;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured Electric Field!");
- GangZoneHideForAll(Oil);
- GangZoneShowForAll(OilG, COLOR_WHITE);
- GangZoneHideForAll(OilU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 747.384, 2031.95, 805.7734, 2090.34) && gTeam[i] == TEAM_RUSSIA) {
- if(CapturedBy4 != 5) {
- if( IfCapture[4] == 1 ) return 1;
- IfCapture[4] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy4", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy4 = 5;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured Electric Field!");
- GangZoneHideForAll(Oil);
- GangZoneShowForAll(OilG, COLOR_ORANGE);
- GangZoneHideForAll(OilU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_USA) {
- if(CapturedBy5 != 1) {
- if( IfCapture[5] == 1 ) return 1;
- IfCapture[5] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 1);
- //SetTimer("ScoreText", 5000, 0);
- uscore++;
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy5 = 1;
- if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured area 69!");
- GangZoneHideForAll(A);
- GangZoneShowForAll(AU, COLOR_BLUE);
- GangZoneHideForAll(AG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_GERMANY) {
- if(CapturedBy5 != 2) {
- if( IfCapture[5] == 1 ) return 1;
- IfCapture[5] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy5 = 2;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured area 69!");
- GangZoneHideForAll(A);
- GangZoneShowForAll(AG, COLOR_RED);
- GangZoneHideForAll(AU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_AUSTRALIA) {
- if(CapturedBy5 != 3) {
- if( IfCapture[5] == 1 ) return 1;
- IfCapture[5] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy5 = 3;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured area 69!");
- GangZoneHideForAll(A);
- GangZoneShowForAll(AG, COLOR_YELLOW);
- GangZoneHideForAll(AU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_JAPAN) {
- if(CapturedBy5 != 4) {
- if( IfCapture[5] == 1 ) return 1;
- IfCapture[5] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy5 = 4;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured area 69!");
- GangZoneHideForAll(A);
- GangZoneShowForAll(AG, COLOR_WHITE);
- GangZoneHideForAll(AU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 105.1009, 1786.715, 338.6584, 2055.306) && gTeam[i] == TEAM_RUSSIA) {
- if(CapturedBy5 != 5) {
- if( IfCapture[5] == 1 ) return 1;
- IfCapture[5] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy5 = 5;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured area 69!");
- GangZoneHideForAll(A);
- GangZoneShowForAll(AG, COLOR_ORANGE);
- GangZoneHideForAll(AU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_USA) {
- if(CapturedBy6 != 1) {
- if( IfCapture[6] == 1 ) return 1;
- IfCapture[6] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy6 = 1;
- if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the gas station!");
- GangZoneHideForAll(Gas);
- GangZoneShowForAll(GasU, COLOR_BLUE);
- GangZoneHideForAll(GasG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_GERMANY) {
- if(CapturedBy6 != 2) {
- if( IfCapture[6] == 1 ) return 1;
- IfCapture[6] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy6 = 2;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured gas station!");
- GangZoneHideForAll(Gas);
- GangZoneShowForAll(GasG, COLOR_RED);
- GangZoneHideForAll(GasU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_AUSTRALIA) {
- if(CapturedBy6 != 3) {
- if( IfCapture[6] == 1 ) return 1;
- IfCapture[6] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy6 = 3;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured gas station!");
- GangZoneHideForAll(Gas);
- GangZoneShowForAll(GasG, COLOR_YELLOW);
- GangZoneHideForAll(GasU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_JAPAN) {
- if(CapturedBy6 != 4) {
- if( IfCapture[6] == 1 ) return 1;
- IfCapture[6] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy6 = 4;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured gas station!");
- GangZoneHideForAll(Gas);
- GangZoneShowForAll(GasG, COLOR_WHITE);
- GangZoneHideForAll(GasU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 502.1487, 1588.191, 700.6725, 1786.715) && gTeam[i] == TEAM_RUSSIA) {
- if(CapturedBy6 != 5) {
- if( IfCapture[6] == 1 ) return 1;
- IfCapture[6] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy6", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy6 = 5;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured gas station!");
- GangZoneHideForAll(Gas);
- GangZoneShowForAll(GasG, COLOR_ORANGE);
- GangZoneHideForAll(GasU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_USA) {
- if(CapturedBy7 != 1) {
- if( IfCapture[7] == 1 ) return 1;
- IfCapture[7] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy7 = 1;
- if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Oil Station!");
- GangZoneHideForAll(OS);
- GangZoneShowForAll(OSU, COLOR_BLUE);
- GangZoneHideForAll(OSG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_GERMANY) {
- if(CapturedBy7 != 2) {
- if( IfCapture[7] == 1 ) return 1;
- IfCapture[7] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy7 = 2;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured Oil Station!");
- GangZoneHideForAll(OS);
- GangZoneShowForAll(OSG, COLOR_RED);
- GangZoneHideForAll(OSU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_AUSTRALIA) {
- if(CapturedBy7 != 3) {
- if( IfCapture[7] == 1 ) return 1;
- IfCapture[7] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy7 = 3;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured Oil Station!");
- GangZoneHideForAll(OS);
- GangZoneShowForAll(OSG, COLOR_YELLOW);
- GangZoneHideForAll(OSU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_JAPAN) {
- if(CapturedBy7 != 4) {
- if( IfCapture[7] == 1 ) return 1;
- IfCapture[7] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy7 = 4;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured Oil Station!");
- GangZoneHideForAll(OS);
- GangZoneShowForAll(OSG, COLOR_WHITE);
- GangZoneHideForAll(OSU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 105.1009, 1342.956, 280.269, 1483.09) && gTeam[i] == TEAM_RUSSIA) {
- if(CapturedBy7 != 5) {
- if( IfCapture[7] == 1 ) return 1;
- IfCapture[7] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy7", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy7 = 5;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured Oil Station!");
- GangZoneHideForAll(OS);
- GangZoneShowForAll(OSG, COLOR_ORANGE);
- GangZoneHideForAll(OSU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_USA) {
- if(CapturedBy8 != 1) {
- if( IfCapture[8] == 1 ) return 1;
- IfCapture[8] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy8 = 1;
- if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Train refueling station!");
- GangZoneHideForAll(T);
- GangZoneShowForAll(TU, COLOR_BLUE);
- GangZoneHideForAll(TG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_GERMANY) {
- if(CapturedBy8 != 2) {
- if( IfCapture[8] == 1 ) return 1;
- IfCapture[8] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy8 = 2;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured Train refueling station!");
- GangZoneHideForAll(T);
- GangZoneShowForAll(TG, COLOR_RED);
- GangZoneHideForAll(TU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_AUSTRALIA) {
- if(CapturedBy8 != 3) {
- if( IfCapture[8] == 1 ) return 1;
- IfCapture[8] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy8 = 3;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured Train refueling station!");
- GangZoneHideForAll(T);
- GangZoneShowForAll(TG, COLOR_YELLOW);
- GangZoneHideForAll(TU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_JAPAN) {
- if(CapturedBy8 != 4) {
- if( IfCapture[8] == 1 ) return 1;
- IfCapture[8] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy8 = 4;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured Train refueling station!");
- GangZoneHideForAll(T);
- GangZoneShowForAll(TG, COLOR_WHITE);
- GangZoneHideForAll(TU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, 408.7256, 1156.11, 712.3504, 1296.244) && gTeam[i] == TEAM_RUSSIA) {
- if(CapturedBy8 != 5) {
- if( IfCapture[8] == 1 ) return 1;
- IfCapture[8] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy8", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy8 = 5;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured Train refueling station!");
- GangZoneHideForAll(T);
- GangZoneShowForAll(TG, COLOR_ORANGE);
- GangZoneHideForAll(TU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_USA) {
- if(CapturedBy9 != 1) {
- if( IfCapture[9] == 1 ) return 1;
- IfCapture[9] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy9 = 1;
- if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the damm");
- GangZoneHideForAll(D);
- GangZoneShowForAll(DU, COLOR_BLUE);
- GangZoneHideForAll(DG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_GERMANY) {
- if(CapturedBy9 != 2) {
- if( IfCapture[9] == 1 ) return 1;
- IfCapture[9] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy9 = 2;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the damm!");
- GangZoneHideForAll(D);
- GangZoneShowForAll(DG, COLOR_RED);
- GangZoneHideForAll(DU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_AUSTRALIA) {
- if(CapturedBy9 != 3) {
- if( IfCapture[9] == 1 ) return 1;
- IfCapture[9] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy9 = 3;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the damm!");
- GangZoneHideForAll(D);
- GangZoneShowForAll(DG, COLOR_YELLOW);
- GangZoneHideForAll(DU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_JAPAN) {
- if(CapturedBy9 != 4) {
- if( IfCapture[9] == 1 ) return 1;
- IfCapture[9] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy9 = 4;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the damm!");
- GangZoneHideForAll(D);
- GangZoneShowForAll(DG, COLOR_WHITE);
- GangZoneHideForAll(DU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -945.9079, 1915.172, -525.5044, 2148.729) && gTeam[i] == TEAM_RUSSIA) {
- if(CapturedBy9 != 5) {
- if( IfCapture[9] == 1 ) return 1;
- IfCapture[9] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy9", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy9 = 5;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the damm!");
- GangZoneHideForAll(D);
- GangZoneShowForAll(DG, COLOR_ORANGE);
- GangZoneHideForAll(DU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_USA) {
- if(CapturedBy10 != 1) {
- if( IfCapture[10] == 1 ) return 1;
- IfCapture[10] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy10 = 1;
- if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the old town!");
- GangZoneHideForAll(OT);
- GangZoneShowForAll(OTU, COLOR_BLUE);
- GangZoneHideForAll(OTG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_GERMANY) {
- if(CapturedBy10 != 2) {
- if( IfCapture[10] == 1 ) return 1;
- IfCapture[10] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy10 = 2;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured old town!");
- GangZoneHideForAll(OT);
- GangZoneShowForAll(OTG, COLOR_RED);
- GangZoneHideForAll(OTU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_AUSTRALIA) {
- if(CapturedBy10 != 3) {
- if( IfCapture[10] == 1 ) return 1;
- IfCapture[10] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy10 = 3;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured old town!");
- GangZoneHideForAll(OT);
- GangZoneShowForAll(OTG, COLOR_YELLOW);
- GangZoneHideForAll(OTU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_JAPAN) {
- if(CapturedBy10 != 4) {
- if( IfCapture[10] == 1 ) return 1;
- IfCapture[10] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy10 = 4;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured old town!");
- GangZoneHideForAll(OT);
- GangZoneShowForAll(OTG, COLOR_WHITE);
- GangZoneHideForAll(OTU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- else if(IsPlayerInArea(i, -525.5044, 2125.373, -291.9469, 2277.186) && gTeam[i] == TEAM_RUSSIA) {
- if(CapturedBy10 != 5) {
- if( IfCapture[10] == 1 ) return 1;
- IfCapture[10] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy10", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy10 = 5;
- if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured old town!");
- GangZoneHideForAll(OT);
- GangZoneShowForAll(OTG, COLOR_ORANGE);
- GangZoneHideForAll(OTU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_USA) {
- if(CapturedBy11 != 1) {
- if( IfCapture[11] == 1 ) return 1;
- IfCapture[11] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy11 = 1;
- if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the University!");
- GangZoneHideForAll(University);
- GangZoneShowForAll(University, COLOR_BLUE);
- GangZoneHideForAll(University);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_GERMANY)
- {
- if(CapturedBy11 != 2) {
- if( IfCapture[11] == 1 ) return 1;
- IfCapture[11] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy11 = 2;
- if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the University!");
- GangZoneHideForAll(University);
- GangZoneShowForAll(UniversityG, COLOR_RED);
- GangZoneHideForAll(UniversityU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_AUSTRALIA)
- {
- if(CapturedBy11 != 3) {
- if( IfCapture[11] == 1 ) return 1;
- IfCapture[11] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy11 = 3;
- if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the University!");
- GangZoneHideForAll(University);
- GangZoneShowForAll(UniversityG, COLOR_YELLOW);
- GangZoneHideForAll(UniversityU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_JAPAN)
- {
- if(CapturedBy11 != 4) {
- if( IfCapture[11] == 1 ) return 1;
- IfCapture[11] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy11 = 4;
- if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the University!");
- GangZoneHideForAll(University);
- GangZoneShowForAll(UniversityG, COLOR_WHITE);
- GangZoneHideForAll(UniversityU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 939.5279, 970.4056, 1169.914, 1187.017) && gTeam[i] == TEAM_RUSSIA)
- {
- if(CapturedBy11 != 5) {
- if( IfCapture[11] == 1 ) return 1;
- IfCapture[11] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy11", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy11 = 5;
- if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the University!");
- GangZoneHideForAll(University);
- GangZoneShowForAll(UniversityG, COLOR_ORANGE);
- GangZoneHideForAll(UniversityU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_USA) {
- if(CapturedBy12 != 1) {
- if( IfCapture[12] == 1 ) return 1;
- IfCapture[12] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy12 = 1;
- if(CapturedBy12 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the OilPump!");
- GangZoneHideForAll(OilPump);
- GangZoneShowForAll(OilPumpU, COLOR_BLUE);
- GangZoneHideForAll(OilPumpG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_GERMANY)
- {
- if(CapturedBy12 != 2) {
- if( IfCapture[12] == 1 ) return 1;
- IfCapture[12] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy12 = 2;
- if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the OilPump!");
- GangZoneHideForAll(OilPump);
- GangZoneShowForAll(OilPumpG, COLOR_RED);
- GangZoneHideForAll(OilPumpU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_AUSTRALIA)
- {
- if(CapturedBy12 != 3) {
- if( IfCapture[12] == 1 ) return 1;
- IfCapture[12] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy12 = 3;
- if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the OilPump!");
- GangZoneHideForAll(OilPump);
- GangZoneShowForAll(OilPumpG, COLOR_YELLOW);
- GangZoneHideForAll(OilPumpU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_JAPAN)
- {
- if(CapturedBy12 != 4) {
- if( IfCapture[12] == 1 ) return 1;
- IfCapture[12] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy12 = 4;
- if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the OilPump!");
- GangZoneHideForAll(OilPump);
- GangZoneShowForAll(OilPumpG, COLOR_WHITE);
- GangZoneHideForAll(OilPumpU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_RUSSIA)
- {
- if(CapturedBy12 != 5) {
- if( IfCapture[12] == 1 ) return 1;
- IfCapture[12] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy12", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy12 = 5;
- if(CapturedBy12 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the OilPump!");
- GangZoneHideForAll(OilPump);
- GangZoneShowForAll(OilPumpG, COLOR_ORANGE);
- GangZoneHideForAll(OilPumpU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_USA) {
- if(CapturedBy13 != 1) {
- if( IfCapture[13] == 1 ) return 1;
- IfCapture[13] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy13 = 1;
- if(CapturedBy13 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the CluckinBell!");
- GangZoneHideForAll(Cluck);
- GangZoneShowForAll(CluckU, COLOR_BLUE);
- GangZoneHideForAll(CluckG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_GERMANY)
- {
- if(CapturedBy13 != 2) {
- if( IfCapture[13] == 1 ) return 1;
- IfCapture[13] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy13 = 2;
- if(CapturedBy13 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the CluckinBell!");
- GangZoneHideForAll(Cluck);
- GangZoneShowForAll(CluckG, COLOR_RED);
- GangZoneHideForAll(CluckU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_AUSTRALIA)
- {
- if(CapturedBy13 != 3) {
- if( IfCapture[13] == 1 ) return 1;
- IfCapture[13] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy13 = 3;
- if(CapturedBy13 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the CluckinBell!");
- GangZoneHideForAll(Cluck);
- GangZoneShowForAll(CluckG, COLOR_YELLOW);
- GangZoneHideForAll(CluckU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_JAPAN)
- {
- if(CapturedBy13 != 4) {
- if( IfCapture[13] == 1 ) return 1;
- IfCapture[13] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy13 = 4;
- if(CapturedBy13 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the CluckinBell!");
- GangZoneHideForAll(Cluck);
- GangZoneShowForAll(CluckG, COLOR_WHITE);
- GangZoneHideForAll(CluckU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1015.975, 2861.08, 1121.076,2954.502) && gTeam[i] == TEAM_RUSSIA)
- {
- if(CapturedBy13 != 5) {
- if( IfCapture[13] == 1 ) return 1;
- IfCapture[13] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy13", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy13 = 5;
- if(CapturedBy13 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the CluckinBell!");
- GangZoneHideForAll(Cluck);
- GangZoneShowForAll(CluckG, COLOR_ORANGE);
- GangZoneHideForAll(CluckU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_USA) {
- if(CapturedBy14 != 1) {
- if( IfCapture[14] == 1 ) return 1;
- IfCapture[14] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy14 = 1;
- if(CapturedBy14 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the BeachShack!");
- GangZoneHideForAll(Beach);
- GangZoneShowForAll(BeachU, COLOR_BLUE);
- GangZoneHideForAll(BeachG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_GERMANY)
- {
- if(CapturedBy14 != 2) {
- if( IfCapture[14] == 1 ) return 1;
- IfCapture[14] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy14 = 2;
- if(CapturedBy14 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the BeachShack!");
- GangZoneHideForAll(Beach);
- GangZoneShowForAll(BeachG, COLOR_RED);
- GangZoneHideForAll(BeachU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_AUSTRALIA)
- {
- if(CapturedBy14 != 3) {
- if( IfCapture[14] == 1 ) return 1;
- IfCapture[14] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy14 = 3;
- if(CapturedBy14 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the BeachShack!");
- GangZoneHideForAll(Beach);
- GangZoneShowForAll(BeachG, COLOR_YELLOW);
- GangZoneHideForAll(BeachU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_JAPAN)
- {
- if(CapturedBy14 != 4) {
- if( IfCapture[14] == 1 ) return 1;
- IfCapture[14] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy14 = 4;
- if(CapturedBy14 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the BeachShack!");
- GangZoneHideForAll(Beach);
- GangZoneShowForAll(BeachG, COLOR_WHITE);
- GangZoneHideForAll(BeachU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 210.2018, 2837.724, 326.9805, 2989.536) && gTeam[i] == TEAM_RUSSIA)
- {
- if(CapturedBy14 != 5) {
- if( IfCapture[14] == 1 ) return 1;
- IfCapture[14] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy14", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy14 = 5;
- if(CapturedBy14 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the BeachShack!");
- GangZoneHideForAll(Beach);
- GangZoneShowForAll(BeachG, COLOR_ORANGE);
- GangZoneHideForAll(BeachU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_USA) {
- if(CapturedBy15 != 1) {
- if( IfCapture[15] == 1 ) return 1;
- IfCapture[15] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy15 = 1;
- if(CapturedBy15 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Diner!");
- GangZoneHideForAll(Diner);
- GangZoneShowForAll(DinerU, COLOR_BLUE);
- GangZoneHideForAll(DinerG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_GERMANY)
- {
- if(CapturedBy15 != 2) {
- if( IfCapture[15] == 1 ) return 1;
- IfCapture[15] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy15 = 2;
- if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Diner!");
- GangZoneHideForAll(Diner);
- GangZoneShowForAll(DinerG, COLOR_RED);
- GangZoneHideForAll(DinerU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_AUSTRALIA)
- {
- if(CapturedBy15 != 3) {
- if( IfCapture[15] == 1 ) return 1;
- IfCapture[15] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy15 = 3;
- if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the Diner!");
- GangZoneHideForAll(Diner);
- GangZoneShowForAll(DinerG, COLOR_YELLOW);
- GangZoneHideForAll(DinerU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_JAPAN)
- {
- if(CapturedBy15 != 4) {
- if( IfCapture[15] == 1 ) return 1;
- IfCapture[15] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy15 = 4;
- if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Diner!");
- GangZoneHideForAll(Diner);
- GangZoneShowForAll(DinerG, COLOR_WHITE);
- GangZoneHideForAll(DinerU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, -1985.239, 2277.186, -1845.104, 2440.676) && gTeam[i] == TEAM_RUSSIA)
- {
- if(CapturedBy15 != 5) {
- if( IfCapture[15] == 1 ) return 1;
- IfCapture[15] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy15", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy15 = 5;
- if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Diner!");
- GangZoneHideForAll(Diner);
- GangZoneShowForAll(DinerG, COLOR_ORANGE);
- GangZoneHideForAll(DinerU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859) && gTeam[i] == TEAM_USA) {
- if(CapturedBy16 != 1) {
- if( IfCapture[16] == 1 ) return 1;
- IfCapture[16] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy16", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy16 = 1;
- if(CapturedBy16 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Quarry!");
- GangZoneHideForAll(Quarry);
- GangZoneShowForAll(QuarryU, COLOR_BLUE);
- GangZoneHideForAll(QuarryG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859) && gTeam[i] == TEAM_GERMANY)
- {
- if(CapturedBy16 != 2) {
- if( IfCapture[16] == 1 ) return 1;
- IfCapture[16] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy16", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy16 = 2;
- if(CapturedBy16 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Quarry!");
- GangZoneHideForAll(Quarry);
- GangZoneShowForAll(QuarryG, COLOR_RED);
- GangZoneHideForAll(QuarryU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859) && gTeam[i] == TEAM_AUSTRALIA)
- {
- if(CapturedBy16 != 3) {
- if( IfCapture[16] == 1 ) return 1;
- IfCapture[16] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy16", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy16 = 3;
- if(CapturedBy16 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the Quarry!");
- GangZoneHideForAll(Quarry);
- GangZoneShowForAll(QuarryG, COLOR_YELLOW);
- GangZoneHideForAll(QuarryU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859) && gTeam[i] == TEAM_JAPAN)
- {
- if(CapturedBy16 != 4) {
- if( IfCapture[16] == 1 ) return 1;
- IfCapture[16] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy16", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy16 = 4;
- if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Quarry!");
- GangZoneHideForAll(Quarry);
- GangZoneShowForAll(QuarryG, COLOR_WHITE);
- GangZoneHideForAll(QuarryU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 485.822326, 751.018859, 741.822326, 991.018859) && gTeam[i] == TEAM_RUSSIA)
- {
- if(CapturedBy16 != 5) {
- if( IfCapture[16] == 1 ) return 1;
- IfCapture[16] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy16", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy16 = 5;
- if(CapturedBy15 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Quarry!");
- GangZoneHideForAll(Quarry);
- GangZoneShowForAll(QuarryG, COLOR_ORANGE);
- GangZoneHideForAll(QuarryU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170) && gTeam[i] == TEAM_USA) {
- if(CapturedBy17 != 1) {
- if( IfCapture[17] == 1 ) return 1;
- IfCapture[17] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy17", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy17 = 1;
- if(CapturedBy17 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Field Hospital!");
- GangZoneHideForAll(FH);
- GangZoneShowForAll(FHU, COLOR_BLUE);
- GangZoneHideForAll(FHG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170) && gTeam[i] == TEAM_GERMANY)
- {
- if(CapturedBy17 != 2) {
- if( IfCapture[17] == 1 ) return 1;
- IfCapture[17] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy17", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy17 = 2;
- if(CapturedBy17 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Field Hospital!");
- GangZoneHideForAll(FH);
- GangZoneShowForAll(FHG, COLOR_RED);
- GangZoneHideForAll(FHU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170) && gTeam[i] == TEAM_AUSTRALIA)
- {
- if(CapturedBy17 != 3) {
- if( IfCapture[17] == 1 ) return 1;
- IfCapture[17] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy17", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy17 = 3;
- if(CapturedBy17 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the Field Hospital!");
- GangZoneHideForAll(FH);
- GangZoneShowForAll(FHG, COLOR_YELLOW);
- GangZoneHideForAll(FHU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170) && gTeam[i] == TEAM_JAPAN)
- {
- if(CapturedBy17 != 4) {
- if( IfCapture[17] == 1 ) return 1;
- IfCapture[17] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy17", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy17 = 4;
- if(CapturedBy17 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Field Hospital!");
- GangZoneHideForAll(FH);
- GangZoneShowForAll(FHG, COLOR_WHITE);
- GangZoneHideForAll(FHU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 921.603271, 1648.425170, 985.603271, 1816.425170) && gTeam[i] == TEAM_RUSSIA)
- {
- if(CapturedBy17 != 5) {
- if( IfCapture[17] == 1 ) return 1;
- IfCapture[17] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy17", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy17 = 5;
- if(CapturedBy17 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Field Hospital!");
- GangZoneHideForAll(FH);
- GangZoneShowForAll(FHG, COLOR_ORANGE);
- GangZoneHideForAll(FHU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751) && gTeam[i] == TEAM_USA) {
- if(CapturedBy18 != 1) {
- if( IfCapture[18] == 1 ) return 1;
- IfCapture[18] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy18", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy18 = 1;
- if(CapturedBy18 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Gun Warehouse!");
- GangZoneHideForAll(GW);
- GangZoneShowForAll(GWU, COLOR_BLUE);
- GangZoneHideForAll(GWG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751) && gTeam[i] == TEAM_GERMANY)
- {
- if(CapturedBy18 != 2) {
- if( IfCapture[18] == 1 ) return 1;
- IfCapture[18] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy18", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy18 = 2;
- if(CapturedBy18 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Gun Warhouse!");
- GangZoneHideForAll(GW);
- GangZoneShowForAll(GWG, COLOR_RED);
- GangZoneHideForAll(GWU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751) && gTeam[i] == TEAM_AUSTRALIA)
- {
- if(CapturedBy18 != 3) {
- if( IfCapture[18] == 1 ) return 1;
- IfCapture[18] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy18", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy18 = 3;
- if(CapturedBy18 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the Gun Warehouse!");
- GangZoneHideForAll(GW);
- GangZoneShowForAll(GWG, COLOR_YELLOW);
- GangZoneHideForAll(GWU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751) && gTeam[i] == TEAM_JAPAN)
- {
- if(CapturedBy18 != 4) {
- if( IfCapture[18] == 1 ) return 1;
- IfCapture[18] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy18", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy18 = 4;
- if(CapturedBy18 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Gun Warehouse!");
- GangZoneHideForAll(GW);
- GangZoneShowForAll(GWG, COLOR_WHITE);
- GangZoneHideForAll(GWU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1570.820068, 2266.395751, 1722.820068, 2426.395751) && gTeam[i] == TEAM_RUSSIA)
- {
- if(CapturedBy18 != 5) {
- if( IfCapture[18] == 1 ) return 1;
- IfCapture[18] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy18", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy18 = 5;
- if(CapturedBy18 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Gun Warehouse!");
- GangZoneHideForAll(GW);
- GangZoneShowForAll(GWG, COLOR_ORANGE);
- GangZoneHideForAll(GWU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798) && gTeam[i] == TEAM_USA) {
- if(CapturedBy19 != 1) {
- if( IfCapture[19] == 1 ) return 1;
- IfCapture[19] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy19", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy19 = 1;
- if(CapturedBy19 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Docks!");
- GangZoneHideForAll(Dock);
- GangZoneShowForAll(DockU, COLOR_BLUE);
- GangZoneHideForAll(DockG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798) && gTeam[i] == TEAM_GERMANY)
- {
- if(CapturedBy19 != 2) {
- if( IfCapture[19] == 1 ) return 1;
- IfCapture[19] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy19", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy19 = 2;
- if(CapturedBy19 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the Docks!");
- GangZoneHideForAll(Dock);
- GangZoneShowForAll(DockG, COLOR_RED);
- GangZoneHideForAll(DockU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798) && gTeam[i] == TEAM_AUSTRALIA)
- {
- if(CapturedBy19 != 3) {
- if( IfCapture[19] == 1 ) return 1;
- IfCapture[19] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy19", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy19 = 3;
- if(CapturedBy19 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the Docks!");
- GangZoneHideForAll(Dock);
- GangZoneShowForAll(DockG, COLOR_YELLOW);
- GangZoneHideForAll(DockU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798) && gTeam[i] == TEAM_JAPAN)
- {
- if(CapturedBy19 != 4) {
- if( IfCapture[19] == 1 ) return 1;
- IfCapture[19] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy19", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy19 = 4;
- if(CapturedBy19 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Docks!");
- GangZoneHideForAll(Dock);
- GangZoneShowForAll(DockG, COLOR_WHITE);
- GangZoneHideForAll(DockU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, -2320.655517, 2219.018798, -2160.655517, 2491.018798) && gTeam[i] == TEAM_RUSSIA)
- {
- if(CapturedBy19 != 5) {
- if( IfCapture[19] == 1 ) return 1;
- IfCapture[19] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy19", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy19 = 5;
- if(CapturedBy19 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Docks!");
- GangZoneHideForAll(Dock);
- GangZoneShowForAll(DockG, COLOR_ORANGE);
- GangZoneHideForAll(DockU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- foreach(Player, i) {
- if(IsPlayerInArea(i, 1411.231323, 2715.757568, 1539.231323, 2875.757568) && gTeam[i] == TEAM_USA) {
- if(CapturedBy20 != 1) {
- if( IfCapture[20] == 1 ) return 1;
- IfCapture[20] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy20", 1);
- uscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy20 = 1;
- if(CapturedBy20 != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the Country Club!");
- GangZoneHideForAll(CC);
- GangZoneShowForAll(CCU, COLOR_BLUE);
- GangZoneHideForAll(CCG);
- dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1411.231323, 2715.757568, 1539.231323, 2875.757568) && gTeam[i] == TEAM_GERMANY)
- {
- if(CapturedBy20 != 2) {
- if( IfCapture[20] == 1 ) return 1;
- IfCapture[20] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy20", 2);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy20 = 2;
- if(CapturedBy20 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured the COuntry Club!");
- GangZoneHideForAll(CC);
- GangZoneShowForAll(CCG, COLOR_RED);
- GangZoneHideForAll(CCU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1411.231323, 2715.757568, 1539.231323, 2875.7575688) && gTeam[i] == TEAM_AUSTRALIA)
- {
- if(CapturedBy20 != 3) {
- if( IfCapture[20] == 1 ) return 1;
- IfCapture[20] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy20", 3);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy20 = 3;
- if(CapturedBy20 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team AUSTRALIA have captured the COuntry Club!");
- GangZoneHideForAll(CC);
- GangZoneShowForAll(CCG, COLOR_YELLOW);
- GangZoneHideForAll(CCU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1411.231323, 2715.757568, 1539.231323, 2875.757568) && gTeam[i] == TEAM_JAPAN)
- {
- if(CapturedBy20 != 4) {
- if( IfCapture[20] == 1 ) return 1;
- IfCapture[20] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy20", 4);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy20 = 4;
- if(CapturedBy20 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Japan have captured the Country Club!");
- GangZoneHideForAll(CC);
- GangZoneShowForAll(CCG, COLOR_WHITE);
- GangZoneHideForAll(CCU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }else if(IsPlayerInArea(i, 1411.231323, 2715.757568, 1539.231323, 2875.757568) && gTeam[i] == TEAM_RUSSIA)
- {
- if(CapturedBy20 != 5) {
- if( IfCapture[20] == 1 ) return 1;
- IfCapture[20] = 0;
- dini_IntSet("/Variables/Variables.ini", "CapturedBy20", 5);
- gscore++;
- //SetTimer("ScoreText", 5000, 0);
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- CapturedBy20 = 5;
- if(CapturedBy20 != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team Russia have captured the Country Club!");
- GangZoneHideForAll(CC);
- GangZoneShowForAll(CCG, COLOR_ORANGE);
- GangZoneHideForAll(CCU);
- dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
- CheckForLevelUpdate(i);
- }
- }
- }
- return 1;
- }
- public SendPlayerFormattedText(playerid, const string[], define)
- {
- new tmpbuf[256];
- format(tmpbuf, sizeof(tmpbuf), string, define);
- SendClientMessage(playerid, 0x8CFFA9FF, tmpbuf);
- }
- SendUSAMessage(color, text[])
- {
- foreach(Player, i) {
- if (gTeam[i] == TEAM_USA) {
- SendClientMessage(i, color, text);
- }
- }
- return 1;
- }
- SendGERMANYMessage(color, text[])
- {
- foreach(Player, i) {
- if (gTeam[i] == TEAM_GERMANY) {
- SendClientMessage(i, color, text);
- }
- }
- return 1;
- }
- SendAUSTRALIAMessage(color, text[])
- {
- foreach(Player, i) {
- if (gTeam[i] == TEAM_AUSTRALIA) {
- SendClientMessage(i, color, text);
- }
- }
- return 1;
- }
- SendRUSSIAMessage(color, text[])
- {
- foreach(Player, i) {
- if (gTeam[i] == TEAM_RUSSIA) {
- SendClientMessage(i, color, text);
- }
- }
- return 1;
- }
- SendJAPANMessage(color, text[])
- {
- foreach(Player, i) {
- if (gTeam[i] == TEAM_JAPAN) {
- SendClientMessage(i, color, text);
- }
- }
- return 1;
- }
- /*
- SendSquadMessage(teamid, color, text[])
- {
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerSquad[i] == teamid)
- {
- SendClientMessage(i, color, text);
- }
- }
- }
- return 1;
- }
- */
- stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) {
- return 1;
- }
- return 0;
- }
- forward mission(playerid);
- public mission(playerid)
- {
- if(kills[playerid] != 6) {
- SendClientMessage(playerid, COLOR_WHITE, "You failed the mission. . . .");
- }
- return 1;
- }
- RandomPlayerID()
- {
- new playerid, connected;
- for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(playerid) == 1) connected++;
- if(connected == 0) return -1;
- start:
- playerid = random(MAX_PLAYERS);
- if(IsPlayerConnected(playerid) == 0) goto start;
- return playerid;
- }
- forward Hitman(playerid);
- public Hitman(playerid)
- {
- new rand = RandomPlayerID();
- if(gTeam[playerid] == TEAM_USA && gTeam[rand] == TEAM_USA) {
- SetTimerEx("Hitman", 100, 0, "i", playerid);
- }
- else if(gTeam[playerid] == TEAM_USA && gTeam[rand] == TEAM_GERMANY) {
- new randplayern[MAX_PLAYER_NAME];
- randperson[rand] = GetPlayerName(rand, randplayern, sizeof(randplayern));
- new string[128];
- format(string, sizeof(string), "Find and destroy %s!", randplayern);
- SendClientMessage(playerid, COLOR_WHITE, string);
- }
- return 1;
- }
- forward HitmanG(playerid);
- public HitmanG(playerid)
- {
- new rand = RandomPlayerID();
- if(gTeam[playerid] == TEAM_GERMANY && gTeam[rand] == TEAM_GERMANY) {
- SetTimerEx("HitmanG", 100, 0, "i", playerid);
- }
- else if(gTeam[playerid] == TEAM_GERMANY && gTeam[rand] == TEAM_USA) {
- new randplayern[MAX_PLAYER_NAME];
- randperson[rand] = GetPlayerName(rand, randplayern, sizeof(randplayern));
- new string[128];
- format(string, sizeof(string), "Find and destroy %s!", randplayern);
- SendClientMessage(playerid, COLOR_WHITE, string);
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (GetVehicleModel(PlayerBarracks[playerid]) == 433) {
- new vehicleid = PlayerBarracks[playerid];
- if (IsInBarracks[playerid] == true) {
- if (newkeys & KEY_SECONDARY_ATTACK) {
- LastVehicle[playerid] = PlayerBarracks[playerid];
- Barracks[vehicleid][seats] = Barracks[vehicleid][seats] - 1;
- new Float:X,Float:Y,Float:Z,Float:Ang;
- GetVehiclePos(vehicleid, X, Y, Z);
- GetVehicleZAngle(vehicleid, Ang);
- X += (2 * floatsin(-Ang, degrees));
- Y += (2 * floatcos(-Ang, degrees));
- SetPlayerPos(playerid, X, Y, Z);
- X += (2 * floatsin(-(Ang-45.0), degrees));
- Y += (2 * floatcos(-(Ang-45.0), degrees));
- SetPlayerPos(playerid, X, Y, Z);
- SetPlayerFacingAngle(playerid, Ang);
- cbx[playerid] = X;
- cby[playerid] = Y-2;
- cbz[playerid] = Z;
- cba[playerid] = Ang;
- TogglePlayerSpectating(playerid, false);
- SetTimerEx("ExitCB", 500, 0, "i", playerid);
- GivePlayerWeapon(playerid, 46, 1);
- SetCameraBehindPlayer(playerid);
- IsInBarracks[playerid] = false;
- PlayerBarracks[playerid] = 0;
- }
- }
- }
- if (GetVehicleModel(PlayerCargoB[playerid]) == 548|| GetVehicleModel(PlayerCargoB[playerid]) == 563|| GetVehicleModel(PlayerCargoB[playerid]) == 511 ) {
- new vehicleid = PlayerCargoB[playerid];
- if (IsInCargoB[playerid] == true) {
- if (newkeys & KEY_SECONDARY_ATTACK) {
- LastVehicle[playerid] = PlayerCargoB[playerid];
- CargoBob[vehicleid][seats] = CargoBob[vehicleid][seats] - 1;
- new Float:X,Float:Y,Float:Z,Float:Ang;
- GetVehiclePos(vehicleid, X, Y, Z);
- GetVehicleZAngle(vehicleid, Ang);
- TogglePlayerSpectating(playerid, false);
- X += (2 * floatsin(-Ang, degrees));
- Y += (2 * floatcos(-Ang, degrees));
- SetPlayerPos(playerid, X, Y, Z);
- X += (2 * floatsin(-(Ang-45.0), degrees));
- Y += (2 * floatcos(-(Ang-45.0), degrees));
- SetPlayerPos(playerid, X, Y, Z);
- SetPlayerFacingAngle(playerid, Ang);
- cbx[playerid] = X;
- cby[playerid] = Y-2;
- cbz[playerid] = Z;
- cba[playerid] = Ang;
- SetTimerEx("ExitCB", 500, 0, "i", playerid);
- SetPlayerFacingAngle(playerid, Ang);
- SetCameraBehindPlayer(playerid);
- IsInCargoB[playerid] = false;
- PlayerCargoB[playerid] = 0;
- }
- }
- }
- if(gPlayerClass[playerid] == DEMOLITION) {
- if((newkeys & KEY_CROUCH) && (newkeys & KEY_FIRE) ) {
- if(pSpawned[playerid] == 1) {
- if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
- if( hasbombs[playerid] == 1) {
- if(Planted[playerid] == 1) {
- GivePlayerWeapon(playerid, 40, 1);
- ClearAnimations(playerid);
- ApplyAnimation(playerid,"PED","bomber",4.0,0,0,0,0,1000);
- SetTimerEx("Explode", 1200, 0, "i", playerid);
- SetPlayerArmedWeapon(playerid, 0);
- return 1;
- }
- if(Planted[playerid] == 0) {
- GetPlayerPos(playerid, bx[playerid], by[playerid], bz[playerid]);
- C4[playerid] = CreateObject(1252, bx[playerid], by[playerid], bz[playerid]-1, -87.6624853592, 0.000000, 0.000000);
- Planted[playerid] = 1;
- ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,1000);
- SendClientMessage(playerid,COLOR_YELLOW,"Bomb Planted, Press 'CROUCH + FIRE' to detonate it.");
- return 1;
- }
- } else SendClientMessage(playerid, COLOR_GREY, "You need to be on the explosive class!");
- } else SendClientMessage(playerid,COLOR_GREY,"You cannot plant a bomb in a car");
- } else SendClientMessage(playerid,COLOR_GREY,"You must spawn before planting a bomb");
- }
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER ) LastVehicle[playerid] = GetPlayerVehicleID(playerid);
- new vehicleid = LastVehicle[playerid];
- if( oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) {
- if (GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 433 || GetVehicleModel(vehicleid) == 563 || GetVehicleModel(vehicleid) == 511) {
- CargoBobUser[playerid][vehicleid] =0;
- BarracksUser[playerid][vehicleid] =0;
- }
- }
- if( !IsPlayerAdmin(playerid)) {
- new vehicleidx = GetPlayerVehicleID(playerid);
- if(newstate == PLAYER_STATE_DRIVER) {
- if(GetVehicleModel(vehicleidx) == 460) {
- if(rank[playerid] >= 3) {
- IsInHunter[playerid] = vehicleidx;
- }
- else {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- SetPlayerPos(playerid, X+2.0, Y, Z);
- SendClientMessage(playerid, COLOR_RED, "You arent rank 3!");
- }
- }
- if (GetVehicleModel(vehicleidx) == 432) {
- if(rank[playerid] >= 2) {
- IsInRhino[playerid] = vehicleidx;
- }
- else {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- SetPlayerPos(playerid, X+2.0, Y, Z+2.0);
- SendClientMessage(playerid, COLOR_RED, "You arent rank 2!");
- }
- }
- if (GetVehicleModel(vehicleidx) == 520) {
- if(rank[playerid] >= 3) {
- if(gPlayerClass[playerid] == PILOT || gPlayerClass[playerid] == ADMIN ) {
- //is in the hydra
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You have to be a pilot to drive a hydra!");
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- SetPlayerPos(playerid, X+2.0, Y, Z);
- }
- }
- else {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- SetPlayerPos(playerid, X+2.0, Y, Z+2.0);
- SendClientMessage(playerid, COLOR_RED, "You arent rank 2!");
- }
- }
- if (GetVehicleModel(vehicleidx) == 425) {
- if(rank[playerid] >= 4) {
- if(gPlayerClass[playerid] == PILOT || gPlayerClass[playerid] == ADMIN ) {
- //is in the hydra
- }
- else {
- SendClientMessage(playerid, COLOR_GREY, "You have to be a pilot to drive a HUNTER!");
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- SetPlayerPos(playerid, X+2.0, Y, Z);
- }
- }
- else {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- SetPlayerPos(playerid, X+2.0, Y, Z+2.0);
- SendClientMessage(playerid, COLOR_RED, "You arent rank 4!");
- }
- }
- }
- }
- return 1;
- }
- public Explode(playerid)
- {
- DestroyObject(C4[playerid]);
- CreateExplosion(bx[playerid], by[playerid], bz[playerid], 6, ExplosionRadius);
- GameTextForPlayer(playerid, "~R~Bomb Detonated", 2000, 3);
- Planted[playerid] = 0;
- return 1;
- }
- public GetClosestPlayer(p1)
- {
- new x,Float:dis,Float:dis2,player;
- player = -1;
- dis = 99999.99;
- for (x=0;x<MAX_PLAYERS;x++) {
- if(IsPlayerConnected(x)) {
- if(x != p1) {
- dis2 = GetDistanceBetweenPlayers(x,p1);
- if(dis2 < dis && dis2 != -1.00) {
- dis = dis2;
- player = x;
- }
- }
- }
- }
- return player;
- }
- public Float:GetDistanceBetweenPlayers(p1,p2)
- {
- new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
- if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)) {
- return -1.00;
- }
- GetPlayerPos(p1,x1,y1,z1);
- GetPlayerPos(p2,x2,y2,z2);
- return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
- }
- forward Nuke0();
- public Nuke0()
- {
- nuked = 0; //Reset Timer for nukes, 3 minutes before nukes allowed again
- return 1;
- }
- forward NukeTime(playerid);
- public NukeTime(playerid)
- {
- CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
- CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
- CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
- CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
- CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
- CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
- CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
- CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
- CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
- CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
- CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
- CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
- CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
- CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
- CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
- CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
- CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
- CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
- CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
- CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
- CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
- CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
- CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
- CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
- CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
- CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
- CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
- CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
- CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
- CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
- CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
- CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
- CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
- CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
- CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
- CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
- CreateExplosion(-246.4919,1212.8153,19.7422,7, 20.0);
- CreateExplosion(-230.0679,1191.2112,19.7422,7, 20.0);
- CreateExplosion(-312.4290,1199.8292,19.4117,7, 20.0);
- CreateExplosion(-272.1161,1110.1294,19.2600,7, 20.0);
- CreateExplosion(-10.3318,1094.0081,19.2513, 7, 20.0);
- CreateExplosion(-145.4857,1147.8174,19.5938,7, 20.0);
- CreateExplosion(-115.7963,1196.4725,19.5867,7, 20.0);
- CreateExplosion(-226.5582,1212.7991,19.7422,7, 20.0);
- return 1;
- }
- forward NukeTimeG(playerid);
- public NukeTimeG(playerid)
- {
- CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
- CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
- CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
- CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
- CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
- CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
- CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
- CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
- CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
- CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
- CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
- CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
- CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
- CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
- CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
- CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
- CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
- CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
- CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
- CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
- CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
- CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
- CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
- CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
- CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
- CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
- CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
- CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
- CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
- CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
- CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
- CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
- CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
- CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
- CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
- CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
- CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
- CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
- CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
- CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
- CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
- CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
- CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
- CreateExplosion(-219.6780,2699.8298,62.5391,7, 20.0);
- CreateExplosion(-282.9156,2664.3826,62.6301,7, 20.0);
- CreateExplosion(-296.3685,2666.5051,62.6595,7, 20.0);
- CreateExplosion(-303.6356,2680.3506,62.6317,7, 20.0);
- CreateExplosion(-314.7372,2685.9526,62.6486,7, 20.0);
- CreateExplosion(-224.4260,2609.5977,62.7031,7, 20.0);
- CreateExplosion(-210.4472,2645.1062,63.1548,7, 20.0);
- CreateExplosion(-186.0549,2662.1660,62.6305,7, 20.0);
- CreateExplosion(-187.5771,2690.6819,62.5391,7, 20.0);
- return 1;
- }
- forward HealAgain(playerid);
- public HealAgain(playerid)
- {
- healedrec[playerid] = 0;
- return 1;
- }
- forward SettingPlayerTeam();
- public SettingPlayerTeam()
- {
- foreach(Player, playerid) {
- SetPlayerTeam(playerid, gTeam[playerid]);
- }
- return 1;
- }
- forward restorerepair(playerid);
- public restorerepair(playerid)
- {
- repair[playerid] = 0;
- return 1;
- }
- forward restoreammo(playerid);
- public restoreammo(playerid)
- {
- ammoo[playerid] = 0;
- return 1;
- }
- ReturnUser(text[], playerid = INVALID_PLAYER_ID)
- {
- new pos = 0;
- while (text[pos] < 0x21) {
- if (text[pos] == 0) return INVALID_PLAYER_ID;
- pos++;
- }
- new userid = INVALID_PLAYER_ID;
- if ((text[pos])) {
- userid = strval(text[pos]);
- if (userid >=0 && userid < MAX_PLAYERS) {
- if(!IsPlayerConnected(userid))
- userid = INVALID_PLAYER_ID;
- else return userid;
- return playerid;
- }
- }
- new len = strlen(text[pos]);
- new count = 0;
- new pname[MAX_PLAYER_NAME];
- for (new i = 0; i < MAX_PLAYERS; i++) {
- if (IsPlayerConnected(i)) {
- GetPlayerName(i, pname, sizeof (pname));
- if (strcmp(pname, text[pos], true, len) == 0) {
- if (len == strlen(pname)) return i;
- else {
- count++;
- userid = i;
- }
- }
- }
- }
- if (count != 1) {
- if (playerid != INVALID_PLAYER_ID) {
- if (count) SendClientMessage(playerid, YELLOW, "There are multiple users, enter full playername.");
- else SendClientMessage(playerid, RED, "Playername not found.");
- }
- userid = INVALID_PLAYER_ID;
- }
- return userid;
- }
- stock IsNumeric(const string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++)
- if (string[i] > '9' || string[i] < '0')
- return 0;
- return 1;
- }
- stock sscanf(string[], format[], {Float,_}
- :...)
- {
- #if defined isnull
- if (isnull(string))
- #else
- if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
- #endif
- {
- return format[0];
- }
- #pragma tabsize 4
- new
- formatPos = 0,
- stringPos = 0,
- paramPos = 2,
- paramCount = numargs(),
- delim = ' ';
- while (string[stringPos] && string[stringPos] <= ' ') {
- stringPos++;
- }
- while (paramPos < paramCount && string[stringPos]) {
- switch (format[formatPos++]) {
- case '\0':
- {
- return 0;
- }
- case 'i', 'd':
- {
- new
- neg = 1,
- num = 0,
- ch = string[stringPos];
- if (ch == '-') {
- neg = -1;
- ch = string[++stringPos];
- }
- do {
- stringPos++;
- if ('0' <= ch <= '9') {
- num = (num * 10) + (ch - '0');
- }
- else {
- return -1;
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num * neg);
- }
- case 'h', 'x':
- {
- new
- num = 0,
- ch = string[stringPos];
- do {
- stringPos++;
- switch (ch) {
- case 'x', 'X':
- {
- num = 0;
- continue;
- }
- case '0' .. '9':
- {
- num = (num << 4) | (ch - '0');
- }
- case 'a' .. 'f':
- {
- num = (num << 4) | (ch - ('a' - 10));
- }
- case 'A' .. 'F':
- {
- num = (num << 4) | (ch - ('A' - 10));
- }
- default:
- {
- return -1;
- }
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num);
- }
- case 'c':
- {
- setarg(paramPos, 0, string[stringPos++]);
- }
- case 'f':
- {
- setarg(paramPos, 0, _:floatstr(string[stringPos]));
- }
- case 'p':
- {
- delim = format[formatPos++];
- continue;
- }
- case '\'':
- {
- new
- end = formatPos - 1,
- ch;
- while ((ch = format[++end]) && ch != '\'') {}
- if (!ch) {
- return -1;
- }
- format[end] = '\0';
- if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1) {
- if (format[end + 1]) {
- return -1;
- }
- return 0;
- }
- format[end] = '\'';
- stringPos = ch + (end - formatPos);
- formatPos = end + 1;
- }
- case 'u':
- {
- new
- end = stringPos - 1,
- id = 0,
- bool:num = true,
- ch;
- while ((ch = string[++end]) && ch != delim) {
- if (num) {
- if ('0' <= ch <= '9') {
- id = (id * 10) + (ch - '0');
- }
- else {
- num = false;
- }
- }
- }
- if (num && IsPlayerConnected(id)) {
- setarg(paramPos, 0, id);
- }
- else {
- #if !defined foreach
- #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
- #define __SSCANF_FOREACH__
- #endif
- string[end] = '\0';
- num = false;
- new
- name[MAX_PLAYER_NAME];
- id = end - stringPos;
- foreach (Player, playerid) {
- GetPlayerName(playerid, nameee, sizeof (name));
- if (!strcmp(name, string[stringPos], true, id)) {
- setarg(paramPos, 0, playerid);
- num = true;
- break;
- }
- }
- if (!num) {
- setarg(paramPos, 0, INVALID_PLAYER_ID);
- }
- string[end] = ch;
- #if defined __SSCANF_FOREACH__
- #undef foreach
- #undef __SSCANF_FOREACH__
- #endif
- }
- stringPos = end;
- }
- case 's', 'z':
- {
- new
- i = 0,
- ch;
- if (format[formatPos]) {
- while ((ch = string[stringPos++]) && ch != delim) {
- setarg(paramPos, i++, ch);
- }
- if (!i) {
- return -1;
- }
- }
- else {
- while ((ch = string[stringPos++])) {
- setarg(paramPos, i++, ch);
- }
- }
- stringPos--;
- setarg(paramPos, i, '\0');
- }
- default:
- {
- continue;
- }
- }
- while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ') {
- stringPos++;
- }
- while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' ')) {
- stringPos++;
- }
- paramPos++;
- }
- do {
- if ((delim = format[formatPos++]) > ' ') {
- if (delim == '\'') {
- while ((delim = format[formatPos++]) && delim != '\'') {}
- }
- else if (delim != 'z') {
- return delim;
- }
- }
- }
- while (delim > ' ');
- return 0;
- }
- stock CheckForLevelUpdate(playerid)
- {
- if ( GetPlayerScore(playerid) >= 50 ) {
- if( rank[playerid] < 1 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "*You are a Private!");
- rank[playerid] = 1;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 5000);
- }
- }
- if ( GetPlayerScore(playerid) >= 100 ) {
- if( rank[playerid] < 2 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "**You are a Corporal!");
- rank[playerid] = 2;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 10000);
- }
- }
- if ( GetPlayerScore(playerid) >= 250 ) {
- if( rank[playerid] < 3 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "***You are a Sergeant!");
- rank[playerid] = 3;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 15000);
- }
- }
- if ( GetPlayerScore(playerid) >= 500 ) {
- if( rank[playerid] < 4 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "****You are a Lieutenant!");
- rank[playerid] = 4;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 20000);
- }
- }
- if ( GetPlayerScore(playerid) >= 750 ) {
- if( rank[playerid] < 5 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "*****You are a Captain!");
- rank[playerid] = 5;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 25000);
- }
- }
- if ( GetPlayerScore(playerid) >= 1000 ) {
- if( rank[playerid] < 6 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "******You are a Major!");
- SendClientMessage(playerid, COLOR_CON_GREEN,"Congratulations! You recieved all the badges!");
- SendClientMessage(playerid, COLOR_CON_GREEN,"You may still recieve ranks but you will not gain anymore badges.");
- rank[playerid] = 6;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 30000);
- }
- }
- if ( GetPlayerScore(playerid) >= 1250) {
- if( rank[playerid] < 7 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "*******You are a Colonel!");
- rank[playerid] = 7;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 35000);
- }
- }
- if ( GetPlayerScore(playerid) >= 1500 ) {
- if( rank[playerid] < 8 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "********You are a Lieutenant General!");
- rank[playerid] = 8;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 40000);
- }
- }
- if ( GetPlayerScore(playerid) >= 2000 ) {
- if( rank[playerid] < 9 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "*********You are a Major General!");
- rank[playerid] = 9;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 45000);
- }
- }
- if ( GetPlayerScore(playerid) >= 2250 ) {
- if( rank[playerid] < 10 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "**********You are a General!");
- rank[playerid] = 10;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 50000);
- }
- }
- if ( GetPlayerScore(playerid) >= 4500 ) {
- if( rank[playerid] < 11 ) {
- PlayerPlaySound(playerid, 1150, 0, 0, 0);
- SendClientMessage(playerid, COLOR_CON_GREEN,"You Got Promoted!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "***********You are a the General of The Army!");
- SendClientMessage(playerid, COLOR_CON_GREEN, "Congratulations! You recieved all of the ranks!");
- rank[playerid] = 11;
- SetPlayerWantedLevel(playerid, rank[playerid]);
- GivePlayerMoney(playerid, 100000);
- }
- }
- if( rank[playerid] > 11 ) rank[playerid] = 11;
- return 1;
- }
- stock RestoreClassWeapons(playerid)
- {
- if(gPlayerClass[playerid] == 0) {
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 31, 500);
- GivePlayerWeapon(playerid, 25, 100);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 31, 500);
- GivePlayerWeapon(playerid, 25, 100);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if(gPlayerClass[playerid] == 1) {
- if( rank[playerid] >= 1 ) {
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 16, 50);
- GivePlayerWeapon(playerid, 36, 5);
- GivePlayerWeapon(playerid, 24, 200);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 16, 50);
- GivePlayerWeapon(playerid, 36, 5);
- GivePlayerWeapon(playerid, 24, 200);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }else SendClientMessage(playerid, COLOR_RED, "You need to be rank 1 to be able to use Demolition !");
- }
- if(gPlayerClass[playerid] == 2) {
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN ) {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if(gPlayerClass[playerid] == 3) {
- if(gTeam[playerid] == TEAM_JAPAN || gTeam[playerid] == TEAM_RUSSIA) {
- SendClientMessage(playerid, COLOR_GREY, "You cant be a pilot on russia or japan!");
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- if(rank[playerid] >= 3) {
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 22, 50);
- }
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 22, 50);
- }
- }
- }
- if(gPlayerClass[playerid] == 4) {
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 1, 1);
- SetPlayerSkin(playerid, 275);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- SetPlayerSkin(playerid, 70);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if(gPlayerClass[playerid] == 5) {
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 29, 200);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 29, 200);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if( gPlayerClass[playerid] == 6 ) { //pyro
- if(gTeam[playerid] == TEAM_USA) {
- GivePlayerWeapon(playerid, 16, 20);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 37, 550);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- GivePlayerWeapon(playerid, 16, 20);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 37, 550);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if( gPlayerClass[playerid] == 7 ) { //scout
- if(gTeam[playerid] == TEAM_USA) {
- SetPlayerArmour(playerid, 25);
- GivePlayerWeapon(playerid, 28, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 200);
- }else
- if(gTeam[playerid] == TEAM_GERMANY) {
- SetPlayerArmour(playerid, 25);
- GivePlayerWeapon(playerid, 28, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 22, 200);
- }else if( gTeam[playerid] == TEAM_RUSSIA || gTeam[playerid] == TEAM_JAPAN )
- {
- GivePlayerWeapon(playerid, 34, 200);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 24, 200);
- }
- }
- if( gPlayerClass[playerid] == ADMIN ) {
- GivePlayerWeapon(playerid, 38, 20000);
- GivePlayerWeapon(playerid, 22, 20000);
- SetPlayerArmour(playerid, 100);
- }
- if(gPlayerClass[playerid] == GENERAL) {
- SetPlayerArmour(playerid, 95);
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerWeapon(playerid, 28, 200);
- }
- return 1;
- }
- stock PlayerName(playerid)
- {
- new UserName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, UserName, sizeof(UserName));
- return UserName;
- }
- stock bigstrtok(const string[], &idx)
- {
- new length = strlen(string);
- while ((idx < length) && (string[idx] <= ' ')) {
- idx++;
- }
- new offset = idx;
- new result[128];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
- result[idx - offset] = string[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- return result;
- }
- public SendClientMessageToAdmins(color,string[],alevel)
- {
- foreach(Player, i) {
- if (adminlevel[i] >= alevel) {
- SendClientMessage(i, color, string);
- printf("%s", string);
- }
- }
- return 1;
- }
- public BanLog(string[])
- {
- new entry[128];
- format(entry, sizeof(entry), "%s\r\n",string);
- new File:hFile;
- hFile = fopen("ban.log", io_append);
- if (hFile) {
- fwrite(hFile, entry);
- fclose(hFile);
- }
- }
- public Message()
- {
- SendClientMessageToAll(WHITE, "If you want your stats, including deaths and kills to be saved type /register [password]");
- return 1;
- }
- public RankRefresh()
- {
- //rank refresh
- foreach(Player, i) {
- if( GetPlayerWantedLevel(i) != rank[i] ) SetPlayerWantedLevel(i, rank[i]);
- }
- return 0;
- }
- stock cTogglePlayerSpectating(playerid, bool:tg)
- {
- TogglePlayerSpectating(playerid, tg);
- if( tg == 0 ) {
- SetPlayerPos(playerid, PlayerSpec[playerid][Xspc], PlayerSpec[playerid][Yspc], PlayerSpec[playerid][Zspc]);
- PlayerSpec[playerid] = 0;
- SetPlayerInterior(playerid, PlayerSpec[playerid][intspc]);
- }
- else if( tg == 1 ) {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- PlayerSpec[playerid][intspc] = GetPlayerInterior(playerid);
- PlayerSpec[playerid][Xspc] = X;
- PlayerSpec[playerid][Yspc] = Y;
- PlayerSpec[playerid][Zspc] = Z;
- PlayerSpec[playerid][is] = 1;
- }
- return 1;
- }
- stock AddIpToList(playerid, reason[])
- {
- new ip[50];
- GetPlayerIp(playerid, ip, sizeof(ip));
- new entry[128];
- format(entry, sizeof(entry), "%s - %s\r\n", ip, reason);
- new File:hFile;
- hFile = fopen("bannedips.cfg", io_append);
- if (hFile) {
- fwrite(hFile, entry);
- fclose(hFile);
- }
- return 1;
- }
- stock CheckForJetpackHack(playerid)
- {
- if( adminlevel[playerid] > 0 ) { {
- }else
- GetPlayerName(playerid, nameee, 16);
- new strr[100];
- format(strr, 100, "*ANTI-HACK: Player %s has been banned for JETPACK !", nameee);
- SendClientMessageToAll(COLOR_RED, strr);
- new IP[50]; GetPlayerIp(playerid, IP, 50);
- printf("%s | (%i)%s has been banned for usage of JETPACK", IP, playerid, nameee);
- if( GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK ) BanEx(playerid, "Jetpack Ban");
- return 1;
- }
- return 1;
- }
- stock CheckForMinigun(playerid)
- {
- if( adminlevel[playerid] < 1 ) {
- if( GetPlayerWeapon(playerid) == 38 ) {
- GetPlayerName(playerid, nameee, 16);
- new strr[100];
- format(strr, 100, "*ANTI-HACK: Player %s has been banned for MINIGUN !", nameee);
- SendClientMessageToAll(COLOR_RED, strr);
- BanEx(playerid, "Minigun Ban");
- }
- }
- return 1;
- }
- /*
- stock GetTeamColor(playerid)
- {
- new color;
- if(gTeam[playerid] == TEAM_USA)
- {
- color = COLOR_BLUE;
- }
- if(gTeam[playerid] == TEAM_GERMANY)
- {
- color = COLOR_RED;
- }
- if(gTeam[playerid] == TEAM_RUSSIA)
- {
- color = COLOR_ORANGE;
- }
- if(gTeam[playerid] == TEAM_JAPAN)
- {
- color = COLOR_WHITE;
- }
- if(gTeam[playerid] == TEAM_AUSTRALIA)
- {
- color = COLOR_YELLOW;
- }
- return color;
- }
- */
- Vip(playerid)
- {
- new ArmourVip;
- ArmourVip = dini_Int(udb_encode(playername), "ArmourVip");
- if(ArmourVip == 1) {
- SetPlayerArmour(playerid, 100);
- }
- return 1;
- }
- stock GetAdminLevel(playerid)
- {
- return adminlevel[playerid];
- }
- stock GetFileDataFromSelectLine(filename[], line, result[])
- {
- new File:FileHandle;
- new LineData[1024 char];
- new LoadCount = 0;
- if(!fexist(filename)) {
- printf("Could not open \"%s\" ",filename);
- return false;
- }
- FileHandle = fopen(filename, io_read);
- while(fread(FileHandle, LineData)) {
- if(LoadCount == (line - 1)) {
- if(LineData[0] == 0) {
- continue;
- }
- if((LineData[strlen(LineData) - 1] == '\n') || (LineData[strlen(LineData) - 1] == '\r')) {
- LineData[strlen(LineData) - 1] = 0;
- if((LineData[strlen(LineData) - 2] == '\n') || (LineData[strlen(LineData) - 2] == '\r')) {
- LineData[strlen(LineData) - 2] = 0;
- }
- if(LineData[0] == 0) {
- continue;
- }
- }
- format(result, sizeof(LineData), "%s", LineData);
- fclose(FileHandle);
- return true;
- }
- LoadCount += 1;
- }
- fclose(FileHandle);
- return false;
- }
- stock GetPlayerSpeed(playerid)
- {
- new v;
- for(new i=0;i<MAX_CHECKS;i++)
- v+=Speed[playerid][i];
- v/=MAX_CHECKS;
- return v;
- }
- stock IsPlayerInPlane(playerid)
- {
- new m=GetVehicleModel(GetPlayerVehicleID(playerid));
- for(new i=0;i<sizeof(Planes);i++)
- if(m==Planes[i])
- return true;
- return false;
- }
- public MutePlayer(playerid,time,reason[])
- {
- if(IsPlayerConnected(playerid) && time) {
- Muted[playerid]=time;
- new string[128];
- format(string, sizeof(string), "Muting player '%s' (%d) for %d second(s). Reason: %s", ReturnPlayerName(playerid),playerid,time,reason);
- return 1;
- }
- return 0;
- }
- public SpamUpdate()
- {
- new reason[64];
- foreach(Player, i) {
- if(Messages[i]) {
- if(!Muted[i]) {
- if(Messages[i]>15) {
- format(reason,sizeof(reason),"Extreme spam [%d messages/second]",Messages[i]);
- SendClientMessageToAll(RED, reason);
- Kick(i);
- continue;
- }
- else if(Messages[i]>10) {
- format(reason,sizeof(reason),"Massive spam [%d messages/second]",Messages[i]);
- SendClientMessageToAll(RED, reason);
- Kick(i);
- continue;
- }
- else if(Messages[i]>4) {
- format(reason,sizeof(reason),"Spam [%d messages/second]",Messages[i]);
- SendClientMessageToAll(RED, reason);
- MutePlayer(i,2*60,reason);
- }
- Messages[i]--;
- }
- if(Commands[i]) {
- if(Commands[i]>15) {
- format(reason,sizeof(reason),"Extreme command spam [%d commands/second]",Commands[i]);
- SendClientMessageToAll(RED, reason);
- Kick(i);
- continue;
- }
- else if(Commands[i]>5) {
- format(reason,sizeof(reason),"Massive command spam [%d commands/second]",Commands[i]);
- SendClientMessageToAll(RED, reason);
- Kick(i);
- continue;
- }
- Commands[i]--;
- }
- }
- }
- return 1;
- }
- stock ReturnPlayerName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- return name;
- }
- stock GetPlayerSpeedSpeedo(playerid, bool:kmh) // by misco
- {
- new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
- if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
- rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
- return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
- }
- public VHPBarUpdate()
- {
- for(new i=0; i<MAX_PLAYERS; i++) {
- TextDrawHideForPlayer(i,vehiclehpbar[0]);
- TextDrawHideForPlayer(i,vehiclehpbar[1]);
- TextDrawHideForPlayer(i,vehiclehpbar[2]);
- TextDrawHideForPlayer(i,vehiclehpbar[3]);
- TextDrawHideForPlayer(i,vehiclehpbar[4]);
- TextDrawHideForPlayer(i,vehiclehpbar[5]);
- TextDrawHideForPlayer(i,vehiclehpbar[6]);
- TextDrawHideForPlayer(i,vehiclehpbar[7]);
- TextDrawHideForPlayer(i,vehiclehpbar[8]);
- TextDrawHideForPlayer(i,vehiclehpbar[9]);
- TextDrawHideForPlayer(i,vehiclehpbar[10]);
- TextDrawHideForPlayer(i,vehiclehpbar[11]);
- if(IsPlayerInAnyVehicle(i) == 1) {
- new vehicleid;
- vehicleid = GetPlayerVehicleID(i);
- new Float:vhp;
- GetVehicleHealth(vehicleid,vhp);
- if(vhp >= 0 && vhp <= 249) {
- TextDrawShowForPlayer(i,vehiclehpbar[0]);
- }
- if(vhp >= 250 && vhp <= 317) {
- TextDrawShowForPlayer(i,vehiclehpbar[1]);
- }
- else if(vhp >= 318 && vhp <= 385) {
- TextDrawShowForPlayer(i,vehiclehpbar[2]);
- }
- else if(vhp >= 386 && vhp <= 453) {
- TextDrawShowForPlayer(i,vehiclehpbar[3]);
- }
- else if(vhp >= 454 && vhp <= 521) {
- TextDrawShowForPlayer(i,vehiclehpbar[4]);
- }
- else if(vhp >= 522 && vhp <= 589) {
- TextDrawShowForPlayer(i,vehiclehpbar[5]);
- }
- else if(vhp >= 590 && vhp <= 657) {
- TextDrawShowForPlayer(i,vehiclehpbar[6]);
- }
- else if(vhp >= 658 && vhp <= 725) {
- TextDrawShowForPlayer(i,vehiclehpbar[7]);
- }
- else if(vhp >= 726 && vhp <= 793) {
- TextDrawShowForPlayer(i,vehiclehpbar[8]);
- }
- else if(vhp >= 794 && vhp <= 861) {
- TextDrawShowForPlayer(i,vehiclehpbar[9]);
- }
- else if(vhp >= 862 && vhp <= 929) {
- TextDrawShowForPlayer(i,vehiclehpbar[10]);
- }
- else if(vhp >= 930 && vhp <= 1000) {
- TextDrawShowForPlayer(i,vehiclehpbar[11]);
- }
- }
- }
- return 1;
- }
- public usabomb()
- {
- //
- CreateExplosion(-233.97259521484, 2633.2021484375, 62.374027252197,7,1);
- //
- CreateExplosion(-342.97686767578, 2645.517578125, 62.374027252197,7,1);
- //
- CreateExplosion(-308.1311340332, 2741.7602539063, 62.374027252197,7,1);
- //
- CreateExplosion(-173.44599914551, 2736.9846191406, 62.374027252197,7,1);
- return 1;
- }
- public germanbomb()
- {
- //
- CreateExplosion(-1459.9934082031, 2603.5158691406, 63.685111999512,7,1);
- //
- CreateExplosion(-1460.349609375, 2666.318359375, 63.685111999512,7,1);
- //
- CreateExplosion(-1417.2110595703, 2666.5600585938, 63.685111999512,7,1);
- //
- CreateExplosion(-1477.8121337891, 2555.8120117188, 63.685111999512,7,1);
- return 1;
- }
- public japanbomb()
- {
- //
- CreateExplosion(-68.205322265625, 1202.595703125, 31.104057312012,7,1);
- //
- CreateExplosion(7.6469922065735, 1203.6928710938, 31.104057312012,7,1);
- //
- CreateExplosion(8.4740104675293, 1146.4287109375, 31.104057312012,7,1);
- //
- CreateExplosion(-52.749965667725, 1145.5432128906, 31.104057312012,7,1);
- //
- CreateExplosion(-52.136501312256, 1103.1577148438, 31.104057312012,7,1);
- //
- CreateExplosion(-80.392822265625, 1102.7485351563, 31.104057312012,7,1);
- //
- CreateExplosion(-123.14115905762, 1127.2521972656, 31.104057312012,7,1);
- //
- CreateExplosion(-170.87112426758, 1170.5258789063, 31.104057312012,7,1);
- //
- CreateExplosion(-130.69058227539, 1215.0708007813, 31.104057312012,7,1);
- return 1;
- }
- public australiabomb()
- {
- //
- CreateExplosion(-686.87591552734, 931.30694580078, 14.374816894531,7,1);
- //
- CreateExplosion(-680.44287109375, 959.30560302734, 14.374816894531,7,1);
- //
- CreateExplosion(-658.13269042969, 938.02575683594, 14.374816894531,7,1);
- //
- CreateExplosion(-675.60485839844, 910.60693359375, 14.374816894531,7,1);
- return 1;
- }
- public russiabomb()
- {
- //
- CreateExplosion(-835.23388671875, 1550.8673095703, 29.692680358887,7,1);
- //
- CreateExplosion(-787.06079101563, 1569.4808349609, 29.692680358887,7,1);
- //
- CreateExplosion(-785.56701660156, 1515.6232910156, 29.692680358887,7,1);
- //
- CreateExplosion(-826.73297119141, 1509.5181884766, 29.692680358887,7,1);
- //
- CreateExplosion(-829.17639160156, 1597.6502685547, 29.692680358887,7,1);
- //
- CreateExplosion(-866.84130859375, 1596.603515625, 29.692680358887,7,1);
- //
- CreateExplosion(-864.77459716797, 1522.0950927734, 29.692680358887,7,1);
- //
- CreateExplosion(-768.34216308594, 1556.1833496094, 29.692680358887,7,1);
- //
- CreateExplosion(-782.17987060547, 1602.0943603516, 29.692680358887,7,1);
- //
- CreateExplosion(-782.1796875, 1602.09375, 29.692680358887,7,1);
- return 1;
- }
- #define TogglePlayerSpectating cTogglePlayerSpectating
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement