• Show Text on HUD for 4 seconds when...
    7 replies, posted
I need a script to show text on the HUD for 3 seconds when the player switches weapons. [img]http://www.polyvore.com/cgi/img-thing?.out=jpg&size=l&tid=7853155[/img]
Where's the code that you've got so far?
-snip- Do what the guy below me said.
[QUOTE=Entoros;19919962]Unfortunately, there aren't any available key bindings for the weapon select buttons, so your best guess (since most people wouldn't rebind the weapon keys) is to use [B][URL="http://wiki.garrysmod.com/?title=Input.IsKeyDown"]Input.IsKeyDown [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG][/URL][/B] with the keys KEY_1 through KEY_6 in a Think hook.[/QUOTE] 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 [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerBindPress]Gamemode.PlayerBindPress [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] then.
What about [b][url=wiki.garrysmod.com/?title=Input.IsMouseDown]Input.IsMouseDown [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] ? 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?
[QUOTE=DoctorSalt;19935842]Did you post a white picture?[/QUOTE] Oh hey there DoctorSalt. Let me remind you that I know where you live... Now what were you saying?
Sorry, you need to Log In to post a reply to this thread.