13.06.2011, 13:13
Wny ideas this is spamming my mysql_log.log?
and if i got 1 (or more) vehicles it sais "Loaded Vehicles: 500 vehicles", who is not true
but if i have 0 vehicles and then it sais "Loaded Vehicles: 0 vehicles" and its correct
and if i got 1 (or more) vehicles it sais "Loaded Vehicles: 500 vehicles", who is not true
but if i have 0 vehicles and then it sais "Loaded Vehicles: 0 vehicles" and its correct
pawn Код:
stock LoadVehicles()
{
new string[44], c, row[85];
for(new v; v < MAX_OWNED_VEHICLES; v ++)
{
format(string, sizeof(string), "SELECT * FROM `vehs` WHERE `vehid` = '%d'", v);
mysql_query(string);
mysql_store_result();
if(mysql_num_rows())
{
if(mysql_fetch_row_format(row, "|"))
{
c ++;
sscanf(row, "p<|>ds[24]ffffdddd", VehicleInfo[v][vid], VehicleInfo[v][Owner],VehicleInfo[v][x],VehicleInfo[v][y],VehicleInfo[v][z],VehicleInfo[v][a],VehicleInfo[v][mid],VehicleInfo[v][col1],VehicleInfo[v][col2],VehicleInfo[v][pc]);
CreateVehicle(VehicleInfo[v][mid], VehicleInfo[v][x], VehicleInfo[v][y], VehicleInfo[v][z], VehicleInfo[v][a], VehicleInfo[v][col1], VehicleInfo[v][col2], -1);
}
}
mysql_free_result();
}
printf("Loaded Vehicles: %d vehicles", c);
return 1;
}