Traffic & Pursuits
Traffic stops
Config.Traffic = {
requireSiren = true, -- lights / siren must be on to pull a vehicle over
emergencyOnly = true, -- must be in an emergency class vehicle
maxDistance = 25.0, -- how far ahead a vehicle can be targeted
dispatchCall = false, -- create a "Traffic Stop" dispatch call
warnOnFlags = true, -- warn the officer when the driver / vehicle has warrants or flags
abandonDistance = 150.0, -- the stop ends if the officer drives this far away
-- % the driver fails to yield. Modifiers stack, capped at 85
fleeChance = { base = 3, wanted = 35, stolen = 45, drugs = 15, drunk = 10, weapon = 20 },
}NPC interaction
Config.Interaction = {
distance = 2.2, -- on-foot interaction range
bacLimit = 0.08, -- legal limit for the breathalyzer
hostileChance = { base = 1, wanted = 8, armed = 25 }, -- % an NPC attacks when approached
fleeChance = { base = 2, wanted = 25, drugs = 8 }, -- % an NPC runs when approached
citations = {
{ label = 'Speeding', fine = 250 },
-- ...
},
}Add, remove or reprice charges in citations. Each needs a label and a fine.
Blacklisted zones
Areas where the [E] Interact prompt never shows for ambient peds or peds spawned by other scripts (event areas, shops, hospital or prison interiors, job NPCs). Empty by default.
Config.InteractionBlacklist = {
-- circle: centre and radius in metres
{ label = 'Pillbox lobby', coords = vec3(307.7, -595.4, 43.3), radius = 25.0 },
-- polygon: 3 or more corners, optional height limits
{ label = 'Event area', points = { vec2(100.0, 200.0), vec2(160.0, 200.0), vec2(160.0, 260.0), vec2(100.0, 260.0) }, minZ = 20.0, maxZ = 40.0 },
}| Field | Type | Meaning |
|---|---|---|
coords + radius | vector3, number | A circle zone. The ped's distance from coords must be within radius |
points | list of vec2 / vec3 | A polygon zone (at least 3 corners, in order around the edge) |
minZ / maxZ | number, optional | Height limits for a polygon zone, so one floor of a building can be blocked |
label | string, optional | Just a name for you |
The check uses the ped's position. People ERS is already dealing with still work inside a zone: callout suspects and victims, and anyone cuffed or arrested, so callouts and arrests are never cut off.
To use your own zone system instead, edit IsInInteractionBlacklist(coords) in client/open/functions.lua: return true to hide the prompt for a ped at those coordinates.
Blacklisted models
Ped models the [E] Interact prompt never shows for, anywhere on the map (shopkeepers, job NPCs, peds from other scripts). Empty by default. Use model names or hashes.
Config.InteractionBlacklistModels = {
'mp_m_shopkeep_01',
's_m_y_cop_01',
}Same rule as the zones: callout suspects and victims, and anyone ERS has cuffed or arrested, still work even if their model is on the list.
To use your own check, edit IsInteractionBlacklistedModel(ped) in client/open/functions.lua.
Contraband
What a frisk (person) or a vehicle search (vehicle) can turn up. chance is in %.
Config.Contraband = {
person = {
{ label = 'Wallet', chance = 85 },
{ label = 'Small bag of cannabis', chance = 7, illegal = true, drugs = true },
{ label = 'Unregistered pistol', chance = 2, illegal = true, weapon = true },
-- ...
},
vehicle = {
{ label = 'Registration papers', chance = 80 },
{ label = 'Brick of cocaine', chance = 1, illegal = true, drugs = true },
-- ...
},
}| Flag | Effect |
|---|---|
illegal = true | Marked as illegal in the search results |
drugs = true | Counts as carrying drugs (questioning, flee chance) |
weapon = true | Counts as carrying a weapon |
Pursuits
Config.Pursuit = {
dispatchCall = true, -- a "Vehicle Pursuit" call that follows the officer
isPanic = false,
updateInterval = 5000, -- ms between dispatch position updates
lostDistance = 650.0, -- the suspect is lost if further than this...
lostTime = 30, -- ...for this many seconds
surrenderChance = 12, -- % per check that a cornered suspect on foot gives up
bailChance = 25, -- % per check that a stuck / slow driver bails on foot
speed = 60.0, -- suspect top speed (m/s)
}