12.04.2013, 12:03
Hi
I have this function that is supposed to save vehicle damage to the vehicle enum. This is in turn saved to the DB. Its running once every 30 seconds and the database call is every 3 minutes and when the player leaves.
When I spawn the vehicle is perfect.
Any ideas.
I have this function that is supposed to save vehicle damage to the vehicle enum. This is in turn saved to the DB. Its running once every 30 seconds and the database call is every 3 minutes and when the player leaves.
When I spawn the vehicle is perfect.
Any ideas.
pawn Код:
public doVehicleDamageUpdates()
{
new i;
new panelsd, doorsd, lightsd, tyresd;
for(i = 0; i < MAX_VEHICLES; i++)
{
if(IsValidVehicle(i))
{
GetVehicleDamageStatus(i, panelsd, doorsd, lightsd, tyresd);
playerVehicles[i][vPanelDamage] = panelsd;
playerVehicles[i][vDoorsDamage] = doorsd;
playerVehicles[i][vLightsDamage] = lightsd;
playerVehicles[i][vTyreDamage] = tyresd;
GetVehicleHealth(i,playerVehicles[i][vHealth]);
}
}
return 1;
}