IsVehicleBlown: Difference between revisions
Jump to navigation
Jump to search
m (→Example) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool isVehicleBlown ( vehicle theVehicle )</syntaxhighlight> | <syntaxhighlight lang="lua">bool isVehicleBlown ( vehicle theVehicle )</syntaxhighlight> | ||
{{OOP||[[vehicle]]:isBlown|blown|blowVehicle}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theVehicle:''' The [[vehicle]] that you want to obtain the blown status of. | *'''theVehicle:''' The [[vehicle]] that you want to obtain the blown status of. | ||
Line 31: | Line 31: | ||
==See Also== | ==See Also== | ||
{{Vehicle functions}} | {{Vehicle functions}} | ||
Latest revision as of 22:33, 18 December 2014
This function allows you to determine whether a vehicle is blown or still intact.
Syntax
bool isVehicleBlown ( vehicle theVehicle )
OOP Syntax Help! I don't understand this!
- Method: vehicle:isBlown(...)
- Variable: .blown
- Counterpart: blowVehicle
Required Arguments
- theVehicle: The vehicle that you want to obtain the blown status of.
Returns
Returns true if the vehicle specified has blown up, false if it is still intact or the vehicle specified is invalid.
Example
Click to collapse [-]
ServerThis example creates a taxi and checks whether the taxi has blown up or not every time somebody types "/taxi".
theTaxi = createVehicle ( 420, 1, 1, 17 ) -- Add a taxi in the middle of SA function checkTaxi ( thePlayer, command ) if ( isVehicleBlown ( theTaxi ) ) then -- Check whether it's blown or not outputChatBox ( "The taxi has blown up.", thePlayer, 255, 0, 0 ) -- If so, we'll output it else -- Anything else (if it's not) outputChatBox ( "The taxi has not blown.", thePlayer, 255, 0, 0 ) -- If not, we'll output that instead end end addCommandHandler ( "taxi", checkTaxi ) -- Make it check when somebody types "/taxi"
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