Loading SQL Vehicles
#3

Try not using OnQueryFinish at all. Just use
pawn Код:
mysql_store_result();
            new row[4000];
            while(mysql_fetch_row(row))
            {
                sscanf(row, "p<|>e<ddffffdds[64]ds[20]ddddddddddddddddddds[64]d>", CarInfo[extraid]);
                ownedcar[extraid] = AddStaticVehicle(CarInfo[extraid][cModel],CarInfo[extraid][cLocationx],CarInfo[extraid][cLocationy],CarInfo[extraid][cLocationz], CarInfo[extraid][cColorOne], CarInfo[extraid][cColorTwo],100);    
                if(CarInfo[extraid][cPaintjob] != 999)
                {
                    ChangeVehiclePaintjob(extraid, CarInfo[extraid][cPaintjob]);
                }
                SetVehicleVirtualWorld(extraid, CarInfo[extraid][cVirWorld]);
                SetVehicleNumberPlate(extraid, CarInfo[extraid][cPlate]);
                SetVehicleModifications(extraid);
            }
            mysql_free_result();
After the mysql_query.

pawn Код:
format(sqlQuery, sizeof(sqlQuery), "SELECT * FROM samp_vehicles");
mysql_query(sqlQuery, THREAD_LOADCARS);
That is correct though . Lastly, what is THREAD_LOADCARS defined as?
Reply


Messages In This Thread
Loading SQL Vehicles - by DaRkM - 12.04.2012, 23:48
Re: Loading SQL Vehicles - by DaRkM - 14.04.2012, 02:54
Re: Loading SQL Vehicles - by [HiC]TheKiller - 14.04.2012, 03:02
Re: Loading SQL Vehicles - by DaRkM - 14.04.2012, 03:33
Re: Loading SQL Vehicles - by [HiC]TheKiller - 14.04.2012, 04:30
Re: Loading SQL Vehicles - by DaRkM - 14.04.2012, 04:50
Re: Loading SQL Vehicles - by [HiC]TheKiller - 14.04.2012, 05:37
Re: Loading SQL Vehicles - by DaRkM - 14.04.2012, 05:57
Re: Loading SQL Vehicles - by [HiC]TheKiller - 14.04.2012, 06:03
Re: Loading SQL Vehicles - by DaRkM - 14.04.2012, 06:15

Forum Jump:


Users browsing this thread: 1 Guest(s)