02.03.2011, 21:31
I think I thought I saw on a server, once, were gang players are dialog items, that you could click on the dialog item and were shown his info. I can do that for show all players on a dialog list:
But how can I make the item list as a dialog option and show anything about player, as example?
Or even make all names from a array into dialog, as listitem.
pawn Код:
dcmd_allip(playerid, params[])
{
new string[300];
foreach(Player, i)
{
format(string,sizeof(string),""#red" %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","");
}
But how can I make the item list as a dialog option and show anything about player, as example?
pawn Код:
if(dialogid == IP_DIALOG)
{
switch(listitem) { case 0: ... }:
}