parceltheft.lua
The complete default parceltheft.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 while opening the parcel. Enable = false to skip
-- it. Swap `spot` for any other minigame.* (see client/minigame.lua) or your
-- own function returning true/false.
Minigame = {
Enable = true,
Start = function()
return require('client.minigame').spot({
gridCount = 12, -- icons shown in the grid
rounds = 3, -- correct picks required to win
timeLimitSec = 8, -- overall time limit; 0 = no limit
}).success
end,
},
Cooldown = 12, -- Minutes before a stolen parcel respawns.
BaseXP = 10, -- XP awarded on successful pickup.
OpenTime = 2, -- Seconds for the open-package progress bar.
BoxModel = 'hei_prop_heist_box', -- Prop attached while carrying a package (also the porch box fallback).
Logging = true, -- Whether to emit lib.logger entries for pickups/opens.
-- The handed-out item and the loot it opens into live in `Config.Package`
-- (configs/config.lua) — mailbox break-ins and parcel theft share the same
-- openable `package` item. The carry visuals + open skill-check stay here.
-- Carry state — disables these controls while the player has a parcel attached
-- so they can't sprint/shoot/etc. while running off with stolen mail.
DisabledControls = { 21, 22, 23, 24, 25, 36, 47, 58, 140, 141, 142, 143, 257, 263, 264 },
PoliceAlert = {
Enable = true,
Chance = 35, -- Daytime alert chance (0-100).
NightChance = 17, -- Reduced chance during night-time hours.
NightStart = 22, -- Hour at which "night" begins (24h clock).
NightEnd = 5, -- Hour at which "night" ends.
Send = function()
local alertMessage = 'Parcel theft 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-21C - Parcel Theft',
message = ('A %s stealing parcels from porches at %s'):format(data.sex, data.street),
flash = 0,
unique_id = data.unique_id,
sound = 1,
blip = {
sprite = 310,
scale = 1.0,
colour = 1,
flashes = false,
text = '911 - Parcel Theft',
time = 5,
radius = 0,
}
})
--]]
end,
},
-- Spawn points. Each is streamed in/out around the player based on `distance`
-- so we don't pay for 49 always-on world entities.
Locations = {
{ coords = vector3(1060.63, -378.30, 67.24), heading = 50.0, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1010.23, -423.59, 64.35), heading = -52.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1028.81, -409.67, 64.95), heading = -50.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1056.19, -449.07, 65.26), heading = -10.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3( 893.20, -540.62, 57.51), heading = -63.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3( 850.28, -532.66, 56.93), heading = -94.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3( 861.73, -583.54, 57.16), heading = 2.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3( 980.31, -627.75, 58.24), heading = 37.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3( 959.95, -669.93, 57.45), heading = -61.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3( 996.79, -729.64, 56.82), heading = -50.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1201.07, -575.49, 68.14), heading = -46.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1265.15, -704.05, 63.54), heading = -30.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1303.17, -527.39, 70.47), heading = -20.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1373.14, -555.82, 73.69), heading = 70.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1341.33, -597.35, 73.71), heading = 55.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1301.04, -574.35, 70.74), heading = -13.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1250.80, -515.48, 68.35), heading = -105.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1262.60, -429.84, 69.02), heading = -66.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1100.93, -411.39, 66.56), heading = -100.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1009.71, -572.51, 59.60), heading = -99.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3( 965.08, -543.30, 58.36), heading = -60.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1045.53, -497.57, 63.08), heading = -103.00, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3( 993.62, -620.83, 58.05), heading = -57.00, distance = 25.0, prop = 'hei_prop_heist_box' },
-- Paleto Bay
{ coords = vector3(-374.62, 6190.97, 31.73), heading = 226.54, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-356.98, 6207.49, 31.84), heading = 226.31, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-347.54, 6225.34, 31.88), heading = 226.98, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-379.95, 6252.66, 31.85), heading = 317.37, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-360.19, 6260.57, 31.90), heading = 136.28, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-449.92, 6261.68, 30.04), heading = 67.62, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-442.47, 6197.88, 29.55), heading = 94.57, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-302.12, 6326.95, 32.89), heading = 42.01, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-227.23, 6377.42, 31.76), heading = 47.65, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-105.58, 6528.65, 30.17), heading = 305.62, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3( -8.41, 6653.31, 31.11), heading = 291.92, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3( 35.45, 6663.22, 32.19), heading = 166.79, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-272.57, 6401.05, 31.50), heading = 210.52, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(-213.60, 6396.30, 33.09), heading = 40.42, distance = 25.0, prop = 'hei_prop_heist_box' },
-- Sandy Shores
{ coords = vector3(1371.92, 3647.19, 34.34), heading = 15.12, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1392.07, 3659.32, 34.29), heading = 16.49, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1631.71, 3720.50, 34.39), heading = 127.86, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1735.13, 3809.95, 34.84), heading = 33.46, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1925.16, 3824.65, 32.44), heading = 31.29, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1898.85, 3781.72, 32.88), heading = 298.80, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1824.66, 3743.32, 34.72), heading = 16.94, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1797.48, 3721.86, 34.64), heading = 306.19, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1639.21, 3731.31, 35.07), heading = 325.65, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1437.14, 3605.43, 35.07), heading = 207.48, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1437.14, 3639.62, 36.17), heading = 7.91, distance = 25.0, prop = 'hei_prop_heist_box' },
{ coords = vector3(1382.57, 3605.43, 35.07), heading = 207.48, distance = 25.0, prop = 'hei_prop_heist_box' },
},
}