I need to find the thing for my script:
local DrawHealth = LocalPlayer():Health() or 0
if DrawHealth<0 then
draw.DrawText("You are dead", "Font33", 930, ScrH () - 32, Color(255,255,255,255),TEXT_ALIGN_CENTER)
end
If drawhealth<0 sometimes doesnt work. So i need something like if player is dead.
I think you got it. I just dont know how to explain it to you properly.
Player/Alive
You can use Alive() with an if statement to only draw if the player is currently dead.
if !LocalPlayer():Alive() then -- ! is a logical operator that essentially turns it into an if not statement
draw.DrawText("You are dead", "Font33", 930, ScrH () - 32, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER)
end
Thank you guys, again saving my hud!
Sorry, you need to Log In to post a reply to this thread.