SAFScriptsDocs

SAF Pursuit

Pursuit modes for police vehicles, an in-car unit display and a PIT helper.

Status
Coming soon
Version
1.0.0
Resource
saf-pursuit
Frameworks
Qbox, QBCore, ESX, ND Core, ox_core, standalone
Dependencies
None. ox_lib optional for notifications
Database
Not needed
Open files
config.lua, bridge/, custom/
The SAF Pursuit unit display in mode C showing 46 mph, no speed cap and PIT READY on the left side
On this page

SAF Pursuit gives police units three driving modes on one key. A is patrol, B is response, C is full pursuit. A small display in the car shows the mode, speed and cap, and in pursuit modes it coaches the officer through a PIT.

What it does

PartWhat it does
Modes A, B, CEach sets engine power, a top speed boost, a speed cap, brakes, tyre grip, springs and anti-roll. Change any value or add a mode
Per-model tuningGive a bike or a heavy SUV its own values for any mode
Only that carChanges live on that one vehicle and are put back when the mode goes off, the officer gets out, or someone else takes the car
SyncedThe mode is on the vehicle's state bag, so every player, your CAD and other scripts can see which units are in pursuit
Unit displayA compact panel that looks like in-car equipment: lit mode keys, a speed readout and the cap. Moves to any corner
PIT helperIn B and C it picks the car you're closing on, tells you which side to take, and checks speed, angle and contact point against your PIT policy
PIT assistOptional. On a real contact in the window, the target gets a small yaw push so it spins instead of bouncing off
Auto offDrops back to OFF after sitting slow for a while

Nothing runs per frame unless you are driving a police car with a mode on.

Modes

ModeNamePowerTop speedCap
APatrol1.00xstock105 mph
BResponse1.15x+6%125 mph
CPursuit1.30x+12%none

B and C count as "in pursuit": they turn on the PIT helper and auto off, and IsInPursuit returns true. See Configuration for every value.

Mode B with no PIT target
FIG 01Mode B, Response, with the PIT helper waiting for a target

The PIT helper

In B and C the lower half of the display tracks the car ahead of you. It shows LEFT or RIGHT for the side to take, and three checks:

CheckGreen when
SPDYou're inside the PIT speed range and matching their speed
ANGYou're running parallel to them
POSYour front corner is at their rear quarter, close alongside

When all three are green it shows PIT READY. Above the PIT speed limit (60 mph by default) it shows the limit in red. The server checks every assisted PIT: police, mode, distance, speed, position and a rate limit. The push is applied by the target's own game.

Next steps

SAF Scripts by San Andreas' Finest StoreDiscordsupprot@safrp.org

Not affiliated with or endorsed by Rockstar Games, Take-Two Interactive or Cfx.re.