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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. A Simple Pause Script for BO2 Zombies

A Simple Pause Script for BO2 Zombies

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
20 Posts 14 Posters 4.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Killerbroundefined Offline
    Killerbroundefined Offline
    Killerbro
    wrote on last edited by
    #7

    I found a couple bugs that occurred when "p" was entered again in chat before a "u" was sent. Occasionally it crashed my pluto and other times it just left the "Game Paused" in the middle of my screen.

    I changed the script slightly to avoid this issue for anybody who is like me and too dumb to not put "p" in twice before "u." Once the "p" is sent it will only trigger again once "u" is sent.

    watchchatpause()
    {
    
        level endon("end_game");
    	self endon("disconnect");
        for(;;)
        {
    
        	level waittill("say", message, player);
    
        	if (message == "p")
        	{
        
        		self EnableInvulnerability();
        		self iprintln("Game Paused ");
        		self.ignoreme = 1;
        		self freezeControls(true);
        		level.gamestate = createServerFontString("hudsmall" , 31);
        		level.gamestate setPoint("CENTER", "TOP", "CENTER", 190);
        		level.gamestate setText("Game Paused");
        		level waittill("say", message1, player);
        		chatPauseFix(message1);
       		}
       		wait 0.05; 
    	}
    }
    
    chatPauseFix(m)
    {
    	if(m == "u")
        {
        	self iprintln("Game UnPaused ");
        	self freezeControls(false);
        	level.gamestate destroy();
        	self DisableInvulnerability();
        	self.ignoreme = 0;
        }
        else
        {
        	level waittill("say", chat, player);
        	chatPauseFix(chat);
        }
    }
    

    As far as I know this won't cause any bugs but who knows at this point.

    1 Reply Last reply
    0
    • potatossssundefined Offline
      potatossssundefined Offline
      potatossss
      replied to hima_simple on last edited by
      #8

      hima_simple can someone tell me how to get this running

      1 Reply Last reply
      0
      • MufaDOOMundefined Offline
        MufaDOOMundefined Offline
        MufaDOOM
        replied to hima_simple on last edited by
        #9

        hima_simple I found a way to freeze zombies (in this test i'm solo but it's work in coop too)

        link to the video : https://mega.nz/file/4Fhk0ZDY#lawaw7K-HzPZKn_UegCiGkIOj0V9necoSHETg7Jg-y4

        1 Reply Last reply
        0
        • Ch00chinat0rundefined Offline
          Ch00chinat0rundefined Offline
          Ch00chinat0r
          replied to hima_simple on last edited by
          #10

          hima_simple I threw the code into a text editor. Then compiled it to GSC. Threw it in .../local/plutonium/storage/t6/scripts/zm

          But when I run the server I get this error. Any ideas on how I can implement this into my self-hosted server?

          **** 2 script error(s):
          **** Unresolved external : "createserverfontstring" with 2 parameters in "chatpause" at line 1 ****
          **** Unresolved external : "setpoint" with 4 parameters in "chatpause" at line 1 ****

          Ekko420undefined 1 Reply Last reply
          2
          • Ekko420undefined Offline
            Ekko420undefined Offline
            Ekko420
            replied to Ch00chinat0r on last edited by
            #11
            This post is deleted!
            Ch00chinat0rundefined 1 Reply Last reply
            0
            • Ch00chinat0rundefined Offline
              Ch00chinat0rundefined Offline
              Ch00chinat0r
              replied to Ekko420 on last edited by
              #12

              Ekko420 Unfortunately not

              chicken emojiundefined 1 Reply Last reply
              0
              • chicken emojiundefined Offline
                chicken emojiundefined Offline
                chicken emoji
                replied to Ch00chinat0r on last edited by chicken emoji
                #13

                Ch00chinat0r add this line at the very top and try again

                #include maps/mp/gametypes_zm/_hud_util;

                Ch00chinat0rundefined Danman360undefined 2 Replies Last reply
                0
                • Ch00chinat0rundefined Offline
                  Ch00chinat0rundefined Offline
                  Ch00chinat0r
                  replied to chicken emoji on last edited by
                  #14

                  chicken emoji Thanks! That did fix the error! However typing "p" in chat isn't pausing the game in any way still..

                  chicken emojiundefined 1 Reply Last reply
                  0
                  • chicken emojiundefined Offline
                    chicken emojiundefined Offline
                    chicken emoji
                    replied to Ch00chinat0r on last edited by
                    #15

                    Ch00chinat0r thats because there is no main or init function so basically the mod doesnt do anything

                    Ch00chinat0rundefined 1 Reply Last reply
                    0
                    • Ch00chinat0rundefined Offline
                      Ch00chinat0rundefined Offline
                      Ch00chinat0r
                      replied to chicken emoji on last edited by
                      #16

                      chicken emoji Ahh gotcha.. this is beyond my knowledge.. Thanks for the replies

                      chicken emojiundefined 1 Reply Last reply
                      0
                      • chicken emojiundefined Offline
                        chicken emojiundefined Offline
                        chicken emoji
                        replied to Ch00chinat0r on last edited by
                        #17
                        This post is deleted!
                        1 Reply Last reply
                        0
                        • Samsundefined Offline
                          Samsundefined Offline
                          Sams
                          wrote on last edited by
                          #18

                          how do I download this script??

                          1 Reply Last reply
                          0
                          • Danman360undefined Offline
                            Danman360undefined Offline
                            Danman360
                            replied to chicken emoji on last edited by
                            #19
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • zzzslundefined Offline
                              zzzslundefined Offline
                              zzzsl
                              wrote on last edited by
                              #20

                              idk how 2 do this heres what i have

                              pause_system.gsc

                              #include maps\mp\gametypes_zm\_hud_util;
                              
                              watchchatpause()
                              {
                                  level endon("end_game");
                                  self endon("disconnect");
                              
                                  for (;;)
                                  {
                                      level waittill("say", message, player);
                              
                                      if (message == "p")
                                      {
                                          self EnableInvulnerability();
                                          self iprintln("Game Paused");
                                          self.ignoreme = 1;
                                          self freezeControls(true);
                              
                                          level.gamestate = createServerFontString("hudsmall", 31);
                                          level.gamestate setPoint("CENTER", "TOP", "CENTER", 190);
                                          level.gamestate setText("Game Paused");
                              
                                          level waittill("say", message1, player);
                                          chatPauseFix(message1);
                                      }
                                      wait 0.05;
                                  }
                              }
                              
                              chatPauseFix(m)
                              {
                                  if (m == "u")
                                  {
                                      self iprintln("Game UnPaused");
                                      self freezeControls(false);
                                      level.gamestate destroy();
                                      self DisableInvulnerability();
                                      self.ignoreme = 0;
                                  }
                                  else
                                  {
                                      level waittill("say", chat, player);
                                      chatPauseFix(chat);
                                  }
                              }
                              
                              

                              zm_mod.gsc

                              #include scripts\zm\pause_system;
                              
                              init()
                              {
                                  level thread watchchatpause();
                              }
                              
                              main()
                              {
                                  init(); 
                              }
                              
                              

                              how i fix pls

                              1 Reply Last reply
                              0

                              • Login

                              • Don't have an account? Register

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