SA-MP Forums Archive
ShowPlayerDialog with array's? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ShowPlayerDialog with array's? (/showthread.php?tid=304668)



ShowPlayerDialog with array's? - Zcelo12 - 19.12.2011

Hey,
Does someone know how to use arrays in ShowPlayerDialog?
If someone don't understand what i mean, you've to look at my code:

Код:
stock ShowFriendListForPlayer(playerid)
{
	new str[MAX_PLAYER_FRIENDS][MAX_PLAYER_NAME],string[128];
	for(new f = 0; f < MAX_PLAYER_FRIENDS; f++)
	{
	    if(strcmp(Freunde[playerid][f],"0",true) != 0)
	    {
	        if(GetIdByName(Freunde[playerid][f]) != -1)
	        {
	            format(str[f],MAX_PLAYER_NAME,"{0x33AA33AA}%s",Freunde[playerid][f]);
			}
			else
			{
			    format(str[f],MAX_PLAYER_NAME,"{0xFF444499}%s",Freunde[playerid][f]);
			}
		}
		format(string,sizeof(string),"",);
		ShowPlayerDialog(playerid,DIALOG_FRIENDLIST,DIALOG_STYLE_MSGBOX,"Friendlist",string,"Ok","");
	}
}
How can i use the "friends" in ShowPlayerDialog?

greetings from germany