engineHasCollisionLoadedAt
Client
Tells whether the world around a point is solid yet: its collision, buildings and landscapes loaded.
bool engineHasCollisionLoadedAt(float x, y, z [, int interior = nil])
Parameters
| Name | Type | Description |
|---|---|---|
| x, y, z | float | The point in the world. |
| interior | int | The interior to load. Without it, the interior the local player is in.default nil |
Returns
true if everything around the point is loaded and collides.
Example
local position = getElementPosition(localPlayer)
if not engineHasCollisionLoadedAt(position.x, position.y, position.z) then
setElementFrozen(localPlayer, true)
end