Called when vehicles object becomes damaged. Note that this does not work for engine, unless it becomes fully destroyed. This also does not work for the fuel lid object. Called after object has been damaged.
Used in: VCMod Main addon.
Shared GM:VC_partDamaged(Entity ent, String class, Integer obj, Entity att, Entity inf)
1. Entity ent; Vehicle
The unlucky vehicle.
2. String class; Class
The class of the object.
3. Integer obj; Object
The number identifier of the object.
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.
hook.Add("VC_partDamaged", "CustomHookName", function(ent, class, obj, att, inf) print("The vehicles object: "..class.."_"..obj.." has been damaged by "..att:Nick()..".") end)