Skip to content

acquireScriptCamera

Client-side

Available in Neon, not standard MTA

Acquires the resource-exclusive GTA script camera and returns a generation token.

Syntax

int|false acquireScriptCamera([bool inhibitControls = false])

Arguments

inhibitControlsbooloptional · default false

Also engage the reference-counted gameplay inhibitor and native player-safe braking bit.

Returns

A non-zero generation token, or false when another resource owns the lease.

Ownership and lifecycle

Only one resource can own the global script camera. Neon rejects stale callbacks and releases ownership on stop, restart, disconnect, or an authoritative server camera RPC.

Example

local token = assert(acquireScriptCamera(true))
assert(setScriptCameraFixed(token, Vector3(0, 0, 20), Vector3(0, 0, 0)))

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →