Skip to content

releaseScriptCamera

Client-side

Available in Neon, not standard MTA

Restores captured gameplay camera state and optionally leaves a successful scene under its black fade.

Syntax

bool releaseScriptCamera(int token [, bool preserveFade = false])

Arguments

tokenint

Current lease generation token.

preserveFadebooloptional · default false

Keep the fade black so gameplay can fade in after restoration.

Returns

true when the calling resource released its current generation; false for stale or foreign tokens.

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.

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →