Well, problem is that client_connect() is called before they are actually put in the server.. And even then, you have to wait until they pick a team and model... Once that happens, they are in-game and can now see menus and stuff..
So, you could delay showing the menu until the event ResetHUD is called for each connecting user...
something like this:
Code:
#include <amxmodx>
new g_bJustJoined[33] = false
public plugin_init()
{
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
register_menucmd(register_menuid("*********"), keys, "BlahBlah")
register_event( "ResetHUD", "ResetHud", "b" )
}
public client_connect(id)
{
g_bJustJoined[id] = true
return PLUGIN_CONTINUE
}
public ResetHud( id )
{
if( g_bJustJoined[id] )
{
ShowMenu( id )
g_bJustJoined[id] = false
}
return PLUGIN_CONTINUE
}
stock ShowMenu( id )
{
new menu[192]
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
format(menu, 191, "*********^n^n1. *******^n2. *****^n3. ****")
show_menu(id, keys, menu)
}
public BlahBlah(id,key)
{
if (key == 0)
{
client_print(id, print_chat, "******************")
} else if (key == 1) {
client_print(id, print_chat, "*****************")
} else if (key == 2) {
client_print(id, print_chat, "***************")
}
}