Vehicle::setNeonColour: Difference between revisions
(Updated page formatting, fixed several issues, added missing links, and corrected grammatical issues.) |
MrPancakers2 (talk | contribs) No edit summary |
||
| Line 6: | Line 6: | ||
==Syntax== | ==Syntax== | ||
<pre> | <pre> | ||
vehicle.setNeonColour( | vehicle.setNeonColour(r, g, b); | ||
</pre> | </pre> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''r:''' Red | *'''r:''' {{RageType|Int}} Red [0 - 255] | ||
*'''g:''' Green | *'''g:''' {{RageType|Int}} Green [0 - 255] | ||
*'''b:''' Blue | *'''b:''' {{RageType|Int}} Blue [0 - 255] | ||
==Example== | ==Example== | ||
| Line 21: | Line 21: | ||
let vehicle = player.vehicle; | let vehicle = player.vehicle; | ||
if (vehicle) { | if (vehicle) { | ||
vehicle.setNeonColour(255, 255, 0); // | vehicle.setNeonColour(255, 255, 0); // Yellow Neon | ||
}; | }; | ||
} | } | ||
| Line 30: | Line 30: | ||
== See Also == | == See Also == | ||
{{Vehicle_function}} | {{Vehicle_function}} | ||
Latest revision as of 00:53, 14 September 2020
Server-Side Function
This function used for set vehicle RGB neon color.
JavaScript Syntax
Syntax
vehicle.setNeonColour(r, g, b);
Required Arguments
- r: Int Red [0 - 255]
- g: Int Green [0 - 255]
- b: Int Blue [0 - 255]
Example
Server-Side
mp.events.addCommand(`yay!`,
(player) => {
let vehicle = player.vehicle;
if (vehicle) {
vehicle.setNeonColour(255, 255, 0); // Yellow Neon
};
}
);
See Also
- Functions
- Vehicle::Vehicle
- Vehicle::repair
- Vehicle::destroy
- Vehicle::setNeonColour
- Vehicle::getNeonColour
- Vehicle::setMod
- Vehicle::getMod
- Vehicle::setColour
- Vehicle::setColourRGB
- Vehicle::setPaint
- Vehicle::getColour
- Vehicle::getColourRGB
- Vehicle::getPaint
- Vehicle::getOccupant
- Vehicle::setOccupant
- Vehicle::getOccupants
- Vehicle::explode
- Vehicle::spawn
- Properties
- Entity::id
- Entity::dimension
- Entity::type
- Vehicle::model
- Vehicle::alpha
- Vehicle::position
- Vehicle::rotation
- Vehicle::velocity
- Vehicle::siren
- Vehicle::horn
- Vehicle::engine
- Vehicle::highbeams
- Vehicle::engineHealth
- Vehicle::bodyHealth
- Vehicle::steerAngle
- Vehicle::rocketBoost
- Vehicle::brake
- Vehicle::locked
- Vehicle::numberPlate
- Vehicle::neonEnabled
- Vehicle::dead
- Vehicle::wheelType