GetVehiclePanelState: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | |||
{{Needs Checking|A list of panels would be nice and a more specific explanation on what the function returns --[[User:Norby89|Norby89]] 12:30, 26 August 2007 (CDT)}} | |||
{{Server client function}} | {{Server client function}} | ||
This function returns the current state of a specifed panel on the vehicle. A vehicle can have up to 7 panels. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
int getVehiclePanelState ( vehicle thevehicle, int panel ) | int getVehiclePanelState ( vehicle thevehicle, int panel ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Required Arguments== | |||
*'''theVehicle:''' A handle to the [[vehicle]] that you wish to know the panel state of. | |||
*''' | *'''panel:''' A whole number ranging from 0 to 6. | ||
== | ==Returns== | ||
Returns an [[int]] indicating the state of the specified the panel. This value can be: | |||
NEEDS UPDATING | |||
=== | ==Example== | ||
This function creates an admiral and outputs every panel's state in the chatbox. | |||
<syntaxhighlight lang="lua">local newcar = createVehicle ( 520, 1024, 1024, 1024 ) | |||
admiral = createVehicle ( 445, 0, 0, 10 ) | |||
... | |||
for i=0, 6 do | |||
local panel = getVehiclePanelState ( admiral, i ) | |||
outputChatBox ( panel ) | |||
end | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Vehicle functions}} | |||
{{ | |||
Revision as of 17:30, 26 August 2007
This article needs checking. | |
Reason(s): A list of panels would be nice and a more specific explanation on what the function returns --Norby89 12:30, 26 August 2007 (CDT) |
This function returns the current state of a specifed panel on the vehicle. A vehicle can have up to 7 panels.
Syntax
int getVehiclePanelState ( vehicle thevehicle, int panel )
Required Arguments
- theVehicle: A handle to the vehicle that you wish to know the panel state of.
- panel: A whole number ranging from 0 to 6.
Returns
Returns an int indicating the state of the specified the panel. This value can be:
NEEDS UPDATING
Example
This function creates an admiral and outputs every panel's state in the chatbox.
local newcar = createVehicle ( 520, 1024, 1024, 1024 ) admiral = createVehicle ( 445, 0, 0, 10 ) ... for i=0, 6 do local panel = getVehiclePanelState ( admiral, i ) outputChatBox ( panel ) 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