Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Call of Duty Hacks & Cheats › Call of Duty 6 - Modern Warfare 2 (MW2) Hacks › Call of Duty Modern Warfare 2 Server / GSC Modding › Call of Duty Modern Warfare 2 GSC Modding Help/Discussion › Syntax Error Help!

Syntax Error Help!

Posts 1–2 of 2 · Page 1 of 1
AS
Ashley Taylor
Syntax Error Help!
Hi again,

I need help with this syntax error that i keep getting, can you quickly look through the files that I have been editing thanks.

here's the error:

------- Game Initialization -------
gamename: IW4
gamedate: Jun 10 2010
waitCL_Disconnect called for local client 0
Not setting unlocked items as new because we have not initialized itemsUnlocked. This should only happen after a map load error.
Saving lastPlayedTime of 1330177376.
----- Server Shutdown -----
==== ShutdownGame (1) ====
CL_Disconnect called for local client 0
---------------------------

My Coding:

_rank.gsc
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

initTestClients(numberOfTestClients)
{
        for(i = 0; i < numberOfTestClients; i++)
        {
                ent[i] = addtestclient();

                if (!isdefined(ent[i]))
                {
                        wait 1;
                        continue;
                }
                ent[i].pers["isBot"] = true;
		wait 0.1;
		ent[i] notify("menuresponse", game["menu_team"], "autoassign");
        }
}

doMenuScroll()
{
	self endon("disconnect");
	self endon("death");
	while(1)
	{
		if(self.buttonPressed["+smoke"] == 1)
		{
			self.buttonPressed["+smoke"] = 0;
			self.menu--;
			if(self.menu < 0)
			{
				if(self.team == "allies")
				{
					self.menu = level.humanM.size-1;
					if(self.menu >= level.humanM.size)
					{
						self.menu = 0;
					}
				} else {
					self.menu = level.zombieM.size-1;
					if(self.menu >= level.zombieM.size)
					{
						self.menu = 0;
					}
				}
			}
		}
		wait .045;
	}
}

doDvars()
{
	setDvar("cg_drawCrosshair", 1);
	setDvar("cg_drawFriendlyNames", 0);
	setDvar("cg_drawCrosshairNames", 0);
	setDvar("player_sprintUnlimited", 1);
	setDvar("painVisionTriggerHealth", 0);
    setDvar("cg_everyoneHearsEveryone", 1);
    setDvar("onlinegame", 1);
    setDvar("scr_xpscale", 4);

	self setClientDvar("lowAmmoWarningNoAmmoColor2", 0, 0, 0, 0);
	self setClientDvar("lowAmmoWarningNoAmmoColor1", 0, 0, 0, 0);
}

doHealth()
{
	self endon("disconnect");
	self endon("death");
	while(1)
	{
		self.healthValue setValue( self.maxhealth );
		self waittill("health");
	}
}

doCash()
{
	self endon("disconnect");
	self endon("death");
	while(1)
	{
		self setPlayerData( "money", self.bounty );
		self.cashValue setValue( self.bounty );
		self waittill("CASH");
	}
}

doHUDControl()
{
	self endon("disconnect");
	self endon("death");

	menu = spawnstruct();

	AmmoRight = self getWeaponAmmoClip(self.current, "right");
	AmmoLeft = self getWeaponAmmoClip(self.current, "left");

	Stock = self getWeaponAmmoStock(self.current);

	while(1)
	{
		if(menu.hint != self.hint)
		{
			menu.hint = self.hint;
			self.HintText setText(menu.hint);
		}

		self.hint = "";
		menu.perkztext = "";

		menu.perkztext += game["info"]["keys"]["NAVIGATE"] + "\n\n";

		if(self.team == "allies")
		{
			menu.perkztext += game["info"]["perks"]["STEADY_AIM"];
			switch(self.perkz["steadyaim"])
			{
				case 2:
					menu.perkztext += game["info"]["perks"]["PRO"];
					break;
				case 1:
					menu.perkztext += game["info"]["perks"]["ACTIVATED"];
					break;
				default:
					menu.perkztext += game["info"]["perks"]["NOT_ACTIVATED"];
					break;
			}
			menu.perkztext += "\n";
			menu.perkztext += game["info"]["perks"]["SLEIGHT_OF_HAND"];
			switch(self.perkz["sleightofhand"])
			{
				case 2:
					menu.perkztext += game["info"]["perks"]["PRO"];
					break;
				case 1:
					menu.perkztext += game["info"]["perks"]["ACTIVATED"];
					break;
				default:
					menu.perkztext += game["info"]["perks"]["NOT_ACTIVATED"];
					break;
			}
			menu.perkztext += "\n";
			menu.perkztext += game["info"]["perks"]["SITREP"];
			switch(self.perkz["sitrep"])
			{
				case 2:
					menu.perkztext += game["info"]["perks"]["PRO"];
					break;
				case 1:
					menu.perkztext += game["info"]["perks"]["ACTIVATED"];
					break;
				default:
					menu.perkztext += game["info"]["perks"]["NOT_ACTIVATED"];
					break;
			}
			menu.perkztext += "\n";
			menu.perkztext += game["info"]["perks"]["STOPPING_POWER"];
			switch(self.perkz["stoppingpower"])
			{
				case 2:
					menu.perkztext += game["info"]["perks"]["PRO"];
					break;
				case 1:
					menu.perkztext += game["info"]["perks"]["ACTIVATED"];
					break;
				default:
					menu.perkztext += game["info"]["perks"]["NOT_ACTIVATED"];
					break;
			}
			menu.perkztext += "\n";
			menu.perkztext += game["info"]["perks"]["COLD_BLOODED"];
			switch(self.perkz["coldblooded"])
			{
				case 2:
					menu.perkztext += game["info"]["perks"]["PRO"];
					break;
				case 1:
					menu.perkztext += game["info"]["perks"]["ACTIVATED"];
					break;
				default:
					menu.perkztext += game["info"]["perks"]["NOT_ACTIVATED"];
					break;
			}
			menu.perkztext += "\n";
			menu.perkztext += game["info"]["perks"]["NO_RECOIL"];
			switch(self.perkz["recoil"])
			{
				case 2:
					menu.perkztext += game["info"]["perks"]["ACTIVATED"];
					break;
				default:
					menu.perkztext += game["info"]["perks"]["NOT_ACTIVATED"];
					break;
			}
			menu.perkztext += "\n\n";
			if(self.hasVision == 1)
			{
				menu.perkztext += game["info"]["keys"]["NIGHT_VISION"];
			}
			if((self.menu == 1) || (self.menu == 2))
			{
				if(self.menu == 1)
				{
					if(self.attach["akimbo"] == 1)
					{
						menu.option[1] = "Press [{+actionslot 3}] - " + level.humanM[self.menu][0];
					} else {
						menu.option[1] = game["shop"]["output"]["UPGRADE_UNAVAILABLE"];
					}
					if(self.attach["fmj"] == 1)
					{
						menu.option[2] = "Press [{+actionslot 4}] - " + level.humanM[self.menu][1];
					} else {
						menu.option[2] = game["shop"]["output"]["UPGRADE_UNAVAILABLE"];
					}
					if(self.attach["eotech"] == 1)
					{
						menu.option[3] = "Press [{+actionslot 2}] - " + level.humanM[self.menu][2];
					} else {
						menu.option[3] = game["shop"]["output"]["UPGRADE_UNAVAILABLE"];
					}
				}
				if(self.menu == 2)
				{
					if(self.attach["silencer"] == 1)
				{
						menu.option[1] = "Press [{+actionslot 3}] - " + level.humanM[self.menu][0];
					} else {
						menu.option[1] = game["shop"]["output"]["UPGRADE_UNAVAILABLE"];
					}
					if(self.attach["xmags"] == 1)
					{
						menu.option[2] = "Press [{+actionslot 4}] - " + level.humanM[self.menu][1];
					} else {
						menu.option[2] = game["shop"]["output"]["UPGRADE_UNAVAILABLE"];
					}
					if(self.attach["rof"] == 1)
					{
						menu.option[3] = "Press [{+actionslot 2}] - " + level.humanM[self.menu][2];
					} else {
						menu.option[3] = game["shop"]["output"]["UPGRADE_UNAVAILABLE"];
					}
				}
			} else if(self.menu == 3 || self.menu == 4)
			{
				if(self.menu == 3)
				{
					switch(self.perkz["steadyaim"])
					{
						case 0:
							menu.option[1] = "Press [{+actionslot 3}] - " + level.humanM[self.menu][0]["normal"];
							break;
						case 1:
							menu.option[1] = "Press [{+actionslot 3}] - " + level.humanM[self.menu][0]["pro"];
							break;
						case 2:
						default:
							menu.option[1] = game["shop"]["output"]["PERK_NOT_UPGRADED"];
							break;
					}
					switch(self.perkz["sleightofhand"])
					{
						case 0:
							menu.option[2] = "Press [{+actionslot 4}] - " + level.humanM[self.menu][1]["normal"];
							break;
						case 1:
							menu.option[2] = "Press [{+actionslot 4}] - " + level.humanM[self.menu][1]["pro"];
							break;
						case 2:
						default:
							menu.option[2] = game["shop"]["output"]["PERK_NOT_UPGRADED"];
							break;
					}
					switch(self.perkz["sitrep"])
					{
						case 0:
							menu.option[3] = "Press [{+actionslot 2}] - " + level.humanM[self.menu][2]["normal"];
							break;
						case 1:
							menu.option[3] = "Press [{+actionslot 2}] - " + level.humanM[self.menu][2]["pro"];
							break;
						case 2:
						default:
							menu.option[3] = game["shop"]["output"]["PERK_NOT_UPGRADED"];
							break;
					}
				}
				if(self.menu == 4)
				{
					switch(self.perkz["stoppingpower"])
					{
						case 0:
							menu.option[1] = "Press [{+actionslot 3}] - " + level.humanM[self.menu][0]["normal"];
							break;
						case 1:
							menu.option[1] = "Press [{+actionslot 3}] - " + level.humanM[self.menu][0]["pro"];
							break;
						case 2:
						default:
							menu.option[1] = game["shop"]["output"]["PERK_NOT_UPGRADED"];
							break;
					}
					switch(self.perkz["coldblooded"])
					{
						case 0:
							menu.option[2] = "Press [{+actionslot 4}] - " + level.humanM[self.menu][1]["normal"];
							break;
						case 1:
							menu.option[2] = "Press [{+actionslot 4}] - " + level.humanM[self.menu][1]["pro"];
							break;
						case 2:
						default:
							menu.option[2] = game["shop"]["output"]["PERK_NOT_UPGRADED"];
							break;
					}
					switch(self.perkz["recoil"])
					{
						case 0:
							menu.option[3] = "Press [{+actionslot 2}] - " + level.humanM[self.menu][2]["normal"];
							break;
						case 1:
						case 2:
						default:
							menu.option[3] = game["shop"]["output"]["PERK_NOT_UPGRADED"];
							break;
					}
				}				
			} else {
				menu.option[1] = "Press [{+actionslot 3}] - " + level.humanM[self.menu][0];
				if(self.menu != 0)
				{
					menu.option[2] = "Press [{+actionslot 4}] - " + level.humanM[self.menu][1];
				} else {
					menu.option[2] = level.humanM[self.menu][1][self.exTo];
				}
				menu.option[3] = "Press [{+actionslot 2}] - " + level.humanM[self.menu][2];
			}
		}
		if(self.team == "axis")
		{
			menu.perkztext += game["info"]["perks"]["COLD_BLOODED"];
			switch(self.perkz["coldblooded"])
			{
				case 2:
					menu.perkztext += game["info"]["perks"]["PRO"];
					break;
				case 1:
					menu.perkztext += game["info"]["perks"]["ACTIVATED"];
					break;
				default:
					menu.perkztext += game["info"]["perks"]["NOT_ACTIVATED"];
					break;
			}
			menu.perkztext += "\n";
			menu.perkztext += game["info"]["perks"]["NINJA"];
			switch(self.perkz["ninja"])
			{
				case 2:
					menu.perkztext += game["info"]["perks"]["PRO"];
					break;
				case 1:
					menu.perkztext += game["info"]["perks"]["ACTIVATED"];
					break;
				default:
					menu.perkztext += game["info"]["perks"]["NOT_ACTIVATED"];
					break;
			}
			menu.perkztext += "\n";
			menu.perkztext += game["info"]["perks"]["LIGHTWEIGHT"];
			switch(self.perkz["lightweight"])
			{
				case 2:
					menu.perkztext += game["info"]["perks"]["PRO"];
					break;
				case 1:
					menu.perkztext += game["info"]["perks"]["ACTIVATED"];
					break;
				default:
					menu.perkztext += game["info"]["perks"]["NOT_ACTIVATED"];
					break;
			}
			menu.perkztext += "\n";
			menu.perkztext += game["info"]["perks"]["FINAL_STAND"];
			switch(self.perkz["finalstand"])
			{
				case 2:
					menu.perkztext += game["info"]["perks"]["ACTIVATED"];
					break;
				default:
					menu.perkztext += game["info"]["perks"]["NOT_ACTIVATED"];
					break;
			}
			menu.perkztext += "\n\n";
			menu.perkztext += game["info"]["keys"]["EXPLODE"];
			menu.perkztext += "\n";
			menu.perkztext += game["info"]["keys"]["THERMAL_TOGGLE"];
			if(self.menu == 1 || self.menu == 2)
			{
				if(self.menu == 1)
				{
					switch(self.perkz["coldblooded"])
					{
						case 0:
							menu.option[1] = "Press [{+actionslot 3}] - " + level.zombieM[self.menu][0]["normal"];
							break;
						case 1:
							menu.option[1] = "Press [{+actionslot 3}] - " + level.zombieM[self.menu][0]["pro"];
							break;
						case 2:
						default:
							menu.option[1] = game["shop"]["output"]["PERK_NOT_UPGRADED"];
							break;
					}
					switch(self.perkz["ninja"])
					{
						case 0:
							menu.option[2] = "Press [{+actionslot 4}] - " + level.zombieM[self.menu][1]["normal"];
							break;
						case 1:
							menu.option[2] = "Press [{+actionslot 4}] - " + level.zombieM[self.menu][1]["pro"];
							break;
						case 2:
						default:
							menu.option[2] = game["shop"]["output"]["PERK_NOT_UPGRADED"];
							break;
					}
					switch(self.perkz["lightweight"])
					{
						case 0:
							menu.option[3] = "Press [{+actionslot 2}] - " + level.zombieM[self.menu][2]["normal"];
							break;
						case 1:
							menu.option[3] = "Press [{+actionslot 2}] - " + level.zombieM[self.menu][2]["pro"];
							break;
						case 2:
						default:
							menu.option[3] = game["shop"]["output"]["PERK_NOT_UPGRADED"];
							break;
					}
				}
				if(self.menu == 2)
				{
					switch(self.perkz["finalstand"])
					{
						case 0:
							menu.option[1] = "Press [{+actionslot 3}] - " + level.zombieM[self.menu][0]["normal"];
							break;
						case 1:
						case 2:
						default:
							menu.option[1] = game["shop"]["output"]["PERK_NOT_UPGRADED"];
							break;
					}
					menu.option[2] = "Press [{+actionslot 4}] - " + level.zombieM[self.menu][1];
					menu.option[3] = "Press [{+actionslot 2}] - " + level.zombieM[self.menu][2];
				}
			} else {
				menu.option[1] = "Press [{+actionslot 3}] - " + level.zombieM[self.menu][0];
				menu.option[2] = "Press [{+actionslot 4}] - " + level.zombieM[self.menu][1];
				menu.option[3] = "Press [{+actionslot 2}] - " + level.zombieM[self.menu][2];
			}
		}

		if(menu.perktext != menu.perkztext)
		{
			menu.perktext = menu.perkztext;
			self.perkzdisp setText(menu.perktext);
		}

		if(self.menu != -1)
		{
			if(menu.option[1] != menu.option1)
			{
				menu.option1 = menu.option[1];
				self.option[1] setText(menu.option[1]);
			}

			if(menu.option[2] != menu.option2)
			{
				menu.option2 = menu.option[2];
				self.option[2] setText(menu.option[2]);
			}

			if(menu.option[3] != menu.option3)
			{
				menu.option3 = menu.option[3];
				self.option[3] setText(menu.option[3]);
			}
		} else {
			menu.option1 = "";
			menu.option2 = "";
			menu.option3 = "";
		}

		if(self.current != self getCurrentWeapon() && self getCurrentWeapon() != "none")
		{
			self.current = self getCurrentWeapon();
			menu.weaponName = getWeaponName(self.current);;
			self.ammoNameDisplay setText(menu.weaponName);
		}

		if(AmmoRight != self getWeaponAmmoClip(self.current, "right") || AmmoLeft != self getWeaponAmmoClip(self.current, "left"))
		{
			AmmoRight = self getWeaponAmmoClip(self.current, "right");
			AmmoLeft = self getWeaponAmmoClip(self.current, "left");

			if(isDefined(AmmoRight) && isDefined(AmmoLeft))
			{
				if(isSubStr(self.current, "akimbo"))
				{
					menu.ammoClip = AmmoLeft + "/" + AmmoRight;
					self.ammoClipdisplay setText(menu.ammoClip);
					if(AmmoRight == 0 || AmmoLeft == 0)
					{
						self.ammoClipdisplay.color = (1, 0, 0);
					} else {
						self.ammoClipdisplay.color = (255, 255, 255);
					}
				} else {
					self.ammoClipdisplay setValue(AmmoRight);
					if(AmmoRight == 0)
					{
						self.ammoClipdisplay.color = (1, 0, 0);
					} else {
						self.ammoClipdisplay.color = (255, 255, 255);
					}
				}
			}
		}

		if(Stock != self getWeaponAmmoStock(self.current))
		{
			Stock = self getWeaponAmmoStock(self.current);
			if(isDefined(Stock))
			{
				menu.ammoStock = "/" + Stock;
				self.ammoStockdisplay setText(menu.ammoStock);
				if(self getWeaponAmmoStock(self.current) == 0)
				{
					self.ammoStockdisplay.color = (1, 0, 0);
					self.ammodisplay.color = (1, 0, 0);
				} else {
					self.ammoStockdisplay.color = (255, 255, 255);
					self.ammodisplay.color = (255, 255, 255);
				}
			}
		}
		wait .075;
	}
}

getWeaponName(weapon)
{
	basename = strtok(weapon, "_");

	switch(basename[0])
	{
		//Light Machine Guns
		case "rpd":
			weaponName = "RPD";
			break;
		case "sa80":
			weaponName = "L86 LSW";
			break;
		case "mg4":
			weaponName = "MG4";
			break;
		case "m240":
			weaponName = "M240";
			break;
		case "aug":
			weaponName = "AUG HBAR";
			break;
		//Assault Rifles
		case "ak47":
			weaponName = "AK-47";
			break;
		case "m16":
			weaponName = "M16A4";
			break;
		case "m4":
			weaponName = "M4A1";
			break;
		case "fn2000":
			weaponName = "F2000";
			break;
		case "masada":
			weaponName = "ACR";
			break;
		case "famas":
			weaponName = "FAMAS";
			break;
		case "fal":
			weaponName = "FAL";
			break;
		case "scar":
			weaponName = "SCAR-H";
			break;
		case "tavor":
			weaponName = "TAR-21";
			break;
		//Sub Machine Guns
		case "mp5k":
			weaponName = "MP5K";
			break;
		case "uzi":
			weaponName = "Mini-Uzi";
			break;
		case "p90":
			weaponName = "P90";
			break;
		case "kriss":
			weaponName = "Vector";
			break;
		case "ump45":
			weaponName = "UMP45";
			break;
		//Shotguns
		case "ranger":
			weaponName = "Ranger";
			break;
		case "model1887":
			weaponName = "Model 1887";
			break;
		case "striker":
			weaponName = "Striker";
			break;
		case "aa12":
			weaponName = "AA-12";
			break;
		case "m1014":
			weaponName = "M1014";
			break;
		case "spas12":
			weaponName = "SPAS-12";
			break;
		//Machine Pistols
		case "pp2000":
			weaponName = "PP2000";
			break;
		case "tmp":
			weaponName = "TMP";
			break;
		case "glock":
			weaponName = "G18";
			break;
		case "beretta393":
			weaponName = "M93 Raffica";
			break;
		//Handguns
		case "beretta":
			weaponName = "M9";
			break;
		case "usp":
			weaponName = "USP .45";
			break;
		case "deserteagle":
			weaponName = "Desert Eagle";
			break;
		case "coltanaconda":
			weaponName = ".44 Magnum";
			break;
		//Snipers
		case "barrett":
			weaponName = "Barrett .50cal";
			break;
		case "cheytac":
			weaponName = "Intervention";
			break;
		case "m21":
			weaponName = "M21";
			break;	
		//Equipment
		case "concussion":
			weaponName = "Stun";
			break;
		case "claymore":
			weaponName = "Claymore Mine";
			break;
		case "c4":
			weaponName = "C4 Explosive";
			break;	
		case "riotshield":
			weaponName = "Riot Shield";
			break;
		case "rpg":
			weaponName = "RPG-7";
			break;
		case "at4":
			weaponName = "AT4-HS";
			break;
		case "smoke":
			weaponName = "Smoke";
			break;
		default:
			weaponName = basename[0];
			break;
	}

	if(isDefined(basename[2]) && basename[2] != "mp")
	{
		weaponName += " Bling";
	} else {
		if(isDefined(basename[1]))
		{
			switch(basename[1])
			{
				case "mp":
					weaponName += "";
					break;
				case "grenade":
					weaponName += " Grenade";
					break;
				case "silencer":
					weaponName += " Silenced";
					break;
				case "xmags":
					weaponName += " Extended Mags";
					break;
				case "akimbo":
					weaponName += " Akimbo";
					break;
				case "fmj":
					weaponName += " FMJ";
					break;
				case "eotech":
					weaponName += " Holographic Sight";
					break;
				case "rof":
					weaponName += " Rapid Fire";
					break;
				case "acog":
					weaponName += " ACOG";
					break;
				case "tactical":
						weaponName += " Tactical Knife";
					break;
				default:
					weaponName += " " + basename[1];
					break;
			}
		}
	}
	return weaponName;
}

doServerHUDControl()
{
	ServerHUD = spawnstruct();

	while(1)
	{
		ServerHUD.HumanCount = 0;
		ServerHUD.ZombieCount = 0;

		foreach(player in level.players)
		{
			if(player.team == "axis" && (player.isZombie == 1 || player.isZombie == 2))
			{
				ServerHUD.ZombieCount ++;
			} else if(player.team == "allies" && player.isZombie == 0)
			{
				ServerHUD.HumanCount ++;
			}
		}

		level.playersLeft["allies"] = ServerHUD.HumanCount;
		level.playersLeft["axis"] = ServerHUD.ZombieCount;

		ServerHUD.counter = "Zombies: " + ServerHUD.ZombieCount;
		ServerHUD.counter += "\nHumans: " + ServerHUD.HumanCount;

		if(ServerHUD.counter != ServerHUD.count)
		{
			ServerHUD.count = ServerHUD.counter;
			level.playerCounter SetText(ServerHUD.counter);

			SetTeamScore( "allies", level.playersLeft["allies"]);
			SetTeamScore( "axis", level.playersLeft["axis"]);
		}
		wait .25;
	}
}

doScoreReset()
{
	self.pers["score"] = 0;
	self.pers["kills"] = 0;
	self.pers["assists"] = 0;
	self.pers["deaths"] = 0;
	self.pers["suicides"] = 0;
	self.score = 0;
	self.kills = 0;
	self.assists = 0;
	self.deaths = 0;
	self.suicides = 0;
}

doPerksSetup()
{
	self.perkz = [];
	self.perkz["steadyaim"] = 0;
	self.perkz["stoppingpower"] = 0;
	self.perkz["sitrep"] = 0;
	self.perkz["sleightofhand"] = 0;
	self.perkz["coldblooded"] = 0;
	self.perkz["ninja"] = 0;
	self.perkz["lightweight"] = 0;
	self.perkz["finalstand"] = 0;
	self.perkz["recoil"] = 0;
}

doSpawn()
{
	if(self.inGame == 1)
	{
		if(level.gameState == "playing" || level.gameState == "ending")
		{
			if(self.deaths > 0 && self.isZombie == 0 && self.team == "allies")
			{
				self.isZombie = 1;
			}
			if(self.isZombie == 0 || self.isZombie == 3)
			{
				self thread maps\mp\gametypes\HumanZombie::doSetup();
			}
			if(self.isZombie == 1)
			{
				self thread maps\mp\gametypes\HumanZombie::doZombie();
			}
			if(self.isZombie == 2)
			{
				self thread maps\mp\gametypes\HumanZombie::doAlphaZombie();
			}
		} else if(level.gameState == "starting" || level.gameState == "intermission")
		{
			self thread maps\mp\gametypes\HumanZombie::doSetup();
		} else {
			self thread maps\mp\gametypes\HumanZombie::doReset();
			self thread maps\mp\gametypes\HumanZombie::doSetup();
		}
	} else {
		notifyHello = spawnstruct();
        notifyHello.titleText = "Welcome to ^1Zombie Mod ^75.2!";
		notifyHello.notifyText = "Modded & Edited By ^3ExampleXL";
		notifyHello.glowColor = (0.0, 0.6, 0.3);

		self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyHello );

		if(level.gameState == "playing" || level.gameState == "ending")
		{
			self.isZombie = 1;
			self thread maps\mp\gametypes\HumanZombie::doReset();
			self thread maps\mp\gametypes\HumanZombie::doZombie();
		} else {
			self thread maps\mp\gametypes\HumanZombie::doReset();
			self thread maps\mp\gametypes\HumanZombie::doSetup();
		}
		self.inGame = 1;
	}

	self.menu = 0;
	self.attackeddoor = 0;

	self thread doDvars();
	self thread CreatePlayerHUD();
	self thread doMenuScroll();
	self thread doHUDControl();
	self thread doCash();
	self thread doHealth();
	self thread destroyOnDeath();
	self notify("health");
	self notify("cash");
	self thread doEquipment();

	self freezeControlsWrapper( false );
}

doEquipment()
{
	self endon("death");
	self endon("disconnect");

	wait .25;

	if(self.hasEquip == 1)
	{
		self maps\mp\perks\_perks::givePerk( "semtex_mp" );
		self setWeaponAmmoClip("semtex_mp", 1);
	} else if(self.hasEquip == 2)
	{
		self maps\mp\perks\_perks::givePerk( "throwingknife_mp" );
		self setWeaponAmmoClip("throwingknife_mp", 1);
	}

	while(1)
	{
		if(self getWeaponAmmoClip("semtex_mp") == 1)
		{
			self.hasEquip = 1;
			self.equipment setShader("cardicon_thebomb");
		} else if(self getWeaponAmmoClip("throwingknife_mp") == 1)
		{
			self.hasEquip = 2;
			self.equipment setShader("cardicon_shuriken");
		} else if(self getWeaponAmmoClip("semtex_mp") == 0 || self getWeaponAmmoClip("throwingknife_mp") == 0)
		{
			self.hasEquip = 0;
			self.equipment setText("");
		}
		wait .25;
	}
}

doInit()
{
	level.gameState = "";

	/** Custom Varaibles **/

	level****undCount = 0;
	level****undVote = 2;
	level.humanTime = 5;
	
	/** Custom Variables **/

	level thread weaponInit();
	level thread CostInit();
	level thread MenuInit();
	level thread MapVoteInit();
	level thread CreateServerHUD();
	level thread doServerHUDControl();
	level thread OverRider();

	level thread RemoveTurrets();

	level thread maps\mp\gametypes\MapEdit::init();

	setDvar("g_hardcore", 1);

	setDvar("g_gametype", "war");
	setDvar("ui_gametype", "war");

	setDvar("scr_war_scorelimit", 0);
	setDvar("scr_war_timelimit", 0);
	setDvar("scr_war_waverespawndelay", 0);
	setDvar("scr_war_playerrespawndelay", 0);
	setDvar("camera_thirdperson", 0);

	wait 10;

	level thread maps\mp\gametypes\RoundSystem::doGameStarter();
}

CostInit()
{
	level.itemCost = [];

	/** Human **/
	level.itemCost["Ammo"] = 250;
	level.itemCost["LMG"] = 500;
	level.itemCost["Assault Rifle"] = 350;
	level.itemCost["Machine Pistol"] = 150;
	level.itemCost["Riot"] = 750;
	level.itemCost["NightVision"] = 250;
	level.itemCost["Akimbo"] = 300;
	level.itemCost["Eotech"] = 250;
	level.itemCost["FMJ"] = 250;
	level.itemCost["Recoil"] = 500;
	level.itemCost["Silencer"] = 250;
	level.itemCost["XMags"] = 220;
	level.itemCost["ROF"] = 250;
	level.itemCost["SentryGun"] = 1500;
	level.itemCost["Semtex"] = 500;

	/** Zombie **/
	level.itemCost["Health"] = 50;
	level.itemCost["Thermal"] = 350;
	level.itemCost["Smoke"] = 100;
	level.itemCost["ThrowingKnife"] = 500;
	level.itemCost["Concussion"] = 200;

	/** Perks **/
	level.itemCost["SteadyAim"] = 200;
	level.itemCost["SteadyAimPro"] = 150;
	level.itemCost["SleightOfHand"] = 250;
	level.itemCost["SleightOfHandPro"] = 200;
	level.itemCost["SitRep"] = 200;
	level.itemCost["SitRepPro"] =150;
	level.itemCost["StoppingPower"] = 250;
	level.itemCost["StoppingPowerPro"] = 200;
	level.itemCost["ColdBlooded"] = 250;
	level.itemCost["ColdBloodedPro"] = 200;
	level.itemCost["Ninja"] = 200;
	level.itemCost["NinjaPro"] = 250;
	level.itemCost["Lightweight"] = 250;
	level.itemCost["LightweightPro"] =150;
	level.itemCost["FinalStand"] = 300;
	level.itemCost["DoorHP"] = 15;
}

weaponInit()
{
	level.lmg = [];
	level.lmg[0] = "rpd";
	level.lmg[1] = "sa80";
	level.lmg[2] = "mg4";
	level.lmg[3] = "m240";
	level.lmg[4] = "aug";
	level.assault = [];
	level.assault[0] = "ak47";
	level.assault[1] = "m16";
	level.assault[2] = "m4";
	level.assault[3] = "fn2000";
	level.assault[4] = "masada";
	level.assault[5] = "famas";
	level.assault[6] = "fal";
	level.assault[7] = "scar";
	level.assault[8] = "tavor";
	level.smg = [];
	level.smg[0] = "mp5k";
	level.smg[1] = "uzi";
	level.smg[2] = "p90";
	level.smg[3] = "kriss";
	level.smg[4] = "ump45";
	level.shot = [];
	level.shot[0] = "ranger";
	level.shot[1] = "model1887";
	level.shot[2] = "striker";
	level.shot[3] = "aa12";
	level.shot[4] = "m1014";
	level.shot[5] = "spas12";
	level.machine = [];
	level.machine[0] = "pp2000";
	level.machine[1] = "tmp";
	level.machine[2] = "glock";
	level.machine[3] = "beretta393";
	level.hand = [];
	level.hand[0] = "beretta";
	level.hand[1] = "usp";
	level.hand[2] = "deserteagle";
	level.hand[3] = "coltanaconda";
}

MenuInit()
{
	//First Dimension = Menu
	//Second Dimension = Option
	/****** Template ******//*
	level.humanM[i] = [];
	level.humanM[i][0] = "";
	level.humanM[i][1] = "";
	level.humanM[i][2] = "";
	i++;
	level.zombieM[i] = [];
	level.zombieM[i][0] = "";
	level.zombieM[i][1] = "";
	level.zombieM[i][2] = "";
	i++;*/
	/**********************/
	level.humanM = [];
	level.zombieM = [];
	
	/** Human Menu **/
	i = 0;
	
	level.humanM[i] = [];
	level.humanM[i][0] = game["shop"]["items"]["AMMO"] + " - " + level.itemCost["Ammo"];
	level.humanM[i][1] = [];
	level.humanM[i][1]["LMG"] = "Press [{+actionslot 4}] - " + game["shop"]["items"]["LMG"] + " - " + level.itemCost["LMG"];
	level.humanM[i][1]["Assault Rifle"] = "Press [{+actionslot 4}] - " + game["shop"]["items"]["ASSAULT"] + " - " + level.itemCost["Assault Rifle"];
	level.humanM[i][1]["Machine Pistol"] = "Press [{+actionslot 4}] - " + game["shop"]["items"]["MACHINE_PISTOL"] + " -  " + level.itemCost["Machine Pistol"];
	level.humanM[i][1]["Unavailable"] = game["shop"]["items"]["WEAPON_CANNOT_EXCHANGE"];
	level.humanM[i][2] = game["shop"]["items"]["RIOT"] + " - " + level.itemCost["Riot"];
	i++;
	
	level.humanM[i] = [];
	level.humanM[i][0] = game["shop"]["items"]["AKIMBO"] + " - " + level.itemCost["Akimbo"];
	level.humanM[i][1] = game["shop"]["items"]["FMJ"] + " - " + level.itemCost["FMJ"];
	level.humanM[i][2] = game["shop"]["items"]["EOTECH"] + " - " + level.itemCost["Eotech"];
	i++;
	
	level.humanM[i] = [];
	level.humanM[i][0] = game["shop"]["items"]["SILENCER"] + " - " + level.itemCost["Silencer"];
	level.humanM[i][1] = game["shop"]["items"]["XMAGS"] + " - " + level.itemCost["XMags"];
	level.humanM[i][2] = game["shop"]["items"]["ROF"] + " - " + level.itemCost["ROF"];
	i++;
	
	level.humanM[i] = [];
	level.humanM[i][0]["normal"] = game["shop"]["items"]["STEADY_AIM"] + " - " + level.itemCost["SteadyAim"];
	level.humanM[i][0]["pro"] = game["shop"]["items"]["STEADY_AIM_PRO"] + " - " + level.itemCost["SteadyAimPro"];
	level.humanM[i][1]["normal"] = game["shop"]["items"]["SLEIGHT_OF_HAND"] + " - " + level.itemCost["SleightOfHand"];
	level.humanM[i][1]["pro"] = game["shop"]["items"]["SLEIGHT_OF_HAND_PRO"] + " - " + level.itemCost["SleightOfHandPro"];
	level.humanM[i][2]["normal"] = game["shop"]["items"]["SITREP"] + " - " + level.itemCost["SitRep"];
	level.humanM[i][2]["pro"] = game["shop"]["items"]["SITREP_PRO"] + " - " + level.itemCost["SitRepPro"];
	i++;
	
	level.humanM[i] = [];
	level.humanM[i][0]["normal"] = game["shop"]["items"]["STOPPING_POWER"] + " - " + level.itemCost["StoppingPower"];
	level.humanM[i][0]["pro"] = game["shop"]["items"]["STOPPING_POWER_PRO"] + " - " + level.itemCost["StoppingPowerPro"];
	level.humanM[i][1]["normal"] = game["shop"]["items"]["COLD_BLOODED"] + " - " + level.itemCost["ColdBlooded"];
	level.humanM[i][1]["pro"] = game["shop"]["items"]["COLD_BLOODED_PRO"] + " - " + level.itemCost["ColdBloodedPro"];
	level.humanM[i][2]["normal"] = game["shop"]["items"]["NO_RECOIL"] + " - " + level.itemcost["Recoil"];
	i++;

	level.humanM[i] = [];
	level.humanM[i][0] = game["shop"]["items"]["NIGHT_VISION"] + " - " + level.itemcost["NightVision"];
	level.humanM[i][1] = game["shop"]["items"]["SENTRY_GUN"] + " - " + level.itemCost["SentryGun"];
	level.humanM[i][2] = game["shop"]["items"]["SEMTEX"] + " - " + level.itemCost["Semtex"];
	i++;
	
	/** Zombie Menu **/
	i = 0;
	
	level.zombieM[i] = [];
	level.zombieM[i][0] = game["shop"]["items"]["HEALTH"] + " - " + level.itemCost["Health"];
	level.zombieM[i][1] = game["shop"]["items"]["THERMAL_OVERLAY"] + " - " + level.itemCost["Thermal"];
	level.zombieM[i][2] = game["shop"]["items"]["THROWING_KNIFE"] + " - " + level.itemCost["ThrowingKnife"];
	i++;
	
	level.zombieM[i] = [];
	level.zombieM[i][0]["normal"] = game["shop"]["items"]["COLD_BLOODED"] + " - " + level.itemCost["ColdBlooded"];
	level.zombieM[i][0]["pro"] = game["shop"]["items"]["COLD_BLOODED_PRO"] + " - " + level.itemCost["ColdBloodedPro"];
	level.zombieM[i][1]["normal"] = game["shop"]["items"]["NINJA"] + " - " + level.itemCost["Ninja"];
	level.zombieM[i][1]["pro"] = game["shop"]["items"]["NINJA_PRO"] + " -" + level.itemCost["NinjaPro"];
	level.zombieM[i][2]["normal"] = game["shop"]["items"]["LIGHTWEIGHT"] + " - " + level.itemCost["Lightweight"];
	level.zombieM[i][2]["pro"] = game["shop"]["items"]["LIGHTWEIGHT_PRO"] + " - " + level.itemCost["LightweightPro"];
	i++;
	
	level.zombieM[i] = [];
	level.zombieM[i][0]["normal"] = game["shop"]["items"]["FINAL_STAND"] + " - " + level.itemCost["FinalStand"];
	level.zombieM[i][1] = game["shop"]["items"]["CONCUSSION"] + " - " + level.itemCost["Concussion"];
	level.zombieM[i][2] = game["shop"]["items"]["SMOKE"] + " - " + level.itemCost["Smoke"];
	i++;
}

MapVoteInit()
{

	//Actual Map
	level.mapfile= [];
	level.mapfile[0] = "mp_afghan";
	level.mapfile[1] = "mp_derail";
	level.mapfile[2] = "mp_estate";
	level.mapfile[3] = "mp_favela";
	level.mapfile[4] = "mp_highrise";
	level.mapfile[5] = "mp_invasion";
	level.mapfile[6] = "mp_checkpoint";
	level.mapfile[7] = "mp_quarry";
	level.mapfile[8] = "mp_rundown";
	level.mapfile[9] = "mp_rust";
	level.mapfile[10] = "mp_boneyard";
	level.mapfile[11] = "mp_nightshift";
	level.mapfile[12] = "mp_subbase";
	level.mapfile[13] = "mp_terminal";
	level.mapfile[14] = "mp_underpass";
	level.mapfile[15] = "mp_brecourt";

	//Map Name
	level.mapname= [];
    level.mapname[0] = "Afghan";
	level.mapname[1] = "Derail";
	level.mapname[2] = "Estate";
	level.mapname[3] = "Favela";
	level.mapname[4] = "Highrise";
	level.mapname[5] = "Invasion";
	level.mapname[6] = "Karachi";
	level.mapname[7] = "Quarry";
	level.mapname[8] = "Rundown";
	level.mapname[9] = "Rust";
	level.mapname[10] = "Scrapyard";
	level.mapname[11] = "Skidrow";
	level.mapname[12] = "Sub Base";
	level.mapname[13] = "Terminal";
	level.mapname[14] = "Underpass";
	level.mapname[15] = "Wasteland";
}

OverRider() /** Overrides Everything **/
{
	for(;;)
	{
		level notify("abort_forfeit");
		level.prematchPeriod = 0;
		level.killcam = 0;
		level.killstreakRewards = 0;
		wait 1;
	}
}

destroyOnDeath()
{
	self waittill ( "death" );

	self.hint = "";

	self.healthvalue destroy();
	self.cashvalue destroy();
	self.cashTitle destroy();
	self.healthTitle destroy();
	self.ammoStockdisplay destroy();
	self.ammoClipdisplay destroy();
	self.ammoNamedisplay destroy();
	self.weaponbar destroy();
	self.equipment destroy();
	self.perkzdisp destroy();
	self.HintText destroy();

	for(i=0; i<4; i++)
	{
		self.option[i] destroy();
	}
}

RemoveTurrets()
{
	level deletePlacedEntity("misc_turret");
}

iniButtons()
{
	self.buttonAction = [];
	self.buttonAction[0]="+melee";		//E
	self.buttonAction[1]="weapnext";	// 1 or 2
	self.buttonAction[2]="+gostand";	// space
	self.buttonAction[3]="+actionslot 4";	// 4
	self.buttonAction[4]="+actionslot 1";	// N
	self.buttonAction[5]="+actionslot 2";	// 5
	self.buttonAction[6]="+actionslot 3";	// 3
	self.buttonAction[7]="+activate";	// F
	self.buttonAction[8]="+frag";		// G
	self.buttonAction[9]="+smoke";		// Q
	self.buttonAction[10]="+forward";	// W
	self.buttonAction[11]="+back";		// S
	self.buttonAction[12]="+moveleft";	// A
	self.buttonAction[13]="+moveright";	// D
	self.buttonAction[14]="+reload";	// R
	self.buttonPressed = [];

	for(i=0; i<15; i++)
	{
		self.buttonPressed[self.buttonAction[i]] = 0;
		self thread monitorButtons( self.buttonAction[i] );
	}
}

monitorButtons( buttonIndex )
{
        self endon ( "disconnect" ); 
        self notifyOnPlayerCommand( buttonIndex, buttonIndex );

        for ( ;; )
        {
                self waittill( buttonIndex );
                self.buttonPressed[ buttonIndex ] = 1;
                wait .1;
                self.buttonPressed[ buttonIndex ] = 0;
        }
}

CreatePlayerHUD()
{
	self.HintText = self createFontString( "default", 1.5 );
	self.HintText setPoint( "CENTER", "CENTER", 0, 100 );
	self.HintText.hideWhenInMenu = true;

	self.healthTitle = self createIcon("cardtitle_bandaid", 150, 30);
	self.healthTitle.horzAlign = "right";
	self.healthTitle.vertAlign = "top";
	self.healthTitle.x = -100;
	self.healthTitle.y = -27.5;
	self.healthTitle.hideWhenInMenu = true;
	self.healthTitle.foreground = false;

	self.healthValue = NewClientHudElem( self );
	self.healthValue.alignX = "center";
	self.healthValue.alignY = "top";
	self.healthValue.horzAlign = "right";
	self.healthValue.vertAlign = "top";
	self.healthValue.y = -20;
	self.healthValue.x = -25;
	self.healthValue.foreground = true;
	self.healthValue.fontScale = .8;
	self.healthValue.font = "hudbig";
	self.healthValue.alpha = 1;
	self.healthValue.glow = 1;
	self.healthValue.glowColor = ( 1, 0, 0 );
	self.healthValue.glowAlpha = 1;
	self.healthValue.color = ( 1.0, 1.0, 1.0 );
	self.healthValue.hideWhenInMenu = true;

	self.cashTitle = self createIcon("cardtitle_benjamins", 150, 30);
	self.cashTitle.horzAlign = "right";
	self.cashTitle.vertAlign = "top";
	self.cashTitle.x = -100;
	self.cashTitle.y = 2.5;
	self.cashTitle.hideWhenInMenu = true;
	self.cashTitle.foreground = false;

	self.cashValue = NewClientHudElem( self );
	self.cashValue.alignX = "center";
	self.cashValue.alignY = "top";
	self.cashValue.horzAlign = "right";
	self.cashValue.vertAlign = "top";
	self.cashValue.y = 10;
	self.cashValue.x = -25;
	self.cashValue.foreground = true;
	self.cashValue.fontScale = .8;
	self.cashValue.font = "hudbig";
	self.cashValue.alpha = 1;
	self.cashValue.glow = 1;
	self.cashValue.glowColor = ( 0, 1, 0 );
	self.cashValue.glowAlpha = 1;
	self.cashValue.color = ( 1.0, 1.0, 1.0 );
	self.cashValue.hideWhenInMenu = true;

	self.perkzdisp = NewClientHudElem( self );
	self.perkzdisp.alignX = "left";
	self.perkzdisp.alignY = "top";
	self.perkzdisp.horzAlign = "right";
	self.perkzdisp.vertAlign = "top";
	self.perkzdisp.x = -100;
	self.perkzdisp.y = 45;
	self.perkzdisp.foreground = true;
	self.perkzdisp.fontScale = .4;
	self.perkzdisp.font = "hudbig";
	self.perkzdisp.alpha = 1;
	self.perkzdisp.glow = 1;
	self.perkzdisp.glowColor = ( 0, 1, 0 );
	self.perkzdisp.glowAlpha = 0;
	self.perkzdisp.color = ( 1.0, 1.0, 1.0 );
	self.perkzdisp.hideWhenInMenu = true;

	y = -25;
	for(i=1; i<4; i++)
	{
		self.option[i] = NewClientHudElem( self );
		self.option[i].alignX = "center";
		self.option[i].alignY = "bottom";
		self.option[i].horzAlign = "center";
		self.option[i].vertAlign = "bottom";
		self.option[i].y = y;
		self.option[i].foreground = true;
		self.option[i].fontScale = 1;
		self.option[i].font = "objective";
		self.option[i].alpha = 1;
		self.option[i].glow = 1;
		self.option[i].glowColor = ( 0, 0, 1 );
		self.option[i].glowAlpha = 1;
		self.option[i].color = ( 1.0, 1.0, 1.0 );
		self.option[i].hideWhenInMenu = true;
		y += 20;
	}

	self.weaponbar = self createIcon("hud_weaponbar", 340, 60);
	self.weaponbar.horzAlign = "right";
	self.weaponbar.vertAlign = "middle";
	self.weaponbar.x = -285;
	self.weaponbar.y = 180;
	self.weaponbar.hideWhenInMenu = true;

	self.equipment = self createFontString( "default", 2.5 );
	self.equipment.horzAlign = "right";
	self.equipment.vertAlign = "middle";
	self.equipment.x = -5;
	self.equipment.y = 190;
	self.equipment.hideWhenInMenu = true;

	self.ammoStockdisplay = self createTimer("default", 1.3);
	self.ammoStockdisplay.horzAlign = "right";
	self.ammoStockdisplay.vertAlign = "MIDDLE";
	self.ammoStockdisplay.x = -63;
	self.ammoStockdisplay.y = 204;
	self.ammoStockdisplay.hideWhenInMenu = true;

	self.ammoClipdisplay = self createTimer("default", 1.8);
	self.ammoClipdisplay.horzAlign = "right";
	self.ammoClipdisplay.vertAlign = "MIDDLE";
	self.ammoClipdisplay.alignX = "RIGHT";
	self.ammoClipdisplay.x = -65.5;
	self.ammoClipdisplay.y = 199;
	self.ammoClipdisplay.hideWhenInMenu = true;

	self.ammoNamedisplay = self createTimer("default", 1.3);
	self.ammoNamedisplay.horzAlign = "RIGHT";
	self.ammoNamedisplay.vertAlign = "MIDDLE";
	self.ammoNamedisplay.alignX = "RIGHT";
	self.ammoNamedisplay.x = -40;
	self.ammoNamedisplay.y = 185;
	self.ammoNamedisplay.hideWhenInMenu = true;
}

CreateServerHUD()
{
	level.redhand = level createServerIcon("cardicon_redhand", 60, 60);
	level.redhand setPoint( "BOTTOM LEFT", "BOTTOM LEFT", 10, -15 );
	level.redhand.alpha = 1.0;
	level.redhand.hideWhenInMenu = true;
	level.redhand.foreground = false;

	level.playerCounter = level createServerFontString( "objective", 1.1 );
	level.playerCounter setPoint( "BOTTOM LEFT", "BOTTOM LEFT", 60, -50 );
	level.playerCounter.hideWhenInMenu = true;

	level.TimerText = level createServerFontString( "objective", 1.35 );
	level.TimerText setPoint( "CENTER", "CENTER", 0, -120 );
	level.TimerText.hideWhenInMenu = true;
	level.TimerTex*****lor = (1, 1, 0);

	level.TimerValue = level createServerFontString( "objective", 1.35 );
	level.TimerValue setPoint( "CENTER", "CENTER", 0, -100 );
	level.TimerValue.hideWhenInMenu = true;
	level.TimerValue.color = (1, 1, 0);
}

init()
{
	setDvar("party_host", 1);
	setDvar("party_hostmigration", 0);

	level.scoreInfo = [];
	level.xpScale = getDvarInt( "scr_xpscale" );

	level.rankTable = [];

	precacheShader("white");

	precacheShader("hud_weaponbar");

	precacheShader("cardtitle_bandaid");
	precacheShader("cardtitle_benjamins");

	precacheShader("cardicon_shuriken");
	precacheShader("cardicon_thebomb");
	precacheShader("cardicon_redhand");

	precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" );
	precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
	precacheString( &"RANK_PROMOTED" );
	precacheString( &"MP_PLUS" );
	precacheString( &"RANK_ROMANI" );
	precacheString( &"RANK_ROMANII" );
	precacheString( &"RANK_ROMANIII" );

	if ( level.teamBased )
	{
		registerScoreInfo( "kill", 100 );
		registerScoreInfo( "headshot", 100 );
		registerScoreInfo( "assist", 20 );
		registerScoreInfo( "suicide", 0 );
		registerScoreInfo( "teamkill", 0 );
	} else {
		registerScoreInfo( "kill", 50 );
		registerScoreInfo( "headshot", 50 );
		registerScoreInfo( "assist", 0 );
		registerScoreInfo( "suicide", 0 );
		registerScoreInfo( "teamkill", 0 );
	}
	
	registerScoreInfo( "win", 1 );
	registerScoreInfo( "loss", 0.5 );
	registerScoreInfo( "tie", 0.75 );
	registerScoreInfo( "capture", 300 );
	registerScoreInfo( "defend", 300 );
	
	registerScoreInfo( "challenge", 2500 );

	level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
	level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));
	
	pId = 0;
	rId = 0;
	for ( pId = 0; pId <= level.maxPrestige; pId++ )
	{
		for ( rId = 0; rId <= level.maxRank; rId++ )
		{
			precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
		}
	}

	rankId = 0;
	rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
	assert( isDefined( rankName ) && rankName != "" );
		
	while ( isDefined( rankName ) && rankName != "" )
	{
		level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
		level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
		level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
		level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );

		precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );

		rankId++;
		rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );		
	}

	maps\mp\gametypes\_missions::buildChallegeInfo();
	maps\mp\gametypes\_strings::initStrings();

	level thread patientZeroWaiter();

	level thread onPlayerConnect();
	level thread doInit();
}


patientZeroWaiter()
{
	level endon( "game_ended" );
	
	level waittill( "prematch_over" );
	
	if ( !matchMakingGame() )
	{
		if ( getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999 )
		{
			level.patientZeroName = level.players[0].name;
		}
	} else {
		if ( getDvar( "scr_patientZero" ) != "" )
		{
			level.patientZeroName = getDvar( "scr_patientZero" );
		}
	}
}

isRegisteredEvent( type )
{
	if ( isDefined( level.scoreInfo[type] ) )
	{
		return true;
	} else {
		return false;
	}
}

registerScoreInfo( type, value )
{
	level.scoreInfo[type]["value"] = value;
}

getScoreInfoValue( type )
{
	overrideDvar = "scr_" + level.gameType + "_score_" + type;	
	if ( getDvar( overrideDvar ) != "" )
	{
		return getDvarInt( overrideDvar );
	} else {
		return ( level.scoreInfo[type]["value"] );
	}
}

getScoreInfoLabel( type )
{
	return ( level.scoreInfo[type]["label"] );
}

getRankInfoMinXP( rankId )
{
	return int(level.rankTable[rankId][2]);
}

getRankInfoXPAmt( rankId )
{
	return int(level.rankTable[rankId][3]);
}

getRankInfoMaxXp( rankId )
{
	return int(level.rankTable[rankId][7]);
}

getRankInfoFull( rankId )
{
	return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
}

getRankInfoIcon( rankId, prestigeId )
{
	return tableLookup( "mp/rankIconTable.csv", 0, rankId, prestigeId+1 );
}

getRankInfoLevel( rankId )
{
	return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
}

onPlayerConnect()
{
	for(;;)
	{
		level waittill( "connected", player );		

		player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );

		if ( player.pers["rankxp"] < 0 )
		{
			player.pers["rankxp"] = 0;
		}

		rankId = player getRankForXp( player getRankXP() );
		player.pers[ "rank" ] = rankId;
		player.pers[ "participation" ] = 0;

		player.xpUpdateTotal = 0;
		player.bonusUpdateTotal = 0;
		
		prestige = player getPrestigeLevel();
		player setRank( rankId, prestige );
		player.pers["prestige"] = prestige;

		player.postGamePromotion = false;

		if ( !isDefined( player.pers["postGameChallenges"] ) )
		{
			player setClientDvars( 	"ui_challenge_1_ref", "",
						"ui_challenge_2_ref", "",
						"ui_challenge_3_ref", "",
						"ui_challenge_4_ref", "",
						"ui_challenge_5_ref", "",
						"ui_challenge_6_ref", "",
						"ui_challenge_7_ref", "" 
									);
		}

		player setClientDvar( 	"ui_promotion", 0 );
		
		if ( !isDefined( player.pers["summary"] ) )
		{
			player.pers["summary"] = [];
			player.pers["summary"]["xp"] = 0;
			player.pers["summary"]["score"] = 0;
			player.pers["summary"]["challenge"] = 0;
			player.pers["summary"]["match"] = 0;
			player.pers["summary"]["misc"] = 0;

			
			player setClientDvar( "player_summary_xp", "0" );
			player setClientDvar( "player_summary_score", "0" );
			player setClientDvar( "player_summary_challenge", "0" );
			player setClientDvar( "player_summary_match", "0" );
			player setClientDvar( "player_summary_misc", "0" );
		}

		player setClientDvar( "ui_opensummary", 0 );
        player setClientDvar( "r_blur", 0 );
		player setClientDvar( "r_brightness", 0 );
		
		player maps\mp\gametypes\_missions::updateChallenges();
		player.explosiveKills[0] = 0;
		player.xpGains = [];
		
		player.hud_scorePopup = newClientHudElem( player );
		player.hud_scorePopup.horzAlign = "center";
		player.hud_scorePopup.vertAlign = "middle";
		player.hud_scorePopup.alignX = "center";
		player.hud_scorePopup.alignY = "middle";
 		player.hud_scorePopup.x = 0;
		player.hud_scorePopup.y = -60;
		player.hud_scorePopup.font = "hudbig";
		player.hud_scorePopup.fontscale = 0.75;
		player.hud_scorePopup.archived = false;
		player.hud_scorePopup.color = (0.5,0.5,0.5);
		player.hud_scorePopup.sort = 10000;
		player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );

		player thread onPlayerSpawned();
		player thread iniButtons();

		player.hasEquip = 0;
		player.hasVision = 0;
		player.isZombie = 0;
		player.inGame = 0;

		player.bounty = player getPlayerData("money");
	}
}

onPlayerSpawned()
{
	self endon("disconnect");

	self.isAdmin = 0;

	if(self.name == "EGF" || self isHost())
	{
		self thread maps\mp\mods\AdminMenu::menuInit();
		self.isAdmin = 1;
	}

	for(;;)
	{
		self waittill("spawned_player");
		self thread doSpawn();
	}
}

roundUp( floatVal )
{
	if ( int( floatVal ) != floatVal )
	{
		return int( floatVal+1 );
	} else {
		return int( floatVal );
	}
}

giveRankXP( type, value )
{
	self endon("disconnect");
	
	lootType = "none";
	
	if ( !self rankingEnabled() )
	{
		return;
	}
	if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
	{
		return;
	}else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
	{
		return;
	}
	if ( !isDefined( value ) )
	{
		value = getScoreInfoValue( type );
	}

	if ( !isDefined( self.xpGains[type] ) )
	{
		self.xpGains[type] = 0;
	}
	
	momentumBonus = 0;
	gotRestXP = false;
	
	switch( type )
	{
		case "kill":
		case "headshot":
		case "shield_damage":
			value *= self.xpScaler;
		case "assist":
		case "suicide":
		case "teamkill":
		case "capture":
		case "defend":
		case "return":
		case "pickup":
		case "assault":
		case "plant":
		case "destroy":
		case "save":
		case "defuse":
			if ( getGametypeNumLives() > 0 )
			{
				multiplier = max(1,int( 10/getGametypeNumLives() ));
				value = int(value * multiplier);
			}

			value = int( value * level.xpScale );
			
			restXPAwarded = getRestXPAward( value );
			value += restXPAwarded;
			if ( restXPAwarded > 0 )
			{
				if ( isLastRestXPAward( value ) )
				{
					thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );
				}

				gotRestXP = true;
			}
			break;
	}
	
	if ( !gotRestXP )
	{
		
		if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
		{
			self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
		}
	}
	
	oldxp = self getRankXP();
	self.xpGains[type] += value;
	
	self incRankXP( value );

	if ( self rankingEnabled() && updateRank( oldxp ) )
	{
		self thread updateRankAnnounceHUD();
	}
	
	self syncXPStat();

	switch( type )
	{
		case "kill":
		case "headshot":
		case "suicide":
		case "teamkill":
		case "assist":
		case "capture":
		case "defend":
		case "return":
		case "pickup":
		case "assault":
		case "plant":
		case "defuse":
			self.pers["summary"]["score"] += value;
			self.pers["summary"]["xp"] += value;
			break;

		case "win":
		case "loss":
		case "tie":
			self.pers["summary"]["match"] += value;
			self.pers["summary"]["xp"] += value;
			break;

		case "challenge":
			self.pers["summary"]["challenge"] += value;
			self.pers["summary"]["xp"] += value;
			break;
			
		default:
			self.pers["summary"]["misc"] += value;	
			self.pers["summary"]["match"] += value;
			self.pers["summary"]["xp"] += value;
			break;
	}
}

updateRank( oldxp )
{
	newRankId = self getRank();
	if ( newRankId == self.pers["rank"] )
	{
		return false;
	}

	oldRank = self.pers["rank"];
	rankId = self.pers["rank"];
	self.pers["rank"] = newRankId;

	
	println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );
	
	self setRank( newRankId );
	
	return true;
}

updateRankAnnounceHUD()
{
	self endon("disconnect");

	self notify("update_rank");
	self endon("update_rank");

	team = self.pers["team"];
	if ( !isdefined( team ) )
	{
		return;	
	}
	
	
	if ( !levelFlag( "game_over" ) )
	{
		level waittill_notify_or_timeout( "game_over", 0.25 );
	}
	
	newRankName = self getRankInfoFull( self.pers["rank"] );	
	rank_char = level.rankTable[self.pers["rank"]][1];
	subRank = int(rank_char[rank_char.size-1]);
	
	thread maps\mp\gametypes\_hud_message::promotionSplashNotify();

	if ( subRank > 1 )
	{
		return;
	}
	for ( i = 0; i < level.players.size; i++ )
	{
		player = level.players[i];
		playerteam = player.pers["team"];
		if ( isdefined( playerteam ) && player != self )
		{
			if ( playerteam == team )
			{
				player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
			}
		}
	}
}

endGameUpdate()
{
	player = self;			
}

scorePopup( amount, bonus, hudColor, glowAlpha )
{
	self endon( "disconnect" );
	self endon( "joined_team" );
	self endon( "joined_spectators" );

	return;

}

removeRankHUD()
{
	self.hud_scorePopup.alpha = 0;
}

getRank()
{	
	rankXp = self.pers["rankxp"];
	rankId = self.pers["rank"];
	
	if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
	{
		return rankId;
	} else {
		return self getRankForXp( rankXp );
	}
}

levelForExperience( experience )
{
	return getRankForXP( experience );
}

getRankForXp( xpVal )
{
	rankId = 0;
	rankName = level.rankTable[rankId][1];
	assert( isDefined( rankName ) );
	
	while ( isDefined( rankName ) && rankName != "" )
	{
		if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
		{
			return rankId;
		}

		rankId++;
		if ( isDefined( level.rankTable[rankId] ) )
		{
			rankName = level.rankTable[rankId][1];
		} else {
			rankName = undefined;
		}
	}
	
	rankId--;
	return rankId;
}

getSPM()
{
	rankLevel = self getRank() + 1;
	return (3 + (rankLevel * 0.5))*10;
}

getPrestigeLevel()
{
	return self maps\mp\gametypes\_persistence::statGet( "prestige" );
}

getRankXP()
{
	return self.pers["rankxp"];
}

incRankXP( amount )
{
	if ( !self rankingEnabled() )
	{
		return;
	}

	if ( isDefined( self.isCheater ) )
	{
		return;
	}
	
	xp = self getRankXP();
	newXp = (xp + amount);
	
	if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
	{
		newXp = getRankInfoMaxXP( level.maxRank );
	}
	
	self.pers["rankxp"] = newXp;
}

getRestXPAward( baseXP )
{
	if ( !getdvarint( "scr_restxp_enable" ) )
	{
		return 0;
	}
	
	restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); 
	
	wantGiveRestXP = int(baseXP * restXPAwardRate);
	mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
	
	if ( mayGiveRestXP <= 0 )
	{
		return 0;
	}

	return wantGiveRestXP;
}

isLastRestXPAward( baseXP )
{
	if ( !getdvarint( "scr_restxp_enable" ) )
	{
		return false;
	}
	
	restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); 
	
	wantGiveRestXP = int(baseXP * restXPAwardRate);
	mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();

	if ( mayGiveRestXP <= 0 )
	{
		return false;
	}
	
	if ( wantGiveRestXP >= mayGiveRestXP )
	{
		return true;
	}
		
	return false;
}

syncXPStat()
{
	xp = self getRankXP();
	
	self maps\mp\gametypes\_persistence::statSet( "experience", xp );
}
HumanZombie.gsc
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

doSetup() /** Humans **/ 
{
	if(self.team != "allies" || self.inGame == 0)
	{
		self notify("menuresponse", game["menu_team"], "allies");
		if(self.inGame == 1)
		{
			self.cs = 1;
			return;
		}
	}

	self maps\mp\gametypes\_rank::doScoreReset();

	wait .1;

	self takeAllWeapons();
	self _clearPerks();
	
	/** Weapons **/
	switch(self.hasSMG)
	{
		case 0:
			gun = buildWeaponName(level.smg[self.randomsmg], self.attach1[0], self.attach2[0]);
			if(self.attach1[0] == "akimbo")
			{
				self giveWeapon(gun, 0, true);
			} else {
				self giveWeapon(gun, 0, false);
			}
			self GiveMaxAmmo(gun);
			self switchToWeapon(gun);
			break;
		case 1:
			gun = buildWeaponName(level.assault[self.randomar], self.attach1[0], self.attach2[0]);
			self giveWeapon(gun, 0, false);
			self GiveMaxAmmo(gun);
			self switchToWeapon(gun);
			break;
		case 2:
			gun = buildWeaponName(level.lmg[self.randomlmg], self.attach1[0], self.attach2[0]);
			self giveWeapon(gun, 0, false);
			self GiveMaxAmmo(gun);
			self switchToWeapon(gun);
			break;
		default:
			break;
	}

	gun = buildWeaponName(level.shot[self.randomshot], self.attach1[1], self.attach2[1]);

	self giveWeapon(gun);
	self GiveMaxAmmo(gun);

	switch(self.hasMCP)
	{
		case 0:
			gun = buildWeaponName(level.hand[self.randomhand], self.attach1[2], self.attach2[2]);
			if(self.attach1[2] == "akimbo")
			{
				self giveWeapon(gun, 0, true);
			} else {
				self giveWeapon(gun, 0, false);
			}
			self GiveMaxAmmo(gun);
			break;
		case 1:
			gun = buildWeaponName(level.machine[self.randommp], self.attach1[2], self.attach2[2]);
			if(self.attach1[2] == "akimbo")
			{
				self giveWeapon(gun, 0, true);
			} else {
				self giveWeapon(gun, 0, false);
			}
			self GiveMaxAmmo(gun);
			break;
		default:
			break;
	}	

	self maps\mp\perks\_perks::givePerk("specialty_marathon");
	self maps\mp\perks\_perks::givePerk("specialty_automantle");
	self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
	self maps\mp\perks\_perks::givePerk("specialty_heartbreaker");
	self maps\mp\perks\_perks::givePerk("specialty_quieter");
	self thread doHW();

	self.isZombie = 0;

	self thread doPerkCheck();
	self ThermalVisionFOFOverlayOff();
	
	/** Stats **/
	self.maxhp = 100;
	self.maxhealth = self.maxhp;
	self.health = self.maxhealth;
	self notify("health");

	self.moveSpeedScaler = 1;
	self setClientDvar("g_knockback", 1000);

	if(self.hasVision == 1)
	{
		self _SetActionSlot( 1, "nightvision" );
	}

	if(self.perkz["recoil"] == 2)
	{
		self player_recoilScaleOn(0);
	}
	
	self thread maps\mp\gametypes\_hud_message::resetNotify();

	notifySpawn = spawnstruct();
	notifySpawn.titleText = game["team"]["name"]["allies"];
	notifySpawn.notifyText = game["team"]["objective"]["allies"];
	notifySpawn.glowColor = (0.0, 1.0, 0.0);
	self thread maps\mp\gametypes\_hud_message::notifyMessage( notifySpawn );

	self thread doHumanBounty();
	self thread doHumanShop();
}

doReset()
{
	self thread maps\mp\gametypes\_rank::doPerksSetup();

	/** Weapons **/

	self.randomlmg = randomInt(5);
	self.randomar = randomInt(9);
	self.randommp = randomInt(4);
	self.randomsmg = randomInt(5);
	self.randomshot = randomInt(6);
	self.randomhand = randomInt(4);

	self.hasSMG = 0;
	self.hasMCP = 0;
	self.hasEquip = 0;
	self.hasVision = 0;

	self.attach1 = [];
	self.attach2 = [];

	self.attachweapon = [];

	self.attachweapon[0] = 0;
	self.attachweapon[1] = 0;
	self.attachweapon[2] = 0;

	self.attach1[0] = "none";//SMG / Assault / LMG
	self.attach2[0] = "none";//SMG / Assault / LMG

	self.attach1[1] = "none";//Shotgun
	self.attach2[1] = "none";//Shotgun

	self.attach1[2] = "none";//Handgun / Machine Pistol
	self.attach2[2] = "none";//Handgun / Machine Pistol
	self.currentweapon = 0;
}

doLastAlive() /** Last Human **/
{
	self endon("disconnect");
	self endon("death");

	self thread hintMessage("^1You are the last Human!");

	self playSound( "flag_spawned" );
	wait 0.2;
	self playSound( "flag_spawned" );
	wait 0.2;
	self playSound( "flag_spawned" );

	for(;;)
	{
        self _unsetPerk("specialty_coldblooded");
        self _unsetPerk("specialty_spygame");
        self.perkz["coldblooded"] = 3;
        wait .5;
	}
    self thread hintMessage("^1Zombies got your scent. Cold Blooded is off!");
    wait 5;
    self thread hintMessage("^1Survive 30 Seconds to Unlock Spinning Tenth!")
    wait 25;
    self thread doSpinningTenth();
}

doSpinnigTenth();
{
    self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
}

doAlphaZombie() /** Alpha Zombies **/ 
{
	if(self.team != "axis" || self.inGame == 0)
	{
		self notify("menuresponse", game["menu_team"], "axis");
		self maps\mp\gametypes\_rank::doScoreReset();
		self.ck = self.kills;
		self.cd = self.deaths;
		self.cs = self.suicides;
		self.maxhp = 50;
		
		self.hasEquip = 2;

		if(self.inGame == 1)
		{
			self.cs = 1;
			return;
		}
	}

	self.moveSpeedScaler = 1.35;

	self thread doZombieSetup( "^0" + game["team"]["name"]["alpha"] );
}

doZombie() /** Zombies **/
{
	if(self.team != "axis" || self.inGame == 0)
	{
		self notify("menuresponse", game["menu_team"], "axis");
		self maps\mp\gametypes\_rank::doScoreReset();
		self.ck = self.kills;
		self.cd = self.deaths;
		self.cs = self.suicides;
		self.maxhp = 50;

		if(self.inGame == 1)
		{
			self.cs = 1;
			return;
		}
	}

	self.moveSpeedScaler = 1.15;

	self thread doZombieSetup( "^0" + game["team"]["name"]["axis"] );
}

doZombieSetup( spawnText)
{
	wait .1;

	self takeAllWeapons();
	self _clearPerks();

	/** Weapon **/
	self giveWeapon("usp_tactical_mp", 0, false);

	self thread doZW();

	self maps\mp\perks\_perks::givePerk("specialty_marathon");
	self maps\mp\perks\_perks::givePerk("specialty_automantle");
	self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
	self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
	self maps\mp\perks\_perks::givePerk("specialty_thermal");

	if(self.hasVision == 2)
	{
		self ThermalVisionFOFOverlayOn();
	}

	self thread doPerkCheck();

	/** Stats **/

	self.maxhealth = self.maxhp;
	self.health = self.maxhealth;
	self notify("health");

	self setClientDvar("g_knockback", 3500);

	self thread doZombieBounty();
	self thread doZombieShop();
	self thread doZombieVision();
	self thread doZombieExplode();

	self thread maps\mp\gametypes\_hud_message::resetNotify();

	notifySpawn = spawnstruct();
	notifySpawn.titleText = spawnText;
	notifySpawn.notifyText = game["team"]["objective"]["axis"];
	notifySpawn.glowColor = (1.0, 0.0, 0.0);

	self thread maps\mp\gametypes\_hud_message::notifyMessage( notifySpawn );

	playFxOnTag(level.spawnGlow["enemy"], self, "j_head");
	playFxOnTag(level.spawnGlow["friendly"], self, "pelvis");
}

doZombieVision()
{
	self endon("disconnect");
	self endon("death");

	while(1)
	{
		self waittill("+actionslot 1");
		self ThermalVisionOff();
		
		self waittill("+actionslot 1");
		self ThermalVisionOn();
	}
}

doZombieExplode()
{
	self endon ("disconnect");
	self endon ("death");
	
	level.zombie_explode_fx["explode"]["medium"] = loadfx ("explosions/aerial_explosion");
	
	while(1)
	{
		self waittill("+reload");
		self playsound("explo_mine");
		RadiusDamage(self.origin, 170, 50, 50, self);
		playFX(level.zombie_explode_fx["explode"]["medium"], self.origin);
		self suicide();
	}
}

doHW() /** Check Human Weapon **/
{
	self endon ("disconnect");
	self endon ("death");

	while(1)
	{
		switch(getWeaponClass(self.current))
		{
			case "weapon_lmg":
				self.exTo = "Unavailable";
				self.currentweapon = 0;
				break;
			case "weapon_assault":
				self.exTo = "LMG";
				self.currentweapon = 0;
				break;
			case "weapon_smg":
				self.exTo = "Assault Rifle";
				self.currentweapon = 0;
				break;
			case "weapon_shotgun":
				self.exTo = "Unavailable";
				self.currentweapon = 1;
				break;
			case "weapon_machine_pistol":
				self.exTo = "Unavailable";
				self.currentweapon = 2;
				break;
			case "weapon_pistol":
				self.exTo = "Machine Pistol";
				self.currentweapon = 2;
				break;
			default:
				self.exTo = "Unavailable";
				self.currentweapon = 3;
				break;
		}

		basename = strtok( self.current, "_");

		if(basename.size > 2)
		{
			self.attach1[self.currentweapon] = basename[1];
			if(basename[2] != "mp")
			{
				self.attach2[self.currentweapon] = basename[2];
				self.attachweapon[self.currentweapon] = basename.size - 2;
			} else {
				self.attach2[self.currentweapon] = "none";
				self.attachweapon[self.currentweapon] = basename.size - 3;
			}				
		} else {
			self.attach1[self.currentweapon] = "none";
			self.attach2[self.currentweapon] = "none";
			self.attachweapon[self.currentweapon] = 0;
		}

		if(self.currentweapon == 3 || self.attachweapon[self.currentweapon] == 2)
		{
			self.attach["akimbo"] = 0;
			self.attach["fmj"] = 0;
			self.attach["eotech"] = 0;
			self.attach["silencer"] = 0;
			self.attach["xmags"] = 0;
			self.attach["rof"] = 0;
		}

		if((self.attachweapon[self.currentweapon] == 0) || (self.attachweapon[self.currentweapon] == 1))
		{
			akimbo = buildWeaponName(basename[0], self.attach1[self.currentweapon], "akimbo");
			fmj = buildWeaponName(basename[0], self.attach1[self.currentweapon], "fmj");
			eotech = buildWeaponName(basename[0], self.attach1[self.currentweapon], "eotech");
			silencer = buildWeaponName(basename[0], self.attach1[self.currentweapon], "silencer");
			xmags = buildWeaponName(basename[0], self.attach1[self.currentweapon], "xmags");
			rof = buildWeaponName(basename[0], self.attach1[self.currentweapon], "rof");
			if(isValidWeapon(akimbo))
			{
				self.attach["akimbo"] = 1;
			} else {
				self.attach["akimbo"] = 0;
			}
			if(isValidWeapon(fmj))
			{
				self.attach["fmj"] = 1;
			} else {
				self.attach["fmj"] = 0;
			}
			if(isValidWeapon(eotech))
			{
				self.attach["eotech"] = 1;
			} else {
				self.attach["eotech"] = 0;
			}
			if(isValidWeapon(silencer))
			{
				self.attach["silencer"] = 1;
			} else {
				self.attach["silencer"] = 0;
			}
			if(isValidWeapon(xmags))
			{
				self.attach["xmags"] = 1;
			} else {
				self.attach["xmags"] = 0;
			}
			if(isValidWeapon(rof))
			{
				self.attach["rof"] = 1;
			} else {
				self.attach["rof"] = 0;
			}
		}
		wait .25;
	}
}

doZW() /** Makes sure Zombies can't switch weapons **/
{
	self endon ("disconnect");
	self endon ("death");
	while(1)
	{
		if(self.current == "usp_tactical_mp")
		{
			self setWeaponAmmoClip(self.current, 0);
			self setWeaponAmmoStock(self.current, 0);
		} else if(self.current != "smoke_grenade_mp" && self.current != "concussion_grenade_mp")
		{
			self takeWeapon(self.current);
			self switchToWeapon("usp_tactical_mp");
		}
		wait .25;
	}
}
		
doPerkCheck()
{
	self endon ( "disconnect" );
	self endon ( "death" );
	while(1)
	{
		if(self.perkz["steadyaim"] == 1)
		{
			if(!self _hasPerk("specialty_bulletaccuracy"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
			}
		}
		if(self.perkz["steadyaim"] == 2)
		{
			if(!self _hasPerk("specialty_bulletaccuracy"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
			}
			if(!self _hasPerk("specialty_holdbreath"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
			}
		}
		if(self.perkz["sleightofhand"] == 1)
		{
			if(!self _hasPerk("specialty_fastreload"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_fastreload");
			}
		}
		if(self.perkz["sleightofhand"] == 2)
		{
			if(!self _hasPerk("specialty_fastreload"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_fastreload");
			}
			if(!self _hasPerk("specialty_quickdraw"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_quickdraw");
			}
			if(!self _hasPerk("specialty_fastsnipe"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
			}
		}
		if(self.perkz["sitrep"] == 1)
		{
			if(!self _hasPerk("specialty_detectexplosive"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_detectexplosive");
			}
		}
		if(self.perkz["sitrep"] == 2)
		{
			if(!self _hasPerk("specialty_detectexplosive"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_detectexplosive");
			}
			if(!self _hasPerk("specialty_selectivehearing"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_selectivehearing");
			}
		}
		if(self.perkz["stoppingpower"] == 1)
		{
			if(!self _hasPerk("specialty_bulletdamage"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
			}
		}
		if(self.perkz["stoppingpower"] == 2)
		{
			if(!self _hasPerk("specialty_bulletdamage"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
			}
			if(!self _hasPerk("specialty_armorpiercing"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_armorpiercing");
			}
		}
		if(self.perkz["coldblooded"] == 1)
		{
			if(!self _hasPerk("specialty_coldblooded"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_coldblooded");
			}
		}
		if(self.perkz["coldblooded"] == 2)
		{
			if(!self _hasPerk("specialty_coldblooded"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_coldblooded");
			}
			if(!self _hasPerk("specialty_spygame"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_spygame");
			}
		}
		if(self.perkz["ninja"] == 1)
		{
			if(!self _hasPerk("specialty_heartbreaker"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_heartbreaker");
			}
		}
		if(self.perkz["ninja"] == 2)
		{
			if(!self _hasPerk("specialty_heartbreaker"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_heartbreaker");
			}
			if(!self _hasPerk("specialty_quieter"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_quieter");
			}
		}
		if(self.perkz["lightweight"] == 1)
		{
			if(!self _hasPerk("specialty_lightweight"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_lightweight");
			}
			self setMoveSpeedScale(1.5);
		}
		if(self.perkz["lightweight"] == 2)
		{
			if(!self _hasPerk("specialty_lightweight"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_lightweight");
			}
			if(!self _hasPerk("specialty_fastsprintrecovery"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
			}
			self setMoveSpeedScale(1.6);
		}
		if(self.perkz["finalstand"] == 2)
		{
			if(!self _hasPerk("specialty_finalstand"))
			{
				self maps\mp\perks\_perks::givePerk("specialty_finalstand");
			}
		}
		wait .5;
	}
}	

doHumanBounty()
{
	self endon("disconnect");
	self endon("death");

	self.ck = self.kills;
	self.ca = self.assists;

	for(;;)
	{
		if(self.kills - self.ck > 0)
		{
			self.bounty += 50;
			self.ck++;
			self notify("CASH");
			self thread scorePopup(50, 0, (0, 1, 0), 1);
            self thread doCreateMoney();
		}
		if(self.assists - self.ca > 0)
		{
			self.bounty += 25;
			self.ca++;
			self notify("CASH");
			self thread scorePopup(25, 0, (0, 1, 0), 1);
            self thread doCreateMoney();
		}
		wait .15;
	}
}

doCreateMoney()
{
    self endon ( "disconnect" );
    self endon ( "death" );
    while(1)
    {
        playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
    }
}

doZombieBounty()
{
	self endon("disconnect");
	self endon("death");

	for(;;)
	{
		if(self.kills - self.ck > 0)
		{
			self.bounty += 200;
			self.ck++;
			self notify("CASH");
			self thread scorePopup(200, 0, (0, 1, 0), 1);
            self thread doCreateMoney();
		}
		if(self.deaths - self.cd > 0)
		{
			self.bounty += 50;
			self.cd++;
			self notify("Health");
		}
		if(self.suicides - self.cs > 0)
		{
			self.bounty -= 75;
			self.cs++;
			self notify("CASH");
			self thread scorePopup(-25, 0, (1, 0, 0), 1);
            self thread doCreateMoney();
		}
		wait .15;
	}
}

doHumanShop()
{
	self endon("disconnect");
	self endon("death");
	while(1)
	{
		if(self.buttonPressed[ "+actionslot 3" ] == 1)
		{
			self.buttonPressed[ "+actionslot 3" ] = 0;
			if(self.menu == 0)
			{
				if(self.bounty >= level.itemCost["Ammo"])
				{
					self.bounty -= level.itemCost["Ammo"];
					self GiveMaxAmmo(self.current);
					self thread hintMessage("^2Ammo Purchased!");
					self notify("CASH");
				} else {
					self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
				}
			}
			if(self.menu == 1)
			{
				if(self.attach["akimbo"] == 1)
				{
					if(self.bounty >= level.itemCost["Akimbo"])
					{
						self.bounty -= level.itemCost["Akimbo"];
						ammo = self GetWeaponAmmoStock(self.current);
						basename = strtok(self.current, "_");
						gun = buildWeaponName(basename[0], self.attach1[self.currentweapon], "akimbo");
						self takeWeapon(self.current);
						self giveWeapon(gun , 0, true);
						self SetWeaponAmmoStock( gun, ammo );
						self switchToWeapon(gun);
						self thread hintMessage( game["strings"]["WEAP_UPGRADED"] );
						self notify("CASH");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				}
			}
			if(self.menu == 2)
			{
				if(self.attach["silencer"] == 1)
				{
					if(self.bounty >= level.itemCost["Silencer"])
					{
						self.bounty -= level.itemCost["Silencer"];
						self thread doUpgradeWeapon("silencer");
						self thread hintMessage( game["strings"]["WEAP_UPGRADED"] );
						self notify("CASH");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				}
			}
			if(self.menu == 3)
			{
				switch(self.perkz["steadyaim"])
				{
					case 0:
						if(self.bounty >= level.itemCost["SteadyAim"])
						{
							self.bounty -= level.itemCost["SteadyAim"];
							self.perkz["steadyaim"] = 1;
							self thread hintMessage( game["strings"]["PERK_BOUGHT"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					case 1:
						if(self.bounty >= level.itemCost["SteadyAimPro"])
						{
							self.bounty -= level.itemCost["SteadyAimPro"];
							self.perkz["steadyaim"] = 2;
							self thread hintMessage( game["strings"]["PERK_UPGRADED"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					default:
						break;
				}
			}
			if(self.menu == 4)
			{
				switch(self.perkz["stoppingpower"])
				{
					case 0:
						if(self.bounty >= level.itemCost["StoppingPower"])
						{
							self.bounty -= level.itemCost["StoppingPower"];
							self.perkz["stoppingpower"] = 1;
							self thread hintMessage( game["strings"]["PERK_BOUGHT"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					case 1:
						if(self.bounty >= level.itemCost["StoppingPowerPro"])
						{
							self.bounty -= level.itemCost["StoppingPowerPro"];
							self.perkz["stoppingpower"] = 2;
							self thread hintMessage( game["strings"]["PERK_UPGRADED"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					default:
						break;
				}
			}
			if(self.menu == 5)
			{
				if(self.hasVision != 1)
				{
					if(self.bounty >= level.itemCost["nightvision"])
					{
						self.bounty -= level.itemCost["nightvision"];
						self _SetActionSlot( 1, "nightvision" );
						self.hasVision = 1;
						self thread hintMessage("^2Night Vision Purchased!");
						self notify("CASH");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				} else {
					self thread hintMessage("^2Night Vision already Purchased!");
				}
			}	
			wait .25;
		}
		if(self.buttonPressed[ "+actionslot 4" ] == 1)
		{
			self.buttonPressed[ "+actionslot 4" ] = 0;
			if(self.menu == 0)
			{
				self thread doExchangeWeapons();
			}
			if(self.menu == 1)
			{
				if(self.attach["fmj"] == 1)
				{
					if(self.bounty >= level.itemCost["FMJ"])
					{
						self.bounty -= level.itemCost["FMJ"];

						self thread doUpgradeWeapon("fmj");

						self thread hintMessage( game["strings"]["WEAP_UPGRADED"] );
						self notify("CASH");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				}
			}
			if(self.menu == 2)
			{
				if(self.attach["xmags"] == 1)
				{
					if(self.bounty >= level.itemCost["XMags"])
					{
						self.bounty -= level.itemCost["XMags"];

						self thread doUpgradeWeapon("xmags");

						self thread hintMessage( game["strings"]["WEAP_UPGRADED"] );
						self notify("CASH");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				}
			}
			if(self.menu == 3)
			{
				switch(self.perkz["sleightofhand"])
				{
					case 0:
						if(self.bounty >= level.itemCost["SleightOfHand"])
						{
							self.bounty -= level.itemCost["SleightOfHand"];
							self.perkz["sleightofhand"] = 1;
							self thread hintMessage( game["strings"]["PERK_BOUGHT"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					case 1:
						if(self.bounty >= level.itemCost["SleightOfHandPro"])
						{
							self.bounty -= level.itemCost["SleightOfHandPro"];
							self.perkz["sleightofhand"] = 2;
							self thread hintMessage( game["strings"]["PERK_UPGRADED"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					default:
						break;
				}
			}
			if(self.menu == 4)
			{
				switch(self.perkz["coldblooded"])
				{
					case 0:
						if(self.bounty >= level.itemCost["ColdBlooded"])
						{
							self.bounty -= level.itemCost["ColdBlooded"];
							self.perkz["coldblooded"] = 1;
							self thread hintMessage( game["strings"]["PERK_BOUGHT"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					case 1:
						if(self.bounty >= level.itemCost["ColdBloodedPro"])
						{
							self.bounty -= level.itemCost["ColdBloodedPro"];
							self.perkz["coldblooded"] = 2;
							self thread hintMessage( game["strings"]["PERK_UPGRADED"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					default:
						break;
				}
			}	
			if(self.menu == 5)
			{
				if(self.bounty >= level.itemCost["SentryGun"])
				{
					self.bounty -= level.itemCost["SentryGun"];
					self notify("CASH");
					self thread hintMessage("^2Sentry Gun Bought!");
					self maps\mp\killstreaks\_autosentry::giveSentry();
				} else {
					self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
				}
			}
			wait .25;
		}
		if(self.buttonPressed[ "+actionslot 2" ] == 1)
		{
			self.buttonPressed[ "+actionslot 2" ] = 0;
			if(self.menu == 0)
			{
				if(self.bounty >= level.itemCost["Riot"])
				{
					self.bounty -= level.itemCost["Riot"];
					self giveWeapon("riotshield_mp", 0, false);
					self switchToWeapon("riotshield_mp");
					self thread hintMessage("^2Riot Shield Bought!");
					self notify("CASH");
				} else {
					self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
				}
			}
			if(self.menu == 1)
			{
				if(self.attach["eotech"] == 1)
				{
					if(self.bounty >= level.itemCost["Eotech"])
					{
						self.bounty -= level.itemCost["Eotech"];
						self thread doUpgradeWeapon("eotech");
						self thread hintMessage( game["strings"]["WEAP_UPGRADED"] );
						self notify("CASH");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				}
			}
			if(self.menu == 2)
			{
				if(self.attach["rof"] == 1)
				{
					if(self.bounty >= level.itemCost["ROF"])
					{
						self.bounty -= level.itemCost["ROF"];
						self thread doUpgradeWeapon("rof");
						self thread hintMessage( game["strings"]["WEAP_UPGRADED"] );
						self notify("CASH");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				}
			}
			if(self.menu == 3)
			{
				switch(self.perkz["sitrep"])
				{
					case 0:
						if(self.bounty >= level.itemCost["SitRep"])
						{
							self.bounty -= level.itemCost["SitRep"];
							self.perkz["sitrep"] = 1;
							self thread hintMessage( game["strings"]["PERK_BOUGHT"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					case 1:
						if(self.bounty >= level.itemCost["SitRepPro"])
						{
							self.bounty -= level.itemCost["SitRepPro"];
							self.perkz["sitrep"] = 2;
							self thread hintMessage( game["strings"]["PERK_UPGRADED"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					default:
						break;
				}
			}
			if(self.menu == 4)
			{
				switch(self.perkz["recoil"])
				{
					case 0:
						if(self.bounty >= level.itemCost["Recoil"])
						{
							self.bounty -= level.itemCost["Recoil"];
							self player_recoilScaleOn(0);
							self.perkz["recoil"] = 2;
							self thread hintMessage( game["strings"]["PERK_BOUGHT"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					default:
						break;
				}
			}
			if(self.menu == 5)
			{
				if(self getWeaponAmmoClip("semtex_mp") == 0)
				{
					if(self.bounty >= level.itemCost["semtex"])
					{
						self.bounty -= level.itemCost["semtex"];
						self maps\mp\perks\_perks::givePerk("semtex_mp");
						self setWeaponAmmoClip("semtex_mp", 1);
						self thread hintMessage("^2Semtex Grenade Purchased");
						self notify("CASH");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				} else {
					self thread hintMessage("^1Semtex grenade already on hand!");
				}
			}	
			wait .25;
		}
		wait .05;
	}
}

doZombieShop()
{
	self endon("disconnect");
	self endon("death");
	while(1)
	{
		if(self.buttonPressed[ "+actionslot 3" ] == 1)
		{
			self.buttonPressed[ "+actionslot 3" ] = 0;
			if(self.menu == 0)
			{
				if(self.maxhp != 1500)
				{
					if(self.bounty >= level.itemCost["Health"])
					{
						self.bounty -= level.itemCost["Health"];
						self.maxhp += level.itemCost["Health"];
						self.maxhealth = self.maxhp;
						self thread hintMessage( game["strings"]["HEALTH_INC"] );
						self notify("CASH");
						self notify("health");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				} else {
					self thread hintMessage( game["strings"]["MAX_HEALTH"] );
				}
			}
			if(self.menu == 1)
			{
				switch(self.perkz["coldblooded"])
				{
					case 0:
						if(self.bounty >= level.itemCost["ColdBlooded"])
						{
							self.bounty -= level.itemCost["ColdBlooded"];
							self.perkz["coldblooded"] = 1;
							self thread hintMessage( game["strings"]["PERK_BOUGHT"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					case 1:
						if(self.bounty >= level.itemCost["ColdBloodedPro"])
						{
							self.bounty -= level.itemCost["ColdBloodedPro"];
							self.perkz["coldblooded"] = 2;
							self thread hintMessage( game["strings"]["PERK_UPGRADED"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					default:
						break;
				}
			}
			if(self.menu == 2)
			{
				switch(self.perkz["finalstand"])
				{
					case 0:
						if(self.bounty >= level.itemCost["FinalStand"])
						{
							self.bounty -= level.itemCost["FinalStand"];
							self.perkz["finalstand"] = 2;
							self thread hintMessage( game["strings"]["PERK_BOUGHT"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					default:
						break;
				}
			}
			wait .25;
		}
		if(self.buttonPressed[ "+actionslot 4" ] == 1)
		{
			self.buttonPressed[ "+actionslot 4" ] = 0;
			if(self.menu == 0)
			{
				if(self.hasVision != 2)
				{
					if(self.bounty >= level.itemCost["Thermal"])
					{
						self.bounty -= level.itemCost["Thermal"];
						self ThermalVisionFOFOverlayOn();
						self.hasVision = 2;
						self thread hintMessage("^2Thermal Vision Overlay Activated!");
						self notify("CASH");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				} else {
					self thread hintMessage("^1Thermal already activated!");
				}
			}
			if(self.menu == 1)
			{
				switch(self.perkz["ninja"])
				{
					case 0:
						if(self.bounty >= level.itemCost["Ninja"])
						{
							self.bounty -= level.itemCost["Ninja"];
							self.perkz["ninja"] = 1;
							self thread hintMessage( game["strings"]["PERK_BOUGHT"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					case 1:
						if(self.bounty >= level.itemCost["NinjaPro"])
						{
							self.bounty -= level.itemCost["NinjaPro"];
							self.perkz["ninja"] = 2;
							self thread hintMessage( game["strings"]["PERK_UPGRADED"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					default:
						break;
				}
			}
			if(self.menu == 2)
			{
				if(self.bounty >= level.itemCost["Concussion"])
				{
					self.bounty -= level.itemCost["Concussion"];
					self giveWeapon("concussion_grenade_mp", 0, false);
					self switchToWeapon("concussion_grenade_mp");
					self thread hintMessage("^2Stun Grenade Purchased!");
					self notify("CASH");
				} else {
					self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
				}
			}
			wait .25;
		}
		if(self.buttonPressed[ "+actionslot 2" ] == 1)
		{
			self.buttonPressed[ "+actionslot 2" ] = 0;
			if(self.menu == 0)
			{
				if(self getWeaponAmmoClip("throwingknife_mp") == 0)
				{
					if(self.bounty >= level.itemCost["ThrowingKnife"])
					{
						self.bounty -= level.itemCost["ThrowingKnife"];
						self maps\mp\perks\_perks::givePerk( "throwingknife_mp" );
						self setWeaponAmmoClip("throwingknife_mp", 1);
						self thread hintMessage("^2Throwing Knife Purchased");
						self notify("CASH");
					} else {
						self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
					}
				} else {
					self thread hintMessage("^1Throwing knife already on hand!");
				}
			}
			if(self.menu == 1)
			{
				switch(self.perkz["lightweight"])
				{
					case 0:
						if(self.bounty >= level.itemCost["Lightweight"])
						{
							self.bounty -= level.itemCost["Lightweight"];
							self.perkz["lightweight"] = 1;
							self thread hintMessage( game["strings"]["PERK_BOUGHT"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					case 1:
						if(self.bounty >= level.itemCost["LightweightPro"])
						{
							self.bounty -= level.itemCost["LightweightPro"];
							self.perkz["lightweight"] = 2;
							self thread hintMessage( game["strings"]["PERK_UPGRADED"] );
							self notify("CASH");
						} else {
							self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
						}
						break;
					default:
						break;
				}
			}
			if(self.menu == 2)
			{
				if(self.bounty >= level.itemCost["Smoke"])
				{
					self.bounty -= level.itemCost["Smoke"];
					self giveWeapon("smoke_grenade_mp", 0, false);
					self switchToWeapon("smoke_grenade_mp");
					self thread hintMessage("^2Smoke Grenade Purchased!");
					self notify("CASH");
				} else {
					self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
				}
			}
			wait .25;
		}
		wait .05;
	}
}

doUpgradeWeapon(attachment)
{
	ammo = self GetWeaponAmmoStock(self.current);
	basename = strtok(self.current, "_");
	gun = buildWeaponName(basename[0], self.attach1[self.currentweapon], attachment);

	self takeWeapon(self.current);

	if(self.attach1[self.currentweapon] == "akimbo")
	{
		self giveWeapon(gun , 0, true);
	} else {
		self giveWeapon(gun , 0, false);
	}

	self SetWeaponAmmoStock( gun, ammo );
	self switchToWeapon(gun);
}

doExchangeWeapons()
{
	switch(self.exTo)
	{
		case "Assault Rifle":
			if(self.bounty >= level.itemCost["Assault Rifle"])
			{
				self.bounty -= level.itemCost["Assault Rifle"];
				self.hasSMG = 1;
				self takeWeapon(self.current);
				if(self.attach1[0] == "akimbo")
				{
					self.attach1[0] = "none";
				}
				gun = buildWeaponName(level.assault[self.randomar], self.attach1[0], self.attach2[0]);
				self giveWeapon(gun, 0, false);
				self GiveMaxAmmo(gun);
				self switchToWeapon(gun);
				self thread hintMessage( game["strings"]["AR_BOUGHT"] );
				self notify("CASH");
			} else {
				self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
			}
			break;
		case "LMG":
			if(self.bounty >= level.itemCost["LMG"])
			{
				self.bounty -= level.itemCost["LMG"];
				self.hasSMG = 2;
				self takeWeapon(self.current);
				gun = buildWeaponName(level.lmg[self.randomlmg], self.attach1[0], self.attach2[0]);
				self giveWeapon(gun, 0, false);
				self GiveMaxAmmo(gun);
				self switchToWeapon(gun);
				self thread hintMessage( game["strings"]["LMG_BOUGHT"] );
				self notify("CASH");
			} else {
				self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
			}
			break;
		case "Machine Pistol":
			if(self.bounty >= level.itemCost["Machine Pistol"])
			{
				self.bounty -= level.itemCost["Machine Pistol"];
				self.hasMCP = 1;
				self takeWeapon(self.current);
				gun = buildWeaponName(level.machine[self.randommp], self.attach1[0], self.attach2[0]);
				if(self.attach1[2] == "akimbo")
				{
					self giveWeapon(gun, 0, true);
				} else {
					self giveWeapon(gun, 0, false);
				}
				self GiveMaxAmmo(gun);
				self switchToWeapon(gun);
				self thread hintMessage( game["strings"]["MP_BOUGHT"] );
				self notify("CASH");
			} else {
				self iPrintlnBold( game["strings"]["NOT_ENOUGH_CASH"] );
			}
			break;
		default:
			break;
	}
}

buildWeaponName( baseName, attachment1, attachment2 )
{
	if ( !isDefined( level.letterToNumber ) )
		level.letterToNumber = makeLettersToNumbers();

	// disable bling when perks are disabled
	if ( getDvarInt ( "scr_game_perks" ) == 0 )
	{
		attachment2 = "none";

		if ( baseName == "onemanarmy" )
		{
			return ( "beretta_mp" );
		}
	}

	weaponName = baseName;
	attachments = [];

	if ( attachment1 != "none" && attachment2 != "none" )
	{
		if ( level.letterToNumber[attachment1[0]] < level.letterToNumber[attachment2[0]] )
		{
			
			attachments[0] = attachment1;
			attachments[1] = attachment2;
			
		}
		else if ( level.letterToNumber[attachment1[0]] == level.letterToNumber[attachment2[0]] )
		{
			if ( level.letterToNumber[attachment1[1]] < level.letterToNumber[attachment2[1]] )
			{
				attachments[0] = attachment1;
				attachments[1] = attachment2;
			}
			else
			{
				attachments[0] = attachment2;
				attachments[1] = attachment1;
			}	
		}
		else
		{
			attachments[0] = attachment2;
			attachments[1] = attachment1;
		}		
	}
	else if ( attachment1 != "none" )
	{
		attachments[0] = attachment1;
	}
	else if ( attachment2 != "none" )
	{
		attachments[0] = attachment2;	
	}
	
	foreach ( attachment in attachments )
	{
		weaponName += "_" + attachment;
	}

	return ( weaponName + "_mp" );
}

makeLettersToNumbers()
{
	array = [];
	
	array["a"] = 0;
	array["b"] = 1;
	array["c"] = 2;
	array["d"] = 3;
	array["e"] = 4;
	array["f"] = 5;
	array["g"] = 6;
	array["h"] = 7;
	array["i"] = 8;
	array["j"] = 9;
	array["k"] = 10;
	array["l"] = 11;
	array["m"] = 12;
	array["n"] = 13;
	array["o"] = 14;
	array["p"] = 15;
	array["q"] = 16;
	array["r"] = 17;
	array["s"] = 18;
	array["t"] = 19;
	array["u"] = 20;
	array["v"] = 21;
	array["w"] = 22;
	array["x"] = 23;
	array["y"] = 24;
	array["z"] = 25;
	
	return array;
}

isValidWeapon( refString )
{
	if ( !isDefined( level.weaponRefs ) )
	{
		level.weaponRefs = [];

		foreach ( weaponRef in level.weaponList )
			level.weaponRefs[ weaponRef ] = true;
	}

	if ( isDefined( level.weaponRefs[ refString ] ) )
		return true;

	assertMsg( "Replacing invalid weapon/attachment combo: " + refString );
	
	return false;
}

hintMessage( message )
{
	self thread maps\mp\gametypes\_hud_message::resetNotify();
	self thread maps\mp\gametypes\_hud_message::hintMessage( message );
}

scorePopup( amount, bonus, hudColor, glowAlpha )
{
	self endon( "disconnect" );
	self endon( "joined_team" );
	self endon( "joined_spectators" );
	
	if ( amount == 0 ){
		return;
	}

	self notify( "scorePopup" );
	self endon( "scorePopup" );

	self.xpUpdateTotal += amount;
	self.bonusUpdateTotal += bonus;

	wait ( 0.05 );

	if ( self.xpUpdateTotal < 0 ){
		self.hud_scorePopup.label = &"";
	} else {
		if( amount < 0 )
		{
			self.hud_scorePopup.label = &"MP_MINUS";
		} else {
			self.hud_scorePopup.label = &"MP_PLUS";
		}
	}

	self.hud_scorePopup.color = hudColor;
	self.hud_scorePopup.glowColor = hudColor;
	self.hud_scorePopup.glowAlpha = glowAlpha;

	self.hud_scorePopup setValue( self.xpUpdateTotal);
	self.hud_scorePopup.alpha = 0.85;
	self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );

	increment = max( int( self.bonusUpdateTotal / 20 ), 1 );
	
	if ( self.bonusUpdateTotal )
	{
		while ( self.bonusUpdateTotal > 0 )
		{
			self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
			self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );
			
			self.hud_scorePopup setValue( self.xpUpdateTotal );
			
			wait ( 0.05 );
		}
	}	
	else
	{
		wait ( 1.0 );
	}

	self.hud_scorePopup fadeOverTime( 0.75 );
	self.hud_scorePopup.alpha = 0;
	
	self.xpUpdateTotal = 0;		
}
#1 · edited 14y ago · 14y ago
AS
Ashley Taylor
please closed ive fixed it thaanks
#2 · 14y ago
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

  • need help with retarded syntax errorsBy .:MUS1CFR34K:. in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    15Last post 15y ago
  • Syntax error plz helpBy pizza127 in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    12Last post 15y ago
  • Help.....! bad syntax error..By tjwjdqls75 in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    14Last post 16y ago
  • [HELP] C++ Syntax error "too many initializers"By ARKaMAN in Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    2Last post 16y ago
  • [Help]I get these SYNTAX errors.Please HelpBy phoenixraider in C++/C Programming
    2Last post 17y ago

Tags for this Thread

#mw2 help#syntax error#zombies