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

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [Release] [Zombies] Secondary Score Display for matches with 4+ players

[Release] [Zombies] Secondary Score Display for matches with 4+ players

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
21 Posts 10 Posters 3.2k 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.
  • Amuseddundefined Offline
    Amuseddundefined Offline
    Amusedd
    wrote on last edited by Amusedd
    #10

    Updated the code, if you were having overflow errors try again, tho I can't confirm compatibility with Z++

    MetalThunderundefined 1 Reply Last reply
    1
    • INSANEMODEundefined Offline
      INSANEMODEundefined Offline
      INSANEMODE
      Contributor
      wrote on last edited by
      #11

      still crashes on my server around round 20 ish with the latest update. longer than before, but seems like it still doesn't work with z++. (or something else, because my servers are modded af)

      with this removed, can do 8 player origins games for 40+ rounds without issue.

      haven't attempted with nothing but this mod, though.

      Amuseddundefined 1 Reply Last reply
      0
      • INSANEMODEundefined INSANEMODE

        still crashes on my server around round 20 ish with the latest update. longer than before, but seems like it still doesn't work with z++. (or something else, because my servers are modded af)

        with this removed, can do 8 player origins games for 40+ rounds without issue.

        haven't attempted with nothing but this mod, though.

        Amuseddundefined Offline
        Amuseddundefined Offline
        Amusedd
        wrote on last edited by
        #12

        INSANEMODE current theory is that any amount of functions that changes text on screen etc will get the client/server to crash, but since a lot of mods use the same/similar functions (code was inspired by multiple text changing scripts around on plutonium) you can only have so many before crashing.

        Best bet might be to just scratch the secondary score display and just print the player's score every time it changes, though i'm not sure how effective that would be.

        rockwellundefined 1 Reply Last reply
        0
        • Amuseddundefined Amusedd

          INSANEMODE current theory is that any amount of functions that changes text on screen etc will get the client/server to crash, but since a lot of mods use the same/similar functions (code was inspired by multiple text changing scripts around on plutonium) you can only have so many before crashing.

          Best bet might be to just scratch the secondary score display and just print the player's score every time it changes, though i'm not sure how effective that would be.

          rockwellundefined Offline
          rockwellundefined Offline
          rockwell
          wrote on last edited by
          #13

          Amusedd have you figured out a solution to the Z++ problem

          1 Reply Last reply
          0
          • Amuseddundefined Amusedd

            Updated the code, if you were having overflow errors try again, tho I can't confirm compatibility with Z++

            MetalThunderundefined Offline
            MetalThunderundefined Offline
            MetalThunder
            wrote on last edited by
            #14

            Amusedd It worked very well with 7 players, until some of them exited the server. We were 4 again now, (the score still activated because in that same match we were 7, as i said) played until round 7 or 8, and then the server crashed :c Tested with Zombies ++ and others mods.

            Cahzundefined 1 Reply Last reply
            0
            • MetalThunderundefined MetalThunder

              Amusedd It worked very well with 7 players, until some of them exited the server. We were 4 again now, (the score still activated because in that same match we were 7, as i said) played until round 7 or 8, and then the server crashed :c Tested with Zombies ++ and others mods.

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

              MetalThunder Amusedd
              Could be crashing because the thread doesn't end on endgame or when the player disconnects. Try the script below.

              displayScore()
              {
              	self endon( "disconnect" );
              	level endon( "end_game" );
              	self.scoreText = CreateFontString("Objective", 1.5);
              	self.scoretext setPoint("CENTER", "RIGHT", "CENTER", "RIGHT");
              	self.scoreText.label = &"^2Score: ^7";
              	self.scoretext.alpha = 0;
              	while(true)
              	{
              		self.scoretext SetValue(self.score);
              		if(getplayers().size >= 5 && self.scoretext.alpha == 0)
              		{
              			self.scoretext FadeOverTime( 1 );
              			self.scoretext.alpha = 1;
              		}
              		else if(getplayers().size < 5 && self.scoretext.alpha >= 0)
              		{
              			self.scoretext FadeOverTime( 1 );
              			self.scoretext.alpha = 0;
              		}
              		wait 0.1;
              	}
              }
              

              Make sure to call the function in onPlayerConnected function (like below)

              onplayerconnected()
              {
              	for ( ;; )
              	{
              		level waittill( "connected", player );
              		player thread displayScore(); //add this line
              	}
              }
              
              MetalThunderundefined 3 Replies Last reply
              1
              • Cahzundefined Cahz

                MetalThunder Amusedd
                Could be crashing because the thread doesn't end on endgame or when the player disconnects. Try the script below.

                displayScore()
                {
                	self endon( "disconnect" );
                	level endon( "end_game" );
                	self.scoreText = CreateFontString("Objective", 1.5);
                	self.scoretext setPoint("CENTER", "RIGHT", "CENTER", "RIGHT");
                	self.scoreText.label = &"^2Score: ^7";
                	self.scoretext.alpha = 0;
                	while(true)
                	{
                		self.scoretext SetValue(self.score);
                		if(getplayers().size >= 5 && self.scoretext.alpha == 0)
                		{
                			self.scoretext FadeOverTime( 1 );
                			self.scoretext.alpha = 1;
                		}
                		else if(getplayers().size < 5 && self.scoretext.alpha >= 0)
                		{
                			self.scoretext FadeOverTime( 1 );
                			self.scoretext.alpha = 0;
                		}
                		wait 0.1;
                	}
                }
                

                Make sure to call the function in onPlayerConnected function (like below)

                onplayerconnected()
                {
                	for ( ;; )
                	{
                		level waittill( "connected", player );
                		player thread displayScore(); //add this line
                	}
                }
                
                MetalThunderundefined Offline
                MetalThunderundefined Offline
                MetalThunder
                wrote on last edited by
                #16

                Cahz said in [Release] [Zombies] Secondary Score Display for matches with 4+ players:

                player thread displayScore();

                Thanks for the reply! im testing it now 🙂

                1 Reply Last reply
                1
                • Cahzundefined Cahz

                  MetalThunder Amusedd
                  Could be crashing because the thread doesn't end on endgame or when the player disconnects. Try the script below.

                  displayScore()
                  {
                  	self endon( "disconnect" );
                  	level endon( "end_game" );
                  	self.scoreText = CreateFontString("Objective", 1.5);
                  	self.scoretext setPoint("CENTER", "RIGHT", "CENTER", "RIGHT");
                  	self.scoreText.label = &"^2Score: ^7";
                  	self.scoretext.alpha = 0;
                  	while(true)
                  	{
                  		self.scoretext SetValue(self.score);
                  		if(getplayers().size >= 5 && self.scoretext.alpha == 0)
                  		{
                  			self.scoretext FadeOverTime( 1 );
                  			self.scoretext.alpha = 1;
                  		}
                  		else if(getplayers().size < 5 && self.scoretext.alpha >= 0)
                  		{
                  			self.scoretext FadeOverTime( 1 );
                  			self.scoretext.alpha = 0;
                  		}
                  		wait 0.1;
                  	}
                  }
                  

                  Make sure to call the function in onPlayerConnected function (like below)

                  onplayerconnected()
                  {
                  	for ( ;; )
                  	{
                  		level waittill( "connected", player );
                  		player thread displayScore(); //add this line
                  	}
                  }
                  
                  MetalThunderundefined Offline
                  MetalThunderundefined Offline
                  MetalThunder
                  wrote on last edited by
                  #17

                  Cahz I worked perfectly! Thank you! I tested it today and no crashes. I used several mods, included Zombies++, for those who wanna use this on their servers 😄

                  1 Reply Last reply
                  1
                  • Cahzundefined Cahz

                    MetalThunder Amusedd
                    Could be crashing because the thread doesn't end on endgame or when the player disconnects. Try the script below.

                    displayScore()
                    {
                    	self endon( "disconnect" );
                    	level endon( "end_game" );
                    	self.scoreText = CreateFontString("Objective", 1.5);
                    	self.scoretext setPoint("CENTER", "RIGHT", "CENTER", "RIGHT");
                    	self.scoreText.label = &"^2Score: ^7";
                    	self.scoretext.alpha = 0;
                    	while(true)
                    	{
                    		self.scoretext SetValue(self.score);
                    		if(getplayers().size >= 5 && self.scoretext.alpha == 0)
                    		{
                    			self.scoretext FadeOverTime( 1 );
                    			self.scoretext.alpha = 1;
                    		}
                    		else if(getplayers().size < 5 && self.scoretext.alpha >= 0)
                    		{
                    			self.scoretext FadeOverTime( 1 );
                    			self.scoretext.alpha = 0;
                    		}
                    		wait 0.1;
                    	}
                    }
                    

                    Make sure to call the function in onPlayerConnected function (like below)

                    onplayerconnected()
                    {
                    	for ( ;; )
                    	{
                    		level waittill( "connected", player );
                    		player thread displayScore(); //add this line
                    	}
                    }
                    
                    MetalThunderundefined Offline
                    MetalThunderundefined Offline
                    MetalThunder
                    wrote on last edited by
                    #18

                    Cahz Hi its me again, u know i was playing today on MOTD, 6 players, and between round 11 or 12, sv crashed :c had no problems up today with maps like nuked or town. Can u help me to figure out what is causing the crash? Thanks

                    Cahzundefined 1 Reply Last reply
                    0
                    • MetalThunderundefined MetalThunder

                      Cahz Hi its me again, u know i was playing today on MOTD, 6 players, and between round 11 or 12, sv crashed :c had no problems up today with maps like nuked or town. Can u help me to figure out what is causing the crash? Thanks

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

                      MetalThunder MOTD crashes when using Stamin-Up. Disable for MOTD

                      MetalThunderundefined 1 Reply Last reply
                      1
                      • Cahzundefined Cahz

                        MetalThunder MOTD crashes when using Stamin-Up. Disable for MOTD

                        MetalThunderundefined Offline
                        MetalThunderundefined Offline
                        MetalThunder
                        wrote on last edited by
                        #20

                        Cahz Oh shiiiit, i knew it! I was disabling both (flopper and stamina) to fix the crash. Thanks

                        1 Reply Last reply
                        1
                        • gats1212undefined Offline
                          gats1212undefined Offline
                          gats1212
                          wrote on last edited by
                          #21

                          From someone who has zero experience messing around with dedicated servers, how can I add this into a plugin or something?

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • 1
                          • 2
                          • Login

                          • Don't have an account? Register

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