18.01.2012, 10:06
if the vehicles health reaches 250, set it to 300 and turn the engine off, that's what I do.
pawn Код:
new Float:Health, engine, lights, alarm, doors, bonnet, boot, objective;
for(new a = 0; a < MAX_VEHICLES; a++)
{
GetVehicleHealth(a, Health);
if(Health <= 250.0)
{
SetVehicleHealth(a, 300.0);
GetVehicleParamsEx(a, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(a, 0, lights, alarm, doors, bonnet, boot, objective);
}
}