Summary

Methods

Returns whether the player's active weapon is raised.
Raises or lowers the player's weapon.
Raises the player's weapon if it is lowered, or lowers it if it is raised.

Methods

Player:IsWeaponRaised()

shared gamemodes/catwork/plugins/sh_raisegun.lua:54

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

Player:SetWeaponRaised(bIsRaised)

shared gamemodes/catwork/plugins/sh_raisegun.lua:39

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

Player:ToggleWeaponRaised()

shared gamemodes/catwork/plugins/sh_raisegun.lua:79

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.

See also

Defined in