Server Entity Vehicle:VC_setHealth(Integer health)
1. Integer health; Health
New health amount.
concommand.Add("VC_RestoreVehicleHealth", function(ply) if !IsValid(ply) then print("Only for players.") return end local ent = ply:GetVehicle() if IsValid(ent) then // Damages the vehicle by 5% of its total health, this can be achieved with: ent:VC_damageHealth() local healthMax = ent:VC_getHealthMax() local health = ent:VC_getHealth() ent:VC_setHealth(health-healthMax/100*5) else print("Invalid entity.") end end)