Gamemode.HUDItemPickedUp

From GMod Wiki

Revision as of 21:38, 5 January 2011 by Shen (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameHUDItemPickedUp
SyntaxGM:HUDItemPickedUp( String ItemName )
DescriptionCalled when an item has been picked up.
ReturnsNil
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.HUDItemPickedUp]Gamemode.HUDItemPickedUp [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionNotifies you on the chat box when you pick up an item.
Used onNewerClient.png
Code
hook.Add( "HUDItemPickedUp", "NotifyMe", function( item )
 
     LocalPlayer():ChatPrint("You just picked up a " .. item .. "!")
 
end )
OutputYou just picked up a item_battery!


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox