IsVehicleFuelTankExplodable: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Server client function}} | |||
__NOTOC__ | __NOTOC__ | ||
This will tell you if a vehicle's petrol tank is explodable. | This will tell you if a vehicle's petrol tank is explodable. | ||
Line 6: | Line 7: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theVehicle''' | *'''theVehicle:''' The [[vehicle]] that you want to obtain the fuel tank status of. | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the specified vehicle is valid and | Returns ''true'' if the specified vehicle is valid and its fuel tank is explodable, ''false'' otherwise. | ||
==Example== | ==Example== | ||
This example creates a vehicle then displays if it fuel tank is explodable or not in the chatbox. | This example creates a vehicle, then displays if it fuel tank is explodable or not in the chatbox. | ||
<syntaxhighlight lang="lua">newcar = createVehicle ( 520, 1024, 1024, 1024 ) | <syntaxhighlight lang="lua"> | ||
newcar = createVehicle ( 520, 1024, 1024, 1024 ) | |||
if ( isVehicleFuelTankExplodable ( newcar ) ) then | if ( isVehicleFuelTankExplodable ( newcar ) ) then | ||
outputChatBox ( "Vehicle's tank is explodable" ) | |||
else | else | ||
outputChatBox ( "Vehicle's tank is not explodable" ) | |||
end</syntaxhighlight> | end | ||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Vehicle functions}} | {{Vehicle functions}} |
Revision as of 19:12, 16 August 2007
This will tell you if a vehicle's petrol tank is explodable.
Syntax
bool isVehicleFuelTankExplodable ( vehicle theVehicle )
Required Arguments
- theVehicle: The vehicle that you want to obtain the fuel tank status of.
Returns
Returns true if the specified vehicle is valid and its fuel tank is explodable, false otherwise.
Example
This example creates a vehicle, then displays if it fuel tank is explodable or not in the chatbox.
newcar = createVehicle ( 520, 1024, 1024, 1024 ) if ( isVehicleFuelTankExplodable ( newcar ) ) then outputChatBox ( "Vehicle's tank is explodable" ) else outputChatBox ( "Vehicle's tank is not explodable" ) 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