• Drawing Pickups
    1 replies, posted
I can't seem to override the base version of the pickup HUD. I really wanna create something simple for it, but it wont let me override it in my gamemode. I have searched alot on google about any guides/tutorials on how to make your own "Weapon pickup hud" but all I could find was people telling me to 'override' it by just making [LUA] function GM:HUDDrawPickupHistory( ) end [/LUA] inside of a clientside script. Any help would be appreciated :)
You can have a look at the version that's implemented in base [url=https://github.com/garrynewman/garrysmod/blob/28b7be5cda7fdde1a19c59d43408dcb2df357fd8/garrysmod/gamemodes/base/gamemode/cl_hudpickup.lua]here[/url]. It should give you a good idea on what you'll need. The short version is you do need to override [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/HUDDrawPickupHistory]GM/HUDDrawPickupHistory[/url], and iterate over GM.PickupHistory, which contains a table of everything you've picked up recently. (Bear in mind you'll need to manage popping items off the queue when they expire in the hook too.)
Sorry, you need to Log In to post a reply to this thread.