HUD
Functions

Vehicle: get Health Max

Displays the current vehicles maximum health.

Used in: VCMod Main addon.

Server Entity Vehicle:VC_getHealthMax()

Returns

1. Integer Maximum health in VCMod units.

Example

// Makes all vehicles with these models 5 times as hard to kill

if SERVER then
	local models = {
		"models/tdmcars/emergency/dod_charger12.mdl",
		"models/tdmcars/emergency/chargersrt8.mdl"
	}
	hook.Add("VC_postVehicleInit", "VC_postVehicleInit_MakeCarsStronger", function(ent)
		if table.HasValue(models, ent:GetModel()) then
			local healthMax = ent:VC_getHealthMax()
			ent:VC_setHealthMax(healthMax*5)
		end
	end)
end
Page modified:
...2018-11-02 09:24:38