Player class
Part of Raise Gun
Summary
Methods
IsWeaponRaised()shared
Returns whether the player's active weapon is raised.
Raises or lowers the player's weapon.
ToggleWeaponRaised()shared
Raises the player's weapon if it is lowered, or lowers it if it is raised.
Methods
Returns whether the player's active weapon is raised.
Tools such as the physgun, toolgun, camera, gravity gun and keys always count as raised. A truthy
result from the ShouldWeaponBeRaised hook also counts as raised; otherwise the networked state set
by Player:SetWeaponRaised decides.
Returns
- Boolean Whether the weapon is raised; false when the player has no valid weapon
Raises or lowers the player's weapon.
Server only; does nothing on the client. Stores the state in the BOOL_WEAPON_RAISED data table
variable, which is networked to clients, and runs the OnWeaponRaised hook with the player, their
active weapon and the new state.
Parameters
- bIsRaised Boolean True to raise the weapon, false to lower it
See also
Raises the player's weapon if it is lowered, or lowers it if it is raised.
Does nothing when the CanWeaponBeToggled hook returns false for the active weapon.