Best to all.
What happens is that I have a problem with the controls of players
PHP Code:
GetAlive()
{
new iAlive
for(new i; i <= g_maxplayers; ++i)
if(is_user_connected(i) && is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
iAlive++;
return iAlive;
}
to put it into a hud if players live shows
PHP Code:
show_hudmessage(0, "Alive %d", GetAlive())
But when I try to open a menu does not work
PHP Code:
public ShowMenu(id)
{
if(GetAlive() = 1)
{
new menu = menu_create("New Menu", "CmdNewMenu")
menu_additem("Option 1", "1")
menu_display(id, menu)
}
return PLUGIN_HANDLED;
}
Someone tell me the error
thanks