HUD
Functions

Vehicle: part Is Damaged

Checks if the part is damaged or not.

Used in: VCMod Main addon.

Shared Entity Vehicle:VC_partIsDamaged(String class, String class)

Arguments

1. String class; Class
The class of the object.

2. String class; Class
The class of the object.

Returns

1. Boolean If object is damaged or not.

Example

concommand.Add("vehicle_check_if_front_left_wheel_is_damaged", function()
	local ent = player.GetAll()[1]:GetEyeTraceNoCursor().Entity
	if IsValid(ent) then
		if ent:VC_partIsDamaged("wheel", 1) then
			print("Its damaged, sadly.")
		else
			print("Still going strong, its ok.")
		end

		print("Turning vehicles hazard lights on.")
	else
		print("Invalid entity.")
	end
end)
Page modified:
...2018-11-02 09:24:39