Skip to content
  • 0 Unread 0
  • 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 11.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • hima_simple hima_simple

    Hello ,I have been looking around for a script or something to pause a game , it doesn't really pause the game but if anyone wants to go AFK no they can and that was one of my main goals.

    How to Use

    • open chat by pressing 'T'

    • Type 'p' and press Enter.

    • Type 'u' to unpause.

    How it works

    • Makes Player invisible to zombies.

    • Gives play Invariability so no damaged is caused.

    • Freezes player in place so No one uses the pause in a bad/spam way [to keep the game clean].

    GSC Code

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

    Screen Shot
    558d9580-71c2-4537-b591-8b2b1932ac73-image.png https://ibb.co/FwyMD3Q)

    Future Goals

    • Full Game Pause for all Player

    • Try to freeze zombies in there places / freeze zombie spawn

    • Better GUI / Shortcut for game pause like a press of a button

    thats hope this was useful and thank you ❤

    Ch00chinat0r Offline
    Ch00chinat0r Offline
    Ch00chinat0r
    wrote 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 ****

    Ekko420 1 Reply Last reply
    3
    • Ch00chinat0r Ch00chinat0r

      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 ****

      Ekko420 Offline
      Ekko420 Offline
      Ekko420
      wrote on last edited by
      #11
      This post is deleted!
      Ch00chinat0r 1 Reply Last reply
      0
      • Ekko420 Ekko420

        This post is deleted!

        Ch00chinat0r Offline
        Ch00chinat0r Offline
        Ch00chinat0r
        wrote on last edited by
        #12

        Ekko420 Unfortunately not

        chicken emoji 1 Reply Last reply
        0
        • Ch00chinat0r Ch00chinat0r

          Ekko420 Unfortunately not

          chicken emoji Offline
          chicken emoji Offline
          chicken emoji
          wrote 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;

          Ch00chinat0r Danman360 2 Replies Last reply
          0
          • chicken emoji chicken emoji

            Ch00chinat0r add this line at the very top and try again

            #include maps/mp/gametypes_zm/_hud_util;

            Ch00chinat0r Offline
            Ch00chinat0r Offline
            Ch00chinat0r
            wrote 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 emoji 1 Reply Last reply
            0
            • Ch00chinat0r Ch00chinat0r

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

              chicken emoji Offline
              chicken emoji Offline
              chicken emoji
              wrote on last edited by
              #15

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

              Ch00chinat0r 1 Reply Last reply
              0
              • chicken emoji chicken emoji

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

                Ch00chinat0r Offline
                Ch00chinat0r Offline
                Ch00chinat0r
                wrote on last edited by
                #16

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

                chicken emoji 1 Reply Last reply
                0
                • Ch00chinat0r Ch00chinat0r

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

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

                    how do I download this script??

                    1 Reply Last reply
                    0
                    • chicken emoji chicken emoji

                      Ch00chinat0r add this line at the very top and try again

                      #include maps/mp/gametypes_zm/_hud_util;

                      Danman360 Offline
                      Danman360 Offline
                      Danman360
                      wrote on last edited by
                      #19
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • zzzsl Offline
                        zzzsl 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
                        2

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

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