Vehicle::setColor: Difference between revisions
m (Rt-2 moved page Vehicle::setColour to Vehicle::setColor) |
No edit summary |
||
| Line 1: | Line 1: | ||
'''Function''': sets vehicle body color. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
void vehicle. | void vehicle.setColor(int color1, int color2); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''color1:''' Primary color. | ||
*''' | *'''color2:''' Secondary color. | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
var theVehicle = mp.vehicles.new(418536135, new mp.Vector3(-17.460, 39.787, 71.318)); // spawn Infernus | var theVehicle = mp.vehicles.new(418536135, new mp.Vector3(-17.460, 39.787, 71.318)); // spawn Infernus | ||
theVehicle. | theVehicle.setColor(0,0); // set black colour | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{ | {{Vehicle_definition}} | ||
Revision as of 13:55, 28 December 2017
Function: sets vehicle body color.
Syntax
void vehicle.setColor(int color1, int color2);
Required Arguments
- color1: Primary color.
- color2: Secondary color.
Example
var theVehicle = mp.vehicles.new(418536135, new mp.Vector3(-17.460, 39.787, 71.318)); // spawn Infernus
theVehicle.setColor(0,0); // set black colour
See Also
- Functions
- Vehicle::Vehicle
- Vehicle::destroy
- Vehicle::explode
- Vehicle::getColor
- Vehicle::getColorRGB
- Vehicle::getExtra
- Vehicle::getMod
- Vehicle::getNeonColor
- Vehicle::getOccupant
- Vehicle::getOccupants
- Vehicle::getPaint
- Vehicle::isStreamed
- Vehicle::isStreamedFor
- Vehicle::repair
- Vehicle::setColor
- Vehicle::setColorRGB
- Vehicle::setExtra
- Vehicle::setMod
- Vehicle::setNeonColor
- Vehicle::setOccupant
- Vehicle::setPaint
- Vehicle::spawn
- Entity::destroy
- Entity::dist
- Entity::distSquared
- Entity::getVariable
- Entity::setVariable
- Entity::setVariables
- Properties
- Vehicle::bodyHealth
- Vehicle::brake
- Vehicle::dashboardColor
- Vehicle::dead
- Vehicle::engine
- Vehicle::engineHealth
- Vehicle::extras
- Vehicle::highbeams
- Vehicle::horn
- Vehicle::livery
- Vehicle::locked
- Vehicle::movable
- Vehicle::mods
- Vehicle::neonEnabled
- Vehicle::numberPlate
- Vehicle::numberPlateType
- Vehicle::pearlescentColor
- Vehicle::rocketBoost
- Vehicle::rotation
- Vehicle::siren
- Vehicle::steerAngle
- Vehicle::streamedPlayers
- Vehicle::taxiLights
- Vehicle::trailer
- Vehicle::traileredBy
- Vehicle::trimColor
- Vehicle::velocity
- Vehicle::windowTint
- Vehicle::wheelColor
- Vehicle::wheelType
- Entity::alpha
- Entity::data
- Entity::dimension
- Entity::id
- Entity::model
- Entity::position
- Entity::type