I used a method that is not really eficient... but in the Others subforum someone posted this:
Code:
#define TEAM_SELECT_VGUI_MENU_ID 2
public plugin_init()
{
register_message(get_user_msgid("ShowMenu"),"message_show_menu")
register_message(get_user_msgid("VGUIMenu"), "message_vgui_menu")
public message_show_menu(msgid, dest, id)
{
static team_select[] = "#Team_Select"
static menu_text_code[sizeof team_select]
get_msg_arg_string(4, menu_text_code, sizeof menu_text_code - 1)
if (equal(menu_text_code, team_select))
return PLUGIN_HANDLED
return PLUGIN_CONTINUE
}
public message_vgui_menu(msgid, dest, id)
{
if (!(get_msg_arg_int(1) != TEAM_SELECT_VGUI_MENU_ID))
return PLUGIN_HANDLED
return PLUGIN_CONTINUE
}
I think is the best method.
__________________