Vehicle::setPlanePropellersHealth

From RAGE Multiplayer Wiki
Revision as of 17:17, 22 April 2024 by Shr0x (talk | contribs) (Created page with "{{JSContainer| === Required Arguments === *'''handle:''' Vehicle handle *'''health:''' number ===Return value=== *'''void''' ==Syntax== <syntaxhighlight lang="javascript"> mp.game.vehicle.setPlanePropellersHealth(handle, health); </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> 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....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

JavaScript Syntax


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);


See also