Navigation

    CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How to possibly convert percentages to height

    ScriptAPI
    3
    10
    53
    Loading More Posts
    • 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.
    • DreamWasFucked
      DreamWasFucked Banned last edited by

      So I have this code which converts health to percentages

      Math.percent = function(min, max) {
          return (min / max * 100);
      }
      
      var pHealth = Math.percent(target.getHealth(), target.getMaxHealth()).toFixed(1)
      

      And now how to convert the health to the height of the player

      To make the player's health percentage the same as the player's height

      CzechHek A 2 Replies Last reply Reply Quote 0
      • CzechHek
        CzechHek @DreamWasFucked last edited by

        @skidma Why would you make a player as high as his health percentage?

        DreamWasFucked 1 Reply Last reply Reply Quote 0
        • DreamWasFucked
          DreamWasFucked Banned @CzechHek last edited by

          @czechhek health bar

          CzechHek 1 Reply Last reply Reply Quote 0
          • CzechHek
            CzechHek @DreamWasFucked last edited by

            @skidma You just do percentage * rect height

            DreamWasFucked 1 Reply Last reply Reply Quote 0
            • A
              Aftery @DreamWasFucked last edited by

              @skidma basic multiplication/division

              1 Reply Last reply Reply Quote 0
              • DreamWasFucked
                DreamWasFucked Banned @CzechHek last edited by

                @czechhek I need the health bar to take the value of the player's height

                CzechHek 1 Reply Last reply Reply Quote 0
                • CzechHek
                  CzechHek @DreamWasFucked last edited by

                  @skidma what the

                  DreamWasFucked 1 Reply Last reply Reply Quote 0
                  • DreamWasFucked
                    DreamWasFucked Banned @CzechHek last edited by DreamWasFucked

                    @czechhek I need the size to work the same way as here (esp health bar) EXHIBITION - BESTEST HYPIXEL HACKED CLIENT?!?! – 03:14
                    — Arithmo

                    A CzechHek 2 Replies Last reply Reply Quote 0
                    • A
                      Aftery @DreamWasFucked last edited by

                      @skidma this is starting to sound like an uid issue irl
                      //thread closed

                      1 Reply Last reply Reply Quote 0
                      • CzechHek
                        CzechHek @DreamWasFucked last edited by

                        @skidma said in How to possibly convert percentages to height:

                        @czechhek I need the size to work the same way as here (esp health bar) EXHIBITION - BESTEST HYPIXEL HACKED CLIENT?!?! – 03:14
                        — Arithmo

                        @czechhek said in How to possibly convert percentages to height:

                        @skidma You just do percentage * rect height

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post