Skip to content

dumbestdevalive/AI-Spawn-In-Newer-DLC-Cars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

DLC Traffic by Area

Spawns AI drivers in Hao's Special Works and newer DLC cars (addons are also supported via config). The car model is randomized by zone: each area uses its own list of vehicles, so traffic feels different in the city, desert, airport, etc.

Features

  • AI traffic drives Hao's-style and newer DLC cars (e.g. Euros, S95, Cyclone II, Vigero ZX, Arbiter GT, Corsita, Champion, SM722) plus addon vehicles if you add their spawn codes.
  • Vehicle type is chosen at random from the current zone (e.g. Vinewood, Airport, Sandy Shores).
  • Configurable per-zone car lists and a default list for unlisted zones.
  • Spawns on road nodes when possible; cleans up vehicles when far from the player.
  • Never spawns in front of you: with AvoidSpawnInFront (default on), DLC traffic only spawns behind or to the sides, so cars don’t pop in on the road ahead. Spawns are also pushed further away (55–95 m by default) and only in clear spots (no other vehicle within 12 m).

Installation

  1. Copy the dlc-traffic-by-area folder into your server resources directory.
  2. Add ensure dlc-traffic-by-area to server.cfg.
  3. (Optional) Edit config.lua to enable/disable, change limits, or edit zone car lists.

Configuration

  • Enabled – Turn the system on or off.
  • MaxSpawned – Max number of DLC-traffic vehicles near the player at once.
  • SpawnIntervalMs – Time between spawn attempts (milliseconds).
  • MinSpawnDistance / MaxSpawnDistance – Spawn only within this range from the player (defaults 55–95 m so cars don’t appear in front of you).
  • AvoidSpawnInFront – When true (default), spawns only behind or to the sides of the player, never on the road ahead.
  • MinClearRadius – Don’t spawn if any vehicle is within this many metres of the spawn point (default 12 m).
  • DespawnDistance – Spawned vehicles beyond this distance are deleted.
  • ZoneCars – Table of zone name → list of vehicle spawn codes. Zone names come from the game (e.g. AIRP, DOWNT, VINEW, SANDY). Use exact spawn names (e.g. "schafter2", "reaper").
  • DefaultZoneCars – Vehicles used when the current zone is not in ZoneCars.

Zone names can be looked up in the FiveM zone reference. Add or change zones in ZoneCars to control which cars appear in each area.

Dependencies

None.

About

Spawns AI drivers in Hao's Special Works and newer DLC cars.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages