SetVehiclePaintjob: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Link to paintjob list) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | |||
This function changes the paintjob on the specified vehicle. <br/> | This function changes the paintjob on the specified vehicle. <br/> | ||
See [[Paintjob|paintjob]] for list of supported vehicles. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool setVehiclePaintjob ( vehicle theVehicle, int | <syntaxhighlight lang="lua">bool setVehiclePaintjob ( vehicle theVehicle, int value )</syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theVehicle''': The [[vehicle]] you wish to change the paintjob of. | *'''theVehicle''': The [[vehicle]] you wish to change the paintjob of. | ||
*''' | *'''value''': A whole number representing the new paintjob id. Ranges from 0 up to 3. | ||
==Returns== | ==Returns== | ||
Returns 'true' if the vehicle's paintjob was changed. Otherwise 'false'. | Returns ''true'' if the vehicle's paintjob was changed. Otherwise ''false''. | ||
==Example== | ==Example== | ||
This example will set the paintjob of a new sultan to '2'. | This example will set the paintjob of a new sultan to '2'. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
newvehicle = createVehicle ( 560, 100, 100, 40 ) -- create the sultan | |||
setVehiclePaintjob ( | setVehiclePaintjob ( newvehicle, 2 ) -- change the paintjob | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Vehicle functions}} | {{Vehicle functions}} |
Latest revision as of 17:13, 15 April 2014
This function changes the paintjob on the specified vehicle.
See paintjob for list of supported vehicles.
Syntax
bool setVehiclePaintjob ( vehicle theVehicle, int value )
Required Arguments
- theVehicle: The vehicle you wish to change the paintjob of.
- value: A whole number representing the new paintjob id. Ranges from 0 up to 3.
Returns
Returns true if the vehicle's paintjob was changed. Otherwise false.
Example
This example will set the paintjob of a new sultan to '2'.
newvehicle = createVehicle ( 560, 100, 100, 40 ) -- create the sultan setVehiclePaintjob ( newvehicle, 2 ) -- change the paintjob
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