Quote:
Can be written like this to avoid the same things being repeated:
PHP Code:
formatex(szData, charsmax(szData), "#%i - %s", iPosition, szName); menu_additem(g_Top, szData, szPosition); if(iPosition == 1 && id == 0) return;
|
Thanks but i'm using the first position to display something different. These are just examples
Quote:
|
You should also create the new menu ( g_InfoTop = menu_create(title, "TopInfoMenu_Handler"); ) on another place, maybe where the topMenu is being created.
|
I need to read the results from tables so.. where else could i place it?
EDIT: Sorry, misunderstood. i'll test that
EDIT2: Nope.. it doesn't work
Quote:
|
Do you want to create the other menu that it shows nick/steamid when you click on the player in the first menu?
|
Exactly
PHP Code:
public TopMenu_Handler(id, menuid, item)
{
if(!is_user_connected(id) || item == MENU_EXIT)
return PLUGIN_HANDLED;
menu_display(id, g_TopInfo);
return PLUGIN_HANDLED;
}
^ This way it just displays the last person's info that entered the top. I don't know how to display it for each case, each player. Thank you for your reply