07.11.2010, 01:26
(
Последний раз редактировалось Johndaonee; 07.11.2010 в 01:59.
)
pawn Код:
forward LoadCityCars();
public LoadCityCars()
{
new sql[64], car[10][64], row[255];
new totalcars;
format(sql, sizeof(sql), "SELECT COUNT(*) FROM Vehicles");
mysql_query(sql);
mysql_store_result();
mysql_fetch_row(row);
totalcars = strvalEx(row);
mysql_free_result();
for (new i=0; i<=totalcars; i++)
{
format(sql, sizeof(sql), "SELECT * FROM Vehicles WHERE carid=%d", i);
mysql_query(sql);
mysql_store_result();
mysql_fetch_row(row);
split(row, car, '|');
mysql_free_result();
AddStaticVehicleEx(strvalEx(car[1]), strvalEx(car[2]), strvalEx(car[3]), strvalEx(car[4]), strvalEx(car[5]),strvalEx(car[6]), strvalEx(car[7]), 2500000);
VehicleInfo[i][CarModel] = strvalEx(car[1]);
VehicleInfo[i][CarX] = strvalEx(car[2]);
VehicleInfo[i][CarY] = strvalEx(car[3]);
VehicleInfo[i][CarZ] = strvalEx(car[4]);
VehicleInfo[i][CarAngle] = strvalEx(car[5]);
VehicleInfo[i][CarColor1] = strvalEx(car[6]);
VehicleInfo[i][CarColor2] = strvalEx(car[7]);
VehicleInfo[i][FactionCar] = strvalEx(car[8]);
VehicleInfo[i][CarType] = strvalEx(car[9]);
}
}
I know i did a fix for this in my old mysql load thing, could anybody help me out ?