Skip to content

signrob.lua

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

lua
return {
    -- Skill-check minigame run during the sign grab. Enable = false to skip it.
    -- Swap `pipes` for any other minigame.* (see client/minigame.lua) or your
    -- own function returning true/false.
    Minigame = {
        Enable = true,
        Start = function()
            return require('client.minigame').pipes({
                cols         = 5,  -- grid columns
                rows         = 3,  -- grid rows
                timeLimitSec = 25, -- seconds before caught; 0 = no limit
            }).success
        end,
    },

    Cooldown = 60, -- Per-coords cooldown (minutes) before a stolen sign respawns. Set to 0 for permanent (until restart).
    Items = { 'screwdriver', 'WEAPON_WRENCH', 'multitool' }, -- Tools (any one is enough) — needed to unbolt the sign.
    StealTime = 6, -- Seconds spent unbolting (progress bar duration).
    BaseXP = 12, -- Base XP per sign stolen.
    GiveXPForItems = true, -- Whether to give additional XP based on items received.
    Logging = true, -- Enables lib.logger usage for this action.

    -- Sign prop models. `target.addModel` attaches the steal option to
    -- every world prop matching one of these. Same list ps-signrobbery
    -- targets — standard GTA V street-sign props seeded around the map.
    --
    --   prop_sign_road_01a            — Stop sign
    --   prop_sign_road_02a            — Yield sign
    --   prop_sign_road_03e            — Don't block intersection
    --   prop_sign_road_03m            — U-Turn
    --   prop_sign_road_04a            — No parking
    --   prop_sign_road_05a            — Walking man / pedestrian crossing
    --   prop_sign_road_05e            — Left turn
    --   prop_sign_road_05f            — Right turn
    --   prop_sign_road_restriction_10 — No trespassing
    Models = {
        'prop_sign_road_01a',
        'prop_sign_road_02a',
        'prop_sign_road_03e',
        'prop_sign_road_03m',
        'prop_sign_road_04a',
        'prop_sign_road_05a',
        'prop_sign_road_05e',
        'prop_sign_road_05f',
        'prop_sign_road_restriction_10',
    },

    PoliceAlert = {
        Enable = true,
        Chance = 15, -- Quiet crime — unbolt and run. Visible result (missing sign) gets noticed slowly.
        Send = function() -- Client function
            local alertMessage = 'Stolen street sign 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-21S - Stolen Street Sign',
                message = ('A %s unbolting a street sign at %s'):format(data.sex, data.street),
                flash = 0,
                unique_id = data.unique_id,
                sound = 1,
                blip = {
                    sprite = 380,
                    scale = 1.0,
                    colour = 1,
                    flashes = false,
                    text = '911 - Stolen Sign',
                    time = 5,
                    radius = 0,
                }
            })
            --]]
        end,
    },

    -- Loot bucket per player level. Steel street signs scrap into the
    -- same materials as the rooftop AC strip — `metalscrap`, `iron`,
    -- `aluminum`, `steel`, etc. — so they reuse the established scrap
    -- item ecosystem without needing per-sign-type inventory items.
    Rewards = {
        [1] = { -- Level 1 — basic
            { item = 'metalscrap', chance = 60, min = 1, max = 3, xp = 1 },
            { item = 'iron',       chance = 30, min = 1, max = 2, xp = 2 },
            { item = 'aluminum',   chance = 25, min = 1, max = 2, xp = 3 },
        },
        [2] = { -- Level 2 — improved
            { item = 'metalscrap', chance = 50, min = 2, max = 4, xp = 1 },
            { item = 'iron',       chance = 30, min = 1, max = 3, xp = 2 },
            { item = 'aluminum',   chance = 25, min = 1, max = 3, xp = 3 },
            { item = 'steel',      chance = 18, min = 1, max = 2, xp = 5 },
        },
        [3] = { -- Level 3 — advanced
            { item = 'metalscrap', chance = 40, min = 2, max = 5, xp = 1 },
            { item = 'iron',       chance = 30, min = 2, max = 4, xp = 2 },
            { item = 'aluminum',   chance = 25, min = 2, max = 4, xp = 3 },
            { item = 'steel',      chance = 22, min = 1, max = 3, xp = 5 },
            { item = 'copper',     chance = 18, min = 1, max = 2, xp = 2 },
        },
    },
}