SA-MP Forums Archive
Dialog bugged - 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)
+--- Thread: Dialog bugged (/showthread.php?tid=430159)



Dialog bugged - Geeboi_Mehdi - 12.04.2013

when any player does /market you get list of cars for sale but if there is a lot its bugged as crazy so that means i cant put more than 9 cars or it will be bugged and thats not good hope you can help
pawn Код:
public ShowMarketplace(playerid)
{
    new query[250],results[500],title[64];
    format(title,sizeof(title),"{FF9900}Vehicle Market");
    Num1[playerid] = 0;
    Num2[playerid] = 12;
    format(query,sizeof(query),"SELECT VehicleID,VehicleModel,VehiclePrice,OwnedBy FROM `pvehicles` WHERE `VehicleForSale`= 1 ORDER BY `VehiclePrice` DESC LIMIT %d, %d", Num1[playerid],Num2[playerid]);
    mysql_query(query);
    mysql_store_result();
    new tRows = mysql_num_rows();
    if(tRows == 0) { SendClientMessage(playerid, COLOR_ERROR, "No vehicles are currently for sale!"); return 1; }
    new vID, vModel, vOwnedBy[24], vPrice;
    while(mysql_fetch_row(query))
    {
        sscanf(query, "p<|>ddds[24]", vID, vModel, vPrice, vOwnedBy);
        format(results,sizeof(results),"%s%d | %s($%d) | Seller: %s\n", results,vID,VehicleFriendlyNames[vModel-400],vPrice,vOwnedBy);
    }
    if(tRows >= 10) { format(results,sizeof(results), "{FF9900}%sNext Page", results); }
    ShowPlayerDialog(playerid, marketplace1, DIALOG_STYLE_LIST,title,results,"Select", "Close");
    mysql_free_result();
    return 1;
}



Re: Dialog bugged - Geeboi_Mehdi - 17.04.2013

any answer guys?
it should show alot of pages but if one page is full its supper bugged letters get eaten