fadeScriptCamera
Client-side
Runs GTA's native fade under the current camera lease.
Syntax
bool fadeScriptCamera(int token, bool fadeIn, float durationSeconds [, int red = 0, int green = 0, int blue = 0])Arguments
tokenintCurrent lease token.
fadeInbooltrue to reveal, false to fade to color.
durationSecondsfloatNon-negative fade duration.
red, green, blueintoptional · default 0, 0, 0Fade color channels from 0 through 255.
Returns
true when the native fade was accepted; false otherwise.
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
SOURCECLuaCameraDefs.cppClient/mods/deathmatch/logic/luadefs/CLuaCameraDefs.cpp INTRODUCED / EXTENDED8cf6cc3cbRead the commit and why the change was made RELATED CATEGORY HARNESS native-script-camera-test Category-level coverage · test-resources/native-script-camera-test
RELATED NEON APIS
Read the system guide → Continue exploring
← Back to the Neon Lua API · How Native script camera works →