Gamemode.PlayerUse
From GMod Wiki
Event Hook | |
Hook Name | PlayerUse |
Syntax | GM:PlayerUse( Player ply, Entity Entity ) |
Description | Triggered when a player uses something. |
Returns | Return false to stop people from using the object. |
Lua State | |
BBCode | [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerUse]Gamemode.PlayerUse [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- If you override GM:PlayerUse, true must be returned to allow it!
- Does not respect Entity.SetUseType, always called as if set to CONTINUOUS_USE
- Does not work on props (and maybe some other types of entities).
- You can use this for NPCs, because there is no NPC:OnUse.