wheelloose.lua
The complete default wheelloose.lua for Petty Crime (sd-pettycrime). Use this as a reference or a starting point for your own configuration.
TIP
This is the full, unedited config file. For a detailed explanation of each option, see the Configuration page.
lua
return {
-- Skill-check minigame run during the loosen. Enable = false to skip it.
-- Swap `safeDial` for any other minigame.* (see client/minigame.lua) or your
-- own function returning true/false.
Minigame = {
Enable = true,
Start = function()
return require('client.minigame').safeDial({
numbers = 12, -- marks around the dial
steps = 3, -- marks to land in sequence to crack it
toleranceDeg = 10, -- angular tolerance per mark (deg)
timeLimitSec = 18, -- seconds before caught; 0 = no limit
}).success
end,
},
Items = { 'WEAPON_WRENCH' }, -- Leverage tool used to back the lugs off the studs.
LooseTime = 6, -- Seconds spent crouched at the wheel backing the lugs off (progress bar duration).
BaseXP = 20, -- Base XP per wheel loosened.
Logging = true, -- Enables lib.logger usage for this action.
-- Vehicle speed (m/s) at which a loosened wheel will detach mid-drive.
-- GetEntitySpeed returns m/s natively, so this matches without conversion.
-- Reference points:
-- 13.41 m/s ≈ 30 mph ≈ 48 km/h — early-trigger, urban speeds
-- 22.35 m/s ≈ 50 mph ≈ 80 km/h — default, freeway-onramp speeds
-- 27.78 m/s ≈ 62 mph ≈ 100 km/h — late-trigger, highway speeds
-- 33.53 m/s ≈ 75 mph ≈ 120 km/h — only-on-the-highway sabotage
TriggerSpeed = 22.35,
-- Vehicle classes the target option will refuse to attach to. Same default
-- shape as tireslash/tiretheft.
IgnoreClasses = {
[8] = true, -- Motorcycles
[13] = true, -- Cycles
[14] = true, -- Boats
[15] = true, -- Helicopters
[16] = true, -- Planes
[17] = true, -- Service (taxi, bus, ambulance)
[18] = true, -- Emergency (police, fire)
[19] = true, -- Military
[21] = true, -- Trains
[22] = true, -- Open Wheel (F1)
},
-- Pre-hashed model exemption list — civilian models you don't want eligible.
IgnoreModels = {
-- ['emperor'] = true,
},
PoliceAlert = {
Enable = true,
Chance = 20, -- Quieter than visible tyre theft — the wheel only comes off later.
Send = function() -- Client function
local alertMessage = 'Vehicle tampering reported'
print('Police Alert: ' .. alertMessage)
-- Example: cd_dispatch integration (uncomment to use)
--[[
local data = exports['cd_dispatch']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = {'police'},
coords = data.coords,
title = '10-21L - Wheel Tampering',
message = ('A %s loosening lugnuts on a parked vehicle at %s'):format(data.sex, data.street),
flash = 0,
unique_id = data.unique_id,
sound = 1,
blip = {
sprite = 380,
scale = 1.1,
colour = 1,
flashes = false,
text = '911 - Wheel Tampering',
time = 5,
radius = 0,
}
})
--]]
end,
},
}