I tried with this code:
Код:
public ShowPlayerItems(playerid, page)
{
if(page == -10) return CallLocalFunction("ShowPlayerItems", "dd", playerid, 0) & GameTextForPlayer(playerid, "~r~~<~Don't find a page", 3000, 3);
new list_item[356];
new str[126];
new zmienna = 0;
format(str, 356, "SELECT `iUid` FROM `1items` WHERE `iBelongTo`=0 AND `iPlace`=1 AND `iOwner`=%d LIMIT %d, 10", PlayerInfo[playerid][player_uid], page);
mysql_query(str);
mysql_store_result();
if(!mysql_num_rows()) return GameTextForPlayer(playerid, "~r~Don't find a page~>~", 3000, 3) & mysql_free_result();
while(mysql_fetch_row_format(str, "|"))
{
new i = strval(str);
zmienna++;
Przedmiot[playerid][zmienna] = i;
if(ItemData[i][iType] == ITEM_WEAPON) format(list_item, sizeof(list_item), "%s~p~%d %s- %s (%d ammo)~n~", list_item, zmienna, UseItem(i), ItemData[i][iName], ItemData[i][iValue2]);
else if(ItemData[i][iType] == ITEM_PHONE) format(list_item, sizeof(list_item), "%s~p~%d %s- %s (%d)~n~", list_item, zmienna, UseItem(i), ItemData[i][iName], ItemData[i][iValue1]);
else format(list_item, sizeof(list_item), "%s~p~%d %s- %s~n~", list_item, zmienna, UseItem(i), ItemData[i][iName]);
}
mysql_free_result();
TextDrawSetString(przed[playerid], list_item);
TextDrawShowForPlayer(playerid, przed[playerid]);
TextDrawShowForPlayer(playerid, p2);
TextDrawShowForPlayer(playerid, p4);
SetPVarInt(playerid, "TD", 1);
SetPVarInt(playerid, "td-page", page);
return 1;
}
It's old script.
Do not look for alignment/optimality.