[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.