forked from Simnation/Main
22 lines
786 B
Lua
22 lines
786 B
Lua
for boneName, _index in pairs(WHEEL_BONES) do
|
|
exports.qtarget:AddTargetBone(boneName, {
|
|
options = {
|
|
{
|
|
icon = Config.TargetIcon,
|
|
label = GetLocalization('target_label'),
|
|
canInteract = function(entity)
|
|
return TargetCanInteract(entity)
|
|
end,
|
|
action = function(entity)
|
|
local tire = exports[CURRENT_RESOURCE]:getVehicleTireByBone(entity, boneName)
|
|
if tire.index == nil then
|
|
return
|
|
end
|
|
|
|
exports[CURRENT_RESOURCE]:attemptToSlashTire(tire)
|
|
end
|
|
}
|
|
},
|
|
distance = Config.MaxTireInteractionDist
|
|
})
|
|
end
|