01.02.2012, 11:21
Currently, I am having this Vehicle Saving Method.
But the problem is, it's taking decade to save the vehicles. Is there anyway I can make a faster 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;
}