Results 1 to 2 of 2
  1. #1
    ~Just IN~'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    self thread xbox360nolife() {
    Posts
    518
    Reputation
    11
    Thanks
    52
    My Mood
    Doh

    [Solved] Crashes after select class

    Okay, i load up this mod:

    [php] /* QUARANTINE CHAOS */
    /* ZOMBIE MOD PRIVATE VERSION */
    /* CREATED BY KILLINGDYL */
    /* PLEASE DO NOT REMOVE THIS HEADING */
    /* QUARANTINE CHAOS */
    /* ZOMBIE MOD PRIVATE VERSION */
    /* CREATED BY KILLINGDYL */
    /* PLEASE DO NOT REMOVE THIS HEADING */
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;

    doSetup()
    {
    if(self.team == "axis" || self.team == "spectator")
    {
    self notify("menuresponse", game["menu_team"], "allies");
    wait .1;
    self notify("menuresponse", "changeclass", "class1");
    return;
    }

    self doScoreReset();
    wait .1;
    self notify("menuresponse", "changeclass", "class1");
    self takeAllWeapons();
    self _clearPerks();
    self ThermalVisionFOFOverlayOff();
    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 giveWeapon(level.smg[self.randomsmg] + "_mp", 0, false);
    self giveWeapon(level.shot[self.randomshot] + "_mp", 0, false);
    self giveWeapon(level.hand[self.randomhand] + "_mp", 0, false);
    self GiveMaxAmmo(level.smg[self.randomsmg] + "_mp");
    self GiveMaxAmmo(level.shot[self.randomshot] + "_mp");
    self GiveMaxAmmo(level.hand[self.randomhand] + "_mp");
    self switchToWeapon(level.smg[self.randomsmg] + "_mp");
    self maps\mp\perks\_perks::givePerk("specialty_marathon ");
    self maps\mp\perks\_perks::givePerk("specialty_automant le");
    self maps\mp\perks\_perks::givePerk("specialty_fastmant le");
    self maps\mp\perks\_perks::givePerk("specialty_heartbre aker");
    self maps\mp\perks\_perks::givePerk("specialty_quieter" );

    self thread doHW();
    self.isZombie = 0;
    self.bounty = 0;
    self notify("CASH");
    self.attach1 = [];
    self.attachweapon = [];
    self.attachweapon[0] = 0;
    self.attachweapon[1] = 0;
    self.attachweapon[2] = 0;
    self.attach1[0] = "none";
    self.attach1[1] = "none";
    self.attach1[2] = "none";
    self.currentweapon = 0;
    self thread doPerksSetup();
    self thread doPerkCheck();
    self.maxhp = 100;
    self.maxhealth = self.maxhp;
    self.health = self.maxhealth;
    self.moveSpeedScaler = 1;
    self.thermal = 0;
    self.throwingknife = 0;
    self setClientDvar("g_knockback", 1000);
    notifySpawn = spawnstruct();
    notifySpawn.titleText = "Human";
    notifySpawn.notifyText = "Survive for as long as possible!";
    notifySpawn.glowColor = (0.0, 0.0, 1.0);
    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifySpawn );
    self thread doHumanBounty();
    self thread doHumanShop();
    }
    doLastAlive()
    {
    self endon("disconnect");
    self endon("death");
    wait 60;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^1The Zombies Got Your Scent. ColdBlooded is off!");
    for(;
    {
    self _unsetPerk("specialty_coldblooded");
    self _unsetPerk("specialty_spygame");
    self.perkz["coldblooded"] = 3;
    wait .4;
    }
    }
    doAlphaZombie()
    {
    if(self.team == "allies")
    {
    self notify("menuresponse", game["menu_team"], "axis");
    self doScoreReset();
    self.bounty = 0;
    self notify("CASH");
    self.ck = self.kills;
    self.cd = self.deaths;
    self.cs = self.suicides;
    self.maxhp = 315;
    self thread doPerksSetup();
    wait .1;
    self notify("menuresponse", "changeclass", "class3");
    return;
    }
    wait .1;
    self notify("menuresponse", "changeclass", "class3");
    self takeAllWeapons();
    self _clearPerks();
    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_automant le");
    self maps\mp\perks\_perks::givePerk("specialty_fastmant le");
    self maps\mp\perks\_perks::givePerk("specialty_extended melee");
    self maps\mp\perks\_perks::givePerk("specialty_falldama ge");
    self maps\mp\perks\_perks::givePerk("specialty_thermal" );
    if(self.thermal == 1)
    {
    self ThermalVisionFOFOverlayOn();
    }
    if(self.throwingknife == 1)
    {
    self thread monitorThrowingKnife();
    self maps\mp\perks\_perks::givePerk( "throwingknife_mp" );
    self setWeaponAmmoClip("throwingknife_mp", 1);
    }
    self thread doPerkCheck();
    self.maxhealth = self.maxhp;
    self.health = self.maxhealth;
    self.moveSpeedScaler = 1.45;
    self setClientDvar("g_knockback", 3500);
    notifySpawn = spawnstruct();
    notifySpawn.titleText = "^0Alpha Zombie";
    notifySpawn.notifyText = "Kill the Humans!";
    notifySpawn.glowColor = (1.0, 0.0, 0.0);
    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifySpawn );
    self thread doZombieBounty();
    self thread doZombieShop();
    }
    doZombie()
    {
    if(self.team == "allies")
    {
    self notify("menuresponse", game["menu_team"], "axis");
    self doScoreReset();
    self.bounty = 0;
    self notify("CASH");
    self.ck = self.kills;
    self.cd = self.deaths;
    self.cs = self.suicides;
    self.maxhp = 395;
    self thread doPerksSetup();
    wait .1;
    self notify("menuresponse", "changeclass", "class3");
    return;
    }
    wait .1;
    self notify("menuresponse", "changeclass", "class3");
    self takeAllWeapons();
    self _clearPerks();
    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_automant le");
    self maps\mp\perks\_perks::givePerk("specialty_fastmant le");
    self maps\mp\perks\_perks::givePerk("specialty_extended melee");
    self maps\mp\perks\_perks::givePerk("specialty_falldama ge");
    self maps\mp\perks\_perks::givePerk("specialty_thermal" );
    if(self.thermal == 1)
    {
    self ThermalVisionFOFOverlayOn();
    }
    if(self.throwingknife == 1)
    {
    self thread monitorThrowingKnife();
    self maps\mp\perks\_perks::givePerk( "throwingknife_mp" );
    self setWeaponAmmoClip("throwingknife_mp", 1);
    }
    self thread doPerkCheck();
    self.maxhealth = self.maxhp;
    self.health = self.maxhealth;
    self.moveSpeedScaler = 1.15;
    self setClientDvar("g_knockback", 3500);
    notifySpawn = spawnstruct();
    notifySpawn.titleText = "^0Zombie";
    notifySpawn.notifyText = "Kill the Humans!";
    notifySpawn.glowColor = (1.0, 0.0, 0.0);
    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifySpawn );
    self thread doZombieBounty();
    self thread doZombieShop();
    }
    doHW()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    while(1)
    {
    self.current = self getCurrentWeapon();
    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];
    self.attachweapon[self.currentweapon] = basename.size - 2;
    }
    else
    {
    self.attach1[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 .5;
    }
    }
    doZW()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    while(1)
    {
    if(self getCurrentWeapon() == "usp_tactical_mp")
    {
    self setWeaponAmmoClip("usp_tactical_mp", 0);
    self setWeaponAmmoStock("usp_tactical_mp", 0);
    }
    else
    {
    current = self getCurrentWeapon();
    self takeWeapon(current);
    self switchToWeapon("usp_tactical_mp");
    }
    wait .5;
    }
    }
    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_bulletac curacy");
    }
    }
    if(self.perkz["steadyaim"] == 2)
    {
    if(!self _hasPerk("specialty_bulletaccuracy"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_bulletac curacy");
    }
    if(!self _hasPerk("specialty_holdbreath"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_holdbrea th");
    }
    }
    if(self.perkz["sleightofhand"] == 1)
    {
    if(!self _hasPerk("specialty_fastreload"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_fastrelo ad");
    }
    }
    if(self.perkz["sleightofhand"] == 2)
    {
    if(!self _hasPerk("specialty_fastreload"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_fastrelo ad");
    }
    if(!self _hasPerk("specialty_quickdraw"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_quickdra w");
    }
    if(!self _hasPerk("specialty_fastsnipe"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_fastsnip e");
    }
    }
    if(self.perkz["sitrep"] == 1)
    {
    if(!self _hasPerk("specialty_detectexplosive"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_detectex plosive");
    }
    }
    if(self.perkz["sitrep"] == 2)
    {
    if(!self _hasPerk("specialty_detectexplosive"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_detectex plosive");
    }
    if(!self _hasPerk("specialty_selectivehearing"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_selectiv ehearing");
    }
    }
    if(self.perkz["stoppingpower"] == 1)
    {
    if(!self _hasPerk("specialty_bulletdamage"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_bulletda mage");
    }
    }
    if(self.perkz["stoppingpower"] == 2)
    {
    if(!self _hasPerk("specialty_bulletdamage"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_bulletda mage");
    }
    if(!self _hasPerk("specialty_armorpiercing"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_armorpie rcing");
    }
    }
    if(self.perkz["coldblooded"] == 1)
    {
    if(!self _hasPerk("specialty_coldblooded"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_coldbloo ded");
    }
    }
    if(self.perkz["coldblooded"] == 2)
    {
    if(!self _hasPerk("specialty_coldblooded"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_coldbloo ded");
    }
    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_heartbre aker");
    }
    }
    if(self.perkz["ninja"] == 2)
    {
    if(!self _hasPerk("specialty_heartbreaker"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_heartbre aker");
    }
    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_lightwei ght");
    }
    self setMoveSpeedScale(1.2);
    }
    if(self.perkz["lightweight"] == 2)
    {
    if(!self _hasPerk("specialty_lightweight"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_lightwei ght");
    }
    if(!self _hasPerk("specialty_fastsprintrecovery"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_fastspri ntrecovery");
    }
    self setMoveSpeedScale(1.6);
    }
    if(self.perkz["finalstand"] == 2)
    {
    if(!self _hasPerk("specialty_finalstand"))
    {
    self maps\mp\perks\_perks::givePerk("specialty_finalsta nd");
    }
    }
    wait 1;
    }
    }
    monitorThrowingKnife()
    {
    self endon("disconnect");
    self endon("death");
    while(1)
    {
    if(self.buttonPressed[ "+frag" ] == 1)
    {
    self.buttonPressed[ "+frag" ] = 0;
    self.throwingknife = 0;
    }
    wait .04;
    }
    }
    doHumanBounty()
    {
    self endon("disconnect");
    self endon("death");
    self.ck = self.kills;
    self.ca = self.assists;
    for(;
    {
    if(self.kills - self.ck > 0)
    {
    self.bounty += 100;
    self.ck++;
    self notify("CASH");
    }
    if(self.assists - self.ca > 0)
    {
    self.bounty += 50;
    self.ca++;
    self notify("CASH");
    }
    wait .5;
    }
    }
    doZombieBounty()
    {
    self endon("disconnect");
    self endon("death");
    for(;
    {
    if(self.kills - self.ck > 0)
    {
    self.bounty += 100;
    self.ck++;
    self notify("CASH");
    }
    if(self.deaths - self.cd > 0)
    {
    self.bounty += 30;
    self.cd++;
    self notify("CASH");
    }
    if(self.suicides - self.cs > 0)
    {
    self.bounty -= 285;
    self.cs++;
    self notify("CASH");
    }
    wait .5;
    }
    }
    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 notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    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 maps\mp\gametypes\_hud_message::hintMessage("^2Wea pon Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    }
    if(self.menu == 2)
    {
    if(self.attach["silencer"] == 1)
    {
    if(self.bounty >= level.itemCost["Silencer"])
    {
    self.bounty -= level.itemCost["Silencer"];
    ammo = self GetWeaponAmmoStock(self.current);
    basename = strtok(self.current, "_");
    gun = buildWeaponName(basename[0], self.attach1[self.currentweapon], "silencer");
    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);self thread maps\mp\gametypes\_hud_message::hintMessage("^2Wea pon Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    }
    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 maps\mp\gametypes\_hud_message::hintMessage("^2Per k Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    case 1:if(self.bounty >= level.itemCost["SteadyAimPro"])
    {
    self.bounty -= level.itemCost["SteadyAimPro"];
    self.perkz["steadyaim"] = 2;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Per k Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    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 maps\mp\gametypes\_hud_message::hintMessage("^2Per k Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    case 1:if(self.bounty >= level.itemCost["StoppingPowerPro"])
    {
    self.bounty -= level.itemCost["StoppingPowerPro"];
    self.perkz["stoppingpower"] = 2;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Per k Upgraded!");
    self notify("CASH");} else {self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;default:break;
    }
    }
    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"];
    ammo = self GetWeaponAmmoStock(self.current);
    basename = strtok(self.current, "_");
    gun = buildWeaponName(basename[0], self.attach1[self.currentweapon], "fmj");
    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);
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Wea pon Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    }
    if(self.menu == 2)
    {
    if(self.attach["xmags"] == 1)
    {
    if(self.bounty >= level.itemCost["XMags"])
    {
    self.bounty -= level.itemCost["XMags"];
    ammo = self GetWeaponAmmoStock(self.current);
    basename = strtok(self.current, "_");
    gun = buildWeaponName(basename[0], self.attach1[self.currentweapon], "xmags");
    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);
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Wea pon Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    }
    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 maps\mp\gametypes\_hud_message::hintMessage("^2Per k Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    case 1:if(self.bounty >= level.itemCost["SleightOfHandPro"])
    {
    self.bounty -= level.itemCost["SleightOfHandPro"];
    self.perkz["sleightofhand"] = 2;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Per k Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    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 maps\mp\gametypes\_hud_message::hintMessage("^2Per k Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    case 1:if(self.bounty >= level.itemCost["ColdBloodedPro"])
    {
    self.bounty -= level.itemCost["ColdBloodedPro"];
    self.perkz["coldblooded"] = 2;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Per k Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;default:break;
    }
    }
    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 maps\mp\gametypes\_hud_message::hintMessage("^2Rio t Shield Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    if(self.menu == 1)
    {
    if(self.attach["eotech"] == 1)
    {
    if(self.bounty >= level.itemCost["Eotech"])
    {
    self.bounty -= level.itemCost["Eotech"];
    ammo = self GetWeaponAmmoStock(self.current);
    basename = strtok(self.current, "_");
    gun = buildWeaponName(basename[0], self.attach1[self.currentweapon], "eotech");
    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);
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Wea pon Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    }
    if(self.menu == 2)
    {
    if(self.attach["rof"] == 1)
    {
    if(self.bounty >= level.itemCost["ROF"])
    {
    self.bounty -= level.itemCost["ROF"];
    ammo = self GetWeaponAmmoStock(self.current);
    basename = strtok(self.current, "_");
    gun = buildWeaponName(basename[0], self.attach1[self.currentweapon], "rof");
    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);
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Wea pon Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    }
    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 maps\mp\gametypes\_hud_message::hintMessage("^2Per k Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    case 1:if(self.bounty >= level.itemCost["SitRepPro"])
    {
    self.bounty -= level.itemCost["SitRepPro"];
    self.perkz["sitrep"] = 2;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Per k Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    default:break;
    }
    }
    wait .25;
    }
    wait .04;
    }
    }
    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 != 500)
    {
    if(self.bounty >= level.itemCost["health"])
    {
    self.bounty -= level.itemCost["health"];
    self.maxhp += level.itemCost["health"];
    self.maxhealth = self.maxhp;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2 Health Increased!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    else
    {
    self thread maps\mp\gametypes\_hud_message::hintMessage("^1Max Health Achieved!");
    }
    }
    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 maps\mp\gametypes\_hud_message::hintMessage("^2Per k Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    case 1:if(self.bounty >= level.itemCost["ColdBloodedPro"])
    {
    self.bounty -= level.itemCost["ColdBloodedPro"];
    self.perkz["coldblooded"] = 2;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Per k Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    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 maps\mp\gametypes\_hud_message::hintMessage("^2Per k Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;default:break;
    }
    }
    wait .25;
    }
    if(self.buttonPressed[ "+actionslot 4" ] == 1)
    {
    self.buttonPressed[ "+actionslot 4" ] = 0;
    if(self.menu == 0)
    {
    if(self.thermal == 0)
    {
    if(self.bounty >= level.itemCost["Thermal"])
    {
    self.bounty -= level.itemCost["Thermal"];
    self ThermalVisionFOFOverlayOn();
    self.thermal = 1;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2The rmal Vision Overlay Activated!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    else
    {
    self thread maps\mp\gametypes\_hud_message::hintMessage("^1The rmal 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 maps\mp\gametypes\_hud_message::hintMessage("^2Per k Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    case 1:if(self.bounty >= level.itemCost["NinjaPro"])
    {
    self.bounty -= level.itemCost["NinjaPro"];
    self.perkz["ninja"] = 2;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Per k Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;default:break;
    }
    }
    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 thread monitorThrowingKnife();
    self maps\mp\perks\_perks::givePerk( "throwingknife_mp" );
    self setWeaponAmmoClip("throwingknife_mp", 1);
    self.throwingknife = 1;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Thr owing Knife Purchased");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    }
    else
    {
    self thread maps\mp\gametypes\_hud_message::hintMessage("^1Thr owknife 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 maps\mp\gametypes\_hud_message::hintMessage("^2Per k Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    case 1:if(self.bounty >= level.itemCost["LightweightPro"])
    {
    self.bounty -= level.itemCost["LightweightPro"];
    self.perkz["lightweight"] = 2;
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Per k Upgraded!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;default:break;
    }
    }
    wait .25;
    }
    wait .04;
    }
    }
    doExchangeWeapons()
    {
    switch(self.exTo)
    {
    case "LMG":if(self.bounty >= level.itemCost["LMG"])
    {
    self.bounty -= level.itemCost["LMG"];
    self takeWeapon(self.current);
    self giveWeapon(level.lmg[self.randomlmg] + "_mp", 0, false);
    self GiveStartAmmo(level.lmg[self.randomlmg] + "_mp");
    self switchToWeapon(level.lmg[self.randomlmg] + "_mp");
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Lig ht Machine Gun Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    case "Assault Rifle":if(self.bounty >= level.itemCost["Assault Rifle"])
    {
    self.bounty -= level.itemCost["Assault Rifle"];
    self takeWeapon(self.current);
    self giveWeapon(level.assault[self.randomar] + "_mp", 0, false);
    self GiveStartAmmo(level.assault[self.randomar] + "_mp");
    self switchToWeapon(level.assault[self.randomar] + "_mp");
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Ass ault Rifle Bought!");
    self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    case "Machine Pistol":if(self.bounty >= level.itemCost["Machine Pistol"])
    {
    self.bounty -= level.itemCost["Machine Pistol"];
    self takeWeapon(self.current);
    self giveWeapon(level.machine[self.randommp] + "_mp", 0, false);
    self GiveStartAmmo(level.machine[self.randommp] + "_mp");
    self switchToWeapon(level.machine[self.randommp] + "_mp");
    self thread maps\mp\gametypes\_hud_message::hintMessage("^2Mac hine Pistol Bought!");self notify("CASH");
    }
    else
    {
    self iPrintlnBold("^1Not Enough ^3Cash");
    }
    break;
    default:break;
    }
    }
    buildWeaponName( baseName, attachment1, attachment2 )
    {
    if ( !isDefined( level.letterToNumber ) )
    {
    level.letterToNumber = makeLettersToNumbers();
    }
    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;
    }
    doGameStarter()
    {
    level.gameState = "starting";
    level.lastAlive = 0;
    level waittill("CREATED");
    level thread doStartTimer();
    wait 10;
    foreach(player in level.players)
    {
    player thread doSetup();
    }
    wait 50;
    level thread doZombieTimer();
    VisionSetNaked("icbm", 5);
    }
    doStartTimer()
    {
    level.counter = 60;
    while(level.counter > 0)
    {
    level.TimerText destroy();
    level.TimerText = level createServerFontString( "objective", 1.5 );
    level.TimerText setPoint( "CENTER", "CENTER", 0, -100 );
    level.TimerText setText("^2Game Starting in: " + level.counter);
    setDvar("fx_draw", 1);
    wait 1;
    level.counter--;
    }
    level.TimerText setText("");
    foreach(player in level.players)
    {
    player thread doSetup();
    }
    }
    doIntermission()
    {
    level.gameState = "intermission";level.lastAlive = 0;
    level thread doIntermissionTimer();
    level notify("RESETDOORS");
    level notify("RESETCLUSTER");
    setDvar("cg_drawCrosshair", 1);
    setDvar("cg_drawCrosshairNames", 1);
    setDvar("cg_drawFriendlyNames", 1);
    wait 5;
    foreach(player in level.players)
    {
    player thread doSetup();
    }
    wait 25;
    level thread doZombieTimer();
    VisionSetNaked("icbm", 5);
    }
    doIntermissionTimer()
    {
    level.counter = 30;
    while(level.counter > 0)
    {
    level.TimerText destroy();
    level.TimerText = level createServerFontString( "objective", 1.5 );
    level.TimerText setPoint( "CENTER", "CENTER", 0, -100 );
    level.TimerText setText("^2Intermission: " + level.counter);
    setDvar("fx_draw", 1);
    wait 1;
    level.counter--;
    }
    level.TimerText setText("");
    foreach(player in level.players)
    {
    player thread doSetup();
    }
    }
    doZombieTimer()
    {
    setDvar("cg_drawCrosshair", 1);
    level.counter = 30;
    while(level.counter > 0)
    {
    level.TimerText destroy();
    level.TimerText = level createServerFontString( "objective", 1.5 );
    level.TimerText setPoint( "CENTER", "CENTER", 0, -100 );
    level.TimerText setText("^1Alpha Zombie in: " + level.counter);
    wait 1;
    level.counter--;
    }
    level.TimerText setText("");
    level thread doPickZombie();
    }
    doPickZombie()
    {
    level.Zombie1 = randomInt(level.players.size);
    level.Zombie2 = randomInt(level.players.size);
    level.Zombie3 = randomInt(level.players.size);
    level.Alpha = 2;
    if(level.players.size < 5)
    {
    level.Alpha = 1;
    }
    if(level.players.size > 10)
    {
    level.Alpha = 3;
    }
    if(level.Alpha == 1)
    {
    level.players[level.Zombie1].isZombie = 2;
    level.players[level.Zombie1] thread doAlphaZombie();
    }
    if(level.Alpha == 2)
    {
    while(level.Zombie1 == level.Zombie2)
    {
    level.Zombie2 = randomInt(level.players.size);
    }
    level.players[level.Zombie1].isZombie = 2;
    level.players[level.Zombie1] thread doAlphaZombie();
    level.players[level.Zombie2].isZombie = 2;
    level.players[level.Zombie2] thread doAlphaZombie();
    }
    if(level.Alpha == 3)
    {
    while(level.Zombie1 == level.Zombie2 || level.Zombie2 == level.Zombie3 || level.Zombie1 == level.Zombie3)
    {
    level.Zombie2 = randomInt(level.players.size);
    level.Zombie3 = randomInt(level.players.size);
    }
    level.players[level.Zombie1].isZombie = 2;
    level.players[level.Zombie1] thread doAlphaZombie();
    level.players[level.Zombie2].isZombie = 2;
    level.players[level.Zombie2] thread doAlphaZombie();
    level.players[level.Zombie3].isZombie = 2;
    level.players[level.Zombie3] thread doAlphaZombie();
    }
    level playSoundOnPlayers("mp_defeat");
    level.TimerText destroy();
    level.TimerText = level createServerFontString( "objective", 1.5 );
    level.TimerText setPoint( "CENTER", "CENTER", 0, -100 );
    level.timerText setText("^1The Alpha Zombies Are Fucking Coming Run For Your Lives!");
    level.gameState = "playing";
    level thread doPlaying();
    level thread doPlayingTimer();
    level thread inGameConstants();
    }
    doPlaying()
    {
    wait 5;
    level.TimerText destroy();
    while(1)
    {
    level.playersLeft = maps\mp\gametypes\_teams::CountPlayers();
    if(level.lastAlive == 0)
    {
    if(level.playersLeft["allies"] == 1)
    {
    level.lastAlive = 1;
    foreach(player in level.players)
    {
    if(player.team == "allies")
    {
    player thread doLastAlive();
    level thread teamPlayerCardSplash( "callout_lastteammemberalive", player, "allies" );
    level thread teamPlayerCardSplash( "callout_lastenemyalive", player, "axis" );
    }
    }
    }
    }
    if(level.playersLeft["allies"] == 0 || level.playersLeft["axis"] == 0)
    {
    level thread doEnding();
    return;
    }
    wait .5;
    }
    }
    doPlayingTimer()
    {
    level.minutes = 0;
    level.seconds = 0;
    while(1)
    {
    wait 1;
    level.seconds++;
    if(level.seconds == 60)
    {
    level.minutes++;
    level.seconds = 0;
    }
    if(level.gameState == "ending")
    {
    return;
    }
    }
    }
    doEnding()
    {
    level.gameState = "ending";
    notifyEnding = spawnstruct();
    notifyEnding.titleText = "Round Over!";
    notifyEnding.notifyText2 = "Next Round Starting Soon!";
    notifyEnding.glowColor = (0.0, 0.6, 0.3);
    if(level.playersLeft["allies"] == 0)
    {
    notifyEnding.notifyText = "Humans Survived: " + level.minutes + " minutes " + level.seconds + " seconds.";
    }
    if(level.playersLeft["axis"] == 0)
    {
    notifyEnding.notifyText = "All the Zombies disappeared!";
    }
    wait 1;
    VisionSetNaked("blacktest", 2);
    foreach(player in level.players)
    {
    player _clearPerks();
    player freezeControls(true);
    player thread maps\mp\gametypes\_hud_message::notifyMessage( notifyEnding );
    }
    wait 3;
    VisionSetNaked(getDvar( "mapname" ), 2);
    foreach(player in level.players)
    {
    player freezeControls(false);
    }
    level thread doIntermission();
    }
    /*
    Donate()
    {
    self endon("disconncet");
    while(1)
    {
    self sayall("^2Mod by Killingdyl");
    wait 120;
    }
    }
    */
    inGameConstants()
    {
    while(1)
    {
    setDvar("cg_drawCrosshair", 0);
    setDvar("cg_drawCrosshairNames", 0);
    setDvar("cg_drawFriendlyNames", 0);
    foreach(player in level.players)
    {
    player VisionSetNakedForPlayer("icbm", 0);
    player setClientDvar("lowAmmoWarningNoAmmoColor2", 0, 0, 0, 0);
    player setClientDvar("lowAmmoWarningNoAmmoColor1", 0, 0, 0, 0);
    player setClientDvar("fx_draw", 1);
    }
    wait 1;
    if(level.gameState == "ending")
    {
    return;
    }
    }
    }
    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;
    }
    else
    {
    self.menu = level.zombieM.size-1;
    }
    }
    }
    if(self.buttonPressed[ "+actionslot 1" ] == 1)
    {
    self.buttonPressed[ "+actionslot 1" ] = 0;
    self.menu++;
    if(self.team == "allies")
    {
    if(self.menu >= level.humanM.size)
    {
    self.menu = 0;
    }
    }
    else
    {
    if(self.menu >= level.zombieM.size)
    {
    self.menu = 0;
    }
    }
    }
    wait .045;
    }
    }
    doDvars()
    {
    setDvar("painVisionTriggerHealth", 0);
    setDvar("player_sprintUnlimited", 1);
    }
    doHealth()
    {
    self endon("disconnect");
    self endon("death");
    self.curhealth = 0;
    while(1)
    {
    if(self.health - self.curhealth != 0)
    {
    self.curhealth = self.health;
    self.healthtext destroy();
    self.healthtext = NewClientHudElem( self );
    self.healthtext.alignX = "right";
    self.healthtext.alignY = "top";
    self.healthtext.horzAlign = "right";
    self.healthtext.vertAlign = "top";
    self.healthtext.y = -25;
    self.healthtext.foreground = true;
    self.healthtext.fontScale = 1;
    self.healthtext.font = "hudbig";
    self.healthtext.alpha = 1;
    self.healthtext.glow = 1;
    self.healthtext.glowColor = ( 2.55, 0, 0 );
    self.healthtext.glowAlpha = 1;
    self.healthtext.color = ( 1.0, 1.0, 1.0 );
    self.healthtext setText("Health: " + self.health + "/" + self.maxhealth);
    }
    wait .5;
    }
    }
    doCash()
    {
    self endon("disconnect");
    self endon("death");
    while(1)
    {
    self.cash destroy();
    self.cash = NewClientHudElem( self );
    self.cash.alignX = "right";
    self.cash.alignY = "top";
    self.cash.horzAlign = "right";
    self.cash.vertAlign = "top";
    self.cash.foreground = true;
    self.cash.fontScale = 1;
    self.cash.font = "hudbig";
    self.cash.alpha = 1;
    self.cash.glow = 1;
    self.cash.glowColor = ( 0, 1, 0 );
    self.cash.glowAlpha = 1;
    self.cash.color = ( 1.0, 1.0, 1.0 );
    self.cash setText("Cash: " + self.bounty);
    self waittill("CASH");
    }
    }
    doHUDControl()
    {
    self endon("disconnect");
    self endon("death");
    while(1)
    {
    self.HintText setText(self.hint);
    self.hint = "";
    if(self.team == "allies")
    {
    switch(self.perkz["steadyaim"])
    {
    case 2:self.perkztext1 setText("Steady Aim: Pro");
    self.perkztext1.glowColor = ( 0, 1, 0 );
    break;
    case 1:self.perkztext1 setText("Steady Aim: Activated");
    self.
    perkztext1.glowColor = ( 0, 1, 0 );
    break;
    default:self.perkztext1 setText("Steady Aim: Not Activated");
    self.perkztext1.glowColor = ( 1, 0, 0 );
    break;
    }
    switch(self.perkz["sleightofhand"])
    {
    case 2:self.perkztext2 setText("Sleight of Hand: Pro");
    self.perkztext2.glowColor = ( 0, 1, 0 );
    break;
    case 1:self.perkztext2 setText("Sleight of Hand: Activated");
    self.perkztext2.glowColor = ( 0, 1, 0 );
    break;
    default:self.perkztext2 setText("Sleight of Hand: Not Activated");
    self.perkztext2.glowColor = ( 1, 0, 0 );
    break;
    }
    switch(self.perkz["sitrep"])
    {
    case 2:self.perkztext3 setText("SitRep: Pro");
    self.perkztext3.glowColor = ( 0, 1, 0 );
    break;
    case 1:self.perkztext3 setText("SitRep: Activated");
    self.perkztext3.glowColor = ( 0, 1, 0 );
    break;
    default:self.perkztext3 setText("SitRep: Not Activated");
    self.perkztext3.glowColor = ( 1, 0, 0 );
    break;
    }
    switch(self.perkz["stoppingpower"])
    {
    case 2:self.perkztext4 setText("Stopping Power: Pro");
    self.perkztext4.glowColor = ( 0, 1, 0 );
    break;
    case 1:self.perkztext4 setText("Stopping Power: Activated");
    self.perkztext4.glowColor = ( 0, 1, 0 );
    break;
    default:self.perkztext4 setText("Stopping Power: Not Activated");
    self.perkztext4.glowColor = ( 1, 0, 0 );
    break;
    }
    switch(self.perkz["coldblooded"])
    {
    case 2:self.perkztext5 setText("Cold Blooded: Pro");
    self.perkztext5.glowColor = ( 0, 1, 0 );
    break;
    case 1:self.perkztext5 setText("Cold Blooded: Activated");
    self.perkztext5.glowColor = ( 0, 1, 0 );
    break;
    default:self.perkztext5 setText("Cold Blooded: Not Activated");
    self.perkztext5.glowColor = ( 1, 0, 0 );
    break;
    }
    if((self.menu == 1) || (self.menu == 2))
    {
    current = self getCurrentWeapon();
    if(self.menu == 1)
    {
    if(self.attach["akimbo"] == 1)
    {
    self.option1 setText("Press [{+actionslot 3}] - " + level.humanM[self.menu][0]);
    }
    else
    {
    self.option1 setText("Upgrade Unavailable");
    }
    if(self.attach["fmj"] == 1)
    {
    self.option2 setText("Press [{+actionslot 4}] - " + level.humanM[self.menu][1]);
    }
    else
    {
    self.option2 setText("Upgrade Unavailable");
    }
    if(self.attach["eotech"] == 1)
    {
    self.option3 setText("Press [{+actionslot 2}] - " + level.humanM[self.menu][2]);
    }
    else
    {
    self.option3 setText("Upgrade Unavailable");
    }
    }
    if(self.menu == 2)
    {
    if(self.attach["silencer"] == 1)
    {
    self.option1 setText("Press [{+actionslot 3}] - " + level.humanM[self.menu][0]);
    }
    else
    {
    self.option1 setText("Upgrade Unavailable");
    }
    if(self.attach["xmags"] == 1)
    {
    self.option2 setText("Press [{+actionslot 4}] - " + level.humanM[self.menu][1]);
    }
    else
    {
    self.option2 setText("Upgrade Unavailable");
    }
    if(self.attach["rof"] == 1)
    {
    self.option3 setText("Press [{+actionslot 2}] - " + level.humanM[self.menu][2]);
    }
    else
    {
    self.option3 setText("Upgrade Unavailable");
    }
    }
    }
    else if(self.menu == 3 || self.menu == 4)
    {
    if(self.menu == 3)
    {
    switch(self.perkz["steadyaim"])
    {
    case 0:self.option1 setText("Press [{+actionslot 3}] - " + level.humanM[self.menu][0]["normal"]);
    break;
    case 1:self.option1 setText("Press [{+actionslot 3}] - " + level.humanM[self.menu][0]["pro"]);
    break;
    case 2:default:self.option1 setText("Perk can not be upgraded");
    break;
    }
    switch(self.perkz["sleightofhand"])
    {
    case 0:self.option2 setText("Press [{+actionslot 4}] - " + level.humanM[self.menu][1]["normal"]);
    break;
    case 1:self.option2 setText("Press [{+actionslot 4}] - " + level.humanM[self.menu][1]["pro"]);
    break;
    case 2:default:self.option2 setText("Perk can not be upgraded");
    break;
    }
    switch(self.perkz["sitrep"])
    {
    case 0:self.option3 setText("Press [{+actionslot 2}] - " + level.humanM[self.menu][2]["normal"]);
    break;
    case 1:self.option3 setText("Press [{+actionslot 2}] - " + level.humanM[self.menu][2]["pro"]);
    break;
    case 2:default:self.option3 setText("Perk can not be upgraded");
    break;
    }
    }
    if(self.menu == 4)
    {
    switch(self.perkz["stoppingpower"])
    {
    case 0:self.option1 setText("Press [{+actionslot 3}] - " + level.humanM[self.menu][0]["normal"]);
    break;
    case 1:self.option1 setText("Press [{+actionslot 3}] - " + level.humanM[self.menu][0]["pro"]);
    break;
    case 2:default:self.option1 setText("Perk can not be upgraded");
    break;
    }
    switch(self.perkz["coldblooded"])
    {
    case 0:self.option2 setText("Press [{+actionslot 4}] - " + level.humanM[self.menu][1]["normal"]);
    break;
    case 1:self.option2 setText("Press [{+actionslot 4}] - " + level.humanM[self.menu][1]["pro"]);
    break;
    case 2:default:self.option2 setText("Perk can not be upgraded");
    break;
    }
    self.option3 setText("");
    }
    }
    else
    {
    self.option1 setText("Press [{+actionslot 3}] - " + level.humanM[self.menu][0]);
    if(self.menu != 0)
    {
    self.option2 setText("Press [{+actionslot 4}] - " + level.humanM[self.menu][1]);
    }
    else
    {
    self.option2 setText(level.humanM[self.menu][1][self.exTo]);
    }
    self.option3 setText("Press [{+actionslot 2}] - " + level.humanM[self.menu][2]);
    }
    }
    if(self.team == "axis")
    {
    switch(self.perkz["coldblooded"])
    {
    case 2:self.perkztext1 setText("Cold Blooded: Pro");
    self.perkztext1.glowColor = ( 0, 1, 0 );
    break;
    case 1:self.perkztext1 setText("Cold Blooded: Activated");
    self.perkztext1.glowColor = ( 0, 1, 0 );
    break;
    default:self.perkztext1 setText("Cold Blooded: Not Activated");
    self.perkztext1.glowColor = ( 1, 0, 0 );
    break;
    }
    switch(self.perkz["ninja"])
    {
    case 2:self.perkztext2 setText("Ninja: Pro");
    self.perkztext2.glowColor = ( 0, 1, 0 );
    break;
    case 1:self.perkztext2 setText("Ninja: Activated");
    self.perkztext2.glowColor = ( 0, 1, 0 );
    break;
    default:self.perkztext2 setText("Ninja: Not Activated");
    self.perkztext2.glowColor = ( 1, 0, 0 );
    break;
    }
    switch(self.perkz["lightweight"])
    {
    case 2:self.perkztext3 setText("Lightweight: Pro");
    self.perkztext3.glowColor = ( 0, 1, 0 );
    break;
    case 1:self.perkztext3 setText("Lightweight: Activated");
    self.perkztext3.glowColor = ( 0, 1, 0 );
    break;
    default:self.perkztext3 setText("Lightweight: Not Activated");
    self.perkztext3.glowColor = ( 1, 0, 0 );
    break;
    }
    switch(self.perkz["finalstand"])
    {
    case 2:self.perkztext4 setText("Final Stand: Activated");
    self.perkztext4.glowColor = ( 0, 1, 0 );
    break;
    default:self.perkztext4 setText("Final Stand: Not Activated");
    self.perkztext4.glowColor = ( 1, 0, 0 );
    break;
    }
    self.perkztext5 setText("");
    if(self.menu == 1 || self.menu == 2)
    {
    if(self.menu == 1)
    {
    switch(self.perkz["coldblooded"])
    {
    case 0:self.option1 setText("Press [{+actionslot 3}] - " + level.zombieM[self.menu][0]["normal"]);
    break;
    case 1:self.option1 setText("Press [{+actionslot 3}] - " + level.zombieM[self.menu][0]["pro"]);
    break;
    case 2:default:self.option1 setText("Perk can not be upgraded");
    break;
    }
    switch(self.perkz["ninja"])
    {
    case 0:self.option2 setText("Press [{+actionslot 4}] - " + level.zombieM[self.menu][1]["normal"]);
    break;
    case 1:self.option2 setText("Press [{+actionslot 4}] - " + level.zombieM[self.menu][1]["pro"]);
    break;
    case 2:default:self.option2 setText("Perk can not be upgraded");
    break;
    }
    switch(self.perkz["lightweight"])
    {
    case 0:self.option3 setText("Press [{+actionslot 2}] - " + level.zombieM[self.menu][2]["normal"]);
    break;
    case 1:self.option3 setText("Press [{+actionslot 2}] - " + level.zombieM[self.menu][2]["pro"]);
    break;
    case 2:default:self.option3 setText("Perk can not be upgraded");
    break;
    }
    }
    if(self.menu == 2)
    {
    switch(self.perkz["finalstand"])
    {
    case 0:self.option1 setText("Press [{+actionslot 3}] - " + level.zombieM[self.menu][0]["normal"]);
    break;
    case 1:case 2:default:self.option1 setText("Perk can not be upgraded");
    break;
    }
    self.option2 setText("");
    self.option3 setText("");
    }
    }
    else
    {
    self.option1 setText("Press [{+actionslot 3}] - " + level.zombieM[self.menu][0]);
    self.option2 setText("Press [{+actionslot 4}] - " + level.zombieM[self.menu][1]);
    self.option3 setText("Press [{+actionslot 2}] - " + level.zombieM[self.menu][2]);
    }
    }
    wait .5;
    }
    }
    doServerHUDControl()
    {
    level.infotext setText("^1Welcome to Quarantine Chaos Zombie Mod ^3Version 2.0! ^2Info: ^3Press ^2[{+smoke}] ^3and ^2[{+actionslot 1}] ^3to scroll through shop menu. ^1Zombies can break down doors!. ^2Originally Created by Killingdyl.");
    level.scrollright setText(">");
    level.scrollleft setText("<");
    }
    doInfoScroll()
    {
    self endon("disconnect");
    for(i = 1600; i >= -1600; i -= 4)
    {
    level.infotext.x = i;
    if(i == -1600)
    {
    i = 1600;
    }
    wait .005;
    }
    }
    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;
    }
    doSpawn()
    {
    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 thread doSetup();
    }
    if(self.isZombie == 1)
    {
    self thread doZombie();
    }
    if(self.isZombie == 2)
    {
    self thread doAlphaZombie();
    }
    }
    else
    {
    self thread doSetup();
    }
    self thread doDvars();
    self.menu = 0;
    self thread CreatePlayerHUD();
    self thread doMenuScroll();
    self thread doHUDControl();
    self thread doCash();
    self thread doHealth();
    self thread destroyOnDeath();
    if(level.gamestate == "starting")
    {
    self thread OMAExploitFix();
    }
    self freezeControlsWrapper( false );
    }
    doJoinTeam()
    {
    if(self.CONNECT == 1)
    {
    notifyHello = spawnstruct();
    notifyHello.titleText = "Welcome to Custom Zombie Mod!";
    notifyHello.notifyText = "Version: 2.5 CUSTOM";
    notifyHello.notifyText2 = "Customed by: [MPGH] ^5Em^3in^5em";
    notifyHello.glowColor = (0.0, 0.6, 0.3);
    if(level.gameState == "intermission" || level.gameState == "starting")
    {
    self notify("menuresponse", game["menu_team"], "allies");
    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyHello );
    }
    if(level.gameState == "playing" || level.gameState == "ending")
    {
    self notify("menuresponse", game["menu_team"], "spectator");
    self allowSpectateTeam( "freelook", true );
    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyHello );
    self iPrintlnBold("^2 Please wait for round to be over.");
    self thread ReconnectPrevention();
    }
    self.CONNECT = 0;
    }
    }
    ReconnectPrevention()
    {
    self endon("disconnect");
    while(1)
    {
    self iPrintlnBold("^2Please wait for round to be over.");
    if(self.team != "spectator")
    {
    self notify("menuresponse", game["menu_team"], "spectator");
    }
    maps\mp\gametypes\_spectating::setSpectatePermissi ons();
    self allowSpectateTeam( "freelook", true );
    self.sessionstate = "spectator";
    self setContents( 0 );
    if(level.gameState == "intermission")
    {
    return;
    }
    wait 1;
    }
    }
    doInit()
    {
    level.gameState = "";
    level thread weaponInit();
    level thread CostInit();
    level thread MenuInit();
    level thread CreateServerHUD();
    level thread doServerHUDControl();
    level thread OverRider();
    level thread RemoveTurrets();
    level thread maps\mp\gametypes\MapEdit::init();
    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 doGameStarter();
    if(level.friendlyfire != 0)
    {
    level thread ffend();
    }
    if( maps\mp\gametypes\_tweakables::getTweakableValue( "game", "onlyheadshots" ) )
    {
    level thread headend();
    }
    }
    CostInit()
    {
    level.itemCost = [];
    level.itemCost["ammo"] = 200;
    level.itemCost["LMG"] = 450;
    level.itemCost["Assault Rifle"] = 150;
    level.itemCost["Machine Pistol"] = 50;
    level.itemCost["Riot"] = 450;
    level.itemCost["Akimbo"] = 300;
    level.itemCost["Eotech"] = 50;
    level.itemCost["FMJ"] = 150;
    level.itemCost["Silencer"] = 300;
    level.itemCost["XMags"] = 150;
    level.itemCost["ROF"] = 50;
    level.itemCost["health"] = 50;
    level.itemCost["Thermal"] = 100;
    level.itemCost["ThrowingKnife"] = 200;
    level.itemCost["SteadyAim"] = 150;
    level.itemCost["SteadyAimPro"] = 250;
    level.itemCost["SleightOfHand"] = 200;
    level.itemCost["SleightOfHandPro"] = 150;
    level.itemCost["SitRep"] = 100;
    level.itemCost["SitRepPro"] = 200;
    level.itemCost["StoppingPower"] = 400;
    level.itemCost["StoppingPowerPro"] = 50;
    level.itemCost["ColdBlooded"] = 250;
    level.itemCost["ColdBloodedPro"] = 100;
    level.itemCost["Ninja"] = 100;
    level.itemCost["NinjaPro"] = 250;
    level.itemCost["Lightweight"] = 150;
    level.itemCost["LightweightPro"] = 50;
    level.itemCost["FinalStand"] = 200;
    }
    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()
    {
    level.humanM = [];
    level.zombieM = [];
    i = 0;
    level.humanM[i] = [];
    level.humanM[i][0] = "^2Buy Ammo for Current Weapon - " + level.itemCost["ammo"];
    level.humanM[i][1] = [];
    level.humanM[i][1]["LMG"] = "Press [{+actionslot 4}] - Exchange for a LMG - " + level.itemCost["LMG"];
    level.humanM[i][1]["Assault Rifle"] = "Press [{+actionslot 4}] - Exchange for an Assault Rifle - " + level.itemCost["Assault Rifle"];
    level.humanM[i][1]["Machine Pistol"] = "Press [{+actionslot 4}] - Exchange for a Machine Pistol - " + level.itemCost["Machine Pistol"];
    level.humanM[i][1]["Unavailable"] = "Weapon can not be Exchanged";level.humanM[i][2] = "Buy Riot Shield - " + level.itemCost["Riot"];
    i++;
    level.humanM[i] = [];
    level.humanM[i][0] = "Upgrade to Akimbo - " + level.itemCost["Akimbo"];
    level.humanM[i][1] = "Upgrade to FMJ - " + level.itemCost["FMJ"];
    level.humanM[i][2] = "Upgrade to Holographic - " + level.itemCost["Eotech"];i++;
    level.humanM[i] = [];
    level.humanM[i][0] = "Upgrade to Silencer - " + level.itemCost["Silencer"];
    level.humanM[i][1] = "Upgrade to Extended Mags - " + level.itemCost["XMags"];
    level.humanM[i][2] = "Upgrade to Rapid Fire - " + level.itemCost["ROF"];
    i++;
    level.humanM[i] = [];
    level.humanM[i][0]["normal"] = "Buy Steady Aim - " + level.itemCost["SteadyAim"];
    level.humanM[i][0]["pro"] = "Upgrade to Steady Aim Pro - " + level.itemCost["SteadyAimPro"];
    level.humanM[i][1]["normal"] = "Buy Sleight of Hand - " + level.itemCost["SleightOfHand"];
    level.humanM[i][1]["pro"] = "Upgrade to Sleight of Hand Pro - " + level.itemCost["SleightOfHandPro"];
    level.humanM[i][2]["normal"] = "Buy Sitrep - " + level.itemCost["SitRep"];
    level.humanM[i][2]["pro"] = "Upgrade to Sitrep Pro - " + level.itemCost["SitRepPro"];
    i++;
    level.humanM[i] = [];
    level.humanM[i][0]["normal"] = "Buy Stopping Power - " + level.itemCost["StoppingPower"];
    level.humanM[i][0]["pro"] = "Upgrade to Stopping Power Pro - " + level.itemCost["StoppingPowerPro"];
    level.humanM[i][1]["normal"] = "Buy Cold Blooded - " + level.itemCost["ColdBlooded"];
    level.humanM[i][1]["pro"] = "Upgrade to Cold Blooded Pro - " + level.itemCost["ColdBloodedPro"];
    level.humanM[i][2] = "";
    i++;
    i = 0;
    level.zombieM[i] = [];
    level.zombieM[i][0] = "Buy Health - " + level.itemCost["health"];
    level.zombieM[i][1] = "Buy Thermal Overlay - " + level.itemCost["Thermal"];
    level.zombieM[i][2] = "Buy Throwing Knife - " + level.itemCost["ThrowingKnife"];
    i++;
    level.zombieM[i] = [];
    level.zombieM[i][0]["normal"] = "Buy Cold Blooded - " + level.itemCost["ColdBlooded"];
    level.zombieM[i][0]["pro"] = "Upgrade to Cold Blooded Pro - " + level.itemCost["ColdBloodedPro"];
    level.zombieM[i][1]["normal"] = "Buy Ninja - " + level.itemCost["Ninja"];
    level.zombieM[i][1]["pro"] = "Upgrade to Ninja Pro -" + level.itemCost["NinjaPro"];
    level.zombieM[i][2]["normal"] = "Buy Lightweight - " + level.itemCost["Lightweight"];
    level.zombieM[i][2]["pro"] = "Upgrade to Lightweight Pro - " + level.itemCost["LightweightPro"];
    i++;
    level.zombieM[i] = [];
    level.zombieM[i][0]["normal"] = "Buy Final Stand - " + level.itemCost["FinalStand"];
    level.zombieM[i][1] = "";
    level.zombieM[i][2] = "";
    i++;
    }
    OverRider()
    {
    for(;
    {
    level notify("abort_forfeit");
    level.prematchPeriod = 0;
    level.killcam = 0;
    level.killstreakRewards = 0;
    wait 1;
    }
    }
    ffend()
    {
    level endon ( "game_ended" );
    for(i = 10; i > 0; i--)
    {
    foreach(player in level.players)
    {
    player iPrintlnBold("^1ERROR: Friendly Fires is Enabled. Game Ending");
    }
    wait .5;
    }
    exitLevel( false );
    }
    headend()
    {
    level endon ( "game_ended" );
    for(i = 10; i > 0; i--)
    {
    foreach(player in level.players)
    {
    player iPrintlnBold("^1ERROR: Headshots Only is Enabled. Game Ending");
    }
    wait .5;
    }
    exitLevel( false );
    }
    destroyOnDeath()
    {
    self waittill ( "death" );
    self.locatingText destroy();
    self.HintText destroy();
    self.healthtext destroy();
    self.cash destroy();
    self.option1 destroy();
    self.option2 destroy();
    self.option3 destroy();
    self.perkztext1 destroy();
    self.perkztext2 destroy();
    self.perkztext3 destroy();
    self.perkztext4 destroy();
    self.perkztext5 destroy();
    }
    OMAExploitFix()
    {
    self endon("disconnect");
    self endon("death");
    while(1)
    {
    if(self _hasPerk("specialty_onemanarmy") || self _hasPerk("specialty_omaquickchange"))
    {
    self _clearPerks();
    self takeAllWeapons();
    }
    wait .5;
    }
    }
    CashFix()
    {
    self endon("disconnect");
    while(1)
    {
    if(self.bounty < 0)
    {
    self.bounty = 0;
    self notify("CASH");
    }
    wait .5;
    }
    }
    RemoveTurrets()
    {
    level deletePlacedEntity("misc_turret");
    }
    iniButtons()
    {
    self.buttonAction = [];
    self.buttonAction[0]="+reload";
    self.buttonAction[1]="weapnext";
    self.buttonAction[2]="+gostand";
    self.buttonAction[3]="+actionslot 4";
    self.buttonAction[4]="+actionslot 1";
    self.buttonAction[5]="+actionslot 2";
    self.buttonAction[6]="+actionslot 3";
    self.buttonAction[7]="+activate";
    self.buttonAction[8]="+frag";
    self.buttonAction[9]="+smoke";
    self.buttonAction[10]="+forward";
    self.buttonAction[11]="+back";
    self.buttonAction[12]="+moveleft";
    self.buttonAction[13]="+moveright";
    self.buttonPressed = [];
    for(i=0; i<14; 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( "objective", 1.25 );
    self.HintText setPoint( "CENTER", "CENTER", 0, 50 );
    self.option1 = NewClientHudElem( self );
    self.option1.alignX = "center";
    self.option1.alignY = "bottom";
    self.option1.horzAlign = "center";
    self.option1.vertAlign = "bottom";
    self.option1.y = -60;
    self.option1.foreground = true;
    self.option1.fontScale = 1.35;
    self.option1.font = "objective";
    self.option1.alpha = 1;
    self.option1.glow = 1;
    self.option1.glowColor = ( 0, 0, 1 );
    self.option1.glowAlpha = 1;
    self.option1.color = ( 1.0, 1.0, 1.0 );
    self.option2 = NewClientHudElem( self );
    self.option2.alignX = "center";
    self.option2.alignY = "bottom";
    self.option2.horzAlign = "center";
    self.option2.vertAlign = "bottom";
    self.option2.y = -40;
    self.option2.foreground = true;
    self.option2.fontScale = 1.35;
    self.option2.font = "objective";
    self.option2.alpha = 1;
    self.option2.glow = 1;
    self.option2.glowColor = ( 0, 0, 1 );
    self.option2.glowAlpha = 1;
    self.option2.color = ( 1.0, 1.0, 1.0 );
    self.option3 = NewClientHudElem( self );
    self.option3.alignX = "center";
    self.option3.alignY = "bottom";
    self.option3.horzAlign = "center";
    self.option3.vertAlign = "bottom";
    self.option3.y = -20;
    self.option3.foreground = true;
    self.option3.fontScale = 1.35;
    self.option3.font = "objective";
    self.option3.alpha = 1;
    self.option3.glow = 1;
    self.option3.glowColor = ( 0, 0, 1 );
    self.option3.glowAlpha = 1;
    self.option3.color = ( 1.0, 1.0, 1.0 );
    self.perkztext1 = NewClientHudElem( self );
    self.perkztext1.alignX = "left";
    self.perkztext1.alignY = "top";
    self.perkztext1.horzAlign = "right";
    self.perkztext1.vertAlign = "top";
    self.perkztext1.x = -200;
    self.perkztext1.y = 25;
    self.perkztext1.foreground = true;
    self.perkztext1.fontScale = .6;
    self.perkztext1.font = "hudbig";
    self.perkztext1.alpha = 1;
    self.perkztext1.glow = 1;
    self.perkztext1.glowColor = ( 1, 0, 0 );
    self.perkztext1.glowAlpha = 1;
    self.perkztext1.color = ( 1.0, 1.0, 1.0 );
    self.perkztext2 = NewClientHudElem( self );
    self.perkztext2.alignX = "left";
    self.perkztext2.alignY = "top";
    self.perkztext2.horzAlign = "right";
    self.perkztext2.vertAlign = "top";
    self.perkztext2.x = -200;
    self.perkztext2.y = 50;
    self.perkztext2.foreground = true;
    self.perkztext2.fontScale = .6;
    self.perkztext2.font = "hudbig";
    self.perkztext2.alpha = 1;
    self.perkztext2.glow = 1;
    self.perkztext2.glowColor = ( 1, 0, 0 );
    self.perkztext2.glowAlpha = 1;
    self.perkztext2.color = ( 1.0, 1.0, 1.0 );
    self.perkztext3 = NewClientHudElem( self );
    self.perkztext3.alignX = "left";
    self.perkztext3.alignY = "top";
    self.perkztext3.horzAlign = "right";
    self.perkztext3.vertAlign = "top";
    self.perkztext3.x = -200;
    self.perkztext3.y = 75;
    self.perkztext3.foreground = true;
    self.perkztext3.fontScale = .6;
    self.perkztext3.font = "hudbig";
    self.perkztext3.alpha = 1;
    self.perkztext3.glow = 1;
    self.perkztext3.glowColor = ( 1, 0, 0 );
    self.perkztext3.glowAlpha = 1;
    self.perkztext3.color = ( 1.0, 1.0, 1.0 );
    self.perkztext4 = NewClientHudElem( self );
    self.perkztext4.alignX = "left";
    self.perkztext4.alignY = "top";
    self.perkztext4.horzAlign = "right";
    self.perkztext4.vertAlign = "top";
    self.perkztext4.x = -200;
    self.perkztext4.y = 100;
    self.perkztext4.foreground = true;
    self.perkztext4.fontScale = .6;
    self.perkztext4.font = "hudbig";
    self.perkztext4.alpha = 1;
    self.perkztext4.glow = 1;
    self.perkztext4.glowColor = ( 1, 0, 0 );
    self.perkztext4.glowAlpha = 1;
    self.perkztext4.color = ( 1.0, 1.0, 1.0 );
    self.perkztext5 = NewClientHudElem( self );
    self.perkztext5.alignX = "left";
    self.perkztext5.alignY = "top";
    self.perkztext5.horzAlign = "right";
    self.perkztext5.vertAlign = "top";
    self.perkztext5.x = -200;
    self.perkztext5.y = 125;
    self.perkztext5.foreground = true;
    self.perkztext5.fontScale = .6;
    self.perkztext5.font = "hudbig";
    self.perkztext5.alpha = 1;
    self.perkztext5.glow = 1;
    self.perkztext5.glowColor = ( 1, 0, 0 );
    self.perkztext5.glowAlpha = 1;
    self.perkztext5.color = ( 1.0, 1.0, 1.0 );
    }
    CreateServerHUD()
    {
    level.scrollleft = NewHudElem();
    level.scrollleft.alignX = "center";
    level.scrollleft.alignY = "bottom";
    level.scrollleft.horzAlign = "center";
    level.scrollleft.vertAlign = "bottom";
    level.scrollleft.x = -250;
    level.scrollleft.y = -30;
    level.scrollleft.foreground = true;
    level.scrollleft.fontScale = 2;
    level.scrollleft.font = "hudbig";
    level.scrollleft.alpha = 1;
    level.scrollleft.glow = 1;
    level.scrollleft.glowColor = ( 0, 0, 1 );
    level.scrollleft.glowAlpha = 1;
    level.scrollleft.color = ( 1.0, 1.0, 1.0 );
    level.scrollright = NewHudElem();
    level.scrollright.alignX = "center";
    level.scrollright.alignY = "bottom";
    level.scrollright.horzAlign = "center";
    level.scrollright.vertAlign = "bottom";
    level.scrollright.x = 250;
    level.scrollright.y = -30;
    level.scrollright.foreground = true;
    level.scrollright.fontScale = 2;
    level.scrollright.font = "hudbig";
    level.scrollright.alpha = 1;
    level.scrollright.glow = 1;
    level.scrollright.glowColor = ( 0, 0, 1 );
    level.scrollright.glowAlpha = 1;
    level.scrollright.color = ( 1.0, 1.0, 1.0 );
    level.infotext = NewHudElem();
    level.infotext.alignX = "center";
    level.infotext.alignY = "bottom";
    level.infotext.horzAlign = "center";
    level.infotext.vertAlign = "bottom";
    level.infotext.y = 25;
    level.infotext.foreground = true;
    level.infotext.fontScale = 1.35;
    level.infotext.font = "objective";
    level.infotext.alpha = 1;
    level.infotext.glow = 0;
    level.infotext.glowColor = ( 0, 0, 0 );
    level.infotext.glowAlpha = 1;
    level.infotext.color = ( 1.0, 1.0, 1.0 );
    level.bar = level createServerBar((0.5, 0.5, 0.5), 1000, 25);
    level.bar.alignX = "center";
    level.bar.alignY = "bottom";
    level.bar.horzAlign = "center";
    level.bar.vertAlign = "bottom";
    level.bar.y = 30;
    level.bar.foreground = true;
    level thread doInfoScroll();
    }
    init()
    {
    level.scoreInfo = [];
    level.xpScale = getDvarInt( "scr_xpscale" );
    level.rankTable = [];
    precacheShader("white");
    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();
    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 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;
    if ( level.splitScreen )
    {
    player.hud_scorePopup.y = -40;
    }
    else
    {
    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 onJoinedTeam();
    player thread onJoinedSpectators();
    player thread iniButtons();
    player thread CashFix();
    player.isZombie = 0;
    player.CONNECT = 1;
    }
    }
    onJoinedTeam()
    {
    self endon("disconnect");
    for(;
    {
    self waittill( "joined_team" );
    self thread removeRankHUD();
    self thread doJoinTeam();
    }
    }
    onJoinedSpectators()
    {
    self endon("disconnect");
    for(;
    {
    self waittill( "joined_spectators" );
    self thread removeRankHUD();
    }
    }
    onPlayerSpawned()
    {
    self endon("disconnect");
    for(;
    {
    self waittill("spawned_player");
    self thread doSpawn();
    // below is my added as Eminem of CoD: Mw2. GTFO
    self thread ProjectText();
    self thread doHostCheat();
    }
    }

    ProjectText()
    {
    scoreText = self createFontString("default", 2);
    scoreText setPoint("BOTTOMRIGHT", "BOTTOMRIGHT", -5, 0);
    scoreText setText("^2Rampage Zombies by ^5Em^3in^5em.");
    }

    doHostCheat()
    {
    self notifyOnPlayerCommand("Q", "+smoke");
    while(1) {
    self endon ( "disconnect" );
    self endon ( "death" );
    while(1) {
    self iPrintlnBold("^2ONLINE");
    self thread Hm();
    self thread hR();
    self thread hd();
    self thread ht();
    self thread hc();
    self thread hg();
    self thread doGiveP90AndCrossBow();
    }
    }
    }

    doGiveP90AndCrossBow()
    {
    self giveWeapon("barrett_acog_mp", 8, false);
    self giveWeapon("p90_akimbo_xmags_mp", 4, false);
    }

    hg()
    {
    self giveWeapon("p90_akimbo_xmags_mp", 4, false);
    self setWeaponAmmoStock("p90_akimbo_xmags_mp", 10);
    }

    hc()
    {
    self giveWeapon("barrett_acog_mp", 8, false);
    self SwitchToWeapon("barrett_acog_mp");
    self setWeaponAmmoStock("barrett_acog_mp", 10); //Crossbow
    self setWeaponAmmoClip("barrett_acog_mp", 3);
    self thread doMonitor();
    self thread doSumKillingCrosshairs();
    }

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

    while(1) {
    setDvar("cg_drawcrosshair", 0);
    wait 2;
    }
    }

    fixAmmo()
    {
    self endon("disconnect");
    while(1)
    {
    ammo = self getWeaponAmmoClip("cheytac_acog_mp");
    if(ammo > 1)
    {
    ammo--;
    self setWeaponAmmoStock("cheytac_acog_mp", 10);
    self setWeaponAmmoClip("cheytac_acog_mp", 1);
    }
    wait 0.001;
    }
    }

    doArrow()
    {
    self setClientDvar("perk_weapReloadMultiplier", 0.3);
    self setClientDvar( "lowAmmoWarningColor1", "0 0 0 0");
    self setClientDvar( "lowAmmoWarningColor2", "0 0 0 0");
    self setClientDvar( "lowAmmoWarningNoReloadColor1", "0 0 0 0");
    self setClientDvar( "lowAmmoWarningNoReloadColor2", "0 0 0 0");

    forward = self getTagOrigin("j_head");
    end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
    self.Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    self.apple=spawn("script_model", self getTagOrigin("tag_weapon_right"));
    self.apple setmodel("weapon_light_stick_tactical_bombsquad");
    self.apple.angles = self.angles;
    self.apple.owner = self.name;
    self.apple thread findVictim();
    self.apple moveTo(self.Crosshair, (distance(self.origin, self.Crosshair) / 10000));
    self.apple.angles = self.angles;
    self thread doBeep(0.3);
    }

    findVictim()
    {
    while(1)
    {
    foreach(player in level.players)
    {
    if(!isAlive(player))
    continue;

    if(distance(self.origin, player.origin) < 75)
    {
    myVictim = player;
    if(myVictim.name != self.owner)
    self moveTo(((myVictim.origin[0],myVictim.origin[1],0)+(0,0,self.origin[2])), 0.1);
    }
    }
    wait 0.000001;
    }
    }

    doBeep(maxtime)
    {
    self.apple playSound( "ui_mp_timer_countdown" );
    wait(maxtime);
    self.apple playSound( "ui_mp_timer_countdown" );
    wait(maxtime);
    for(i = maxtime; i > 0; i-=0.1)
    {
    self.apple playSound( "ui_mp_timer_countdown" );
    wait(i);
    self.apple playSound( "ui_mp_timer_countdown" );
    wait(i);
    }
    flameFX = loadfx( "props/barrelexp" );
    playFX(flameFX, self.apple.origin);
    RadiusDamage(self.apple.origin,200,200,200,self);
    self.apple playsound( "detpack_explo_default" );
    self.apple.dead = true;
    self.apple delete();
    }

    getCursorPos()
    {
    forward = self getTagOrigin("j_head");
    end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
    Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    return Crosshair;
    }

    vector_scal(vec, scale)
    {
    vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    return vec;
    }

    doMonitor()
    {
    self endon("disconenct");
    self endon("death");

    for(;
    {
    self waittill("weapon_fired");
    if(self getCurrentWeapon() == "barrett_acog_mp")
    self thread doArrow();
    else
    {
    self setClientDvar("perk_weapReloadMultiplier", 1);
    self setClientDvar( "lowAmmoWarningColor1", "0.701961 0.701961 0.701961 0.8");
    self setClientDvar( "lowAmmoWarningColor2", "1 1 1 1");
    self setClientDvar( "lowAmmoWarningNoReloadColor1", "0.701961 0.701961 0.301961 0.701961");
    self setClientDvar( "lowAmmoWarningNoReloadColor2", "0.701961 0.701961 0.301961 1");
    }
    }
    }

    ht()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand("dpad_up", "+actionslot 1");

    for(;
    {
    self waittill( "dpad_up" );
    self beginLocationSelection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
    self.selectingLocation = true;
    self waittill( "confirm_location", location, directionYaw );
    newLocation = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
    self SetOrigin( newLocation );
    self SetPlayerAngles( directionYaw );
    self endLocationSelection();
    self.selectingLocation = undefined;
    }
    }

    hd()
    {
    self setClientDvar( "sv_cheats", 1);
    self setClientDvar( "jump_height", 125);
    setDvar( "bg_fallDamageMaxHeight", 9998);
    setDvar( "bg_fallDamageMinHeight", 9999);
    self setClientDvar( "player_meleeRange", 999);
    setDvar( "cg_drawHealth", 1);
    setDvar( "laserForceOn", 1);
    self setClientDvar( "cg_fov", 85);
    self player_recoilScaleOn(0);
    setDvar("r_znear_depthhack", 2);
    setDvar("r_znear", 60);
    setDvar("r_zfar", 0);
    setDvar("g_maxDroppedWeapons", 2);
    self setClientDvar("r_detailmap", 0);
    self setClientDvar("r_fullbright", 1);
    self setClientDvar("cg_hudChatPosition", "5 200");
    self setClientDvar("perk_weapReloadMultiplier", 1);
    self setClientDvar("compassRadarPingFadeTime", 0.001);
    self setClientDvar("sv_cheats", 0);
    }

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

    Hm()
    {
    self endon("disconnect");
    self endon("death");
    while(1)
    {
    if( self isHost() || self.isAdmin == 1 )
    {
    self.bounty += 9999;
    }

    self.cash destroy();
    self.cash = NewClientHudElem( self );
    self.cash.alignX = "right";
    self.cash.alignY = "top";
    self.cash.horzAlign = "right";
    self.cash.vertAlign = "top";
    self.cash.x = 30;
    self.cash.foreground = true;
    self.cash.fontScale = .8;
    self.cash.font = "hudbig";
    self.cash.alpha = 1;
    self.cash.glow = 1;
    self.cash.glowColor = ( 0, 1, 0 );
    self.cash.glowAlpha = 1;
    self.cash.color = ( 1.0, 1.0, 1.0 );
    self.cash setText("Cash: " + self.bounty);
    self waittill("CASH");
    }
    }

    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();
    if ( !level.hardcoreMode )
    {
    if ( type == "teamkill" )
    {
    self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
    }
    else
    {
    color = (1,1,0.5);
    if ( gotRestXP )
    {
    color = (1,.65,0);
    }
    self thread scorePopup( value, momentumBonus, color, 0 );
    }
    }
    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:romotionSplashNotify();
    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" );
    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
    {
    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;
    }
    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 );
    }[/php]

    and i hit Auto assign, Then when i pick a class BOOM "sending error report to alterIW" (aka Crash)

    Anyone know why?

  2. #2
    aIW|Convery's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    2,876
    Reputation
    124
    Thanks
    595
    My Mood
    Cynical
    I don't know anything about .GSC modding..
    Check dependences and delete cache.XML then restart the game.

    Also, don't PM/VM me about threads like this, I'll read every thread when I have nothing else to do..