07.07.2010, 06:04
Ah now I get it, anyways the FactionVeh = 111 is still not fixed? Anybody got a solution? The new loading is:
pawn Code:
new idx = 0;
new vehfstats[14][40];
new sql[100], row[512];
mysql_query("SELECT * FROM vehicles");
mysql_store_result();
while(mysql_fetch_row(row) && idx < sizeof(CarInfo))
{
split(row, vehfstats, '|');
CarInfo[idx][VehID] = strval(vehfstats[0]);
CarInfo[idx][FactionID] = strval(vehfstats[1]);
CarInfo[idx][Model] = strval(vehfstats[2]);
CarInfo[idx][SpawnX] = floatstr(vehfstats[3]);
CarInfo[idx][SpawnY] = floatstr(vehfstats[4]);
CarInfo[idx][SpawnZ] = floatstr(vehfstats[5]);
CarInfo[idx][SpawnAngle] = strval(vehfstats[6]);
CarInfo[idx][Color1] = strval(vehfstats[7]);
CarInfo[idx][Color2] = strval(vehfstats[8]);
CarInfo[idx][FactionVeh] = strval(vehfstats[9]);
CarInfo[idx][Owned] = strval(vehfstats[10]);
strmid(CarInfo[idx][Owner], vehfstats[11], 0, strlen(vehfstats[11]), 255);
strmid(CarInfo[idx][Plate], vehfstats[13], 0, strlen(vehfstats[13]), 255);
AddStaticVehicleEx(strval(vehfstats[2]),strval(vehfstats[3]),strval(vehfstats[4]),strval(vehfstats[5]),strval(vehfstats[6]),strval(vehfstats[7]),strval(vehfstats[8]),6000);
idx ++;
}
mysql_free_result();
printf("%d Vehicles loaded from database", idx);
return 1;