Vehicle::getNeonColour: Difference between revisions
(Added missing "See Also" links.) |
m (Added a missing line break in the code for readability purposes.) |
||
| Line 7: | Line 7: | ||
<pre> | <pre> | ||
Object vehicle.getNeonColour(); | Object vehicle.getNeonColour(); | ||
</pre> | </pre> | ||
===Returns=== | ===Returns=== | ||
Return array containing colours. | Return array containing colours. | ||
Revision as of 20:07, 11 September 2020
Server-Side Function
This function used for get vehicle neon color in RGB format.
JavaScript Syntax
Syntax
Object vehicle.getNeonColour();
Returns
Return array containing colours.
Array content
- Red color in diapason 0 - 255.
- Green color in diapason 0 - 255.
- Blue color in diapason 0 - 255.
Example
Server-Side
mp.events.addCommand(`neonich`,
(player) => {
let vehicle = player.vehicle;
if (!!vehicle) {
let [r, g, b] = vehicle.getNeonColour();
player.outputChatBox(`R <b>${r}</b>; G <b>${g}</b>; B <b>${b}</b>`);
};
}
);
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