AutoRepair for Airplanes
#1

Quote:

public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
#pragma unused playerid

new panels, doors, lights, tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
tires = encode_tires(0, 0, 0, 0); // fix all tires
panels = encode_panels(0, 0, 0, 0, 0, 0, 0); // fix all panels //fell off - (3, 3, 3, 3, 3, 3, 3)
doors = encode_doors(0, 0, 0, 0, 0, 0); // fix all doors //fell off - (4, 4, 4, 4, 0, 0)
lights = encode_lights(0, 0, 0, 0); // fix all lights
SetVehicleHealth(vehicleid,1000.0);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
return 1;
}

encode_tires(tire1, tire2, tire3, tire4) return tire1 | (tire2 << 1) | (tire3 << 2) | (tire4 << 3);
encode_panels(flp, frp, rlp, rrp, windshield, front_bumper, rear_bumper)
{
return flp | (frp << 4) | (rlp << | (rrp << 12) | (windshield << 16) | (front_bumper << 20) | (rear_bumper << 24);
}
encode_doors(bonnet, boot, driver_door, passenger_door, behind_driver_door, behind_passenger_door)
{
#pragma unused behind_driver_door
#pragma unused behind_passenger_door
return bonnet | (boot << | (driver_door << 16) | (passenger_door << 24);
}
encode_lights(light1, light2, light3, light4)
{
return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);
}
// end of it!

Its only for cars auto repair but its not working on airplane. Help me how too add autorepairs for airplanes helicopters.
Reply


Messages In This Thread
AutoRepair for Airplanes - by kbalor - 23.06.2012, 08:06
Re: AutoRepair for Airplanes - by MP2 - 23.06.2012, 09:41
Re: AutoRepair for Airplanes - by Faisal_khan - 23.06.2012, 10:23

Forum Jump:


Users browsing this thread: 1 Guest(s)