15.02.2010, 15:19
Still bugged.
This is how I'm loading them;
This is how I'm loading them;
pawn Код:
public LoadHouses()
{
CheckSQL();
new resultline[256],hid,houseid,renter,rentable,rentcost,cost,interior,vw,locked,Float:intx,Float:inty,Float:intz, Float:icx, Float:icy, Float:icz, ownerid;
mysql_query("SELECT * FROM `houses`");
mysql_store_result();
while(mysql_fetch_row_format(resultline,"|") == 1)
{
sscanf(resultline,"p|ddddddddffffffd",houseid,renter,rentable,rentcost,cost,interior,vw,locked,intx,inty, intz, icx, icy,icz, ownerid);
hid = CreatePickup(1273, 23, icx, icy, icz, -1);
hInfo[hid][hSQLId] = houseid;
hInfo[hid][Renter] = renter;
hInfo[hid][Rentable] = rentable;
hInfo[hid][Rentcost] = rentcost;
hInfo[hid][Cost] = interior;
hInfo[hid][VW] = vw;
hInfo[hid][Locked] = locked;
hInfo[hid][Intx] = intx;
hInfo[hid][Inty] = inty;
hInfo[hid][Intz] = intz;
hInfo[hid][Iconx] = icx;
hInfo[hid][Icony] = icy;
hInfo[hid][Iconz] = icz;
hInfo[hid][Ownerid] = ownerid;
}
mysql_free_result();
return 1;
}