Catch player choosing team.
Hi,
I need to know how to detect when a player presses the team select menu key (for example: M). I need this team select menu to be replaced by another menu, how do i this? |
Re: Catch player choosing team.
This might be helpful for you: http://forums.alliedmods.net/showthread.php?t=184918
|
Re: Catch player choosing team.
Thanks, will try this :)
|
Re: Catch player choosing team.
You have to let cs do the job, just alter the visual menu : http://forums.alliedmods.net/showpos...35&postcount=4
|
Re: Catch player choosing team.
Quote:
|
Re: Catch player choosing team.
Yes, just hook "chooseteam" command and set vgui pdata to false on there.
If i have to gonna do it. |
Re: Catch player choosing team.
Quote:
I would like to think that I know how to hook "chooseteam", but I'd rather be sure that the code is 100% good, as I'm still prone to rookie mistakes. |
Re: Catch player choosing team.
Would something like this work if I added it to your plugin? As it seems simpler than hooking chooseteam?
Quote:
|
Re: Catch player choosing team.
No, you have to set pdata, and only before you want to show your custom menu.
Don't change directly userinfo because players may like to buy with vgui menus. pdata is set again each time client_infochanged is called. |
Re: Catch player choosing team.
I see, thanks. It took me a while to figure out what you meant by pdata, but now that I looked it up it all makes sense. Thanks.
|
| All times are GMT -4. The time now is 10:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.