06.02.2017, 14:45
I got a problem, not exactly like this but.. it's kind the same thing. My problem came from the loop.
PHP код:
mysql_tquery(MySQL, "SELECT * FROM Vehicle ORDER BY ID", "OnVehiclesLoad", "");
PUBLIC:OnVehiclesLoad()
{
for (new i, r = 1, j = cache_num_rows(); i != j; i++, r++)
{
cache_get_value_int(i, "ID", vStats[r][vSQLIB]);
cache_get_value_float(i, "x", vStats[r][vX]);
cache_get_value_float(i, "y", vStats[r][vY]);
cache_get_value_float(i, "z", vStats[r][vZ]);
cache_get_value_int(i, "Color1", vStats[r][vColor1]);
cache_get_value_int(i, "Color2", vStats[r][vColor2]);
cache_get_value_float(i, "Health", vStats[r][vHealth]);
cache_get_value_int(i, "Model", vStats[r][vModel]);
cache_get_value_int(i, "Respawn", vStats[r][vRespawn]);
cache_get_value_float(i, "Angle", vStats[r][vZr]);
cache_get_value(i, "Plate", vStats[r][vPlate], 20);
CreatedVehicle[r] = false;
#if DebugMode
printf("Vйhicule ID %i", r);
#endif
vStats[r][vID] = CreateVehicle(vStats[r][vModel], vStats[r][vX], vStats[r][vY], vStats[r][vZ], vStats[r][vZr], vStats[r][vColor1], vStats[r][vColor2], vStats[r][vRespawn]);
SetVehicleHealth(vStats[r][vID], vStats[r][vHealth]);
SetVehicleNumberPlate(vStats[r][vID], vStats[r][vPlate]);
#if DebugMode
GetVehicleDebugInfos(r);
#endif
}
print("[SERVER] All vehicle are loaded.\n\n");
}