engineFreeModel
Server-side
Releases a logical model owned by the calling resource after remapping surviving elements to their native parent.
Syntax
bool engineFreeModel(int model)Arguments
modelintActive server logical model ID owned by the caller.
Returns
true when the definition was safely released; false for an unknown or foreign model.
Ownership and lifecycle
The server keeps logical IDs stable, but each client chooses its own GTA slot. When a resource stops, Neon moves surviving elements back to their parent model before freeing those slots.
Example
if isElement(vehicle) then destroyElement(vehicle) endengineFreeModel(model)Where this comes from
SOURCECLuaModelDefs.cppServer/mods/deathmatch/logic/luadefs/CLuaModelDefs.cpp INTRODUCED / EXTENDEDa7a20d32bRead the commit and why the change was made RELATED CATEGORY HARNESS server-model-registry-test Category-level coverage · test-resources/server-model-registry-test
RELATED NEON APIS
Read the system guide → Continue exploring
← Back to the Neon Lua API · How Server-authoritative models works →