robaped.lua
The complete default robaped.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 when committing the rob. Enable = false to skip
-- it. Swap `reaction` for any other minigame.* (see client/minigame.lua) or
-- your own function returning true/false.
Minigame = {
Enable = true,
Start = function()
return require('client.minigame').reaction({
rounds = 5, -- key prompts to hit in a row
startWindowSec = 1.2, -- time for the first prompt (sec)
windowShrink = 0.88, -- window multiplier each round (tighter)
}).success
end,
},
Cooldown = {
Enable = false, -- Personal cooldown between attempts (true = use Time below).
Time = 30, -- Seconds between attempts when Cooldown.Enable = true.
},
Time = 10, -- Time in seconds for the rob progress bar.
Chance = 80, -- Overall % chance the ped has anything on them.
RunawayChance = 10, -- Per-second % chance a held-up ped breaks free if you stop aiming.
Key = 38, -- Control input that commits the rob (38 = E by default).
BaseXP = 25, -- Base XP awarded on every successful rob.
GiveXPForItems = true, -- Adds the per-item XP value when an item drops.
GiveXPForCash = true, -- Adds 1 XP per $ stolen (set false for flat per-rob XP).
Logging = true, -- lib.logger entries on success.
PoliceAlert = {
Enable = true,
Chance = 35, -- 0-100 chance an alert fires on a successful rob.
Send = function()
local alertMessage = 'Armed robbery 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-31 - Armed Robbery',
message = ('A %s robbing pedestrian at %s'):format(data.sex, data.street),
flash = 0,
unique_id = data.unique_id,
sound = 1,
blip = {
sprite = 431,
scale = 1.2,
colour = 1,
flashes = true,
text = '911 - Armed Robbery',
time = 5,
radius = 0,
}
})
--]]
end,
},
-- Weapons (or weapon groups) that won't trigger the detection loop. Keep
-- harmless ones here so the option doesn't fire on someone holding a
-- fire extinguisher and sneezing at a passer-by.
IgnoreWeapons = {
WEAPON_UNARMED = true,
WEAPON_BEANBAG = true,
GROUP_FIREEXTINGUISHER = true,
},
-- Ped models the option won't attach to. Cops, paramedics, named gang
-- bosses, military, etc. — anyone where "armed robbery" should escalate
-- to combat instead of a held-up animation.
IgnoreModels = {
['s_m_y_cop_01'] = true,
['s_m_m_paramedic_01'] = true,
['s_f_y_shop_mid'] = true,
['csb_ballasog'] = true,
['g_m_y_ballasout_01'] = true,
['g_f_y_ballas_01'] = true,
['ig_ballasog'] = true,
['s_m_y_marine_01'] = true,
['s_m_m_armoured_02'] = true,
},
-- Tiered loot tables. Same shape as pickpocket — cash range and a
-- level-keyed item bucket on each tier. Cash bands are higher than
-- pickpocket because armed robbery carries more risk (police chance,
-- visible weapon, witness reactions).
Tiers = {
low = {
cash = { min = 8, max = 25 },
[1] = {
{ item = 'metalscrap', chance = 25, min = 1, max = 2, xp = 1 },
{ item = 'copper', chance = 15, min = 1, max = 1, xp = 2 },
},
[2] = {
{ item = 'metalscrap', chance = 20, min = 2, max = 3, xp = 1 },
{ item = 'copper', chance = 15, min = 1, max = 2, xp = 2 },
{ item = 'aluminum', chance = 10, min = 1, max = 1, xp = 3 },
},
[3] = {
{ item = 'metalscrap', chance = 18, min = 3, max = 4, xp = 1 },
{ item = 'copper', chance = 15, min = 2, max = 3, xp = 2 },
{ item = 'aluminum', chance = 12, min = 1, max = 2, xp = 3 },
{ item = 'steel', chance = 8, min = 1, max = 1, xp = 5 },
},
},
medium = {
cash = { min = 20, max = 50 },
[1] = {
{ item = 'rolex', chance = 15, min = 1, max = 1, xp = 8 },
{ item = 'phone', chance = 20, min = 1, max = 1, xp = 6 },
},
[2] = {
{ item = 'rolex', chance = 18, min = 1, max = 2, xp = 8 },
{ item = 'phone', chance = 15, min = 1, max = 1, xp = 6 },
{ item = 'goldchain', chance = 12, min = 1, max = 1, xp = 10 },
},
[3] = {
{ item = 'rolex', chance = 20, min = 1, max = 3, xp = 8 },
{ item = 'phone', chance = 15, min = 1, max = 2, xp = 6 },
{ item = 'goldchain', chance = 15, min = 1, max = 2, xp = 10 },
{ item = 'laptop', chance = 10, min = 1, max = 1, xp = 12 },
},
},
high = {
cash = { min = 40, max = 100 },
[1] = {
{ item = 'diamond_ring', chance = 12, min = 1, max = 1, xp = 15 },
{ item = 'goldchain', chance = 18, min = 1, max = 1, xp = 10 },
},
[2] = {
{ item = 'diamond_ring', chance = 15, min = 1, max = 1, xp = 15 },
{ item = 'goldchain', chance = 15, min = 1, max = 2, xp = 10 },
{ item = '10kgoldchain', chance = 10, min = 1, max = 1, xp = 20 },
},
[3] = {
{ item = 'diamond_ring', chance = 18, min = 1, max = 2, xp = 15 },
{ item = 'goldchain', chance = 15, min = 2, max = 3, xp = 10 },
{ item = '10kgoldchain', chance = 12, min = 1, max = 2, xp = 20 },
{ item = 'diamond', chance = 8, min = 1, max = 1, xp = 25 },
},
},
},
-- Zones grouped by tier. Robbery's tier model leans toward
-- *high-traffic* areas where wealthy peds are likely to be on foot
-- carrying cash + valuables — slightly different from pickpocket's
-- "wealth at home" residential focus.
--
-- Anything not listed defaults to the `low` tier.
ZoneTiers = {
high = {
'AIRP', -- Los Santos International Airport (travelers with cash + valuables)
'PBOX', -- Pillbox Hill (downtown business)
'DOWNT', -- Downtown
'DTVINE', -- Downtown Vinewood
'STAD', -- Maze Bank Arena (event crowds)
'MOVIE', -- Richards Majestic
'LEGSQU', -- Legion Square
'KOREAT', -- Little Seoul
},
medium = {
'CHIL', -- Vinewood Hills
'ROCKF', -- Rockford Hills
'HAWICK', -- Hawick
'PBLUFF', -- Pacific Bluffs
'TONGVAH', -- Tongva Hills
'RGLEN', -- Richman Glen
'RICHM', -- Richman
'BEACH', -- Vespucci Beach
'DELBE', -- Del Perro Beach
'DELPE', -- Del Perro
'MIRR', -- Mirror Park
'MORN', -- Morningwood
'VINE', -- Vinewood
'WVINE', -- West Vinewood
'EAST_V', -- East Vinewood
'BURTON', -- Burton
'ALTA', -- Alta
'HORS', -- Vinewood Racetrack
'BHAMCA', -- Banham Canyon
'GOLF', -- GWC and Golfing Society
'TEXTI', -- Textile City
},
-- Everything else (Davis, Strawberry, Chamberlain, El Burro, Stab
-- City, Sandy Shores, Grapeseed, Paleto, the wilds) falls through
-- to the `low` tier.
},
}