Weapon.IsCarriedByLocalPlayer

From GMod Wiki

Jump to: navigation, search


Function
Syntax Weapon:IsCarriedByLocalPlayer( )
Description:
Returns true if the weapon is being carried by the local player.
Returns: Boolean
In Object: Weapon
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Weapon.IsCarriedByLocalPlayer]Weapon.IsCarriedByLocalPlayer [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionPrints true if the local players active weapon is being held by the local player.
Used onNewerClient.png
Code
print( LocalPlayer():GetActiveWeapon():IsCarriedByLocalPlayer() )
OutputIt will always be true, unless the local player has no weapons.


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox