Displays the current vehicles health. Please note: when using clientside it will always return a percentage value, no matter of the option.
Used in: VCMod Main addon.
Shared Entity Vehicle:VC_getHealth(Boolean perc)
1. Boolean perc; Show in percentage
If it should show the health in percentage instead of VCMod units.
1. Integer Either health in VCMod units or in percentage of the maximum health. Clientside only returns the percentage, no matter of this choice.
concommand.Add("vehicle_gethealth", function() local ent = player.GetAll()[1]:GetEyeTraceNoCursor().Entity if IsValid(ent) then print("Vehicle you are currently looking at health is: "..ent:VC_getHealth(true).." percent.") else print("Invalid entity.") end end)