Server Entity Vehicle:VC_damageHealth(Integer amount)
1. Integer amount; Amount of health.
The amount of health that needs to be taken away in VCMod health units.
concommand.Add("vehicle_explodethevehicle", function()
local ent = player.GetAll()[1]:GetEyeTraceNoCursor().Entity
if IsValid(ent) then
ent:VC_damageHealth(ent:VC_GetHealth())
print("Exploding the vehicle.")
else
print("Invalid entity.")
end
end)