05.03.2011, 16:44
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?
I've tried the switching on dialog, but it just shows all online Character 'i':
pawn Код:
dcmd_allip(playerid, params[])
{
#pragma unused params
new string[300];
foreach(Character, i)
{
format(string,sizeof(string),""#red" \n%s (id: %d) | "#green"Ip: %s\n",GetMyName(i),i,GetMyIp(i));
}
return ShowPlayerDialog(playerid,IP_DIALOG,DIALOG_STYLE_LIST,""#red"IP "#green"List",string,"Ok","");
}
pawn Код:
if(dialogid == IP_DIALOG)
{
foreach(Character, i)
{
switch(i)
{
case 0 .. 500: printf("%s (id: %d)",GetMyName(i),i);
}
}
}