This commit is contained in:
[TW]Rain_Bob 2024-10-06 09:57:55 +08:00 committed by GitHub
parent 514c83e685
commit d2f539b2b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -137,7 +137,7 @@ function GM:HUDPaint()
-- Display Prop's Health
local tr = util.TraceLine(util.GetPlayerTrace(LocalPlayer()))
if tr.Entity:IsValid() and not tr.Entity:IsPlayer() then
if tr.Entity:GetNWInt("CurrentPropHealth") == "" or tr.Entity:GetNWInt("CurrentPropHealth") == nil or tr.Entity:GetNWInt("CurrentPropHealth") == NULL then
if tr.Entity:GetNWInt("CurrentPropHealth") == "" or tr.Entity:GetNWInt("CurrentPropHealth") == nil then
draw.SimpleText("Fetching Health", "Flood_HUD_Small", x * 0.5, y * 0.5 - 25, color_white, 1, 1)
elseif(tr.Entity:GetNWInt("CurrentPropHealth")!="0")then
draw.SimpleText("Health: " .. tr.Entity:GetNWInt("CurrentPropHealth"), "Flood_HUD_Small", x * 0.5, y * 0.5 - 25, color_white, 1, 1)