Release Deluxe Nuketown Survival

Dr.GiggleZ

Modder
Messages
33
Reaction score
14
Points
368
Well here's Deluxe Nuketown Survival almost semi finshed i just need to add guns to pack a punch and mystery box...

*Note- Releasing this here only for now since the bugs lol

*Updates*
**v.6**
-initial release

*****Aso if anyone can help with the bug that'd be greatly appreciated, probably won't work on this for a week or two lol decided to release what i've gotten working on bo2... Credit is in the code provided in spoiler****

-----Outdated vid-----

---Features---
*Auto map restart to nuketown
*Auto Spawn for humans every round
*Zombies gain health as rounds go by
*Stable money system

---Bugs/Todo list--
*Major Bug: When in public no one can join once game has started....
*todos*
-Finish mystery box and pack a punch
-make zombie health more fair at beggining maybe lol
- Maybe make barrier a little higher not sure yet...

Code:
//
//  _____        _____ _             _      ______
// |  __ \      / ____(_)           | |    |___  /
// | |  | |_ __| |  __ _  __ _  __ _| | ___   / /
// | |  | | '__| | |_ | |/ _` |/ _` | |/ _ \ / /
// | |__| | | _| |__| | | (_| | (_| | |  __// /__
// |_____/|_|(_)\_____|_|\__, |\__, |_|\___/_____|
//                         _/ | __/ |         
//                        |___/ |___/
//Made by Cheesetoast,map edit by Cannibal666,moved to bo2 by Dr.GiggleZ
//Special Thanks to BullyWiiPlaza For helping me out/providing me with the End Game Message
//Credit to anyone else i might have forgotten lol...
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;

init()
{
    level thread onPlayerConnect();
    level thread onPlayerConnected();
    level thread doBlocks();
    level thread deathBarrier();
    level.onPlayerKilled = ::onPlayerKilled;
    level.disableweapondrop = 1;
    level.matchHasntStarted = 1;
    wait level.prematchPeriod;
    level.matchHasntStarted = 0;
}

onPlayerConnect()
{
    for(;;)
    {
        level waittill( "connecting", player );
        player thread onPlayerSpawned();
        player thread BuyGuns();
        player thread RoundSettings();
        player thread NotifyRound();
        player thread MonitorRound();
    }
}

onPlayerConnected()
{
    for(;;)
    {
        level waittill( "connected", player );
        player [[level.autoassign]]();
        player thread TeamsAreEqual();
        player thread Money();
        player thread EndTheGame();
        wait 4;
        player thread Credit();
    }
}

onPlayerSpawned()
{
    self endon("disconnect");
    level endon("game_ended");
    for(;;)
    {
        self waittill("spawned_player");
        self thread Settings();
        self thread DisplayRound();
        self thread DisplayRtxt();
        self thread CheckMap();
        if(self isHost())
        {
            self thread hearplayers();
        }
    }
}

hearplayers()
{
    setmatchtalkflag("EveryoneHearsEveryone", 1);
}

CheckMap()
{
    if(GetDvar("mapname") != "mp_nuketown_2020")
    {
        iprintlnbold("^1Map is reseting to nuketown in 10 secs");
        wait 10;
        map("mp_nuketown_2020");
    }
}

Settings()
{
    if( self.pers["team"] == "axis" )
    {
        self clearPerks();
        self setPerk("specialty_fallheight");
        level.disableweapondrop = 1;
        self.disableweapondrop = 1;
        self thread ZombieGuns();
        wait 0.1;
        self thread ZombieSettings();
        wait 0.1;
        self thread ZombieHealth();
        wait 0.1;
        self thread ZombiePerks();
        wait 0.1;
        self thread MonitorKnifing();
    }

    else if( self.pers["team"] == "allies" )
    {
        self clearPerks();
        self setPerk("specialty_fallheight");
        level.disableweapondrop = 1;
        self.disableweapondrop = 1;
        self thread HumanGuns();
        wait 0.1;
        self thread ShowCash();
        wait 0.1;
        self thread HumansSettings();
        wait 0.1;
        self thread SwitchToSpectator();
        wait 0.1;
        self thread HumanHealth();
        wait 0.1;
        self thread HumansPerks();
        wait 0.1;
        self thread HumansGlitching();
    }
}
HumanGuns()
{
    self takeAllWeapons();
    self giveWeapon( "fiveseven_mp" );
    self giveWeapon( "frag_grenade_mp" );
    self giveWeapon( "knife_mp" );                  
    self giveWeapon( "fnp45_mp" );
    self switchToWeapon( "fiveseven_mp" );
}
ZombieGuns()
{
    self takeAllWeapons();
    self giveWeapon( "knife_ballistic_mp" );
    self giveWeapon( "knife_mp" );
    self switchToWeapon( "knife_ballistic_mp" );
    self SetWeaponAmmoClip( "knife_ballistic_mp", 0 );
    self SetWeaponAmmoStock( "knife_ballistic_mp", 0 );
}
MonitorKnifing()
{
    self endon ( "disconnect" );
    self endon ( "death" );

    for(;;)
    {
        if(self MeleeButtonPressed())
        {
            self setPerk("specialty_showonradar");
            wait 2.25;
            self unsetPerk("specialty_showonradar");        
        }

    wait 0.1;
    }
}
SwitchToSpectator()
{
    self endon ( "disconnect" );

    self waittill( "death" );
    self [[level.spectator]]();
    self iprintlnbold("You will be automatically spwned in next round");
}
ZombieSettings()
{
    self endon( "disconnect" );
    spawn = randomIntRange(1, 7);
    if(spawn == 1)
    {
            self setOrigin( ( 116, 337, -35 ), ( 0, 225, 0 ) );
    }
    else if(spawn == 2)
    {
            self setOrigin( ( 495, 1004, -62 ), ( 0, -103, 0 ) );
    }
    else if(spawn == 3)
    {
            self setOrigin( ( 2005, 431, -62 ), ( 0, -157, 0 ) );
    }
    else if(spawn == 4)
    {
            self setOrigin( ( -681, -235, -59 ), ( 0, 115, 0 ) );
    }
    else if(spawn == 5)
    {
            self setOrigin( ( -2019, 448, -62 ), ( 0, -18, 0 ) );
    }
    else if(spawn == 6)
    {
            self setOrigin( ( -496, 924, -62 ), ( 0, -35, 0 ) );
    }
}
HumansSettings()
{
    self endon( "disconnect" );
    self freeze_player_controls( false );
    Hspawn = randomIntRange(1, 7);
    if(Hspawn == 1)
    {
        self setOrigin( ( 841, 584, -37 ), ( 0, 225, 0 ) );
    }
    else if(Hspawn == 2)
    {
        self setOrigin( ( 797, 394, -57 ), ( 0, -108, 0 ) );
    }
    else if(Hspawn == 3)
    {
        self setOrigin( ( 1066, 466, 80 ), ( 0, -131, 0 ) );
    }
    else if(Hspawn == 4)
    {
        self setOrigin( ( -828, 9, -57 ), ( 0, 121, 0 ) );
    }
    else if(Hspawn == 5)
    {
        self setOrigin( ( -558, 269, -57 ), ( 0, 225, 0 ) );
    }
    else if(Hspawn == 6)
    {
        self setOrigin( ( -809, 333, 80 ), ( 0, 102, 0 ) );
    }
}

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

    self clearPerks();
    self setPerk("specialty_healthregen");
    self setPerk("specialty_finalstand");
    self setPerk("specialty_pistoldeath");
    self setPerk("specialty_quieter");
    self setPerk("specialty_loudenemies");
    self setPerk("specialty_nomotionsensor");
    self setPerk("specialty_gpsjammer");
}

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

    self clearPerks();
    self setPerk("specialty_gpsjammer");
    self setPerk("specialty_reconnaissance");
    self setPerk("specialty_nottargetedbyai");
    self setPerk("specialty_noname");
    self setPerk("specialty_detectexplosive");
}

TeamsAreEqual()
{
    for(;;)
    {
        if( level.playerCount["allies"] >= 6 && self.pers["team"] == "spectator" )
        {
            self [[level.axis]]();
        }

    wait 0.01;
    }
}
Money()
{
    if(self isHost())
    {
        self.cash = 40000;
    }
    else
    {
    self.cash = 1000;
    }
}
HumansGlitching()
{
    self endon ( "death" );
    for(;;)
    {
        self unsetPerk("specialty_showonradar");
        wait 27;
        self setPerk("specialty_showonradar");
        wait 3;
    }
}
ShowCash()
{
    CashDisplay = self createFontString( "objective", 1.7 );
    CashDisplay setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
    for(;;)
    {
        CashDisplay setText( "^5Cash: ^1$" + self.cash );
        wait 0.5;
    }
    self waittill ("death");
    CashDisplay destroy();
}
PackBox( pos, ang )
{
    level.pBox = spawn( "script_model", pos );
    level.pBox setModel( "t6_wpn_supply_drop_trap" );
    level.pBox.angles = ang;
}
createBlock( pos, angles, num )
{
        level.crate[num] = spawn( "script_model", pos );
        level.crate[num] setModel( "t6_wpn_supply_drop_ally" );
        level.crate[num].angles = angles;
}
createPerk( pos, angles, num )
{
        level.perk[num] = spawn( "script_model", pos );
        level.perk[num] setModel( "t6_wpn_supply_drop_axis" );
        level.perk[num].angles = angles;

    FlagEffect = loadfx( "misc/fx_ui_flagbase_gold_t5" );
    Effect = PlayLoopedFX( FlagEffect, 1, pos - ( 0, 0, 34 ) );
}
AmmoBox( pos, angles )
{
        level.ammobox = spawn( "script_model", pos );
        level.ammobox setModel( "t6_wpn_supply_drop_axis" );
        level.ammobox.angles = angles;
}
MysteryBox( pos, angles )
{
        level.Mbox = spawn( "script_model", pos );
        level.Mbox setModel( "t6_wpn_supply_drop_trap" );
        level.Mbox.angles = angles;
}
TeleporterBox( pos, angles, num )
{
        level.Tbox[num] = spawn( "script_model", pos );
        level.Tbox[num] setModel( "t6_wpn_supply_drop_trap" );
        level.Tbox[num].angles = angles;
}
createGun( pos, angles, gun )
{
    level.gun[gun] = spawn( "script_model", pos );
    level.gun[gun] setModel( getWeaponModel( gun ) );
    level.gun[gun].angles = angles;
}
DoorBlock( pos, angles, num )
{
        level.CreateDoor[num] = spawn( "script_model", pos );
        level.CreateDoor[num] setModel( "t6_wpn_supply_drop_hq" );
        level.CreateDoor[num].angles = angles;
}
ZombieBlock( pos, angles )
{
        level.ZombieCrate = spawn( "script_model", pos );
        level.ZombieCrate setModel( "t6_wpn_supply_drop_axis" );
        level.ZombieCrate.angles = angles;
}
doBlocks()
{
    //CheeseToast made this map(edited/organized by Cannibal666)
    //bottom door next to stairs
    level.bunkers[1] = createBlock( ( 575, 116, -31), (0, 195, 0), 1 );
    level.bunkers[2] = createBlock( ( 575, 116, -46), (0, 195, 0), 2 );
    level.bunkers[3] = createBlock( ( 551, 111, -46), (0, 195, 0), 3 );
    //uper dooor next to stairs
    level.bunkers[4] = createBlock( ( 1146, 306, 92), (0, 195, 0), 4 );
    level.bunkers[5] = createBlock( ( 1146, 306, 107), (0, 195, 0), 5 );
    level.bunkers[6] = createBlock( ( 1180, 312, 92), (0, 195, 0), 6 );
    //bottom door behind stairs
    level.bunkers[7] = createBlock( ( 1155, 267, -31), (0, 195, 0), 7 );
    level.bunkers[8] = createBlock( ( 1155, 267, -46), (0, 195, 0), 8 );
    level.bunkers[9] = createBlock( ( 1189, 273, -46), (0, 195, 0), 9 );

    //big garage door
    //right
    level.bunkers[10] = createBlock( ( 681, 518, -41), (0, 195, 0), 10 );
    level.bunkers[11] = createBlock( ( 681, 518, -6), (0, 195, 0), 11 );
    level.bunkers[12] = createBlock( ( 681, 518, 29), (0, 195, 0), 12 );
    //lefft
    level.bunkers[13] = createBlock( ( 700, 456, -41), (0, 195, 0), 13 );
    level.bunkers[14] = createBlock( ( 700, 456, -6), (0, 195, 0), 14 );
    level.bunkers[15] = createBlock( ( 700, 456, 29), (0, 195, 0), 15 );

    //small garage door
    level.bunkers[16] = createBlock( ( 1010, 693, -41), (0, 195, 0), 16 );
    level.bunkers[17] = createBlock( ( 1010, 693, -6), (0, 195, 0), 17 );
    level.bunkers[18] = createBlock( ( 1010, 693, 29), (0, 195, 0), 18 );
    //upstairs teleporter room
    //window blocks
    level.bunkers[19] = createBlock( ( 577, 64, 126), (0, 195, 0), 19 );
    level.bunkers[20] = createBlock( ( 583, 42, 126), (0, 195, 0), 20 );
    level.bunkers[21] = createBlock( ( 577, 64, 158), (0, 195, 0), 21 );
    level.bunkers[22] = createBlock( ( 583, 42, 158), (0, 195, 0), 22 );
    //teleporter box
    level.bunkers[23] = TeleporterBox( ( 652, 6, 96), (0, -76, 0), 1 );
    //doors
    level.Doors[1] = DoorBlock( ( 789, 236, 95), (0, 195, 0), 1 );
    level.Doors[2] = DoorBlock( ( 789, 236, 130), (0, 195, 0), 2 );
    level.Doors[3] = DoorBlock( ( 789, 236, 165), (0, 195, 0), 3 );

    //gold house guns
    level.guns[1] = createGun( ( 677, 596, -8 ), ( 0, 105, 0 ), "beretta93r_mp" );//b23r
    level.guns[2] = createGun( ( 660, 650, -8 ), ( 0, 105, 0 ), "tar21_mp" );//mtar
    level.guns[3] = createGun( ( 910, 179, -3 ), ( 0, 105, 0 ), "saiga12_mp" );//s12
    //blue house guns
    level.guns[4] = createGun( ( -904, 350, -8 ), ( 0, 155, 0 ), "evoskorpion_mp" );
    level.guns[5] = createGun( ( -965, 716, 123 ), ( 0, -111, 0 ), "qcw05_mp" );//chicom
    level.guns[6] = createGun( ( -746, 578, 123 ), ( 0, 155, 0 ), "peacekeeper_mp" );

    //perk boxes
    level.perks[1] = createPerk( ( 784, 365, 113 ), ( 0, 285, 90 ), 1 );
    level.perks[2] = createPerk( ( 572, 300, -23 ), ( 0, 285, 90 ), 2 );
    level.perks[3] = createPerk( ( -1066, 426, 113 ), ( 0, 159, 90 ), 3 );
    level.perks[4] = createPerk( ( -753, 513, -25 ), ( 0, 159, 90 ), 4 );

    //ammo box
    level.ammo[1] = AmmoBox( ( 954, 745, -23), (0, 105, 90) );

    //mystery box
    level.mystery[1] = MysteryBox( ( -500, 418, 95), (0, 159, 0) );

    //blue house
    //window
    level.bunkers[41] = createBlock( ( -500, 305, 131), (0, 159, 0), 41 );
    level.bunkers[42] = createBlock( ( -516, 260, 131), (0, 159, 0), 42 );
    level.bunkers[43] = createBlock( ( -500, 305, 162), (0, 159, 0), 43 );
    level.bunkers[44] = createBlock( ( -516, 260, 162), (0, 159, 0), 44 );
    //front door
    level.bunkers[45] = createBlock( ( -476, 384, -46), (0, 159, 0), 45 );
    level.bunkers[46] = createBlock( ( -460, 378, -46), (0, 159, 0), 46 );
    level.bunkers[47] = createBlock( ( -476, 384, -31), (0, 159, 0), 47 );
    //door behind stairs
    level.bunkers[48] = createBlock( ( -996, 704, -46), (0, 159, 0), 48 );
    level.bunkers[49] = createBlock( ( -1012, 710, -46), (0, 159, 0), 49 );
    level.bunkers[50] = createBlock( ( -996, 704, -31), (0, 159, 0), 50 );
    //back side wall to garage
    level.bunkers[51] = createBlock( ( -1043, 379, -33), (0, 159, 90), 51 );
    level.bunkers[52] = createBlock( ( -1053, 351, -33), (0, 159, 90), 52 );
    level.bunkers[53] = createBlock( ( -1064, 322, -33), (0, 159, 90), 53 );
    level.bunkers[141] = createBlock( ( -1077, 293, -33), (0, 159, 90), 141 );
    level.bunkers[142] = createBlock( ( -1089, 265, -33), (0, 159, 90), 142 );
    level.bunkers[143] = createBlock( ( -1101, 235, -33), (0, 159, 90), 143 );
    level.bunkers[144] = createBlock( ( -1113, 206, -33), (0, 159, 90), 144 );
    level.bunkers[145] = createBlock( ( -1125, 178, -33), (0, 159, 90), 145 );
    level.bunkers[146] = createBlock( ( -1138, 150, -33), (0, 159, 90), 146 );
    level.bunkers[147] = createBlock( ( -1149, 122, -33), (0, 159, 90), 147 );
    level.bunkers[148] = createBlock( ( -1116, 107, -33), (0, 159, 90), 148 );
    level.bunkers[149] = createBlock( ( -1084, 95, -33), (0, 159, 90), 149 );
    level.bunkers[150] = createBlock( ( -1053, 83, -33), (0, 159, 90), 150 );
    //garage door
    level.bunkers[151] = createBlock( ( -736, 167, -41), (0, 159, 0), 151 );
    level.bunkers[152] = createBlock( ( -736, 167, 13), (0, 159, 0), 152 );
    level.bunkers[153] = createBlock( ( -736, 167, 46), (0, 159, 0), 153 );
    level.bunkers[158] = createBlock( ( -736, 167, -20), (0, 159, 0), 158 );
    level.bunkers[154] = createBlock( ( -717, 216, -41), (0, 159, 0), 154 );
    level.bunkers[155] = createBlock( ( -717, 216, 13), (0, 159, 0), 155 );
    level.bunkers[156] = createBlock( ( -717, 216, 46), (0, 159, 0), 156 );
    level.bunkers[157] = createBlock( ( -717, 216, -20), (0, 159, 0), 157 );
    //upstairs door
    level.bunkers[54] = createBlock( ( -1029, 608, 93), (0, 159, 0), 54 );
    level.bunkers[55] = createBlock( ( -1048, 614, 93), (0, 159, 0), 55 );
    level.bunkers[56] = createBlock( ( -1029, 608, 108), (0, 159, 0), 56 );
    //doors blue house
    level.Doors[4] = DoorBlock( ( -728, 363, 95), (0, 159, 0), 4 );
    level.Doors[5] = DoorBlock( ( -728, 363, 130), (0, 159, 0), 5 );
    level.Doors[6] = DoorBlock( ( -728, 363, 165), (0, 159, 0), 6 );
    //teleporter box
    level.TeleporterBunker[1] = TeleporterBox( ( -560, 258, 95), (0, 159, 0), 2 );

    //fort flooor
    level.bunkers[63] = createBlock( ( -80, 1138, 364), (0, -87, 0), 63 );
    level.bunkers[64] = createBlock( ( -148, 1134, 364), (0, -87, 0), 64 );
    level.bunkers[65] = createBlock( ( -15, 1141, 364), (0, -87, 0), 65 );
    level.bunkers[66] = createBlock( ( -146, 1099, 364), (0, -87, 0), 66 );
    level.bunkers[67] = createBlock( ( -79, 1102, 364), (0, -87, 0), 67 );
    level.bunkers[68] = createBlock( ( -12, 1104, 364), (0, -87, 0), 68 );
    level.bunkers[69] = createBlock( ( -17, 1177, 364), (0, -87, 0), 69 );
    level.bunkers[70] = createBlock( ( -81, 1173, 364), (0, -87, 0), 70 );
    level.bunkers[71] = createBlock( ( -149, 1169, 364), (0, -87, 0), 71 );
    level.bunkers[72] = createBlock( ( -19, 1210, 364), (0, -87, 0), 72 );
    level.bunkers[73] = createBlock( ( -83, 1207, 364), (0, -87, 0), 73 );
    level.bunkers[74] = createBlock( ( -152, 1204, 364), (0, -87, 0), 74 );
    //walls
    level.bunkers[75] = createBlock( ( 0, 1245, 410), (0, -87, 90), 75 );
    level.bunkers[76] = createBlock( ( 33, 1210, 410), (0, -87, 90), 76 );
    level.bunkers[77] = createBlock( ( 31, 1172, 410), (0, -87, 90), 77 );
    level.bunkers[78] = createBlock( ( -31, 1243, 410), (0, -87, 90), 78 );
    level.bunkers[79] = createBlock( ( 34, 1138, 410), (0, -87, 90), 79 );
    level.bunkers[80] = createBlock( ( -61, 1243, 410), (0, -87, 90), 80 );
    level.bunkers[81] = createBlock( ( -91, 1240, 410), (0, -87, 90), 81 );
    level.bunkers[82] = createBlock( ( -122, 1239, 410), (0, -87, 90), 82 );
    level.bunkers[83] = createBlock( ( -152, 1237, 410), (0, -87, 90), 83 );
    level.bunkers[84] = createBlock( ( -184, 1236, 410), (0, -87, 90), 84 );
    level.bunkers[85] = createBlock( ( 36, 1104, 410), (0, -87, 90), 85 );
    level.bunkers[86] = createBlock( ( -200, 1201, 410), (0, -87, 90), 86 );
    level.bunkers[87] = createBlock( ( -200, 1167, 410), (0, -87, 90), 87 );
    level.bunkers[88] = createBlock( ( -198, 1131, 410), (0, -87, 90), 88 );
    level.bunkers[89] = createBlock( ( -195, 1096, 410), (0, -87, 90), 89 );
    //front wall
    level.bunkers[90] = createBlock( ( -141, 1067, 410), (0, -87, 90), 90 );
    level.bunkers[91] = createBlock( ( -73, 1069, 410), (0, -87, 90), 91 );
    level.bunkers[92] = createBlock( ( -7, 1072, 410), (0, -87, 90), 92 );
    //fort roof
    level.bunkers[93] = createBlock( ( -80, 1138, 500), (0, -87, 0), 93 );
    level.bunkers[94] = createBlock( ( -148, 1134, 500), (0, -87, 0), 94 );
    level.bunkers[95] = createBlock( ( -15, 1141, 500), (0, -87, 0), 95 );
    level.bunkers[96] = createBlock( ( -146, 1099, 500), (0, -87, 0), 96 );
    level.bunkers[97] = createBlock( ( -79, 1102, 500), (0, -87, 0), 97 );
    level.bunkers[98] = createBlock( ( -12, 1104, 500), (0, -87, 0), 98 );
    level.bunkers[99] = createBlock( ( -17, 1177, 500), (0, -87, 0), 99 );
    level.bunkers[100] = createBlock( ( -81, 1173, 500), (0, -87, 0), 100 );
    level.bunkers[101] = createBlock( ( -149, 1169, 500), (0, -87, 0), 101 );
    level.bunkers[102] = createBlock( ( -19, 1210, 500), (0, -87, 0), 102 );
    level.bunkers[103] = createBlock( ( -83, 1207, 500), (0, -87, 0), 103 );
    level.bunkers[104] = createBlock( ( -152, 1204, 500), (0, -87, 0), 104 );
    //walls little higher to connect to roof
    level.bunkers[105] = createBlock( ( 0, 1245, 464), (0, -87, 90), 105 );
    level.bunkers[106] = createBlock( ( 33, 1210, 464), (0, -87, 90), 106 );
    level.bunkers[107] = createBlock( ( 31, 1172, 464), (0, -87, 90), 107 );
    level.bunkers[108] = createBlock( ( -31, 1243, 464), (0, -87, 90), 108 );
    level.bunkers[109] = createBlock( ( 34, 1138, 464), (0, -87, 90), 109 );
    level.bunkers[110] = createBlock( ( -61, 1243, 464), (0, -87, 90), 110 );
    level.bunkers[111] = createBlock( ( -91, 1240, 464), (0, -87, 90), 111 );
    level.bunkers[112] = createBlock( ( -122, 1239, 464), (0, -87, 90), 112 );
    level.bunkers[113] = createBlock( ( -152, 1237, 464), (0, -87, 90), 113 );
    level.bunkers[114] = createBlock( ( -184, 1236, 464), (0, -87, 90), 114 );
    level.bunkers[115] = createBlock( ( 36, 1104, 464), (0, -87, 90), 115 );
    level.bunkers[116] = createBlock( ( -200, 1201, 464), (0, -87, 90), 116 );
    level.bunkers[117] = createBlock( ( -200, 1167, 464), (0, -87, 90), 117 );
    level.bunkers[118] = createBlock( ( -198, 1131, 464), (0, -87, 90), 118 );
    level.bunkers[119] = createBlock( ( -195, 1096, 464), (0, -87, 90), 119 );

    //front wall higher
    level.bunkers[120] = createBlock( ( -141, 1067, 464), (0, -87, 90), 120 );
    level.bunkers[121] = createBlock( ( -73, 1069, 464), (0, -87, 90), 121 );
    level.bunkers[122] = createBlock( ( -7, 1072, 464), (0, -87, 90), 122 );

    //pack-a-punch
    level.PackaPunch[1] = PackBox( ( -82, 1208, 396), (0, -87, 0) );

    //zombie spawn fort
    //blue side wall
    level.bunkers[123] = createBlock( ( 22, 328, -21), (0, 15, 0), 123 );
    level.bunkers[124] = createBlock( ( 22, 328, 12), (0, 15, 0), 124 );
    level.bunkers[125] = createBlock( ( 22, 328, 45), (0, 15, 0), 125 );
    level.bunkers[126] = createBlock( ( 27, 305, -21), (0, 15, 0), 126 );
    level.bunkers[127] = createBlock( ( 27, 305, 12), (0, 15, 0), 127 );
    level.bunkers[128] = createBlock( ( 27, 305, 45), (0, 15, 0), 128 );
    //gold side wall
    level.bunkers[129] = createBlock( ( 193, 371, -21), (0, 15, 0), 129 );
    level.bunkers[130] = createBlock( ( 193, 371, 12), (0, 15, 0), 130 );
    level.bunkers[131] = createBlock( ( 193, 371, 45), (0, 15, 0), 131 );
    level.bunkers[132] = createBlock( ( 200, 350, -21), (0, 15, 0), 132 );
    level.bunkers[133] = createBlock( ( 200, 350, 12), (0, 15, 0), 133 );
    level.bunkers[134] = createBlock( ( 200, 350, 45), (0, 15, 0), 134 );
    //front wall
    level.bunkers[135] = createBlock( ( 89, 551, -21), (0, -75, 0), 135 );
    level.bunkers[136] = createBlock( ( 89, 551, 0), (0, -75, 0), 136 );
    level.bunkers[137] = createBlock( ( 22, 534, -21), (0, -75, 0), 137 );
    level.bunkers[138] = createBlock( ( 22, 534, 0), (0, -75, 0), 138 );
    level.bunkers[139] = createBlock( ( 93, 520, -21), (0, -75, 0), 139 );
    level.bunkers[140] = createBlock( ( 29, 504, -21), (0, -75, 0), 140 );

    level.minigunBox[1] = DoorBlock( ( -801, 280, -41), (0, 70, 0), 7 );
    level.minigun[1] = createGun( ( -787, 278, -85), (0, 155, 0), "minigun_mp" );
}
BuyGuns()
{
    for(;;)
    {
        if( distance( self.origin, level.gun["evoskorpion_mp"].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy A ^1Skorpion^7(^2$650^7)" );

            while( distance( self.origin, level.gun["evoskorpion_mp"].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 650 )
                {
                    self.cash -= 650;
                    self playLocalSound("uin_alert_cash_register");
                    self takeWeapon( self getCurrentWeapon() );
                    self giveWeapon( "evoskorpion_mp" );
                    self switchToWeapon( "evoskorpion_mp" );
                    self giveMaxAmmo( "evoskorpion_mp" );
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 649 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }

        else if( distance( self.origin, level.gun["saiga12_mp"].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy A ^1S-12^7(^2$650^7)" );

            while( distance( self.origin, level.gun["saiga12_mp"].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 650 )
                {
                    self.cash -= 650;
                    self playLocalSound("uin_alert_cash_register");
                    self takeWeapon( self getCurrentWeapon() );
                    self giveWeapon( "saiga12_mp" );
                    self switchToWeapon( "saiga12_mp" );
                    self giveMaxAmmo( "saiga12_mp" );
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 649 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }


        else if( distance( self.origin, level.gun["peacekeeper_mp"].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy A ^1Peacekeeper ^7(^2$650^7)" );
            while( distance( self.origin, level.gun["peacekeeper_mp"].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 650 )
                {
                    self.cash -= 650;
                    self playLocalSound("uin_alert_cash_register");
                    self takeWeapon( self getCurrentWeapon() );
                    self giveWeapon( "peacekeeper_mp" );
                    self switchToWeapon( "peacekeeper_mp" );
                    self giveMaxAmmo( "peacekeeper_mp" );
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 649 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }

        else if( distance( self.origin, level.gun["tar21_mp"].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy A ^1M-TAR^7(^2$500^7)" );

            while( distance( self.origin, level.gun["tar21_mp"].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 500 )
                {
                    self.cash -= 500;
                    self playLocalSound("uin_alert_cash_register");
                    self takeWeapon( self getCurrentWeapon() );
                    self giveWeapon( "tar21_mp" );
                    self switchToWeapon( "tar21_mp" );
                    self giveMaxAmmo( "tar21_mp" );
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 499 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }

        else if( distance( self.origin, level.gun["qcw05_mp"].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy A ^Chicom CQB^7(^2$600^7)" );
        
            while( distance( self.origin, level.gun["qcw05_mp"].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 600 )
                {
                    self.cash -= 600;
                    self playLocalSound("uin_alert_cash_register");
                    self takeWeapon( self getCurrentWeapon() );
                    self giveWeapon( "qcw05_mp" );
                    self switchToWeapon( "qcw05_mp" );
                    self giveMaxAmmo( "qcw05_mp" );
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 599 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }

        else if( distance( self.origin, level.gun["beretta93r_mp"].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy A ^1B23R ^7(^2$550^7)" );

            while( distance( self.origin, level.gun["beretta93r_mp"].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 550 )
                {
                    self.cash -= 550;
                    self playLocalSound("uin_alert_cash_register");
                    self takeWeapon( self getCurrentWeapon() );
                    self giveWeapon( "beretta93r_mp" );
                    self switchToWeapon( "beretta93r_mp" );
                    self giveMaxAmmo( "beretta93r_mp" );
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 549 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }
        else if( distance( self.origin, level.CreateDoor[1].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy ^1Doors^7(^2$750^7)" );

            while( distance( self.origin, level.CreateDoor[1].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 750 )
                {
                    self.cash -= 750;
                    self playLocalSound("uin_alert_cash_register");
                    self thread DoorsMove();
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 749 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }

        else if( distance( self.origin, level.CreateDoor[4].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy ^1Doors^7(^2$750^7)" );

            while( distance( self.origin, level.CreateDoor[4].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 750 )
                {
                    self.cash -= 750;
                    self playLocalSound("uin_alert_cash_register");
                    self thread DoorsMove2();
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 749 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }
        else if( distance( self.origin, level.Tbox[1].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy ^1Teleportation^7(^2$600^7)" );

            while( distance( self.origin, level.Tbox[1].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 600 )
                {
                    self.cash -= 600;
                    self playLocalSound("uin_alert_cash_register");
                    self thread Teleporter1Used();
                }

                else if( self useButtonPressed() && self.cash <= 599 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }

        else if( distance( self.origin, level.Tbox[2].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy ^1Teleportation^7(^2$600^7)" );

            while( distance( self.origin, level.Tbox[2].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 600 )
                {
                    self.cash -= 600;
                    self playLocalSound("uin_alert_cash_register");
                    self thread Teleporter2Used();
                }

                else if( self useButtonPressed() && self.cash <= 599 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }
        else if( distance( self.origin, level.CreateDoor[7].origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy ^1Minigun^7(^2$3,500^7)" );
            self iPrintln( "or" );
            self iPrintln( "Hold [{+activate}] To Refill Ammo^7(^2$2,000^7)" );

            while( distance( self.origin, level.CreateDoor[7].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 2000 && self getCurrentWeapon() == "minigun_mp" )
                {
                    self.cash -= 3500;
                    self playLocalSound("uin_alert_cash_register");
                    self thread MinigunUse();
                    self takeWeapon( self getCurrentWeapon() );
                    wait 2;

                    time = 0;
                    while( time != 9 )
                    {
                        time++;
                        wait 0.5;
                    }
                    self thread refillmini();
                }

                else if( self useButtonPressed() && self.cash >= 3500 )
                {
                    self.cash -= 3500;
                    self playLocalSound("uin_alert_cash_register");
                    self thread MinigunUse();
                    wait 3;
                    self giveWeapon( "minigun_mp" );
                    self switchToWeapon( "minigun_mp" );
                    self giveMaxAmmo( "minigun_mp" );
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 3499 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }
    
        else if( distance( self.origin, level.Mbox.origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy ^1Mystery Box^7(^2$750^7)" );
            while( distance( self.origin, level.Mbox.origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 750 )
                {
                    self.cash -= 750;
                    self playLocalSound("uin_alert_cash_register");
                    self thread RandomGuns();
                    self iprintlnbold ("RandomGuns()");
                    self freeze_player_controls( true );
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 749 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }
    
        else if( distance( self.origin, level.pBox.origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy ^1Pack-A-Punch^7(^2$750^7)" );

            while( distance( self.origin, level.pBox.origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 750 )
                {
                    self.cash -= 750;
                    self thread PackedWeapon();
                    self playLocalSound("uin_alert_cash_register");
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 749 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }
        else if( distance( self.origin, level.perk[2].origin ) < 60 && self.pers["team"] == "allies" )
        {    
            self iPrintln( "Hold [{+activate}] To Buy ^1Overkill^7(^2$1,000^7)" );

            while( distance( self.origin, level.perk[2].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 1000 )
                {
                    self.cash -= 1000;
                    self playLocalSound("uin_alert_cash_register");
                    self giveWeapon( "judge_mp" );
                    self SetWeaponAmmoClip( "judge_mp", 0 );
                    self SetWeaponAmmoStock( "judge_mp", 0 );
                    self iPrintln( "Swap The Python For A Gun" );
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 999 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }
        else if( distance( self.origin, level.perk[3].origin ) < 60 && self.pers["team"] == "allies" )
        {    
            self iPrintln( "Hold [{+activate}] To Buy ^1Slight Of Hand Pro^7(^2$800^7)" );

            while( distance( self.origin, level.perk[3].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 800 )
                {
                    self.cash -= 800;
                    self playLocalSound("uin_alert_cash_register");
                    self setPerk("specialty_fastreload");
                    self setPerk("specialty_fastads");        
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 799 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }

        else if( distance( self.origin, level.perk[4].origin ) < 60 && self.pers["team"] == "allies" )
        {    
            self iPrintln( "Hold [{+activate}] To Buy ^1Steady Aim^7(^2$600^7)" );

            while( distance( self.origin, level.perk[4].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 600 )
                {
                    self.cash -= 600;
                    self playLocalSound("uin_alert_cash_register");
                    self setPerk("specialty_bulletaccuracy");      
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 599 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }
        else if( distance( self.origin, level.perk[1].origin ) < 60 && self.pers["team"] == "allies" )
        {    
            self iPrintln( "Hold [{+activate}] To Buy ^1Juggernaut^7(^2$1,500^7)" );

            while( distance( self.origin, level.perk[1].origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 1500 )
                {
                    self.cash -= 1500;
                    self playLocalSound("uin_alert_cash_register");
                    self.maxhealth = 720;
                    self.health = self.maxhealth;
                    self notify( "Jugg_Bought" );
                    self thread HumanHealthJugg();
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 1499 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        
        }
        else if( distance( self.origin, level.ammobox.origin ) < 60 && self.pers["team"] == "allies" )
        {
            self iPrintln( "Hold [{+activate}] To Buy ^1Ammo^7(^2$500^7)" );
            while( distance( self.origin, level.ammobox.origin ) < 60 )
            {
                if( self useButtonPressed() && self.cash >= 500 )
                {
                    self.cash -= 500;
                    self playLocalSound("uin_alert_cash_register");
                    self giveMaxAmmo( self getCurrentWeapon() );
                    self giveMaxAmmo( "fnp45_mp" );
                    self giveMaxAmmo( "fiveseven_mp" );
                    self SetWeaponAmmoStock( "frag_grenade_mp", 1 );
                    self iprintlnbold("Purchased");
                }

                else if( self useButtonPressed() && self.cash <= 499 )
                {
                    self iPrintln( "^1Not Enough Money" );
                }
                wait 1;
            }
        }
        wait 0.1;    
    }
}

Teleporter1Used()
{
    self setOrigin( ( -76, 1137, 381 ), ( 0, -87, 0 ) );
    self iPrintlnBold("^1Teleported");
    wait 15;
    self setOrigin( ( -595, 261, -56 ), ( 0, 116, 0 ) );
    self iPrintlnBold("^1Teleported");
}

Teleporter2Used()
{
    self setOrigin( ( 743, 647, -56 ), ( 0, -33, 0 ) );
    self iPrintlnBold("^1Teleported");
}
DoorsMove()
{
    level.CreateDoor[1] moveTo( ( 789, 236, 190 ), 1.5 );
    level.CreateDoor[2] moveTo( ( 789, 236, 190 ), 1.5 );
    level.CreateDoor[3] moveTo( ( 789, 236, 190 ), 1.5 );
}
DoorsMove2()
{
    level.CreateDoor[4] moveTo( ( -728, 363, 190 ), 1.5 );
    level.CreateDoor[5] moveTo( ( -728, 363, 190 ), 1.5 );
    level.CreateDoor[6] moveTo( ( -728, 363, 190 ), 1.5 );
}
deathBarrier()
{
    ents = getEntArray();
    for ( index = 0; index < ents.size; index++ )
    {
    if(isSubStr(ents[index].classname, "trigger_hurt"))
    ents[index].origin = (0, 0, 9999999);
    }
}

onPlayerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration )
{
    if ( isDefined( attacker ) && isPlayer( attacker ) && self != attacker )
    {
        attacker thread KillMoney();
    }
}

KillMoney()
{
    self.cash += 150;
}

MinigunUse()
{
    level.gun["minigun_mp"] moveTo( ( -787, 278, 0), 3 );
    wait 6;
    level.gun["minigun_mp"] moveTo( ( -787, 278, -85), 3 );
}
RandomGuns()
{
    self endon( "death" );
    self endon( "disconnect" );

    self iPrintln( "^2Random selector ran" );
    gun = randomIntRange(1, 9);
    if(gun == 1)
    {
        self.gun = "1";
        self thread DoText( "crossbow" );
        self thread TakeOrLeave( "crossbow_mp" );
        self iPrintln( "^2Random selector crossbow_mp" );
    self iPrintln( "^2Press [{+attack}] To Keep Gun" );
    self iPrintln( "^1Press [{+speed_throw}] To Leave Gun" );
    }
    if(gun == 2)
    {
        self.gun = "2";
            self thread DoText( "RPG" );
            self thread TakeOrLeave( "usrpg_mp" );
    self iPrintln( "^2Random selector usrpg_mp" );
    self iPrintln( "^2Press [{+attack}] To Keep Gun" );
    self iPrintln( "^1Press [{+speed_throw}] To Leave Gun" );
    }
    if(gun == 3)
    {
        self.gun = "3";
        self thread DoText( "Executioner" );
        self thread TakeOrLeave( "judge_mp" );
        self iPrintln( "^2Random selector judge_mp" );
    self iPrintln( "^2Press [{+attack}] To Keep Gun" );
    self iPrintln( "^1Press [{+speed_throw}] To Leave Gun" );
    }
    if(gun == 4)
    {
        self.gun = "4";
        self thread DoText( "870mcs_mp" );
        self thread TakeOrLeave( "870mcs_mp" );
        self iPrintln( "^2Random selector 870mcs_mp" );
    self iPrintln( "^2Press [{+attack}] To Keep Gun" );
    self iPrintln( "^1Press [{+speed_throw}] To Leave Gun" );
    }
    if(gun == 5)
    {
        self.gun = "5";
        self thread DoText( "AN-94" );
        self thread TakeOrLeave( "an94_mp" );
        self iPrintln( "^2Random selector an94_mp" );
    self iPrintln( "^2Press [{+attack}] To Keep Gun" );
    self iPrintln( "^1Press [{+speed_throw}] To Leave Gun" );
    }
    if(gun == 6)
    {
        self.gun = "6";
        self thread DoText( "Ballista" );
        self thread TakeOrLeave( "ballista_mp" );
        self iPrintln( "^2Random selector ballista_mp" );
    self iPrintln( "^2Press [{+attack}] To Keep Gun" );
    self iPrintln( "^1Press [{+speed_throw}] To Leave Gun" );
    }
    if(gun == 7)
    {
        self.gun = "7";
        self thread DoText( "DSR" );
        self thread TakeOrLeave( "dsr50_mp" );
        self iPrintln( "^2Random selector dsr50_mp" );
    self iPrintln( "^2Press [{+attack}] To Keep Gun" );
    self iPrintln( "^1Press [{+speed_throw}] To Leave Gun" );
    }
    if(gun == 8)
    {
        self.gun = "8";
        self thread DoText( "HAMR" );
        self thread TakeOrLeave( "hamr_mp" );
        self iPrintln( "^2Random selector hamr_mp" );
    self iPrintln( "^2Press [{+attack}] To Keep Gun" );
    self iPrintln( "^1Press [{+speed_throw}] To Leave Gun" );
    }
}
DoText( text )
{
    self endon( "death" );
    self endon( "disconnect" );

    showGun = self createFontString( "objective", 2 );
    showGun setPoint( "CENTER", "CENTER", 0, 0 );
        showGun setText( gun );
    showGun.color = ( 200/255, 0/255, 0/255 );

    self iPrintln( "^2Press [{+attack}] To Keep Gun" );
    self iPrintln( "^1Press [{+speed_throw}] To Leave Gun" );
    self thread DeathDelete(showGun);

    wait 5;
    showGun destroy();
}
DeathDelete(entity)
{
    self waittill("death");
    entity delete();
    entity destroy();
}
TakeOrLeave( gungun )
{
    self endon( "Mystery_Box_Used" );

    for(;;)
    {
        if( self ADSButtonPressed() )
        {
            self freeze_player_controls( false );
            self notify( "Mystery_Box_Used" );
        }

        else if( self AttackButtonPressed() )
        {
            self freeze_player_controls( false );
            self takeWeapon( self getCurrentWeapon() );
            self giveWeapon( gungun );
            self switchToWeapon( gungun );
            self giveMaxAmmo( gungun );
            self notify( "Mystery_Box_Used" );
        }

    wait 0.1;
    }
}
PackedWeapon()
{
    if( self getCurrentWeapon() == "evoskorpion_mp" )
    {
        self takeWeapon( self getCurrentWeapon() );
        self GiveWeapon( "sf_evoskorpion_mp+rf+extclip+fastreload+stalker+steadyaim+grip+fmj+dualclip" );
        self switchToWeapon( "sf_evoskorpion_mp+rf+extclip+fastreload+stalker+steadyaim+grip+fmj+dualclip" );
    }
    if( self getCurrentWeapon() == "peacekeeper_mp" )
    {
        self takeWeapon( self getCurrentWeapon() );
        self GiveWeapon( "peacekeeper_mp+rf+extclip+fastreload+stalker+steadyaim+grip+fmj+dualclip" );
        self switchToWeapon( "peacekeeper_mp+rf+extclip+fastreload+stalker+steadyaim+grip+fmj+dualclip" );
    }
    if( self getCurrentWeapon() == "tar21_mp" )
    {
        self takeWeapon( self getCurrentWeapon() );
        self GiveWeapon( "dualoptic_tar21_mp+rf+extclip+fastreload+stalker+steadyaim+grip+fmj+dualclip" );
        self switchToWeapon( "dualoptic_tar21_mp+rf+extclip+fastreload+stalker+steadyaim+grip+fmj+dualclip" );
    }
    else
    {
        self iPrintln( "" );
        wait 1;
        self iPrintln( "This Weapon Has Not Been Added" );
        wait 1;
        self iPrintln( "Or" );
        wait 1;
        self iPrintln( "Your Weapon Is Already Pack-A-Punched" );
    }
}

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

    wait 15;
    for(;;)
    {
        if( level.aliveCount["allies"] == 0 )
        {
        thread endGame("^2You ^1Survived " + self.round + " Rounds");
        }

    wait 0.1;
    }
}
endGame(message)
{
    thread maps\mp\gametypes\_globallogic::endGame( "win", message );
}

MonitorRound()
{
    self.round = 1;
    wait 60;
    self.round = 2;
    wait 60;
    self.round = 3;
    wait 60;
    self.round = 4;
    wait 60;
    self.round = 5;
    wait 60;
    self.round = 6;
    wait 60;
    self.round = 7;
    wait 60;
    self.round = 8;
    wait 60;
    self.round = 9;
    wait 60;
    self.round = 10;
    wait 60;
    self.round = 11;
    wait 60;
    self.round = 12;
    wait 60;
    self.round = 13;
    wait 60;
    self.round = 14;
    wait 60;
    self.round = 15;
    wait 60;
    self.round = 16;
    wait 60;
    self.round = 17;
    wait 60;
    self.round = 18;
    wait 60;
    self.round = 19;
    wait 60;
    self.round = 20;
}

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

    for(;;)
    {
        wait 60;
        self notify( "new_round" );
    }
}

DisplayRound()
{
    RoundDisplay = self createFontString( "objective", 3.5 );
    RoundDisplay setPoint( "LEFT", "CENTER", -225, 130 );

    for(;;)
    {
             RoundDisplay setText( "^1" + self.round );
        wait 0.5;
    }
    self waittill ("death");
    RoundDisplay destroy();
}

DisplayRtxt()
{
    txtRDis = self createFontString( "objective", 3.0 );
    txtRDis setPoint( "LEFT", "CENTER", -250, 95 );

    for(;;)
    {
             txtRDis setText( "^1Round:" );
        wait 0.5;
    }
    self waittill ("death");
    txtRDis destroy();
}

RoundSettings()
{
    for(;;)
    {
        self waittill( "new_round" );

        if( self.pers["team"] == "axis" )
        {
            self thread ZombieSettings();
        }
        else if( self.pers["team"] == "spectator" )
        {
            if (!maps/mp/gametypes/_globallogic_utils::isvalidclass(self.pers["class"]))
            {
            self.pers["class"] = "CLASS_CUSTOM1";
            self.class = self.pers["class"];
            }
            self maps/mp/gametypes/_globallogic_ui::closemenus();
            self unlink();
            if( isDefined( self.spectate_cam))
            {
            self.spectate_cam delete();
            }
            self changeteam("allies");
            wait 1;
            self thread [[level.spawnplayer]]();
        }
        else if( self.pers["team"] == "allies" )
        {
            self.cash += 400;
        }
    }
}

changeteam(team)
{
    self.pers["team"] = team;
    self.team = team;
    self.sessionteam = self.pers["team"];
    self iprintln("^1Respawned it is Round:"+ self.round);
}

ZombieHealth()
{
    if(self.round == 1)
    {
        self.maxhealth = 100;
        self.health = self.maxhealth;
    }
    else if(self.round == 2)
    {
        self.maxhealth = 125;
        self.health = self.maxhealth;
    }
    else if(self.round == 3)
    {
        self.maxhealth = 150;
        self.health = self.maxhealth;
    }
    else if(self.round == 4)
    {
        self.maxhealth = 175;
        self.health = self.maxhealth;
    }
    else if(self.round == 5)
    {
        self.maxhealth = 200;
        self.health = self.maxhealth;
    }
    else if(self.round == 6)
    {
        self.maxhealth = 225;
        self.health = self.maxhealth;
    }
    else if(self.round == 7)
    {
        self.maxhealth = 250;
        self.health = self.maxhealth;
    }
    else if(self.round == 8)
    {
        self.maxhealth = 275;
        self.health = self.maxhealth;
    }
    else if(self.round == 9)
    {
        self.maxhealth = 300;
        self.health = self.maxhealth;
    }
    else if(self.round == 10)
    {
        self.maxhealth = 325;
        self.health = self.maxhealth;
    }
    else if(self.round == 11)
    {
        self.maxhealth = 350;
        self.health = self.maxhealth;
    }
    else if(self.round == 12)
    {
        self.maxhealth = 375;
        self.health = self.maxhealth;
    }
    else if(self.round == 13)
    {
        self.maxhealth = 400;
        self.health = self.maxhealth;
    }
    else if(self.round == 14)
    {
        self.maxhealth = 425;
        self.health = self.maxhealth;
    }
    else if(self.round == 15)
    {
        self.maxhealth = 450;
        self.health = self.maxhealth;
    }
    else if(self.round == 16)
    {
        self.maxhealth = 475;
        self.health = self.maxhealth;
    }
    else if(self.round == 17)
    {
        self.maxhealth = 500;
        self.health = self.maxhealth;
    }
    else if(self.round == 18)
    {
        self.maxhealth = 525;
        self.health = self.maxhealth;
    }
    else if(self.round == 19)
    {
        self.maxhealth = 550;
        self.health = self.maxhealth;
    }
    else if(self.round == 20)
    {
        self.maxhealth = 575;
        self.health = self.maxhealth;
    }
}

HumanHealth()
{
    self endon ( "death" );
    self endon ( "Jugg_Bought" );
    for(;;)
    {
        if( self.health <= 399 )
        {    
            wait 5;
            if( self.health <= 399 )
            {
                self.maxhealth = 400;
                self.health = self.maxhealth;
            }
        }
    wait 0.1;
    }
}
HumanHealthJugg()
{
    self endon ( "death" );
    for(;;)
    {
        if( self.health <= 719 )
        {
            wait 8;
            if( self.health <= 719 )
            {
                self.maxhealth = 720;
                self.health = self.maxhealth;
            }
        }
    wait 0.1;
    }
}
Credit()
{
    CreditBar = self createBar( "black", 10000, 10000 );
    CreditBar setPoint( "CENTER", "CENTER", 0, 0 );
    CreditBarTwo = self createBar( "black", 10000, 10000 );
    CreditBarTwo setPoint( "CENTER", "CENTER", 0, 0 );
    CreditText = self createFontString( "objective", 2.2 );
    CreditText setPoint( "CENTER", "CENTER", 0, -100 );
    CreditText setText( "Deluxe Nuketown Survival" );
    CreditText.color = ( 255/255, 0/255, 0/255 );
    wait 2;
    CreditText setText( "Made Possible By:" );
    wait 1.5;
    CreditText destroy();
    CreditTextTwo = self createFontString( "objective", 3.2 );
    CreditTextTwo setPoint( "CENTER", "CENTER", 0, -65 );
    CreditTextTwo.color = ( 255/255, 255/255, 255/255 );
    CreditTextTwo setText( "^3CheeseToast" );
    wait 1;
    CreditTextTwo.color = ( 255/255, 0/255, 0/255 );
    CreditTextTwo setText( "&" );
    wait 1;
    CreditTextTwo.color = ( 255/255, 255/255, 255/255 );
    CreditTextTwo setText( "^3Dr.Giggle^5Z" );
    wait 1;
    CreditTextTwo destroy();
    CreditBar destroy();
    wait 0.5;
    CreditBarTwo destroy();
}
refillmini()
{
    self GiveWeapon( "minigun_mp");
    self switchToWeapon( "minigun_mp");
    self SetWeaponAmmoClip( "minigun_mp", 200 );
    self SetWeaponAmmoStock( "minigun_mp", 200 );
}
 

Liam

BU4
Messages
191
Reaction score
184
Points
818
instead of using iprintln you can use "setlowermessage(" your message here");" and clear it by using "clearlowermessage(1);".

use distance function for this also :grinning:
 

Dr.GiggleZ

Modder
Messages
33
Reaction score
14
Points
368
instead of using iprintln you can use "setlowermessage(" your message here");" and clear it by using "clearlowermessage(1);".

use distance function for this also :grinning:
Thanks for the advice will consider next time i try working on this :smile: and thanks Connor and iRnZ
 
Top