X3D Environment
Free one-file map cleaner: no NPCs, no AI traffic, no scenarios, no idle cam, and blood, tire marks and wounds wiped away.
Buy / Get freeConfig builderInstallation
- Unzip and rename the folder to
x3d_environment(other scripts call the exports by this name) - Drop it in
resources/ - Add to
server.cfg:
ensure x3d_environment
Join the server and press F8 — a status line lists the active modules:
[x3d_environment] npc=true scenarios=true idlecam=true body=true decals=true
No database, no framework, no license. Works on ESX, QBCore and standalone.
A better way to save CPU (recommended)
Telling the game "don't spawn NPCs" has to be done every frame — that is a GTA limitation, not a script bug. To get it for free, stop them at the source instead. In server.cfg:
setr onesync_population false
The server then never creates NPCs or AI traffic. Turn the loop off in config.lua:
Config.Population.densityLoop = false
Config.Population.sweep = false
The other modules (stains, scenarios, idle camera) keep working.
Common settings
Everything lives in config.lua, every line explained in Thai and English.
-- some pedestrians, no traffic
Config.Population.ped = 0.3
Config.Population.vehicle = 0.0
-- keep blood for roleplay, clear wounds off the body
Config.Body.blood = false
Config.Body.damage = true
-- sweep the ground faster and wider
Config.Decals.interval = 2000
Config.Decals.radius = 150.0
The five modules
| Module | What it does |
|---|---|
Config.Population |
Stops the engine spawning NPCs / AI traffic / parked cars / AI cops / boats / garbage trucks, and deletes the ones already spawned |
Config.Scenarios |
Disables vehicle scenarios map-wide |
Config.IdleCam |
Kills the idle camera that swings around when you stand still |
Config.Body |
Clears blood, wounds, dirt and wetness on players |
Config.Decals |
Wipes ground decals around the player |
A disabled module never creates its thread.
Calling it from another resource
Pause a module (a cutscene, a mission that needs NPCs) and switch it back on without a restart:
exports['x3d_environment']:SetEnabled('population', false)
-- ... do your thing ...
exports['x3d_environment']:SetEnabled('population', true)
exports['x3d_environment']:IsEnabled('decals') --> true / false
Module names: population · scenarios · idlecam · body · decals
Things to know
| Topic | Detail |
|---|---|
Config.Scenarios.human is off by default |
SetScenarioTypeEnabled disables scenarios game-wide, not just for engine NPCs — shop and job NPCs using TaskStartScenarioInPlace would freeze. Engine pedestrians are already handled by the density settings and the sweep |
Config.Decals wipes every decal in range |
Including decals other resources place on purpose (graffiti, blood left as police evidence). Turn Config.Decals.enabled off if your server uses those |
Config.Body.otherPlayers |
Local rendering only — each client cleans what it sees, other players' actual state is untouched |
| OneSync Infinity | With onesync_population true the NPCs are server entities and client-side deletion may not catch all of them — onesync_population false is the reliable path |
| Alongside ESX | ESX ships its own Config.Multipliers population settings — align them, or the two systems fight every frame |
Support
Discord: discord.gg/x3d-developer · Web: x3d-developer.com