Vehicle::setNeonColour: Difference between revisions
No edit summary |
(Updated page formatting, fixed several issues, added missing links, and corrected grammatical issues.) |
||
| Line 1: | Line 1: | ||
__NOTOC__ | |||
{{ServersideJsFunction}} | |||
This function used for set vehicle RGB neon color. | This function used for set vehicle RGB neon color. | ||
{{JSContainer| | |||
==Syntax== | ==Syntax== | ||
< | <pre> | ||
vehicle.setNeonColour(Number r, Number g, Number b); | vehicle.setNeonColour(Number r, Number g, Number b); | ||
</ | </pre> | ||
===Required Arguments=== | ===Required Arguments=== | ||
| Line 12: | Line 15: | ||
==Example== | ==Example== | ||
{{ServersideCode| | |||
<pre> | |||
< | |||
mp.events.addCommand(`yay!`, | mp.events.addCommand(`yay!`, | ||
(player) => { | (player) => { | ||
| Line 23: | Line 25: | ||
} | } | ||
); | ); | ||
</ | </pre> | ||
}} | |||
}} | |||
==See Also== | == See Also == | ||
{{ | *'''Server-side''' | ||
{{Vehicle_function}} | |||
Revision as of 20:09, 11 September 2020
Server-Side Function
This function used for set vehicle RGB neon color.
JavaScript Syntax
Syntax
vehicle.setNeonColour(Number r, Number g, Number b);
Required Arguments
- r: Red color in range of 0 - 255.
- g: Green color in range of 0 - 255.
- b: Blue color in range of 0 - 255.
Example
Server-Side
mp.events.addCommand(`yay!`,
(player) => {
let vehicle = player.vehicle;
if (vehicle) {
vehicle.setNeonColour(255, 255, 0); //255, 255, 0 - it's a Yellow, yep
};
}
);
See Also
- Server-side
- 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