Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse

Plutonium

NoahOWundefined

NoahOW

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

Posts

Recent Best Controversial

  • Updated pause script for BO2 zm
    NoahOWundefined NoahOW

    pause_system.gsc

    #include scripts\zm\pause_system;
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes_zm\_hud_util;
    #include maps\mp\zombies\_zm_utility;
    
    watchchatpause()
    {
        level endon("end_game");
        self endon("disconnect");
        
        for(;;)
        {
            level waittill("say", message, player);
            message = toLower(message);
    
            if (message == "p" && player == self)
            {
                self freezeControls(true);
                self.ignoreme = 1;
                
                zombies = getAiSpeciesArray("axis", "all"); 
                if (isDefined(zombies))
                {
                    foreach(zombie in zombies)
                    {
                        if (isDefined(zombie) && isAlive(zombie))
                        {
                            // Create an invisible anchor point at the zombie's feet
                            zombie.pauser_anchor = spawn("script_origin", zombie.origin);
                            zombie.pauser_anchor.angles = zombie.angles;
                            
                            // Physically link the zombie to the stationary point
                            zombie linkto(zombie.pauser_anchor);
                            
                            // Disable their attack/AI processing
                            zombie.ignoreall = 1; 
                            if(isDefined(zombie.zombie_move_speed))
                            {
                                zombie.old_speed = zombie.zombie_move_speed;
                                zombie.zombie_move_speed = "stop";
                            }
                        }
                    }
                }
    
                // HUD
                if(isDefined(level.pause_hud)) level.pause_hud destroy();
                level.pause_hud = createServerFontString("default", 2.0);
                level.pause_hud setPoint("CENTER", "CENTER", 0, 0);
                level.pause_hud setText("GAME PAUSED: Type 'u' to resume");
    
                while(1)
                {
                    level waittill("say", m, p);
                    if(toLower(m) == "u" && p == self) break;
                    wait 0.1;
                }
    
                // --- Unfreeze ---
                zombies = getAiSpeciesArray("axis", "all");
                foreach(zombie in zombies)
                {
                    if (isDefined(zombie) && isAlive(zombie))
                    {
                        zombie unlink();
                        if(isDefined(zombie.pauser_anchor))
                            zombie.pauser_anchor delete();
                        
                        zombie.ignoreall = 0;
                        if(isDefined(zombie.old_speed))
                            zombie.zombie_move_speed = zombie.old_speed;
                    }
                }
    
                if(isDefined(level.pause_hud)) level.pause_hud destroy();
                self freezeControls(false);
                self.ignoreme = 0;
            }
            wait 0.1;
        }
    }
    

    zm_mod.gsc

    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes_zm\_hud_util;
    #include maps\mp\zombies\_zm_utility;
    
    init()
    {
        level thread onPlayerConnect();
    }
    
    onPlayerConnect()
    {
        for(;;)
        {
            level waittill("connected", player);
            player thread onPlayerSpawned();
        }
    }
    
    onPlayerSpawned()
    {
        self endon("disconnect");
        for(;;)
        {
            self waittill("spawned_player");
            self thread watchchatpause(); // This starts your script!
        }
    }
    

    you must include both into \AppData\Local\Plutonium\storage\t6\raw\scripts\zm
    enjoy 🙂
    all you have to do is type p in chat and it pauses the game and to unpause type u.
    source gemini

    BO2 Modding Support & Discussion
  • 1 / 1
  • Login

  • Don't have an account? Register

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