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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Need healthbar

Need healthbar

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
5 Posts 4 Posters 228 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.
  • Sgt_Ghostundefined Offline
    Sgt_Ghostundefined Offline
    Sgt_Ghost
    wrote on last edited by Sgt_Ghost
    #1

    hlw
    I have no experience of codeing. Need a hud. Can any one help me ?
    Thank u.

    Like this: Screenshot (133).png

    1 Reply Last reply
    0
    • Marsh_undefined Offline
      Marsh_undefined Offline
      Marsh_ Contributor
      wrote on last edited by
      #2

      This is what I use:
      #include maps/mp/_utility;
      #include common_scripts/utility;
      #include maps/mp/zombies/_zm;
      #include maps/mp/zombies/_zm_perks;
      #include maps/mp/zombies/_zm_utility;
      #include maps/mp/gametypes_zm/_hud_util;
      #include maps/mp/gametypes_zm/_hud_message;
      init()
      {
      level thread onplayerconnect();

      }

      onplayerconnect()
      {
      for(;;)
      {
      level waittill( "connected", player );
      player iprintln( "^1Health ^7Bar ^2ON" );
      player thread onplayerspawned();
      }

      }

      onplayerspawned()
      {
      level endon( "end_game" );
      self endon( "disconnect" );
      self waittill( "spawned_player" );
      self thread health_bar_hud();

      }

      health_bar_hud()
      {
      level endon( "end_game" );
      self endon( "disconnect" );
      flag_wait( "initial_blackscreen_passed" );
      health_bar = self createprimaryprogressbar();
      if( level.script == "zm_buried" )
      {
      health_bar setpoint( undefined, "BOTTOM", 0, -5 );
      }
      else
      {
      if( level.script == "zm_tomb" )
      {
      health_bar setpoint( undefined, "BOTTOM", 0, -5 );
      }
      else
      {
      health_bar setpoint( undefined, "BOTTOM", 0, -5 );
      }
      }
      health_bar.hidewheninmenu = 1;
      health_bar.bar.hidewheninmenu = 1;
      health_bar.barframe.hidewheninmenu = 1;
      health_bar_text = self createprimaryprogressbartext();
      if( level.script == "zm_buried" )
      {
      health_bar_text setpoint( undefined, "BOTTOM", -75, -5 );
      }
      else
      {
      if( level.script == "zm_tomb" )
      {
      health_bar_text setpoint( undefined, "BOTTOM", -75, -5 );
      }
      else
      {
      health_bar_text setpoint( undefined, "BOTTOM", -75, -5 );
      }
      }
      health_bar_text.hidewheninmenu = 1;
      while( 1 )
      {
      if( IsDefined( self.e_afterlife_corpse ) )
      {
      if( health_bar.alpha != 0 )
      {
      health_bar.alpha = 0;
      health_bar.bar.alpha = 0;
      health_bar.barframe.alpha = 0;
      health_bar_text.alpha = 0;
      }
      wait 0.05;
      continue;
      }
      if( health_bar.alpha != 1 )
      {
      health_bar.alpha = 1;
      health_bar.bar.alpha = 1;
      health_bar.barframe.alpha = 1;
      health_bar_text.alpha = 1;
      }
      health_bar updatebar( self.health / self.maxhealth );
      health_bar_text setvalue( self.health );
      wait 0.05;
      }

      }

      Also just in case this goes into AppData\Local\Plutonium\storage\t6\scripts\zm as a GSC File.

      1 Reply Last reply
      0
      • Sgt_Ghostundefined Offline
        Sgt_Ghostundefined Offline
        Sgt_Ghost
        wrote on last edited by
        #3

        Thanks man I was badly in need of this

        1 Reply Last reply
        0
        • Christian_V02undefined Offline
          Christian_V02undefined Offline
          Christian_V02
          wrote on last edited by
          #4

          can someone help me how to download this?

          NightMaRe_911undefined 1 Reply Last reply
          0
          • NightMaRe_911undefined Offline
            NightMaRe_911undefined Offline
            NightMaRe_911
            replied to Christian_V02 on last edited by
            #5

            Christian_V02 just compile the code of Marsh_

            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