[SOLVED] Listbox a Dialog, in listitems?
#1

------------------------
Reply
#2

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

-----------------
Reply
#4

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

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;
	}
Reply
#6

Need quick help!
Reply
#7

http://pastebin.com/m78532b9c
Reply
#8

Thanks jyrno42.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)