Skip to content

engineRequestModel

Server-side

Available in Neon, not standard MTA

Allocates a stable, resource-owned logical model for an object, vehicle, or ped.

Syntax

int|false engineRequestModel(string type, int parentID [, string name = ""])

Arguments

typestring

object, vehicle, or ped.

parentIDint

Native GTA model used for gameplay behavior and legacy fallback.

namestringoptional · default ""

Optional resource-local registry name.

Returns

A logical model ID from 42341 through 65534, or false when validation, naming, quota, parent, or registry-capacity checks fail.

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.

Important behavior
  • Logical IDs are not reused during the server process.
  • The server qualifies a non-empty name with the owning resource.
  • Commit ac3a54f57 moved the range above Neon's complete FileID layout; 65535 remains the invalid-model sentinel.

Example

local model = assert(engineRequestModel("vehicle", 411, "mission_infernus"))
local vehicle = createVehicle(model, 0, 0, 3)

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →