Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

ReuSundefined

ReuS

@ReuS
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
1
Following
1

Posts

Recent Best Controversial

  • Buried - Disable Timebomb to prevent Timebomb Glitch
    ReuSundefined ReuS

    I'm reviving this old thread, but if you want to disable points duplication while still allowing the timebomb (for EE or regular use), you can use this code, which simply disables points duping. 🙂
    in scripts/zm/zm_buried:

    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\zombies\_zm_utility;
    #include maps\mp\gametypes_zm\_hud_util;
    #include maps\mp\zombies\_zm_weapons;
    #include maps\mp\_visionset_mgr;
    #include maps\mp\zombies\_zm_audio;
    #include maps\mp\zombies\_zm_blockers;
    #include maps\mp\zombies\_zm_laststand;
    #include maps\mp\zombies\_zm_weapon_locker;
    #include maps\mp\zombies\_zm_magicbox;
    #include maps\mp\zombies\_zm_perks;
    #include maps\mp\zombies\_zm_score;
    #include maps\mp\zombies\_zm_stats;
    #include maps\mp\zombies\_zm_equipment;
    #include maps\mp\zombies\_zm;
    #include maps\mp\zombies\_zm_spawner;
    #include maps\mp\animscripts\zm_death;
    #include maps\mp\zombies\_zm_ai_basic;
    
    
    main(){
            replaceFunc(maps\mp\zombies\_zm_weap_time_bomb::_time_bomb_restores_player_data_internal, ::_time_bomb_restores_player_data_internal_override);
    }
    
    _time_bomb_restores_player_data_internal_override( save_struct )
    {
        self endon( "death" );
        self endon( "disconnect" );
    
        if ( self maps\mp\zombies\_zm_laststand::player_is_in_laststand() )
        {
            debug_time_bomb_print( "TIMEBOMB >> " + self.name + " in last stand, reviving..." );
            self maps\mp\zombies\_zm_laststand::auto_revive( self );
        }
        else if ( isdefined( self.sessionstate ) && self.sessionstate == "spectator" )
        {
            self [[ level.spawnplayer ]]();
            self thread refresh_player_navcard_hud();
        }
    
        if ( isdefined( self.is_drinking ) && self.is_drinking )
        {
            if ( self has_packapunch_weapon() )
                self.is_drinking++;
    
            self thread maps\mp\zombies\_zm_perks::perk_abort_drinking( 0.1 );
        }
    
        if ( self can_time_bomb_restore_data_on_player( save_struct ) )
        {
            debug_time_bomb_print( "TIMEBOMB >> restoring player " + self.name );
    
            if ( !isdefined( self.time_bomb_save_data ) && !isdefined( save_struct ) )
                self.time_bomb_save_data = spawnstruct();
    
            if ( !isdefined( save_struct ) )
                s_temp = self.time_bomb_save_data;
            else
                s_temp = save_struct.player_saves[self getentitynumber()];
    
            self setorigin( s_temp.player_origin );
            self setplayerangles( s_temp.player_angles );
            self setstance( s_temp.player_stance );
            self thread _restore_player_perks_and_weapons( s_temp );
            n_difference_in_score = s_temp.points_current - self.score;
    
    
            // Comment here to avoid points duplication
            
            // if ( n_difference_in_score > 0 )
            //     self maps\mp\zombies\_zm_score::add_to_player_score( n_difference_in_score );
            // else
            //     self maps\mp\zombies\_zm_score::minus_to_player_score( abs( n_difference_in_score ) );
    
            if ( is_weapon_locker_available_in_game() )
            {
                if ( isdefined( s_temp.weapon_locker_data ) )
                    self maps\mp\zombies\_zm_weapon_locker::wl_set_stored_weapondata( s_temp.weapon_locker_data );
                else
                    self maps\mp\zombies\_zm_weapon_locker::wl_clear_stored_weapondata();
            }
    
            if ( isdefined( s_temp.account_value ) && isdefined( level.banking_map ) )
            {
                self.account_value = s_temp.account_value;
                self maps\mp\zombies\_zm_stats::set_map_stat( "depositBox", self.account_value, level.banking_map );
            }
    
            s_temp.save_ready = 1;
    
            if ( !isdefined( save_struct ) )
                self.time_bomb_save_data = s_temp;
    
            self ent_flag_wait( "time_bomb_restore_thread_done" );
        }
        else
        {
            debug_time_bomb_print( "TIMEBOMB >> restoring player " + self.name + " FAILED. No matching save detected" );
            self restore_player_to_initial_loadout();
        }
    
        self _give_revive_points( s_temp );
    }
    
    BO2 Server Hosting Support
  • 1 / 1
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate