SAFScriptsDocs

Troubleshooting

SAF Traffic is coming soon. These docs describe the build that will ship.

On this page

The map is empty

The roads haven't been scanned yet. Open /traffic and press Scan roads. See First time: scan the roads. Once roads.json exists, keep it.

The scan stopped halfway

Press Scan roads again. It carries on from the last tile in scan.json. Only one person can scan at a time, so check nobody else is running one.

The scanner's game stutters during the scan

Lower Config.Scan.CallsPerFrame. The scan takes longer but runs smoother.

Density changes do nothing

Another script is setting density every frame. Look for the warning in the server console on start. The usual one is qb-smallresources: remove its density loop or set its values to 1.0.

Jams slow traffic but no extra cars appear

  • OneSync must be on. Without it the server can't spawn the jam cars.
  • Someone must be within Config.Jam.ActiveRange (400 m) of the jam.
  • Cars never spawn closer than Config.Jam.MinPlayerDistance (60 m) to a player.
  • Config.Jam.MaxCarsTotal may already be used up by other jams.

Jam cars or props don't show with entity lockdown

They are spawned by the server, so sv_entityLockdown doesn't block them. If they still don't appear, check Config.Props.Enabled and the MaxTotal limits.

Closed roads still have traffic on them

Cars already on the road when it closes keep driving until they leave it. New traffic routes around it. The junctions at each end stay open on purpose (Config.Closures.JunctionTrim) so crossing roads keep working.

No postals on the map

Config.Postals.Resource and File don't point at your postal file. The file must be a list of { code, x, y }. With Resource = false it is read from the saf-traffic folder.

Rush hour doesn't switch on

Config.Schedule.Enabled is false by default. Turn it on in the panel or in config. The schedule follows the SAF Weather clock when it runs, otherwise the game clock.

Items are gone after a restart

Config.Save.Items is off, or state.json was deleted. Turn it on to keep closures, jams, zones, density and the schedule.

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

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