brickgas.lua
The complete default brickgas.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 during the setup. Enable = false to skip it. Swap
-- `rhythm` for any other minigame.* (see client/minigame.lua) or your own
-- function returning true/false.
Minigame = {
Enable = true,
Start = function()
return require('client.minigame').rhythm({
lanes = 4, -- number of lanes (keys A S D F)
noteCount = 12, -- total notes to clear
fallSec = 1.6, -- seconds a note takes to reach the hit line
maxMisses = 3, -- misses allowed before caught
hitWindow = 0.11, -- clean-hit timing window (fraction of fall)
}).success
end,
},
Cooldown = 20, -- Per-plate cooldown (minutes) before the same car can be re-sabotaged.
Items = { 'brick' }, -- Brick required to drop on the pedal.
SetupTime = 3.5, -- Seconds spent leaning into the cabin wedging the brick (progress bar duration).
JoyrideDuration = 30, -- Seconds the ghost driver keeps the throttle pinned before despawning.
BaseXP = 22, -- Base XP per successful sabotage.
ConsumeBrick = true, -- The brick stays wedged on the pedal in the runaway car — remove one from the player on success.
Logging = true, -- Enables lib.logger usage for this action.
-- Vehicle classes the target option will refuse to attach to. Bikes
-- don't have a gas pedal in the meaningful sense; everything else
-- is the standard road-vehicle-only filter.
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.
IgnoreModels = {
-- ['emperor'] = true,
},
-- Ped model for the invisible ghost driver. Any model works since
-- we set alpha=0 immediately after CreatePedInsideVehicle, so the
-- driver is never visible. `a_m_y_skater_01` loads cheaply and is
-- safe to assume is always streamable.
DriverModel = 'a_m_y_skater_01',
-- `TaskVehicleTempAction` action ID for the runaway driving behavior.
-- 30 = "drive forward at standard throttle, no steering input" —
-- the closest match to "stuck accelerator pedal." The ped doesn't
-- actively steer or avoid obstacles; the wheel stays locked straight
-- and the car goes wherever the front bumper happens to point.
--
-- Alternatives if you want different chaos:
-- 23 — full throttle forward (more aggressive)
-- 6 — burnout (wheels smoke first, then launch)
-- 7 — sharp forward acceleration
DriveAction = 30,
PoliceAlert = {
Enable = true,
Chance = 55, -- Loud, visible, dangerous — runaway car gets called in fast.
Send = function() -- Client function
local alertMessage = 'Vehicle accelerating uncontrolled'
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-21G - Runaway Vehicle',
message = ('A %s sent a runaway vehicle careening down %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 - Runaway Vehicle',
time = 5,
radius = 0,
}
})
--]]
end,
},
}