GSC reference › Built-in
LocalClientActive()
Built-in (engine)
Client
Return whether local client is active
Signature
LocalClientActive(<client>)
Parameters
| Name | Required? | Details |
|---|---|---|
| client | Required | the client to check if it is active |
Example (from Treyarch's docs)
active = LocalClientActive( 0 )
Real uses in BO3's scripts
Called 4 times in the decompiled scripts. A few, zombies first:
- scripts/shared/_character_customization.csc, line 1589
if(localclientactive(data_lcn) && (!(isdefined(data_struct.charactermodel.anglesoverride) && data_struct.charactermodel.anglesoverride))) - scripts/shared/callbacks_shared.csc, line 948
if(localclientactive(clientnum)) - scripts/shared/exploder_shared.csc, line 548
if(localclientactive(clientnum)) - scripts/shared/exploder_shared.csc, line 588
if(localclientactive(clientnum))
Related built-ins
- GetActiveLocalClients()Get the number of active local clients
- NewClientHudElem()Create a new hud element for a particular client
- RegisterClientField()Register a client field.
- SetClientUIVisibilityFlag()Sets a HUD visibility flag only on this client
- GetLocalClientNumber()Returns the local client number.
- SetWorldFogActiveBank()Sets world fog volumes active bank mask.
- SetClientNameMode()Alters the way that the player name is updated, to prevent cheating by spectators altering their name to communicate with active players.
- SetPBGActiveBank()Set PBG bank mask from script.
- SetClientThirdPerson()Set the client to be third person
- GadgetIsActive()Returns true if the gadget is active.
- SetClientScriptMainMenu()Sets g_scriptMainMenu dvar only on this client
- IsBonusCardActive()Returns if the bonus card is enabled and active in the class, cannot be called on a larry
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).