Garry's Mod

HUD PROBLEM

Submitted by Gringo1010, , Thread ID: 165778

Thread Closed
05-04-2020, 06:44 PM
#1
Hello i have aHud on my server and i do need to put a SimpleText on the health bar so i can know the hp but i don't know how to do it somone can help me out?

RE: HUD PROBLEM

This post was last modified: 05-04-2020, 07:03 PM by BlackManba
#2
05-04-2020, 06:44 PM
Gringo1010 Wrote:
Hello i have aHud on my server and i do need to put a SimpleText on the health bar so i can know the hp but i don't know how to do it somone can help me out?

Yes then here is the code to add the text on the bar/ in the bar:
Quote:draw.SimpleText("Health: "..client:Health()..."%", "DermaDefaultBold", 10, ScrH() -90, Color(255, 255, 255, 255, 255),0,0)

RE: HUD PROBLEM

#3
You have to create a variable with: local hp = LocalPlayer (): Health (), which allows you to recover the life of the player and then you can directly make a draw.SimpleTextWink

Users browsing this thread: 1 Guest(s)