ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. engineFreeModel

Function

engineFreeModel

Frees a model from engineRequestModel. On the server the model is shared: objects, cars and peds using it get the parent model; on the client it frees the local model. A named model keeps its number in model-ids.json unless forgetName = true.

Syntax

bool engineFreeModel(int modelID [, bool forgetName = false])

Arguments

modelIDint
Model number.
forgetNamebool, optional = false
true = also free the number bound to the name.Not in MTA:SA

Differences from MTA:SA

  • In MTA:SA this function is client-side only.
  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

engineFreeModel(int modelID)

Returns

true on success.

Example

local id = engineRequestModel("object", 1337)
engineFreeModel(id)

See also