Main/resources/[carscripts]/slashtires/bridge/target/qtarget.lua

23 lines
786 B
Lua
Raw Normal View History

2025-06-07 08:51:21 +02:00
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