SA-MP Forums Archive
[SOLVED] Listbox a Dialog, in listitems? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] Listbox a Dialog, in listitems? (/showthread.php?tid=116619)



[SOLVED] Listbox a Dialog, in listitems? - Mechscape - 29.12.2009

------------------------


Re: [UNSOLVED] Listbox a Dialog, in listitems? - Harry_Gaill - 29.12.2009

http://pastebin.com/f5bf2092f - slightly different approach, you can easily advance your stuff by building on the example code.


Re: [UNSOLVED] Listbox a Dialog, in listitems? - Mechscape - 29.12.2009

-----------------


Re: [UNSOLVED] Listbox a Dialog, in listitems? - Harry_Gaill - 29.12.2009

http://pastebin.com/f2869a902
You too need to read that nice pdf file. Might as well try doing less difficult things first...


Re: [SOLVED] Listbox a Dialog, in listitems? - Mechscape - 29.12.2009

One problem:


Код:
enum skin_layout_man
{
	skinID,
	skinPrice,
	skinName[MAX_SKIN_NAME],
};

new listitems1[][skin_layout_man] = {
{59,1000,"Meheriided"},
{120,1000,"Meheriided"},
{21,1000,"Meheriided"},
{29,1000,"Meheriided"},
{47,1000,"Meheriided"},
{48,1000,"Meheriided"},
{60,1000,"Meheriided"},
{73,1000,"Meheriided"},
{98,1000,"Meheriided"},
{170,1000,"Meheriided"},
{171,1000,"Meheriided"},
{179,1000,"Meheriided"},
{180,1000,"Meheriided"},
{184,1000,"Meheriided"},
{185,1000,"Meheriided"},
{186,1000,"Meheriided"},
{187,1000,"Meheriided"},
{223,1000,"Meheriided"},
{240,1000,"Meheriided"},
{250,1000,"Meheriided"},
{292,1000,"Meheriided"},
{293,1000,"Meheriided"},
{299,1000,"Meheriided"},
{262,1000,"Meheriided"}
};
Код:
if(strcmp(cmdtext, "/riided", true) == 0)
	{
	  new fullstr[2000];
	  new tmpstr[64];
		if(PlayerInfo[playerid][pSex] == 1)
		{
			for(new l = 0; l < sizeof listitems1; l++)
		  {
		    format(tmpstr, sizeof tmpstr, "Skinid: %d\t\tHind: %d\t\tNimi: %s\n", listitems1[1][skinID], listitems1[l][skinPrice], listitems1[l][skinName]);
		    strcat(fullstr, tmpstr);
		  }
			ShowPlayerDialog(playerid, DIALOG_ID_SKIN_SELECTION, DIALOG_STYLE_LIST, "Meheriided", fullstr, "Valin", "Loobu");
		}
		else if(PlayerInfo[playerid][pSex] == 2)
		{
   		for(new l = 0; l < sizeof listitems2; l++)
		  {
		    format(tmpstr, sizeof tmpstr, "Skinid: %d\t\tHind: %d\t\tNimi: %s\n", listitems2[1][skinID], listitems2[l][skinPrice], listitems2[l][skinName]);
		    strcat(fullstr, tmpstr);
		  }
			ShowPlayerDialog(playerid, DIALOG_ID_SKIN_SELECTION, DIALOG_STYLE_LIST, "Naisteriided", fullstr, "Valin", "Loobu");
		}
		return 1;
	}



Re: [UNSOLVED] Listbox a Dialog, in listitems? - Mechscape - 29.12.2009

Need quick help!


Re: [UNSOLVED] Listbox a Dialog, in listitems? - jyrno42 - 29.12.2009

http://pastebin.com/m78532b9c


Re: [UNSOLVED] Listbox a Dialog, in listitems? - Mechscape - 29.12.2009

Thanks jyrno42.