GSC reference › Built-in

IsSpectating()

Built-in (engine) Client

Returns 1 if the local client is spectating

Signature

IsSpectating(<localClientNum>, [checkFistPerson])

Parameters

NameRequired?Details
localClientNumRequired Number of the local client to check
checkFistPersonOptional Check if we want first person spectating to be not considered as spectate

Example (from Treyarch's docs)

if ( IsSpectating( localClientNum, false ) )

Real uses in BO3's scripts

Called 59 times in the decompiled scripts. A few, zombies first:

New to GSC?

Start with the basics, or paste a compile error to get the fix.

Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).