Gamemode.AllowPlayerPickup

From GMod Wiki

Revision as of 12:16, 13 June 2011 by SiPlus (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameAllowPlayerPickup
SyntaxGM:AllowPlayerPickup( Player player, Entity entity )
DescriptionCalled when a player attempts to pickup a prop. Return if a player can pickup the prop
ReturnsBoolean
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.AllowPlayerPickup]Gamemode.AllowPlayerPickup [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPickup an object only if the player is admin
Used onNewerServer.png
Code
 
function GM:AllowPlayerPickup( player, entity)
	return player:IsAdmin()
end
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox