resetAmbientPedPopulationModels
Client-side
Releases the stock population-model residency established by the ambient-ped update pass.
Syntax
bool resetAmbientPedPopulationModels()Returns
true after the reset request, including when no ambient population slots were active.
Ownership and lifecycle
The model-residency pass retains GTA's eight stock zone-ped slots until reset or game teardown. Candidate queries create no element; a multiplayer resource must validate proposals, create and own peds, assign one syncer, advance owner epochs, and clean up every element. Native-event tokens belong to the calling resource, activate only on the current syncer, and are revoked on resource shutdown.
Important behavior
- The native clear routine removes only its KEEP_IN_MEMORY pins; live MTA peds and resource model references continue to protect their models.
- The reference resource calls this when traffic is disabled and during client resource shutdown. Game reset and teardown also clear the state.
Where this comes from
SOURCECLuaWorldDefs.cppClient/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp INTRODUCED / EXTENDEDb159bcd0cRead the commit and why the change was made TEST RESOURCE native-ped-traffic test-resources/native-ped-traffic
RELATED NEON APIS
Read the system guide → Continue exploring
← Back to the Neon Lua API · How Synchronized ambient pedestrians works →