HUD
Functions

GM: can Damage Part

Called before a part is damaged.

Used in: VCMod Main addon.

Server GM:VC_canDamagePart(Entity ent, String class, Integer object, Entity att, Entity inf)

Arguments

1. Entity ent; Entity
The unlucky vehicle.

2. String class; Class
The part type.

3. Integer object; Object
The part numnber.

4. Entity att; Attacker
The player/NPC entity which the damage originated from. This argument is optional.

5. Entity inf; Inflictor
Entity which the damage was inflicted with, such as a weapon. This argument is optional.

Returns

1. Boolean If it should allow it or not.

Example

hook.Add("VC_canDamagePart", "VC_BulletProofTires", function(ent, class, object, att, inf)
	if class == "wheel" then
		return false
	end
end)
Page modified:
...2019-09-01 15:41:10