





Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!//read comments for helpful tips
//Spawns players with a random weapon each game for one in the chamber
#using scripts\shared\array_shared;
#using scripts\shared\util_shared;
#using scripts\shared\callbacks_shared;
#using scripts\codescripts\struct;
function main()
{
thread no_weapons();
callback::on_spawned(&oic_start);
}
function no_weapons() //this function disables wall buys. You have to disable magic box and pack a punch separately.
{
level.func_override_wallbuy_prompt = ¬hing_func;
}
function nothing_func()
{
self.stub.hint_string = "";
self.stub.cursor_hint = "HINT_NOICON";
}
function onPlayerDisconnect()
{
self waittill( "disconnect" );
}
function oic_start()
{
self thread onPlayerDisconnect();
self endon("death");
self endon("disconnect");
wait 0.05;
self give_oic_weapon();
self thread kill_watcher();
}
function give_oic_weapon()
{
self endon("death");
self endon("disconnect");
wait 0.05;
weapons = []; //weapons array, follow the pattern to add more weapon options
weapons[0] = "sniper_powerbolt";
weapons[1] = "shotgun_precision";
weapons[2] = "launcher_standard";
weapons[3] = "sniper_fastsemi";
weapons[4] = "sniper_fastbolt";
oic_weap = weapons[randomIntRange(0,5)]; //set the 2nd number to 1 higher than the last number in your weapons array
self TakeAllWeapons();
weap = getweapon(oic_weap);
self giveweapon(weap);
self setWeaponAmmoClip(weap, 1);
self setWeaponAmmoStock(weap, 0);
self switchToWeapon(weap);
stabby = GetWeapon( "knife" );
self GiveWeapon( stabby );
}
function kill_watcher()
{
self endon("death");
self endon("disconnect");
while(IsAlive(self))
{
self waittill("zom_kill");
weapon = self getcurrentweapon();
ammo_clip = self getWeaponAmmoClip(weapon);
self setWeaponAmmoClip(weapon, ammo_clip + 1);
self setWeaponAmmoStock(weapon, 0); //this part stops there from ever being more ammo than what is in the magazine aka no stock ammo, only clip ammo
}
}
players[i] GiveMaxAmmo( primary_weapons[x] );
players[i] SetWeaponAmmoClip( primary_weapons[x], 125 );
if ( players[i] HasWeapon( primary_weapons[x] ) )
//players[i] GiveMaxAmmo( primary_weapons[x] );
players[i] SetWeaponAmmoClip( primary_weapons[x], 125 );
if ( zm_utility::is_Classic() )
//if ( zm_utility::is_Classic() )
//{
//level.chests = struct::get_array( "treasure_chest_use", "targetname" );
//treasure_chest_init( level.start_chest_name );
//}
#using scripts\zm\one_in_the_chamber;
function grab_fire_sale( player )
function grab_fire_sale( player )
{
players = getplayers();
foreach (player in players)
{
player one_in_the_chamber::give_oic_weapon();
wait 0.5;
player thread more_ammo();
}
//level thread start_fire_sale( self );
//player thread zm_powerups::powerup_vo("firesale");
}
function more_ammo() //gives the player full ammo for new gun
{
weapon = self getcurrentweapon();
ammo_clip = self getWeaponAmmoClip(weapon);
self setWeaponAmmoClip(weapon, ammo_clip + 125);
self setWeaponAmmoStock(weapon, 0);
}
function grab_minigun( player )
function grab_minigun( player )
{
level thread give_bullets( player );
//level thread minigun_weapon_powerup( player );
player thread zm_powerups::powerup_vo( "minigun" );
if( IsDefined( level._grab_minigun ) )
{
level thread [[ level._grab_minigun ]]( player );
}
}
function give_bullets( ent_player )
{
weapon = ent_player getcurrentweapon();
ammo_clip = ent_player getWeaponAmmoClip(weapon);
ent_player setWeaponAmmoClip(weapon, ammo_clip + 5); //change to amount of bullets you want to give
ent_player setWeaponAmmoStock(weapon, 0);
}
use_trigger
//one in the chamber
#using scripts\zm\one_in_the_chamber;
one_in_the_chamber::main();