Hello.
I want to get info about players from the loop list. (like ip,rank and stuff)
So when you select player from the list,opens another menu in which is info about player.
I made everything,but info in menu about the player is wrong.
Looped thru players:
PHP Code:
new players[32], pnum, tempid;
new szName[32], szTempid[10];
get_players(players, pnum);
for( new i; i<pnum; i++ )
{
tempid = players[i];
get_user_name(tempid, szName, charsmax(szName));
num_to_str(tempid, szTempid, charsmax(szTempid));
menu_additem(menuname, szName, szTempid, 0);
Made that when selects player opens menu:
PHP Code:
new data[6], szName[64];
new access, callback;
menu_item_getinfo(stmenu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1 .. 32:
{
MenuName(id);
}
}
PHP Code:
MenuName(id)
{
// making menu for info,blah blah.
// and in the end get info from the player that was selected
}
So i need to get id from the player that was selected,but can someone tell me how?