26.05.2012, 09:37
Hello, i have like 60 cars in my MySQL when i try add more they wont load it
here is the load code
here is the load code
pawn Код:
forward LoadCityCars();
public LoadCityCars()
{
mysql_query("SELECT * FROM Vehicles ORDER BY carid");
mysql_store_result();
new data[11][512];
new string[1024];
while(mysql_fetch_row(string,"|"))
{
//if(mysql_num_rows() == 0) continue;
split(string, data, '|');
//printf(string);
new Carid = CreateVehicle(strval(data[1]), floatstr(data[2]), floatstr(data[3]), floatstr(data[4]), floatstr(data[5]), strval(data[6]), strval(data[7]), 60000);
DynamicCars[Carid][FactionCar] = strval(data[8]);
DynamicCars[Carid][CarType] = strval(data[9]);
strmid(DynamicCars[Carid][cDescription], data[10], 0, strlen(data[10]), 255);
SetVehicleNumberPlate(Carid, "XMT 3432");
SetVehicleToRespawn(Carid);
if(Carid == IBPCARS)
{
mysql_free_result();
return 0;
}
}
return 1;
}