Help with list
#1

I want to create textdrawed buy list but
it shows only one item to buy

/imageshack/img697/1395/samp002bp.png

if i do the same with sendclientmessage it will show example:
Shotgun Round, xx$
Shotgun, xx$
Deagle Clip, xx$
Deagle, xx$
Text Version, works alright
Код:
		if(cmdcount < 2)
		{
			//generate product list
			for(new i = 0; i < MAX_PRODUCTS; i++)
			{
				if(ProductInfo[busid][i][prSQLId] != INVALID_SQL_ID)
				{
					if(ProductInfo[busid][i][prFlags] & BUYABLE_PRODUCT)
					{
						format(string, sizeof(string),"%s, $%.2f", BaseProductInfo[ProductInfo[busid][i][prSQLId]][bpName],
						 	FloatMoney(ProductInfo[busid][i][prBuyPrice]));
						SendClientMessage(playerid, COLOR_GREY, string);
					}
				}
			}
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /buy [name/id] [amount=1]");
			return 1;
		}
Textdraw Version
Код:
		if(cmdcount < 2)
		{
			//generate product list
			for(new i = 0; i < MAX_PRODUCTS; i++)
			{
				if(ProductInfo[busid][i][prSQLId] != INVALID_SQL_ID)
				{
					if(ProductInfo[busid][i][prFlags] & BUYABLE_PRODUCT)
					{
						format(string, sizeof(string),"%s, $%.2f~n~", BaseProductInfo[ProductInfo[busid][i][prSQLId]][bpName],
				 	  FloatMoney(ProductInfo[busid][i][prBuyPrice]));
						ShowPlayerInformation(playerid, "Buy menu", string, "_", "_", 0, 0);
					}
				}
			}
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /buy [name/id] [amount=1]");
			return 1;
		}
Reply


Messages In This Thread
Help with list - by armyoftwo - 20.06.2010, 15:16
Re: Help with list - by armyoftwo - 21.06.2010, 06:48
Re: Help with list - by russo666 - 21.06.2010, 06:56
Re: Help with list - by ledzep - 21.06.2010, 07:07

Forum Jump:


Users browsing this thread: 1 Guest(s)