Skip to content

Installation

Follow these steps to install sd-pettycrime on your FiveM server.

Supported Inventories

InventoryStatus
ox_inventorySupported
qb-inventorySupported
qs-inventory / qs-inventory-proSupported
origen_inventorySupported
codem-inventorySupported
jaksam_inventorySupported
ps-inventorySupported
lj-inventorySupported
tgiann-inventorySupported

Recommendation

We heavily recommend using ox_inventory — it's the best inventory system available and more importantly, it's completely free and open source! You won't be missing out on any features in our scripts if you use a different inventory, this is simply a recommendation.

Minigames

No external minigame resource required

Petty Crime ships its own built-in library of 21 minigames. You do not need ps-ui, SN-Hacking, or any other minigame resource. Every crime has one enabled by default, and you can swap it per-crime for any other built-in (or your own function that returns true/false) right in the config. See the Configuration page for the full list and tuning options.

Dependencies

Ensure the following dependencies are installed and running on your server before starting:

DependencyRequiredNotes
FrameworkYesqb-core / qbx_core / es_extended
ox_libYes
oxmysqlYes
Target SystemYesox_target / qb-target / qtarget
InventoryYesAny of the supported inventories listed above

TIP

Framework, target system, and inventory are all automatically detected — no configuration needed. The required database tables are also created automatically on first start.

1 Add the Resource

  1. Download the latest version of sd-pettycrime from the CFX Portal
  2. Extract it into your server's resources directory
  3. Ensure the resource is started in your server.cfg (or resources.cfg). Ensuring the sub-folder (i.e. ensure [sd]) works too, provided dependencies start first. Example:
cfg
ensure ox_lib
ensure oxmysql
ensure qb-core

ensure sd-pettycrime

2 Add Items

Petty Crime uses a set of tool items that players need to commit each crime, plus a couple of loot items. Register the ones you intend to use in your inventory system.

INFO

The tools are interchangeable — you choose which ones each crime accepts (see the tool mapping below), and several crimes use vanilla weapons (WEAPON_HAMMER, WEAPON_WRENCH, WEAPON_HATCHET) that already ship with the game — no item setup needed for those. The reward items in the loot tables (rolex, goldchain, laptop, metalscrap, …) are placeholders — swap them in configs/<crime>.lua for items already on your server.

Required items

package and brick are required, not interchangeable like the tools. package is the shared openable loot item every mailbox break-in, parcel theft, and smash & grab hands out; brick is consumed by the brick-on-the-gas crime. Register both.

Tool & Loot Items

lua
['screwdriver'] = {
    label = 'Screwdriver',
    weight = 300,
    stack = true,
    close = true,
    description = 'A flathead screwdriver for prying coin boxes and unbolting fixtures.',
},
['wirecutter'] = {
    label = 'Wire Cutters',
    weight = 600,
    stack = true,
    close = true,
    description = 'Sharp wire cutters that slice through brake lines and wiring.',
},
['cutter'] = {
    label = 'Box Cutter',
    weight = 200,
    stack = true,
    close = true,
    description = 'A retractable box cutter — sharp enough to slash tyres and puncture tanks.',
},
['multitool'] = {
    label = 'Multitool',
    weight = 400,
    stack = true,
    close = true,
    description = 'A folding multitool that handles meters, news racks, and signs.',
},
['powersaw'] = {
    label = 'Power Saw',
    weight = 4000,
    stack = true,
    close = true,
    description = 'A cordless reciprocating saw for cutting through metal.',
},
['anglegrinder'] = {
    label = 'Angle Grinder',
    weight = 3500,
    stack = true,
    close = true,
    description = 'A battery angle grinder that chews through converters and AC units.',
},
['bolt_cutter'] = {
    label = 'Bolt Cutters',
    weight = 2500,
    stack = true,
    close = true,
    description = 'Long-handled bolt cutters for chains, bolts, and converter mounts.',
},
['brick'] = {
    label = 'Brick',
    weight = 2000,
    stack = true,
    close = true,
    description = 'A heavy clay brick. Wedge it on a gas pedal to send a car running.',
},
['package'] = {
    label = 'Package',
    weight = 500,
    stack = true,
    close = true,
    description = 'A sealed package. Open it to see what is inside.',
},
lua
['screwdriver'] = { name = 'screwdriver', label = 'Screwdriver', weight = 300, type = 'item', image = 'screwdriver.png', unique = false, useable = false, shouldClose = true, description = 'A flathead screwdriver for prying coin boxes and unbolting fixtures.' },
['wirecutter'] = { name = 'wirecutter', label = 'Wire Cutters', weight = 600, type = 'item', image = 'wirecutter.png', unique = false, useable = false, shouldClose = true, description = 'Sharp wire cutters that slice through brake lines and wiring.' },
['cutter'] = { name = 'cutter', label = 'Box Cutter', weight = 200, type = 'item', image = 'cutter.png', unique = false, useable = false, shouldClose = true, description = 'A retractable box cutter — sharp enough to slash tyres and puncture tanks.' },
['multitool'] = { name = 'multitool', label = 'Multitool', weight = 400, type = 'item', image = 'multitool.png', unique = false, useable = false, shouldClose = true, description = 'A folding multitool that handles meters, news racks, and signs.' },
['powersaw'] = { name = 'powersaw', label = 'Power Saw', weight = 4000, type = 'item', image = 'powersaw.png', unique = false, useable = false, shouldClose = true, description = 'A cordless reciprocating saw for cutting through metal.' },
['anglegrinder'] = { name = 'anglegrinder', label = 'Angle Grinder', weight = 3500, type = 'item', image = 'anglegrinder.png', unique = false, useable = false, shouldClose = true, description = 'A battery angle grinder that chews through converters and AC units.' },
['bolt_cutter'] = { name = 'bolt_cutter', label = 'Bolt Cutters', weight = 2500, type = 'item', image = 'bolt_cutter.png', unique = false, useable = false, shouldClose = true, description = 'Long-handled bolt cutters for chains, bolts, and converter mounts.' },
['brick'] = { name = 'brick', label = 'Brick', weight = 2000, type = 'item', image = 'brick.png', unique = false, useable = false, shouldClose = true, description = 'A heavy clay brick. Wedge it on a gas pedal to send a car running.' },
['package'] = { name = 'package', label = 'Package', weight = 500, type = 'item', image = 'package.png', unique = false, useable = true, shouldClose = true, description = 'A sealed package. Open it to see what is inside.' },
sql
-- Register the items in your ESX `items` table
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
    ('screwdriver',   'Screwdriver',    300, 0, 1),
    ('wirecutter',    'Wire Cutters',   600, 0, 1),
    ('cutter',        'Box Cutter',     200, 0, 1),
    ('multitool',     'Multitool',      400, 0, 1),
    ('powersaw',      'Power Saw',     4000, 0, 1),
    ('anglegrinder',  'Angle Grinder', 3500, 0, 1),
    ('bolt_cutter',   'Bolt Cutters',  2500, 0, 1),
    ('brick',         'Brick',         2000, 0, 1),
    ('package',       'Package',        500, 0, 1);

The openable package item

Mailbox break-ins, parcel theft, and smash & grab all hand out one shared package item, defined in config.luaConfig.Package. While carried it sits on the player's shoulder (controls disabled); using it opens it and rolls the loot pool you configure there. The bridge registers it as usable automatically on QB-core and ESX; on ox_inventory the script hooks the use itself.

Tool-to-Crime Mapping

Each crime accepts one tool from its Items array (any one is enough). These are the defaults each crime ships with — change a crime's Items in configs/<crime>.lua to require different tools. Entries prefixed WEAPON_ are vanilla GTA weapons that ship with the game (no item setup needed).

CrimeConfigDefault tool(s)
Mailboxmailbox.luaWEAPON_HAMMER
Payphonepayphone.luascrewdriver, multitool
Parking meterparkingmeter.luascrewdriver, multitool
News racknewsrack.luascrewdriver, multitool
Vending machinevending.luaWEAPON_HAMMER
Smash & grabsmashgrab.luaWEAPON_HAMMER
Street sign theftsignrob.luascrewdriver, WEAPON_WRENCH, multitool
Catalytic convertercatalytic.luapowersaw, anglegrinder, bolt_cutter, WEAPON_HATCHET
AC unit stripacstrip.luapowersaw, anglegrinder, bolt_cutter, WEAPON_HATCHET
Wheel thefttiretheft.luaWEAPON_WRENCH
Wheel looseningwheelloose.luaWEAPON_WRENCH
Tyre slashingtireslash.luacutter
Brake-line cuttingbrakecut.luawirecutter, cutter
Fuel-tank sabotagefuelsabotage.luacutter

Crimes not listed — pickpocketing, armed ped robbery, shoplifting, brick on the gas (brick), ATM skimming (skimmer) and parcel theft — use no tool or a dedicated item set in their own config.

TIP

Example — make catalytic theft require any cutting tool:

lua
-- configs/catalytic.lua
Items = { 'powersaw', 'anglegrinder', 'bolt_cutter', 'WEAPON_HATCHET' },

3 Add Item Images

Copy the item images from sd-pettycrime/images/ into your inventory's image folder (e.g. ox_inventory/web/images/). You can also download them directly from the container below.

Petty Crime Item Images9 images
Screwdriver
screwdriver.png
Wire Cutters
wirecutter.png
Box Cutter
cutter.png
Multitool
multitool.png
Power Saw
powersaw.png
Angle Grinder
anglegrinder.png
Bolt Cutters
bolt_cutter.png
Brick
brick.png
Package
package.png

4 Start the Resource

To load the resource, you can either:

  • Restart your server entirely, or
  • Run the following in your server console (F8 or txAdmin live console):
cfg
refresh
ensure sd-pettycrime

The required database tables (pettycrimes, sd_pettycrime_admin, sd_pettycrime_history) are created automatically on first start.

Configuration

Configure the resource to fit your server. See the Configuration page for detailed explanations of every setting, or edit the files directly in the resource's configs/ folder.