GetVehiclePaintjob: 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 function gets the current paintjob on the specified vehicle. <br/> | This function gets the current paintjob on the specified vehicle. <br /> | ||
Note: Only works for supported vehicles. | Note: Only works for supported vehicles. | ||
Line 10: | Line 11: | ||
==Returns== | ==Returns== | ||
Returns an integer representing the current paintjob on the vehicle. <br/> | Returns an integer representing the current paintjob on the vehicle. <br /> | ||
Note: Returns '255' for default (no paintjob/plain). | Note: Returns '255' for default (no paintjob/plain). | ||
Line 16: | Line 17: | ||
This example will set the paintjob of a new sultan to '2', then check it was set. | This example will set the paintjob of a new sultan to '2', then check it was set. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
newvehicle = createVehicle ( 560, 100, 100, 40 ) -- create the sultan | |||
setVehiclePaintjob ( | setVehiclePaintjob ( newvehicle, 2 ) -- change the paintjob | ||
paintjob = getVehiclePaintjob ( | paintjob = getVehiclePaintjob ( newvehicle ) | ||
if ( paintjob == 2 ) then | if ( paintjob == 2 ) then | ||
outputChatBox ( "the paintjob was successfully set" ) | |||
end | end | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 18:12, 17 August 2007
This function gets the current paintjob on the specified vehicle.
Note: Only works for supported vehicles.
Syntax
int getVehiclePaintjob ( vehicle theVehicle )
Required Arguments
- theVehicle: The vehicle you wish to get the paintjob of.
Returns
Returns an integer representing the current paintjob on the vehicle.
Note: Returns '255' for default (no paintjob/plain).
Example
This example will set the paintjob of a new sultan to '2', then check it was set.
newvehicle = createVehicle ( 560, 100, 100, 40 ) -- create the sultan setVehiclePaintjob ( newvehicle, 2 ) -- change the paintjob paintjob = getVehiclePaintjob ( newvehicle ) if ( paintjob == 2 ) then outputChatBox ( "the paintjob was successfully set" ) 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