SAFScriptsDocs

SAF Traffic

Server-wide traffic control with jams, closures, detours and a live road map.

Status
Coming soon
Version
1.0.0
Resource
saf-traffic
Frameworks
Qbox, QBCore, ESX, ND Core, ox_core, standalone
Requires
OneSync
Optional
ox_lib, SAF Weather
Database
Not needed
Open files
config.lua, bridge/, custom/
The SAF Traffic control panel with density sliders on the left, the road map in the middle and the active items listed
On this page

SAF Traffic runs traffic for the whole server from one place. Staff take the city from empty streets to full gridlock, close roads, back up a freeway behind a crash and send cars around it. It all happens from a panel with a live map of every road in the game.

What it does

FeatureWhat it means
DensityTraffic, random cars, parked cars, pedestrians and scenario peds, plus the car and ped budgets. Presets for Empty, Light, Normal, Rush hour and Gridlock
Rush hour scheduleTime windows that switch to a preset on the game clock
JamsFour levels from Slow to Stopped. Each slows the roads and can add extra AI cars that queue in the lanes
Road closuresCars stop routing through. Barriers, cones and an arrow board go up at the ends. Slow lane mode cones off a lane instead
DetoursClose a road and pick the way around in one go. The detour gets a slow zone so it backs up
Speed zonesFor school zones, scenes and events
Labels and timersEvery item has a label, an optional end time, and can be announced nearby or to everyone

Synced for everyone

The server owns the traffic state. Density and road switches are local to each game, so every client applies the same settings, and late joiners get them the moment they load in. Every change is checked on the server, rate limited and logged with who made it.

The live map

The map is built from GTA's own road network: freeways, major and minor roads, dirt tracks, street names, postal codes, players and everything that's active. Your server reads it once with a road scan.

A jam selected on the map
FIG 01A jam selected, with its level, extra cars and timer in the inspector

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.