MySQL problem
#7

Not sure if this will work but give it a try.

PHP код:
stock LoadFactionVehicles()
{
    new 
Query[500];
    for(new 
1;i<MAX_FACTION_VEHICLES;i++)
    {
        
format(Querysizeof(Query), "SELECT * FROM `vehicledata` WHERE `ID` = %d LIMIT 1"i);
        
mysql_query(Query);
        
mysql_store_result();
        while(
mysql_fetch_row(Query))
        {
            
mysql_fetch_int("ID"vInfo[i][ID]);
            
mysql_fetch_int("ModelID"vInfo[i][ModelID]);
            
mysql_fetch_float("posX"vInfo[i][posX]);
            
mysql_fetch_float("posY"vInfo[i][posY]);
            
mysql_fetch_float("posZ"vInfo[i][posZ]);
            
mysql_fetch_float("posA"vInfo[i][posA]);
            
mysql_fetch_int("ColorA"vInfo[i][ColorA]);
            
mysql_fetch_int("ColorB"vInfo[i][ColorB]);
            
mysql_fetch_int("Faction"vInfo[i][Faction]);
            
mysql_fetch_int("Plate"vInfo[i][NrPlate]);

            
CreateVehicle(vInfo[i][ModelID], vInfo[i][posX], vInfo[i][posY], vInfo[i][posZ], vInfo[i][posA], vInfo[i][ColorA], vInfo[i][ColorB], 100000000000001);
            
SetVehicleNumberPlate(ivInfo[i][NrPlate]);

            
SetVehicleParamsForPlayer(ii01);
            
SetVehicleToRespawn(i);
        }
        
mysql_free_result();
    }
    return 
1;

Reply


Messages In This Thread
MySQL problem - by McGuiness - 04.06.2015, 12:16
Re: MySQL problem - by McGuiness - 04.06.2015, 17:42
Re: MySQL problem - by d3ll - 04.06.2015, 17:55
Re: MySQL problem - by McGuiness - 04.06.2015, 18:03
Re: MySQL problem - by d3ll - 04.06.2015, 18:08
Re: MySQL problem - by McGuiness - 04.06.2015, 18:27
Re: MySQL problem - by rappy93 - 04.06.2015, 18:34

Forum Jump:


Users browsing this thread: 2 Guest(s)