1. Since only two menu exists in amxx, it will depend on what you want to do, but I think no one of both cause lag in server.
2. You only should use formatex if you want to set multilingual support or one variable as an string.
Code:
new szBuffer[32];
new iNumber = 100;
formatex(szBuffer, charsmax(szBuffer), "new iNumber = %d", iNumber);
menu_additem(hMenu, szBuffer, ...);
formatex(szBuffer, charsmax(szBuffer), "%L", pPlayer, "MENU_INUMBER", iNumber);
menu_additem(hMenu, szBuffer, ...);
Code:
[en]
MENU_INUMBER = new iNumber = %d
3. menu_handler will be like:
Code:
new hMenu = menu_create("Title", "menuHandle");
...
// pPlayer = player index
// hMenu = menu index
// iItem = selected item index
public menuHandle(pPlayer, hMenu, iItem)
{
}
4. Loop through players should be like this
Code:
const MAXPLAYERS = 32;
...
new stPlayers[MAXPLAYERS], iPlayersCount, pPlayer;
get_players(stPlayers, iPlayersCount, "ae", "CT");
for (new i = 0; i < iPlayersCount; i++)
{
pPlayer = stPlayers[i];
// Do something with pPlayer.
}
More info about newmenus:
https://forums.alliedmods.net/showthread.php?t=46364
__________________