GSC reference › Built-in
AllowSprint()
Built-in (engine)
Server
Player Called on: player
Sets whether the player can sprint
Signature
<player> AllowSprint(<player sprint>)
Called on an entity: player AllowSprint(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| player sprint | Required | A boolean. True if the player can sprint, and false otherwise |
Example (from Treyarch's docs)
player AllowSprint(false)
Real uses in BO3's scripts
Called 30 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_devgui.gsc, line 1127
sprint = self allowsprint(0); - scripts/zm/_zm_utility.gsc, line 6509
self allowsprint(0); - scripts/zm/zm_factory.gsc, line 287
e_player allowsprint(0); - scripts/zm/zm_island_main_ee_quest.gsc, line 2240
player allowsprint(0); - scripts/zm/zm_island_transport.gsc, line 380
self allowsprint(0);
Related built-ins
- SetSprintDuration()Set the player's sprint duration
- SetSprintCooldown()Set the player's sprint cooldown duration
- SetClientPlayerSprintTime()Sets player_sprintTime dvar only on this client
- SprintButtonPressed()Check if the player is pressing the 'sprint' button.
- SprintUpRequired()Force the player to release the sprint button before sprinting.
- IsSprinting()Returns true if the player is sprinting.
- IsPlayerSprinting()Returns 1 if the player is currently sprinting
- sprintf()Replaces field specifiers in a string with values passed in, returns result string format specifiers take the form of {[n]} in the source string...
- AllClientsPrint()Cause all clients to print the localized version of this string.
- 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
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).