enginePreloadWorldArea | Multi Theft Auto: Wiki Skip to content

enginePreloadWorldArea

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function allows a specific area to be loaded immediately, which can be useful when teleporting a player. The function is not based on a radius, but a specific zone is loaded.

Syntax

nil enginePreloadWorldArea ( float x, float y, float z, [ string loadingOption = "all" ] )
Required Arguments
  • x: Position in the X axis.
  • y: Position in the Y axis
  • z: Position in the z axis.
Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.

  • loadingOption (default: "all"): MISSING_PARAM_DESC

Returns

  • nil: value

Nothing

Code Examples

shared
enginePreloadWorldArea(1000, 500, 0)
local z = getGroundPosition(1000, 500, 100)
setElementPosition(localPlayer, 1000, 500, z)

See Also

Engine Functions
Engine Elements