Skip to main content
sh-policejob is a full-featured law enforcement resource for RedM roleplay servers. It supports VORP and RSG and lets you run police, sheriff, marshal, detective, or custom law jobs under one configurable system. The resource includes duty stations, payroll, patrol zones, a NUI command panel, cuffs and escorting, inventory search and seizure, civilian robbery support, detective inspections, badge props, prison wagons, supply wagons, armories, stores, witness alerts, localization, and Discord logging.

Overview

Dependencies

Required:
  • vorp_core
  • vorp_inventory
  • oxmysql
VORP inventory is used for usable items, player inventory searches, custom armory inventories, and police stores.
Start your framework, inventory, and oxmysql before sh-policejob. If ox_target is enabled, start it before this resource as well.

Features

Configure multiple law jobs in Config.PoliceJobs, such as police, sheriff, and marshal. Duty stations can use markers or NPCs and can display map blips. Officers must be on duty before most job-locked actions are available.
Configure command names and control hashes in Config.Commands and Config.Keys. Defaults include /police_duty, /policepanel, /policeradial, duty prompt key E, radial key U, and lockpick key U.
The NUI police panel shows on-duty officers, logistics, patrols, armories, stores, supply wagons, prison wagons, and officer management. Senior officers can hire, fire, promote, and demote based on Config.Management.
Officers receive automatic salary payments on a configurable interval. Pay can be set per job and per grade through Config.Payroll.Jobs.
Patrol zones define center points, radii, and pay multipliers. Officers can start and stop patrols from the panel or commands. Ambient patrol tasks can spawn timed checkpoints with optional rewards and timeout rules.
Officers can cuff, uncuff, escort, and transport suspects. Cuffs, keys, and lockpicks are item-driven when enabled. Cuffed state persists in cuffed.json.
On-duty officers can search cuffed suspects, open their inventory, and seize cash, gold, or evidence items. Protected items and allowed evidence items are configurable.
The robbery system is separate from police search. It supports /rob, target state checks, player robbery inventory access, and NPC robbery rewards for dead or hogtied NPCs.
Detectives can use a detective_kit item or configured inspect control to inspect NPCs or players. Inspections use a timed progress flow and can return cause-of-death style information.
Officers can equip, remove, and adjust 3D badge props. Badge presets are saved in badge_positions.json. Default badge types include marshal, detective, sheriff, and deputy.
Officers can spawn prison wagons, place escorted suspects inside, pull prisoners out, and return wagons. Each wagon has a configured job, grade requirement, spawn point, prisoner limit, and escape damage threshold.
Supply wagons provide personal or configured stash access for officers. RSG has a built-in stash implementation, while VORP servers can use Config.Integration.OpenSupplyInventory.
Config.PoliceShops creates shared armory/storage locations. Config.PoliceStores creates stocked police supply stores with per-item prices, amounts, metadata, and grade requirements.
Gunshots can trigger witness alerts for on-duty officers after a configurable delay. Alerts include location labels, optional blips, cooldowns, and minimum online officer checks.
Separate webhook channels are available for duty, patrol, search, seizure, wagon, alert, inventory, and cuff events.

Installation

1

Add the resource

Place the sh-policejob folder in your server resources directory.
2

Install dependencies

Make sure your framework, inventory resource, and oxmysql are installed and started before sh-policejob.
3

Configure the framework

Open config.lua and set Config.Framework to "vorp" or "rsg".
4

Install items

For VORP, run install/items.sql or merge it into your existing item table. For RSG, copy the entries from install/rsgitems.txt into rsg-core/shared/items.lua.
5

Add item images

Add item images for any new RSG inventory entries you keep. The package includes install/images/detective_kit.png.
6

Configure jobs

Add your law jobs to Config.PoliceJobs and make sure those job names exist in your framework.
7

Configure stations and locations

Update duty stations, management locations, armories, stores, patrol zones, prison wagons, and supply wagons for your map layout.
8

Configure logging

Add Discord webhook URLs in Config.Webhooks. Leave a webhook value blank to disable that log channel.
9

Start the resource

Add ensure sh-policejob to server.cfg after its dependencies.
server.cfg

Item Setup

The default config references these items:
install/items.sql intentionally does not insert lockpick or bandage because many servers already define those items. Add them manually if your server does not have them.

Core Configuration

config.lua

Interaction Modes

Uses native RedM prompts and is the default option.
config.lua

Payroll and Patrols

config.lua

Enforcement Configuration

config.lua

Robbery Configuration

RSG: Disable default RSG Robbery by going to rsg-inventory\server\events, Comment out code related to “targetMeta”
config.lua

Detective and Badge Configuration

config.lua

Wagons, Shops, and Stores

Prison wagons, supply wagons, armories, and stores are all configured in config.lua.
RSG supply wagon stashes work through rsg-inventory by default. VORP supply wagon stash support is intentionally exposed through Config.Integration.OpenSupplyInventory so you can connect your server’s stash implementation.

Witness Alerts

config.lua

Webhooks

config.lua

Commands

Some commands are configurable through Config.Commands; utility/debug commands are registered directly in their feature files.

Server Exports

Use these exports from other server resources.

Duty Export Return Shapes

Return types differ by export. IsPlayerOnDuty returns a boolean, GetOnDutyCount returns a number, GetPlayerDutyData returns a table or nil, and list/map exports return tables.

Client Exports

Use these exports from client resources when you need badge or notification helpers.

Integration Hooks

You can override or provide these hooks in config.lua.

Persistent Files

Back up cuffed.json and badge_positions.json before deleting or reinstalling the resource if you need to preserve active cuff states or saved badge positions.

Compatibility Notes

  • Make sure the resource folder is named sh-policejob if you use the export examples exactly as written.
  • If you run sh-policemdt, keep the same framework setting in both resources so duty exports and character lookups resolve correctly.
  • The VORP supply wagon stash path is a hook point by default. Configure Config.Integration.OpenSupplyInventory if your server needs VORP supply wagon storage.
  • If player inventory search fails on VORP, confirm your vorp_inventory build supports openPlayerInventory.
  • If RSG armories or stores fail to open, confirm rsg-inventory exposes OpenInventory, CreateShop, and OpenShop.