SetVehicleDisablePetrolTankFires

From GT-MP
Jump to: navigation, search
SetVehicleDisablePetrolTankFires
Client-Side Function
System-users.png Client-Side Javascript.png JavaScript

Allows/disallows the specified vehicle's petrol tank catching fire.

Dialog-warning.png Note: This feature is currently not in the API, or is currently not accurate on the wiki due to upcoming API changes. New API functions and changes will be released with the next update.


Dialog-warning.png

Note: The changed status will be set to default (disabled) after the vehicle streams out, so using this API in onEntityStreamIn is required!

Syntax

In Javascript
Client-Side Function

API.setVehicleDisablePetrolTankFires(LocalHandle vehicle, bool toggle);

Required Arguments

  • vehicle parameter input should be in LocalHandle type.
  • toggle parameter input should be in bool type.

Usage example

Allows all vehicle petrol tanks to catch fire.

In Javascript
Client-Side Function

API.onEntityStreamIn.connect((ent, entType) => {
  if (entType === 1) { // Vehicle
    API.setVehicleDisablePetrolTankFires(ent, false);
  }
});

References