NetworkClient

networkSetInSpectatorMode

NETWORK_SET_IN_SPECTATOR_MODE0x423DE3854BB50894

The GTA V native NETWORK_SET_IN_SPECTATOR_MODE of the NETWORK namespace, as LS:MP client scripts call it: the global function networkSetInSpectatorMode, in JavaScript and in Lua.

SignatureJavaScript
networkSetInSpectatorMode(toggle: boolean, playerPed: Ped): void
SignatureLua
networkSetInSpectatorMode(toggle: boolean, playerPed: Ped)

Usage

JavaScript
networkSetInSpectatorMode(toggle, playerPed);
Lua
networkSetInSpectatorMode(toggle, playerPed)

Parameters

ParameterTypeJavaScriptLua
toggleBOOLbooleanboolean
playerPedPednumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Network NETWORK
In the game
void NETWORK_SET_IN_SPECTATOR_MODE(BOOL toggle, Ped playerPed)
Hash
0x423DE3854BB50894

Open in the interactive natives reference