



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!checkForAllDead()
{
players = get_players();
count = 0;
for( i = 0; i < players.size; i++ )
{
if( !(players[i] maps\_laststand::player_is_in_laststand()) && !(players[i].sessionstate == "spectator") )
{
count++;
}
}
if( count==0 )
{
zombs = getaispeciesarray("axis");
for(i=0;i<zombs.size;i++)
{
zombs[i] delete(); //removes all currently spawned in zombies
}
//maps\_zombiemode_powerups::powerup_round_start(); //restarts the amount of powerups you can earn this round
//array_thread( players, maps\_zombiemode_blockers_new::rebuild_barrier_reward_reset ); //restarts your barrier points this round
level thread round_restart();
players = get_players();
for(i=0;i<players.size;i++)
{
players[i] thread spectator_respawn();
players[i] [[level.spawnPlayer]]();
while(1)
{
if(players[i] hasWeapon("m1911_zm"))
{
//iprintln("Found the weapon");
wait_network_frame();
players[i] laststand_giveback_player_weapons();
if( isDefined( players[i].has_altmelee ) && players[i].has_altmelee )
{
players[i] SetPerk( "specialty_altmelee" );
}
level thread award_grenades_for_survivors(); //get 2 extra grenades when you spawn back in, optional
break;
}
wait(0.05);
}
}
iprintlnbold("You have been given another chance"); //message letting you know the round restarted, optional
}
}
laststand_giveback_player_weapons()
{
ASSERTEX( IsDefined( self.weaponInventory ), "player.weaponInventory is not defined - did you run laststand_take_player_weapons() first?" );
self TakeAllWeapons();
for( i = 0; i < self.weaponInventory.size; i++ )
{
weapon = self.weaponInventory[i];
switch( weapon )
{
// this player was killed while reviving another player
case "syrette":
// player was killed drinking perks-a-cola
case "zombie_perk_bottle_doubletap":
case "zombie_perk_bottle_revive":
case "zombie_perk_bottle_jugg":
case "zombie_perk_bottle_sleight":
case "zombie_bowie_flourish":
case "zombie_knuckle_crack":
continue;
}
self GiveWeapon( weapon );
self SetWeaponAmmoClip( weapon, self.weaponAmmo[weapon]["clip"] );
if ( WeaponType( weapon ) != "grenade" )
self SetWeaponAmmoStock( weapon, self.weaponAmmo[weapon]["stock"] );
}
// if we can't figure out what the last active weapon was, try to switch a primary weapon
//CHRIS_P: - don't try to give the player back the mortar_round weapon ( this is if the player killed himself with a mortar round)
if( self.lastActiveWeapon != "none" && self.lastActiveWeapon != "mortar_round" && self.lastActiveWeapon != "mine_bouncing_betty" )
{
self SwitchToWeapon( self.lastActiveWeapon );
}
else
{
primaryWeapons = self GetWeaponsListPrimaries();
if( IsDefined( primaryWeapons ) && primaryWeapons.size > 0 )
{
self SwitchToWeapon( primaryWeapons[0] );
}
}
}
PlayerLastStand( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration )
{
if( GetDvar( #"zombiemode" ) != "1" && sMeansOfDeath == "MOD_CRUSH" )
{
if( self player_is_in_laststand() )
{
self mission_failed_during_laststand( self );
}
return;
}
if( self player_is_in_laststand() )
{
return;
}
self.downs++;
self.stats["downs"] = self.downs;
dvarName = "player" + self GetEntityNumber() + "downs";
setdvar( dvarName, self.downs );
self AllowJump(false);
if( IsDefined( level.playerlaststand_func ) )
{
[[level.playerlaststand_func]]( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration );
}
if ( !laststand_allowed( sWeapon, sMeansOfDeath, sHitLoc ) )
{
self mission_failed_during_laststand( self );
return;
}
if ( player_all_players_in_laststand() )
{
self mission_failed_during_laststand( self );
return;
}
if ( GetDvar( #"zombiemode" ) == "1" )
{
self VisionSetLastStand( "zombie_last_stand", 1 );
}
else
{
self VisionSetLastStand( "laststand", 1 );
}
self.health = 1;
self thread laststand_bleedout( GetDvarFloat( #"player_lastStandBleedoutTime" ) );
self notify( "player_downed" );
self revive_trigger_spawn();
self laststand_take_player_weapons();
wait(0.05);
self laststand_disable_player_weapons();
//self laststand_give_pistol();
self.ignoreme = true;
}
laststand_take_player_weapons()
{
self.weaponInventory = self GetWeaponsList();
self.lastActiveWeapon = self GetCurrentWeapon();
self.laststandpistol = undefined;
//ASSERTEX( self.lastActiveWeapon != "none", "Last active weapon is 'none,' an unexpected result." );
self.weaponAmmo = [];
for( i = 0; i < self.weaponInventory.size; i++ )
{
weapon = self.weaponInventory[i];
if ( WeaponClass( weapon ) == "pistol" && !IsDefined( self.laststandpistol ) )
{
self.laststandpistol = weapon;
}
switch( weapon )
{
// this player was killed while reviving another player
case "syrette":
// player was killed drinking perks-a-cola
case "zombie_perk_bottle_doubletap":
case "zombie_perk_bottle_revive":
case "zombie_perk_bottle_jugg":
case "zombie_perk_bottle_sleight":
case "zombie_bowie_flourish":
case "zombie_knuckle_crack":
self.lastActiveWeapon = "none";
continue;
}
self.weaponAmmo[weapon]["clip"] = self GetWeaponAmmoClip( weapon );
self.weaponAmmo[weapon]["stock"] = self GetWeaponAmmoStock( weapon );
}
self TakeAllWeapons();
if ( !IsDefined( self.laststandpistol ) )
{
self.laststandpistol = level.laststandpistol;
}
}
level.allPlayersWeapons = [['ak47', 'bazooka', 'minigun'], ['M1911', 'RPG'], ['Olympia', 'M14', 'M16'], ['B23R', 'UZI']]; // I know you cant make arrays this way in gsc syntax but its just for simplicity purposes
players = getPlayers();
for(i = 0; i < players.size; i++) {
for(j = 0; j < allPlayersWeapons[i].size; j++) {
players[i] giveWeapon(allPlayersWeapons[i][j]);
}
}