14.04.2012, 03:02
Try not using OnQueryFinish at all. Just use
After the mysql_query.
That is correct though
. Lastly, what is THREAD_LOADCARS defined as?
pawn Код:
mysql_store_result();
new row[4000];
while(mysql_fetch_row(row))
{
sscanf(row, "p<|>e<ddffffdds[64]ds[20]ddddddddddddddddddds[64]d>", CarInfo[extraid]);
ownedcar[extraid] = AddStaticVehicle(CarInfo[extraid][cModel],CarInfo[extraid][cLocationx],CarInfo[extraid][cLocationy],CarInfo[extraid][cLocationz], CarInfo[extraid][cColorOne], CarInfo[extraid][cColorTwo],100);
if(CarInfo[extraid][cPaintjob] != 999)
{
ChangeVehiclePaintjob(extraid, CarInfo[extraid][cPaintjob]);
}
SetVehicleVirtualWorld(extraid, CarInfo[extraid][cVirWorld]);
SetVehicleNumberPlate(extraid, CarInfo[extraid][cPlate]);
SetVehicleModifications(extraid);
}
mysql_free_result();
pawn Код:
format(sqlQuery, sizeof(sqlQuery), "SELECT * FROM samp_vehicles");
mysql_query(sqlQuery, THREAD_LOADCARS);
