05.03.2011, 17:32
Quote:
Thx. But do you know how can I make each list item from dialog as listitem option, which would return the info from the player chosen?
pawn Код:
pawn Код:
|
So, you can use strins function to do this, look:
pawn Код:
dcmd_allip(playerid, params[])
{
#pragma unused params
new SuperString[5000];
foreach(Character, i)
{
strins(SuperString,PlayerIPData(i),strlen(SuperString),sizeof(SuperString));
}
return ShowPlayerDialog(playerid,IP_DIALOG,DIALOG_STYLE_LIST,""#red"IP "#green"List",SuperString,"Ok","");
}
//And, in the end of your gamemode:
stock PlayerIPData(playerid)
{
new txt[128];
format(txt,128,""#red" \n%s (id: %d) | "#green"Ip: %s\n",GetMyName(playerid),playerid,GetMyIp(playerid));
return txt;
}
