GSC reference › Built-in
AddTestClient()
Built-in (engine)
Server
Adds a test client to the map and returns a reference to that client.
Signature
AddTestClient()
Returns
entity
Example (from Treyarch's docs)
ent[i] = AddTestClient()
Real uses in BO3's scripts
Called 3 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm.gsc, line 981
bot = addtestclient(); - scripts/zm/_zm_devgui.gsc, line 2426
bot = addtestclient(); - scripts/shared/bots/_bot.gsc, line 201
botent = addtestclient();
Related built-ins
- IsTestClient()Returns true if the player is a test client (Does not have a remote user).
- 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.
- SetClientNameMode()Alters the way that the player name is updated, to prevent cheating by spectators altering their name to communicate with active players.
- SetClientThirdPerson()Set the client to be third person
- SetClientScriptMainMenu()Sets g_scriptMainMenu dvar only on this client
- IsLocalClientDriver()Returns the driver of the vehicle.
- CodeSetClientField()Sets the value for a given client field.
- GetClientTime()Gets the current client time in milliseconds
- ClientHasSnapshot()Returns true if client has recieved a snapshot from the server
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).