Question about MySQL
#1

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 :

PHP код:
forward ChargerVehicules();
public 
ChargerVehicules()
{
    new 
rowsfields;
    
cache_get_data(rowsfieldsmysql);
    for(new 
i=0i<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"iInfosVehicules[i][Modele]);
    }

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.
++
Reply
#2

ye it is normal
if u add vehicles in OmGameModeinit then it shows in server console automatically
Reply
#3

If ChargerVehicules() is called after gamemode has finished loading, it will not show the vehicle models that are added by your script.
Reply
#4

Ok, thans u
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)