Anyone have any better Vehicle Saving method?
#1

Currently, I am having this Vehicle Saving Method.

pawn Код:
stock SaveVehicles()
{
    for(new i; i < MAX_VEHICLES; i++)
    {
        new Float:p[5], c1, c2;
        GetVehiclePos(i, p[0], p[1], p[2]);
        GetVehicleZAngle(i, p[3]);
        GetVehicleColor(i, c1, c2);
        format(largestr, sizeof(largestr), "INSERT INTO `vehicles` (`id`,`model`,`x`,`y`,`z`,`angle`,`color1`,`color2`) VALUES  (%d,%d,%f,%f,%f,%f,%d,%d)",
        GetVehicleFreeID(), GetVehicleModel(i), p[0], p[1], p[2], p[3], c1, c2);
        mysql_query(largestr);
    }
    return 1;
}
But the problem is, it's taking decade to save the vehicles. Is there anyway I can make a faster Vehicle Saving method?
Reply


Messages In This Thread
Anyone have any better Vehicle Saving method? - by T0pAz - 01.02.2012, 11:21
Re: Anyone have any better Vehicle Saving method? - by MP2 - 01.02.2012, 11:30
Re: Anyone have any better Vehicle Saving method? - by T0pAz - 01.02.2012, 11:32
Re: Anyone have any better Vehicle Saving method? - by T0pAz - 01.02.2012, 11:41

Forum Jump:


Users browsing this thread: 2 Guest(s)