Skip to main content

Vehicle::setPlanePropellersHealth

JavaScript​

Required Arguments​

  • handle: Vehicle handle
  • health: number

Return value​

  • void

Syntax​

mp.game.vehicle.setPlanePropellersHealth(handle, health);

Example​

const plane = mp.vehicles.atRemoteId(0); //get vehicle with remote id 0
if (!plane || !mp.vehicles.exists(plane)) return; //if the vehicle don't exist we return here
if (mp.game.vehicle.getClass(plane.handle) !== 16) return; //vehicle is not a plane
//Plane is valid, processing the code:
mp.game.vehicle.setPlanePropellersHealth(plane.handle, 100.0);