tireslash.lua
The complete default tireslash.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 before the slash (after the server pre-flight
-- passes). Enable = false to skip it. Swap `trace` for any other minigame.*
-- (see client/minigame.lua) or your own function returning true/false.
Minigame = {
Enable = true,
Start = function()
return require('client.minigame').trace({
tolerance = 22, -- corridor half-width (px); smaller = harder
segments = 6, -- path segments; more = twistier
wiggle = 45, -- path wiggle amplitude (px)
timeLimitSec = 10, -- seconds before caught; 0 = no limit
}).success
end,
},
Items = { 'cutter' }, -- Sharp tool (any one is enough) to slash the tyre.
-- When true, the target option only appears while the knife is the
-- player's currently active (drawn) weapon. When false, the option
-- appears as long as the knife is anywhere in inventory.
--
-- Set this true for a more "you have to actually have the knife in
-- hand" feel; leave it false for less friction (target shows up,
-- player slashes without thinking about which weapon is drawn).
RequireEquipped = false,
BaseXP = 6, -- Base XP per individual tyre slashed.
Logging = true, -- Enables lib.logger usage for this action.
-- Vehicle classes the target option will refuse to attach to. Same
-- exclusions as catalytic/tiretheft plus motorcycles — bikes don't
-- have the kind of rubber tyres the burst native is designed for.
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 = 15, -- Per-tyre roll. Quieter than smash-and-grab; mostly the visible damage tips someone off.
Send = function() -- Client function
local alertMessage = 'Vehicle vandalism 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-21V - Vehicle Vandalism',
message = ('A %s slashing tyres on 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 = false,
text = '911 - Tyre Slashing',
time = 5,
radius = 0,
}
})
--]]
end,
},
}