Gamemode.AllowPlayerPickup
From GMod Wiki
Event Hook | |
Hook Name | AllowPlayerPickup |
Syntax | GM:AllowPlayerPickup( Player player, Entity entity ) |
Description | Called when a player attempts to pickup a prop. Return if a player can pickup the prop |
Returns | Boolean |
Lua State | |
BBCode | [b][url=wiki.garrysmod.com/?title=Gamemode.AllowPlayerPickup]Gamemode.AllowPlayerPickup [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Pickup an object only if the player is admin |
---|---|
Used on | |
Code | function GM:AllowPlayerPickup( player, entity) return player:IsAdmin() end |
Output | N/A |
Additional Notes
- This is called when a user picks it up using E (use), not gravity gun or physgun.