GetVehicleMaxPassengers: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 4: | Line 4: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">int getVehicleMaxPassengers ( vehicle theVehicle )</syntaxhighlight> | <syntaxhighlight lang="lua">int getVehicleMaxPassengers ( vehicle theVehicle / int modelID )</syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theVehicle:''' A handle to the [[vehicle]] that you wish to know the maximum capacity of. | *'''theVehicle:''' A handle to the [[vehicle]] that you wish to know the maximum capacity of. | ||
OR | |||
*'''modelID:''' The model id that you wish to know the maximum capacity of. | |||
===Returns=== | ===Returns=== |
Revision as of 18:06, 7 June 2010
This function returns the maximum number of passengers that a specified vehicle can hold. Only passenger seats are counted, the driver seat is excluded.
Syntax
int getVehicleMaxPassengers ( vehicle theVehicle / int modelID )
Required Arguments
- theVehicle: A handle to the vehicle that you wish to know the maximum capacity of.
OR
- modelID: The model id that you wish to know the maximum capacity of.
Returns
Returns an int indicating the maximum number of passengers that can enter a vehicle.
Example
This example creates a vehicle then gets the number of passenger seats and outputs it in the chat box.
newcar = createVehicle ( 520, 1024, 1024, 1024 ) -- create a vehicle numseats = getVehicleMaxPassengers ( newcar ) -- get the passenger seat count outputChatBox ( "This vehicle supports " .. numseats .. " passengers." ) -- show it in the chat
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