Need help Getting the players health.

Well I just started to learn lua, but need help in getting the player’s health.

Because I would just do a simple code like this

if (health > 40) then
Msg(“You are in a good condition.”
end

But so far havent found the answer from anywhere. :frowning:

Get a player object (ply or pl) and do ply:Health() to get their health.

[lua]
concommand.Add(“checkhealth”, function( ply )
if ply:Health() > 40 then
print"You are in good condition."
end
end )
[/lua]

(slow me // bump Thanks Dx