SetVehicleFuelTankExplodable
Jump to navigation
Jump to search
This function changes 'explodable state' of a vehicle's fuel tank (toggles the ability to blow it up by shooting the tank). This function will have no effect on vehicles with tanks that cannot be shot in single player.
Syntax
bool setVehicleFuelTankExplodable ( vehicle theVehicle, bool Explodable )
Required Arguments
- theVehicle: The vehicle you wish to change the fuel tank explodable state of.
- Explodable: A boolean value representing whether or not the fuel tank will be explodable.
Returns
Returns 'true' if the vehicle's fuel tank explodable state was successfully changed, 'false' otherwise.
Example
This example will make fuel tanks explodable for 10seconds after they're entered
addEventHandler ( "onPlayerEnterVehicle", root, "onPlayerEnterVehicle" ) function onPlayerEnterVehicle ( theVehicle, seat, jacked ) if ( seat == 0 ) then -- if they're getting into the driver seat setVehicleFuelTankExplodable ( theVehicle, true ) -- make it explodable setTimer ( "setVehicleFuelTankExplodable", 10000, 1, theVehicle, false ) -- make it unexplodable in 10seconds end end
See Also
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates