GSC reference › Built-in
AllowLean()
Built-in (engine)
Server
Player Called on: player
Sets whether the player can lean
Signature
<player> AllowLean(<player lean>)
Called on an entity: player AllowLean(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| player lean | Required | A boolean. true if the player can lean, and false otherwise |
Example (from Treyarch's docs)
player AllowLean( false )
Real uses in BO3's scripts
Called 5 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_devgui.gsc, line 1125
lean = self allowlean(0); - scripts/zm/_zm_devgui.gsc, line 1145
self allowlean(lean); - scripts/zm/_zm_utility.gsc, line 6507
self allowlean(0); - scripts/zm/_zm_utility.gsc, line 6534
self allowlean(1); - scripts/zm/zm_temple_minecart.gsc, line 458
player allowlean(1);
Related built-ins
- CleanupSpawnedDynEnts()Removed all dyn ents that were dynamically spawned (gib pieces, destructible parts, etc)
- 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
- HasWeapon()Returns true if the player has the given weapon
- TakeWeapon()Take the weapon
- ButtonPressed()Check if the host is pressing the button/key, "BUTTON_A", "BUTTON_B", "K", etc...
- GetPlayerAngles()Get the player view angles
- SwitchToWeapon()Switch to a different weapon or cycle weapons if no weapon is given
- SetWeaponAmmoClip()Set the weapon's ammo
- FreezeControls()Blocks or unblocks control input from this player
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).