|
Author
|
Message
|
|
AlliedModders Donor
|

12-02-2009
, 20:59
Re: Detecting team join
|
#1
|
Quote:
Originally Posted by ConnorMcLeod
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(id, iKey) { // Player is selecting a skin with old style menu }
public ClientCommand_MenuSelect( id ) { if( get_pdata_int(id, m_iMenuCode, EXTRAOFFSET_PLAYER) == SKIN_SELECT_MENU ) { // Player is selecting a skin with old style menu } }
public ClientCommand_JoinClass( id ) { if( get_pdata_int(id, m_iMenuCode, EXTRAOFFSET_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
|
|
|
|