Raised This Month: $ Target: $400
 0% 

Alternative to TeamInfo for team choose?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sake
Senior Member
Join Date: Jul 2011
Old 08-17-2011 , 13:37   Alternative to TeamInfo for team choose?
Reply With Quote #1

Hello there,

Currently I am having my problems with hooking on TeamInfo because it's sent twice. I am searching for an event that occurs after a player has chosen his class. Is there one or do I have to do better filtering on TeamInfo?

sake
__________________
sake is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-17-2011 , 14:22   Re: Alternative to TeamInfo for team choose?
Reply With Quote #2

You can force user to use old-style menus, then you can hook the team/model choose menus.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-17-2011 , 15:02   Re: Alternative to TeamInfo for team choose?
Reply With Quote #3

In VGUI menu, jointeam and joinclass are sent
I also guess that m_iMenu offset is equal to 14 (or may be it is only when in buy menu).
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
sake
Senior Member
Join Date: Jul 2011
Old 08-17-2011 , 16:30   Re: Alternative to TeamInfo for team choose?
Reply With Quote #4

Quote:
Originally Posted by Exolent[jNr] View Post
You can force user to use old-style menus, then you can hook the team/model choose menus.
Sounds interesting. Can I identify them by menu ids?
__________________
sake is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-17-2011 , 16:31   Re: Alternative to TeamInfo for team choose?
Reply With Quote #5

See my Team Ratio (new plugin submissions) plugin.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
sake
Senior Member
Join Date: Jul 2011
Old 08-17-2011 , 16:52   Re: Alternative to TeamInfo for team choose?
Reply With Quote #6

PHP Code:
register_menucmd(register_menuid("Team_Select"1), (1<<0|1<<1|1<<4|1<<5|1<<9), "MenuTeamSelect");
    
    
register_menucmd(register_menuid("CT_Select"1), (1<<0|1<<1|1<<2|1<<3||1<<4), "MenuModelSelect");
    
register_menucmd(register_menuid("Terrorist_Select"1), (1<<0|1<<1|1<<2|1<<3||1<<4), "MenuModelSelect"); 
This stuff? Thx . Because if yes, this is much better than my crappy TeamAssigned method which works but I don't know why...
__________________

Last edited by sake; 08-17-2011 at 16:54.
sake is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-17-2011 , 17:54   Re: Alternative to TeamInfo for team choose?
Reply With Quote #7

Add a line :

register_menuid("Select", 1)

anywhere after previous ones, or in another plugin, and previous registered menu indexes have changed, so i don't know if the method is reliable.
__________________
- tired and retired -

- my plugins -
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 06:43.


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