Gamemode.PlayerCanPickupItem
From GMod Wiki
Event Hook | |
Hook Name | PlayerCanPickupItem |
Syntax | GM:PlayerCanPickupItem( Player Player, Weapon Item ) |
Description | Hook this to override whether the player can pick item(s) up. |
Returns | Nil |
Lua State | |
BBCode | [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerCanPickupItem]Gamemode.PlayerCanPickupItem [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | This stops the player from picking up a sent_ball |
---|---|
Used on | |
Code | function GM:PlayerCanPickupItem(ply, item) if item:GetClass() == "sent_ball" then return false end return true end |
Output | N/A |