brakecut.lua
The complete default brakecut.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 cut. Enable = false to skip it. Swap
-- `lockpickBar` for any other minigame.* (see client/minigame.lua) or your
-- own function returning true/false.
Minigame = {
Enable = true,
Start = function()
return require('client.minigame').lockpickBar({
nodeCount = 5, -- target nodes along the bar
hitWindowDeg = 32, -- hit tolerance per node (deg)
rotationSpeedDegSec = 150, -- marker sweep speed (deg/sec)
speedUpMultiplier = 1.12, -- speed-up applied after each node opens
timeLimitSec = 0, -- seconds before caught; 0 = no limit
}).success
end,
},
Items = { 'wirecutter', 'cutter' }, -- Wire cutters (any one is enough) to sever the brake line.
CutTime = 6, -- Seconds spent under the hood (progress bar duration).
BaseXP = 24, -- Base XP awarded for a successful brake-line cut.
Logging = true, -- Enables lib.logger usage for this action.
-- Vehicle classes the target option will refuse to attach to. Brake-cut
-- only makes sense for road vehicles — bikes have cable-actuated brakes
-- with no engine-bay lines, boats/aircraft don't have car-style brakes,
-- and emergency/military are skipped to keep the scope to civilian fare.
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,
},
-- GTA V control IDs to disable while the player is inside a brake-cut
-- vehicle. 72 (INPUT_VEH_BRAKE) covers S/brake-pedal; 76 (INPUT_VEH_HANDBRAKE)
-- covers Space/handbrake. Add more if you want to disable downshifts or
-- other deceleration inputs — see https://docs.fivem.net/docs/game-references/controls/
DisabledControls = { 72, 76 },
PoliceAlert = {
Enable = true,
Chance = 35, -- Hood-up sabotage is more visible than tyre slashing — moderate alert chance.
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-21B - Vehicle Tampering',
message = ('A %s tampering with the engine bay of a parked car 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 = true,
text = '911 - Vehicle Tampering',
time = 5,
radius = 0,
}
})
--]]
end,
},
}