• How would I bind a key to the context menu?
    11 replies, posted
I know that TTT does it and fretta does something like it when you're in spectator mode.
[b][url=wiki.garrysmod.com/?title=Gamemode.KeyPress]Gamemode.KeyPress [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] Like that?
yes, thanks.
np
[b][url=wiki.garrysmod.com/?title=Gamemode.OnContextMenuOpen]Gamemode.OnContextMenuOpen [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] [b][url=wiki.garrysmod.com/?title=Gamemode.OnContextMenuClose]Gamemode.OnContextMenuClose [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[QUOTE=Willox;25698679][b][url=wiki.garrysmod.com/?title=Gamemode.OnContextMenuOpen]Gamemode.OnContextMenuOpen [img_thumb]http://wiki.garrysmod.com/favicon.ico[/img_thumb][/url][/b] [b][url=wiki.garrysmod.com/?title=Gamemode.OnContextMenuClose]Gamemode.OnContextMenuClose [img_thumb]http://wiki.garrysmod.com/favicon.ico[/img_thumb][/url][/b][/QUOTE] Those two don't allow you to assign a key to opening the context menu, just executes some code when it is opened / closed
He asked how TTT did it
[QUOTE=Willox;25699915]He asked how TTT did it[/QUOTE] It was resolved 11 hours ago.
I had something else to add and I did, out of my own free will.
[QUOTE=Willox;25701739]I had something else to add and I did, out of my own free will.[/QUOTE] Yeah, don't shoot down Willox's answer just because he used mine, the player can manually go in and bind a key to context menu, he may want to use Willox's answer to execute code when they open it
[QUOTE=Willox;25698679][b][url=wiki.garrysmod.com/?title=Gamemode.OnContextMenuOpen]Gamemode.OnContextMenuOpen [img_thumb]http://wiki.garrysmod.com/favicon.ico[/img_thumb][/url][/b] [b][url=wiki.garrysmod.com/?title=Gamemode.OnContextMenuClose]Gamemode.OnContextMenuClose [img_thumb]http://wiki.garrysmod.com/favicon.ico[/img_thumb][/url][/b][/QUOTE] Actually, the one c-unit posted wasn't really what I was looking for, this I can easily use. The other one made you have to do all this coding to check if it opened.
That's because the one I posted is just to make sure a character has the key bound to it. [editline]28th October 2010[/editline] that's how i would use it anyways, if they push c then open the context menu, then use game.OnContextMenuOpen to do something
Sorry, you need to Log In to post a reply to this thread.