03.07.2014, 11:52
Hello friends,
I have a question about MySQL. I made a script which allows to load vehicles from base of datum, but the problem, it is that during the load of vehicles, in the console to samp-server, it indicates me that Number of vehicle models: 0
My question is why ? Is it normal?
I give you my load script :
It can harm GetPlayerVehicleID ?
Oh, and in server log, row is load well, and in server too
Thank in advance for help me, and sorry for my bad english.
++
I have a question about MySQL. I made a script which allows to load vehicles from base of datum, but the problem, it is that during the load of vehicles, in the console to samp-server, it indicates me that Number of vehicle models: 0
My question is why ? Is it normal?
I give you my load script :
PHP код:
forward ChargerVehicules();
public ChargerVehicules()
{
new rows, fields;
cache_get_data(rows, fields, mysql);
for(new i=0; i<cache_get_row_count(rows); i++)
{
InfosVehicules[i][Modele] = cache_get_field_content_int(i, "Modele");
InfosVehicules[i][SpawnX] = cache_get_field_content_float(i, "SpawnX");
InfosVehicules[i][SpawnY] = cache_get_field_content_float(i, "SpawnY");
InfosVehicules[i][SpawnZ] = cache_get_field_content_float(i, "SpawnZ");
InfosVehicules[i][SpawnAng] = cache_get_field_content_float(i, "SpawnAng");
InfosVehicules[i][Couleur1] = cache_get_field_content_int(i, "Couleur1");
InfosVehicules[i][Couleur2] = cache_get_field_content_int(i, "Couleur2");
AddStaticVehicleEx(InfosVehicules[i][Modele], InfosVehicules[i][SpawnX], InfosVehicules[i][SpawnY], InfosVehicules[i][SpawnZ], InfosVehicules[i][SpawnAng], InfosVehicules[i][Couleur1], InfosVehicules[i][Couleur2], -1);
printf("%i modele : %d", i, InfosVehicules[i][Modele]);
}
}
Oh, and in server log, row is load well, and in server too
Thank in advance for help me, and sorry for my bad english.
++