Raised This Month: $ Target: $400
 0% 

Detecting team join


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 12-02-2009 , 20:59   Re: Detecting team join
Reply With Quote #1

Quote:
Originally Posted by ConnorMcLeod View Post
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
    
}


as of now im using fm_setmdl.... and then im putting a set_task of 3 seconds
Doc-Holiday 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 13:42.


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