20.06.2010, 15:16
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
Textdraw Version
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; }
Код:
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; }