Skip to content

tiretheft.lua

The complete default tiretheft.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.

Download tiretheft.lua

lua
return {
    -- Skill-check minigame run during the wheel detach. Enable = false to skip
    -- it. Swap `tumbler` for any other minigame.* (see client/minigame.lua) or
    -- your own function returning true/false.
    Minigame = {
        Enable = true,
        Start = function()
            return require('client.minigame').tumbler({
                pins              = 5,   -- lug nuts to set in order
                bandSize          = 0.2, -- sweet-spot size (fraction of track)
                speedSec          = 1.0, -- marker traverse time (sec)
                speedUpMultiplier = 1.0, -- speed-up after each pin
                timeLimitSec      = 12,  -- seconds before caught; 0 = no limit
            }).success
        end,
    },

    Items = { 'WEAPON_WRENCH' }, -- Leverage tool used to pry the wheel off the hub.
    DetachTime = 8, -- Seconds spent crouched at the wheel before it pops off (progress bar duration).
    BaseXP = 22, -- Base XP awarded per wheel detached.
    Logging = true, -- Enables lib.logger usage for this action.

    -- Vehicle classes the target option will refuse to attach to. Same default
    -- shape as catalytic/tireslash plus motorcycles — bike wheels don't detach
    -- through the same mechanism as car wheels, and the animation reads wrong
    -- on a bike-height frame.
    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 = 30, -- Visible damage on a parked car gets noticed at moderate rates.
        Send = function() -- Client function
            local alertMessage = 'Wheel sabotage 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-21W - Wheel Sabotage',
                message = ('A %s prying a wheel off a parked vehicle at %s'):format(data.sex, data.street),
                flash = 0,
                unique_id = data.unique_id,
                sound = 1,
                blip = {
                    sprite = 380,
                    scale = 1.2,
                    colour = 1,
                    flashes = true,
                    text = '911 - Wheel Sabotage',
                    time = 5,
                    radius = 0,
                }
            })
            --]]
        end,
    },
}