GSC reference › Built-in
PlayerADS()
Built-in (engine)
Server
Player Called on: player
Gets the player weapon position fraction
Signature
<player> PlayerADS()
Called on an entity: player PlayerADS(...)
Example (from Treyarch's docs)
if ( self PlayerADS() > 0.3 )
Real uses in BO3's scripts
Called 21 times in the decompiled scripts. A few, zombies first:
- scripts/zm/archetype_zod_companion.gsc, line 272
if(entity.enemy playerads() < entity.nextpreemptivejukeads) - scripts/shared/ai/archetype_apothicon_fury.gsc, line 1453
if(entity.enemy playerads() < entity.nextpreemptivejukeads) - scripts/shared/ai/archetype_robot.gsc, line 1446
if(entity.enemy playerads() < entity.nextpreemptivejukeads) - scripts/shared/challenges_shared.gsc, line 486
if(isdefined(player.lastsprinttime) && (gettime() - player.lastsprinttime) < 2500 && player playerads() >= 1) - scripts/shared/stealth_player.gsc, line 186
if(self playerads() > 0.3)
Related built-ins
- AdsButtonPressed()Check if the player is pressing the 'ads' button.
- AllowAds()Sets whether the player can switch to ADS
- SetFilterPassQuads()Sets the filter pass quads
- LoadSiegeAnim()Load a siege anim into memory
- IsADS()Returns true if this local client is in ADS, false otherwise
- LoadSentientEventParameters()Loads the global sentient event parameters for a given scriptbundle sentient events asset.
- GetAllCharacterHeads()Returns all character indices, even disabled ones, for the current session mode (or specified session mode)
- UnloadSiegeAnim()Unload a siege anim from memory
- GetCurrentWeapon()Gets the current player weapon
- SetLUIMenuData()Sets a data value for a given lui menu, the data name has to be precached and the value as well, if its a string.
- GiveWeapon()Give a weapon to the player
- HasPerk()Test if player has a perk
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).