Skip to content

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

modelint

Active 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, San Andreas Online moves surviving elements back to their parent model before freeing those slots.

Example

if isElement(vehicle) then destroyElement(vehicle) end
engineFreeModel(model)

Where this comes from

RELATED SA:O APIS

Continue exploring

Read the system guide →