Raised This Month: $ Target: $400
 0% 

Catch player choosing team.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Decompiler
>:)
Join Date: Mar 2013
Old 05-07-2013 , 17:47   Re: Catch player choosing team.
Reply With Quote #1

Quote:
Originally Posted by ConnorMcLeod View Post
You have to let cs do the job, just alter the visual menu : http://forums.alliedmods.net/showpos...35&postcount=4
Not to hijack the thread, but can you force that plugin to use the oldVGUI?
Decompiler is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-07-2013 , 18:58   Re: Catch player choosing team.
Reply With Quote #2

Yes, just hook "chooseteam" command and set vgui pdata to false on there.
If i have to gonna do it.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Decompiler
>:)
Join Date: Mar 2013
Old 05-07-2013 , 19:27   Re: Catch player choosing team.
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
Yes, just hook "chooseteam" command and set vgui pdata to false on there.
If i have to gonna do it.
If by the last part you mean you wouldn't mind doing it, then yeah, that would be great.
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.
Decompiler is offline
Decompiler
>:)
Join Date: Mar 2013
Old 05-09-2013 , 19:32   Re: Catch player choosing team.
Reply With Quote #4

Would something like this work if I added it to your plugin? As it seems simpler than hooking chooseteam?

Quote:
Originally Posted by teame06 View Post
Code:
#include <amxmodx> public plugin_init() {     register_plugin("Yams", "Pants", "Anime"); } public client_connect(id) {     set_user_info(id, "_vgui_menus", "0"); }

Here this will disable the VGUI team select menu only. They will be able to still use VGUI buy menu, etc.
Decompiler is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-09-2013 , 20:41   Re: Catch player choosing team.
Reply With Quote #5

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.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-09-2013 at 20:42.
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode