Field tools are configured in data/config.tools.lua and the server only file. The main switches are also in /jobadmin, Server settings, Field tools. With ox_target, qb-target or tgiann-target every action sits on the player, the vehicle trunk or the placed prop. Without a target resource the interaction key G (Config.Keybinds.interact) opens a menu for the closest player, vehicle or prop.
The items handcuffs, handcuff_key and zipties must exist in your inventory, see Installation.
Restraints
| Handcuffs | Zip ties | |
|---|---|---|
| Item | handcuffs |
zipties |
| Who can use them | police, sheriff on duty |
everybody with the item |
| Item used up | no | yes |
| Removed by | the same jobs, or anybody with handcuff_key |
anybody with WEAPON_KNIFE, WEAPON_SWITCHBLADE, WEAPON_DAGGER or WEAPON_MACHETE |
| Break free | no | yes, skill check with E |
Restrain with the target option or use the item from the inventory, it acts on the closest player. Using the item on a restrained player removes the restraint if you are allowed to. A restrained player cannot run, jump, fight, use weapons, enter or leave vehicles or open the inventory. The state is exposed as the isCuffed state bag and as ishandcuffed metadata on QBCore and Qbox.
Add your own types by copying an entry in Config.Restraints.types:
| Field | Meaning |
|---|---|
item |
Item that restrains |
consume |
true removes the item when used |
jobs |
Jobs that may use it, false = everybody with the item |
removeWith |
Items or weapons that remove it. The jobs above can always remove it |
returnItem |
Only with consume = true: give the item back to whoever removes it |
struggle |
The restrained player can try to break free |
| Key | Default | What it changes |
|---|---|---|
Config.Restraints.enabled |
true |
Restraints on or off |
Config.Restraints.distance |
2.0 |
Max meters between both players |
Config.Restraints.requireDuty |
true |
Types limited to jobs only work on duty |
Config.Restraints.struggleCooldown |
90 |
Seconds between two break free attempts |
Config.Restraints.struggleDifficulty |
{ 'easy', 'medium', 'medium', 'hard' } |
ox_lib skill check, one entry is one key press |
Config.Restraints.keepOnReconnect |
true |
Players who leave restrained are restrained again on rejoin, until restart |
Escort, vehicles and search
These work on players who are restrained or down (dead or last stand).
| Action | Where |
|---|---|
| Escort, Stop escorting | Target the player |
| Put in vehicle | While escorting, target a vehicle. The player sits in a free rear seat |
| Take out of vehicle | Target the vehicle. With escortAfterTakeOut escorting starts by itself |
| Search | Target the player, their inventory opens (ox_inventory or qb-inventory) |
| Key | Default | What it changes |
|---|---|---|
Config.PlayerActions.escort |
true |
Escorting |
Config.PlayerActions.vehicle |
true |
Put in and take out of vehicles |
Config.PlayerActions.search |
true |
Searching |
Config.PlayerActions.jobs |
false |
Jobs that may use these actions, false = everybody |
Config.PlayerActions.requireDuty |
false |
With jobs set: only on duty |
Config.PlayerActions.escortAfterTakeOut |
true |
Escort starts after taking someone out |
Down detection reads state bags, QBCore metadata and health. For another ambulance resource change ServerEditable.IsDown and ClientEditable.IsDown.
Trunk props
Access depends on the vehicle model, so it works with any garage resource.
- Go on duty and stand behind a listed vehicle.
- Target the trunk, Open trunk. The trunk opens with the equipment menu.
- Pick a prop. Walk to the spot, rotate with the mouse wheel,
Eor left click places it,Backspaceor right click puts it back. - Target a placed prop to Move or Pick up. Every employee of the same job can handle it, admins all of them.
Spike strips burst the tyres of every vehicle that drives over them, except bulletproof tyres. Admins clear an area with /clearprops [radius] (default 30 m).
Default catalog (Config.TrunkProps.catalog):
| Key | Label | Model | Limit per player |
|---|---|---|---|
cone |
Traffic cone | prop_roadcone02a |
20 |
cone_large |
Large cone | prop_roadcone01a |
10 |
barrier |
Police barrier | prop_barrier_work05 |
10 |
barrier_led |
Lighted barrier | prop_barrier_work06a |
6 |
road_sign |
Road sign | prop_snow_sign_road_06g |
4 |
spikes |
Spike strip | p_ld_stinger_s |
2 |
light |
Work light | prop_worklight_03b |
4 |
tent |
Scene tent | prop_gazebo_03 |
1 |
medbag |
Medical bag | xm_prop_x17_bag_med_01a |
2 |
toolbox |
Tool box | prop_tool_box_04 |
2 |
Each entry has label, model, icon, limit, freeze (cannot be pushed by vehicles) and spikes. Access per job:
Config.TrunkProps.jobs = {
police = {
minGrade = 0,
vehicles = { 'police', 'police2', 'police3', 'police4', 'policet', 'policeb', 'sheriff', 'sheriff2', 'fbi', 'fbi2', 'pranger', 'riot' },
props = { 'cone', 'cone_large', 'barrier', 'barrier_led', 'road_sign', 'spikes', 'light', 'tent' },
},
}The defaults also give ambulance (ambulance model: cone, light, tent, medbag) and mechanic (towtruck, towtruck2, flatbed: cone, light, toolbox).
| Key | Default | What it changes |
|---|---|---|
Config.TrunkProps.enabled |
true |
Trunk props on or off |
Config.TrunkProps.requireDuty |
true |
Only on duty |
Config.TrunkProps.maxPerPlayer |
20 |
Props one player can have placed |
Config.TrunkProps.lifetime |
0 |
Minutes until a prop disappears, 0 = never |
Config.TrunkProps.removeOnDrop |
true |
Props of players who leave are removed |
Config.TrunkProps.maxVehicleDistance |
60.0 |
How far from the vehicle a taken prop can be placed |
Job actions
Target options for the jobs listed per action. The server times and validates them.
| Action | Default jobs | Duration (ms) |
|---|---|---|
checkId |
police, sheriff | |
revive |
ambulance | 8000 |
heal |
ambulance | 5000 |
repair |
mechanic | 10000 |
clean |
mechanic | 5000 |
flip |
mechanic, police, sheriff | 4000 |
unlock |
police, sheriff, mechanic | 6000 |
impound |
police, sheriff, mechanic | 5000 |
An action takes jobs (false = everybody), duration, item (required item) and consume (remove it). Config.JobActions.enabled and requireDuty (default true) apply to all. Revive, heal and impound call ServerEditable.Revive, ServerEditable.Heal and ServerEditable.OnImpound. By default revive and heal use the built-in medical module when it runs, otherwise esx_ambulancejob or qb-ambulancejob, and impound goes to jcks_vehicles when it is started.