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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. [Support] Zombie Counter info

[Support] Zombie Counter info

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
12 Posts 8 Posters 3.0k Views
  • 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.
  • SaintAodhanundefined SaintAodhan

    I am setting up a simple dedicated zombies server to play with my friends on. Everything so far is fine, however I want there to be

    1. unlimited perks
      and
    2. a "zombies left" counter

    I have found a script that allows me to get the unlimited perks; I even know it works becuase every time I load up the server the confirmation message comes up.

    However, for the zombies counter, I have looked everywhere for a good script but I am not sure what I am doing wrong. So far I have just copied the script from here:
    https://cabconmodding.com/threads/zombies-counter-display.149/
    and pasted the code into my .gsc and added the correct import statement. (and also changed the "setSafeText" into "setText")
    The server still loads up, no problem, but the counter simply does not show up at all. I don't know what I am doing wrong. Any help appreciated!

    Cahzundefined Offline
    Cahzundefined Offline
    Cahz
    VIP
    wrote on last edited by Cahz
    #3

    SaintAodhan Here's a modified version of the zombies counter.

    just call this inside of init()

    level thread drawZombiesCounter();
    

    Source

    drawZombiesCounter()
    {
        level.zombiesCounter = createServerFontString("hudsmall" , 1.9);
        level.zombiesCounter setPoint("CENTER", "CENTER", "CENTER", 190);
        while(true)
        {
        	enemies = get_round_enemy_array().size + level.zombie_total;
            if( enemies != 0 )
            	level.zombiesCounter.label = &"Zombies: ^1";
            else
            	level.zombiesCounter.label = &"Zombies: ^6";
            level.zombiesCounter setValue( enemies );
            wait 0.05;
        }
    }
    

    This method uses setValue instead of setText to avoid any sort of overflow errors.

    BOLLOEYUCAundefined Cahzundefined 2 Replies Last reply
    1
    • SaintAodhanundefined Offline
      SaintAodhanundefined Offline
      SaintAodhan
      wrote on last edited by
      #4

      Cahz
      Thanks a bunch, finally worked. Really appreciate it

      1 Reply Last reply
      0
      • Cahzundefined Cahz

        SaintAodhan Here's a modified version of the zombies counter.

        just call this inside of init()

        level thread drawZombiesCounter();
        

        Source

        drawZombiesCounter()
        {
            level.zombiesCounter = createServerFontString("hudsmall" , 1.9);
            level.zombiesCounter setPoint("CENTER", "CENTER", "CENTER", 190);
            while(true)
            {
            	enemies = get_round_enemy_array().size + level.zombie_total;
                if( enemies != 0 )
                	level.zombiesCounter.label = &"Zombies: ^1";
                else
                	level.zombiesCounter.label = &"Zombies: ^6";
                level.zombiesCounter setValue( enemies );
                wait 0.05;
            }
        }
        

        This method uses setValue instead of setText to avoid any sort of overflow errors.

        BOLLOEYUCAundefined Offline
        BOLLOEYUCAundefined Offline
        BOLLOEYUCA
        wrote on last edited by
        #5

        Cahz hey im trying to create a gsc with the code u posted for the zombie cunter but i dont know where to put it it gives me errors everytime i try something different and never works. could i get a little help on how to create the script for the zombie counter?

        1 Reply Last reply
        0
        • Cahzundefined Cahz

          SaintAodhan Here's a modified version of the zombies counter.

          just call this inside of init()

          level thread drawZombiesCounter();
          

          Source

          drawZombiesCounter()
          {
              level.zombiesCounter = createServerFontString("hudsmall" , 1.9);
              level.zombiesCounter setPoint("CENTER", "CENTER", "CENTER", 190);
              while(true)
              {
              	enemies = get_round_enemy_array().size + level.zombie_total;
                  if( enemies != 0 )
                  	level.zombiesCounter.label = &"Zombies: ^1";
                  else
                  	level.zombiesCounter.label = &"Zombies: ^6";
                  level.zombiesCounter setValue( enemies );
                  wait 0.05;
              }
          }
          

          This method uses setValue instead of setText to avoid any sort of overflow errors.

          Cahzundefined Offline
          Cahzundefined Offline
          Cahz
          VIP
          wrote on last edited by Cahz
          #6

          Cahz said in [Support] Zombie Counter info:

          SaintAodhan Here's a modified version of the zombies counter.

          just call this inside of init()

          level thread drawZombiesCounter();
          

          Source

          drawZombiesCounter()
          {
              level.zombiesCounter = createServerFontString("hudsmall" , 1.9);
              level.zombiesCounter setPoint("CENTER", "CENTER", "CENTER", 190);
              while(true)
              {
              	enemies = get_round_enemy_array().size + level.zombie_total;
                  if( enemies != 0 )
                  	level.zombiesCounter.label = &"Zombies: ^1";
                  else
                  	level.zombiesCounter.label = &"Zombies: ^6";
                  level.zombiesCounter setValue( enemies );
                  wait 0.05;
              }
          }
          

          Follow the directions

          Don Mishiundefined 1 Reply Last reply
          1
          • Mr. Androidundefined Mr. Android

            You need to compile the GSC using GSC studio. Check the tutorials on this forum.

            luigistyleundefined Offline
            luigistyleundefined Offline
            luigistyle
            Plutonium Staff
            wrote on last edited by luigistyle
            #7

            @Mr-Android Isn't the official method using the provided compiler on the forum post? Pretty sure GSC Studio is / was heavily discouraged for compiling. I don't know if the program just isn't liked, or if it compiles differently than the provided compiler

            1 Reply Last reply
            0
            • Cahzundefined Cahz

              Cahz said in [Support] Zombie Counter info:

              SaintAodhan Here's a modified version of the zombies counter.

              just call this inside of init()

              level thread drawZombiesCounter();
              

              Source

              drawZombiesCounter()
              {
                  level.zombiesCounter = createServerFontString("hudsmall" , 1.9);
                  level.zombiesCounter setPoint("CENTER", "CENTER", "CENTER", 190);
                  while(true)
                  {
                  	enemies = get_round_enemy_array().size + level.zombie_total;
                      if( enemies != 0 )
                      	level.zombiesCounter.label = &"Zombies: ^1";
                      else
                      	level.zombiesCounter.label = &"Zombies: ^6";
                      level.zombiesCounter setValue( enemies );
                      wait 0.05;
                  }
              }
              

              Follow the directions

              Don Mishiundefined Offline
              Don Mishiundefined Offline
              Don Mishi
              wrote on last edited by
              #8

              Cahz

              #include maps\mp\_utility;
              #include common_scripts\utility;
              #include maps\mp\gametypes_zm\_hud_util;
              #include maps\mp\gametypes_zm\_hud_message;
              
              init()
              {
                  level.perk_purchase_limit = 9;
                  for(;;)
                  {
                      level waittill("connected", player);
                      player thread welcome();
                  }
              
                  level thread drawZombiesCounter();
              }
              
              welcome()
              {
                  self endon("disconnect");
                  self waittill("spawned_player");
                  wait 7;
              	self iprintln("^2" +self.name + "^7 , your perk limit has been removed");
              }
              
              drawZombiesCounter()
              {
                  level.zombiesCounter = createServerFontString("hudsmall" , 1.9);
                  level.zombiesCounter setPoint("CENTER", "CENTER", "CENTER", 190);
                  while(true)
                  {
                  	enemies = get_round_enemy_array().size + level.zombie_total;
                      if( enemies != 0 )
                      	level.zombiesCounter.label = &"Zombies: ^1";
                      else
                      	level.zombiesCounter.label = &"Zombies: ^6";
                      level.zombiesCounter setValue( enemies );
                      wait 0.05;
                  }
              }
              

              2021-04-12 (2).png

              ¿Podrías ayudarme a decir qué es lo que estoy haciendo mal y que me salga ese error? 😞

              Cahzundefined 1 Reply Last reply
              0
              • Don Mishiundefined Don Mishi

                Cahz

                #include maps\mp\_utility;
                #include common_scripts\utility;
                #include maps\mp\gametypes_zm\_hud_util;
                #include maps\mp\gametypes_zm\_hud_message;
                
                init()
                {
                    level.perk_purchase_limit = 9;
                    for(;;)
                    {
                        level waittill("connected", player);
                        player thread welcome();
                    }
                
                    level thread drawZombiesCounter();
                }
                
                welcome()
                {
                    self endon("disconnect");
                    self waittill("spawned_player");
                    wait 7;
                	self iprintln("^2" +self.name + "^7 , your perk limit has been removed");
                }
                
                drawZombiesCounter()
                {
                    level.zombiesCounter = createServerFontString("hudsmall" , 1.9);
                    level.zombiesCounter setPoint("CENTER", "CENTER", "CENTER", 190);
                    while(true)
                    {
                    	enemies = get_round_enemy_array().size + level.zombie_total;
                        if( enemies != 0 )
                        	level.zombiesCounter.label = &"Zombies: ^1";
                        else
                        	level.zombiesCounter.label = &"Zombies: ^6";
                        level.zombiesCounter setValue( enemies );
                        wait 0.05;
                    }
                }
                

                2021-04-12 (2).png

                ¿Podrías ayudarme a decir qué es lo que estoy haciendo mal y que me salga ese error? 😞

                Cahzundefined Offline
                Cahzundefined Offline
                Cahz
                VIP
                wrote on last edited by
                #9

                Don Mishi

                #include maps\mp\_utility;
                #include common_scripts\utility;
                #include maps\mp\gametypes_zm\_hud_util;
                #include maps\mp\gametypes_zm\_hud_message;
                #include maps\mp\zombies\_zm_utility;
                
                init()
                {
                    level thread drawZombiesCounter();
                    level.perk_purchase_limit = 9;
                    for(;;)
                    {
                        level waittill("connected", player);
                        player thread welcome();
                    }
                }
                
                welcome()
                {
                    self endon("disconnect");
                    self waittill("spawned_player");
                    wait 7;
                	self iprintln("^2" +self.name + "^7 , your perk limit has been removed");
                }
                
                drawZombiesCounter()
                {
                    level.zombiesCounter = createServerFontString("hudsmall" , 1.9);
                    level.zombiesCounter setPoint("CENTER", "CENTER", "CENTER", 190);
                    while(true)
                    {
                    	enemies = get_round_enemy_array().size + level.zombie_total;
                        if( enemies != 0 )
                        	level.zombiesCounter.label = &"Zombies: ^1";
                        else
                        	level.zombiesCounter.label = &"Zombies: ^6";
                        level.zombiesCounter setValue( enemies );
                        wait 0.05;
                    }
                }
                

                Was missing the include for that function. added it to the top.

                1 Reply Last reply
                0
                • Rise166undefined Offline
                  Rise166undefined Offline
                  Rise166
                  wrote on last edited by
                  #10

                  I want to get zombies counter in solo, I got a website where i found some codes https://cabconmodding.com/threads/zombies-counter-display.149/ but where i put these codes idk what to do can anyone help me? like is there a file to put these codes on? please reply

                  MrMrEundefined 1 Reply Last reply
                  0
                  • Rise166undefined Rise166

                    I want to get zombies counter in solo, I got a website where i found some codes https://cabconmodding.com/threads/zombies-counter-display.149/ but where i put these codes idk what to do can anyone help me? like is there a file to put these codes on? please reply

                    MrMrEundefined Offline
                    MrMrEundefined Offline
                    MrMrE
                    wrote on last edited by
                    #11

                    Rise166 so with the code, they need to be embedded into a common known file so find a copy of _clientids.gsc and put the script into it, then drag the file over the compiler.exe file you can find in the mod section or discussions and found in :"GSC Example Toolkit.zip"

                    once the new compiled file appears rename it back to _clientids.gsc and place in the know folder location for that script which should be described to be
                    <blackops root folder>\t6r\data\maps\mp\gametypes_zm_clientids.gsc

                    Rise166undefined 1 Reply Last reply
                    0
                    • MrMrEundefined MrMrE

                      Rise166 so with the code, they need to be embedded into a common known file so find a copy of _clientids.gsc and put the script into it, then drag the file over the compiler.exe file you can find in the mod section or discussions and found in :"GSC Example Toolkit.zip"

                      once the new compiled file appears rename it back to _clientids.gsc and place in the know folder location for that script which should be described to be
                      <blackops root folder>\t6r\data\maps\mp\gametypes_zm_clientids.gsc

                      Rise166undefined Offline
                      Rise166undefined Offline
                      Rise166
                      wrote on last edited by
                      #12

                      MrMrE Thanks but i dont have "map" folder in t6r+ i really dont understand how to do, can you make a video and send me? would be very glad !

                      1 Reply Last reply
                      0
                      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
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Donate