I’m not sure you can “modify” the pickup notification… For Weapon Selection, I know for a fact you can’t… You’d have to write your own. Take a look at the TTT client file for weapon selection…
This should be a “stand-alone” version of the TTT weapon switcher. I can’t recall if I updated everything, or not… But, that’s the code from TTT ( old, most likely outdated unless the weapon switcher wasn’t updated, but you can still learn a LOT from it… Basically use PlayerBindPress to prevent the main weapon switcher from showing by return true; On invprev/next show if not shown, reset visible time if shown… On +attack, if shown select weapon and return true, if not visible do not override return. On +attack2 if shown close and return true, if not shown then don’t override )… From that, it is pretty simple to create one. I’ll be creating a much lighter weight version of a weapon switcher without a lot of the bloat in a bit and releasing it.
To hide the HL2 version take a look at ShouldDrawHUD: https://dl.dropboxusercontent.com/u/26074909/tutoring/vgui/proper_hud_creation.lua.html
Never use a for loop in that hook either, it is called n times per frame, a loop would be n^2 per frame. I did a benchmark, 100 million times using the above code = 0.08 seconds. With a loop … 15 seconds…
Now, DrawPoly I can help you with… What is the problem? What doesn’t work? If you’re drawing a circle, or something like that and you have an issue where the color doesn’t work, more specifically the alpha not being properly calculated… IE 255 shows up as half transparent… Do this:
surface.SetDrawColor( Color( 20, 20, 20, 200 ) );
surface.DrawPoly( _speedo );
Additionally, I’d recommend creating the object ONCE ( and updating only when resolution changes ), and drawing it…
Example of a stand-alone hook which calls when the player changes resolution: https://dl.dropboxusercontent.com/u/26074909/tutoring/_hooks/acecool_hook_playerchangedresolution/gm_playerchangedresolution.lua
Usage example ( poly:MakeCircle is almost the same as the above simplified circle, but part of a poly meta-table object I’ll be releasing soon… This just covers making it once, rendering it x times, updating it only when necessary… ): https://dl.dropboxusercontent.com/u/26074909/tutoring/_hooks/acecool_hook_playerchangedresolution/example_usage.lua
Now, non-Lua weapon, you need to have a table of data ( especially ammo, etc… ): https://dl.dropboxusercontent.com/u/26074909/tutoring/weapons/hl2_weapons_table.lua.html
As for name, try seeing if PrintTable( Entity( 1 ):GetActiveWeapon( ):GetTable( ) ) works, otherwise you’d need to set it in the table.