I need a script to show text on the HUD for 3 seconds when the player switches weapons.
http://www.polyvore.com/cgi/img-thing?.out=jpg&size=l&tid=7853155
I need a script to show text on the HUD for 3 seconds when the player switches weapons.
http://www.polyvore.com/cgi/img-thing?.out=jpg&size=l&tid=7853155
Where’s the code that you’ve got so far?
-snip- Do what the guy below me said.
Uh… what? You are incorrect, you can use PlayerBindPress with the slot<n> commands. slot1 means the player has just pressed the key for selecting slot 1. You’ll probably want to do stuff for invnext and invprev otherwise it’ll only do stuff when people press the key instead of scrolling.
Right, I had forgotten that hook existed. Never actually gotten around to using it. Use **[Gamemode.PlayerBindPress
http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.PlayerBindPress)** then.
What about **[Input.IsMouseDown
http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Input.IsMouseDown)** ?
Most people have switch weapons binded to MOUSE_WHEEL_UP and MOUSE_WHEEL_DOWN. I tried this with an until loop and a timer but when the key was pressed the game would stop doing everything for the alloted time and then show the text for a fraction of a second
Did you post a white picture?
Oh hey there DoctorSalt. Let me remind you that I know where you live… Now what were you saying?