GetVehicleType: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Server client function}} This function retrieves the vehicle type ==Syntax== <syntaxhighlight lang="lua"> string getVehicleType (vehicle theVehicle) string getVehicleType (integer modelId)...) |
No edit summary |
||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
string getVehicleType (vehicle theVehicle) | string getVehicleType ( vehicle theVehicle ) | ||
string getVehicleType (integer modelId) | string getVehicleType ( integer modelId ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 15: | Line 15: | ||
Returns a ''string'' with vehicle type or ''false'' if an invalid modelID has been supplied, or an empty string if the vehicle is blocked internally (some trailers). Works server- and clientside. | Returns a ''string'' with vehicle type or ''false'' if an invalid modelID has been supplied, or an empty string if the vehicle is blocked internally (some trailers). Works server- and clientside. | ||
'''types:''' | |||
Automobile<br /> Plane<br /> Bike<br /> Helicopter<br /> Boat<br /> Train<br /> Trailer<br /> BMX<br /> Monster Truck<br /> Quad | Automobile<br /> Plane<br /> Bike<br /> Helicopter<br /> Boat<br /> Train<br /> Trailer<br /> BMX<br /> Monster Truck<br /> Quad | ||
Revision as of 20:46, 14 April 2008
This function retrieves the vehicle type
Syntax
string getVehicleType ( vehicle theVehicle ) string getVehicleType ( integer modelId )
Required Arguments
- vehicle: The vehicle element or id.
Returns
Returns a string with vehicle type or false if an invalid modelID has been supplied, or an empty string if the vehicle is blocked internally (some trailers). Works server- and clientside.
types:
Automobile
Plane
Bike
Helicopter
Boat
Train
Trailer
BMX
Monster Truck
Quad
Example
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