Raised This Month: $ Target: $400
 0% 

Detecting team join


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-30-2009 , 01:21   Re: Detecting team join
Reply With Quote #4

This detects when the player is selecting a skin, it could still be too early to spawn him, you could delay it a bit.
2 detection ways with old style menu, 1 way with VGUI :

PHP Code:
#include <amxmodx>
#include <fakemeta>

new const VERSION[] = "0.0.1"

const EXTRAOFFSET_PLAYER    5
const m_iMenuCode        205
const SKIN_SELECT_MENU    3

public plugin_init()
{
    
register_plugin("Skin Menu"VERSION"ConnorMcLeod")

    
register_menucmd(register_menuid("Terrorist_Select"1), 31"ChooseSkinMenu"// 26, 27
    
register_menucmd(register_menuid("CT_Select"1), 31"ChooseSkinMenu")

    
register_clcmd("joinclass""ClientCommand_JoinClass")
    
register_clcmd("menuselect""ClientCommand_MenuSelect")
}

public 
ChooseSkinMenu(idiKey)
{
    
// Player is selecting a skin with old style menu
}

public 
ClientCommand_MenuSelectid )
{
    if( 
get_pdata_int(idm_iMenuCodeEXTRAOFFSET_PLAYER) == SKIN_SELECT_MENU )
    {
        
// Player is selecting a skin with old style menu
    
}
}

public 
ClientCommand_JoinClassid )
{
    if( 
get_pdata_int(idm_iMenuCodeEXTRAOFFSET_PLAYER) == SKIN_SELECT_MENU )
    {
        
// Player is selecting a skin with VGUI style menu
    
}

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
 



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 13:42.


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