01.01.2016, 12:22
I'm making a system of vehicle. and I got a problem while loading rows from mysql.
mysql has 10 rows and when the server trying to load rows from table, it loads only 4 rows.
here's my code.
mysql has 10 rows and when the server trying to load rows from table, it loads only 4 rows.
here's my code.
PHP код:
stock LoadPlayerVehicles()
{
new query[120];
mysql_format(g_Handle, query, sizeof(query), "SELECT * FROM `vehicles`");
mysql_tquery(g_Handle, query, "OnLoadVehicles", "");
return 1;
}
public OnLoadVehicles()
{
for(new i = 0; i < cache_get_row_count(); i++)
{
g_VehicleInfo[i][vehicle_ModelID] = cache_get_field_content_int(i, "vehicle_ModelID");
g_VehicleInfo[i][vehicle_OwnerID] = cache_get_field_content_int(i, "vehicle_OwnerID");
g_VehicleInfo[i][vehicle_Color1] = cache_get_field_content_int(i, "vehicle_Color1");
g_VehicleInfo[i][vehicle_Color2] = cache_get_field_content_int(i, "vehicle_Color1");
g_VehicleInfo[i][vehicle_ParkX] = cache_get_field_content_int(i, "vehicle_ParkX");
g_VehicleInfo[i][vehicle_ParkX] = cache_get_field_content_int(i, "vehicle_ParkY");
g_VehicleInfo[i][vehicle_ParkX] = cache_get_field_content_int(i, "vehicle_ParkZ");
g_VehicleInfo[i][vehicle_Angle] = cache_get_field_content_int(i, "vehicle_Angle");
/*new vehicle = CreateVehicle();
SetVehicleNumberPlate(vehicle, plate);*/
}
return 1;
}