GSC reference › Built-in
AllowAds()
Built-in (engine)
Server
Player Called on: player
Sets whether the player can switch to ADS
Signature
<player> AllowAds(<player ads>)
Called on an entity: player AllowAds(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| player ads | Required | A boolean. true if the player can switch to ADS, and false otherwise. |
Example (from Treyarch's docs)
player AllowAds( false )
Real uses in BO3's scripts
Called 16 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_altbody_beast.gsc, line 198
self allowads(0); - scripts/zm/_zm_devgui.gsc, line 1126
ads = self allowads(0); - scripts/zm/_zm_turned.gsc, line 164
self allowads(0); - scripts/zm/_zm_utility.gsc, line 6508
self allowads(0); - scripts/cp/cp_mi_cairo_aquifer_utility.gsc, line 1294
self allowads(1);
Related built-ins
- PlayerADS()Gets the player weapon position fraction
- AdsButtonPressed()Check if the player is pressing the 'ads' button.
- 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).