Vehicle::getNeonColor

From RAGE Multiplayer Wiki
Revision as of 20:05, 20 October 2019 by M4xf0x (talk | contribs) (Created page with "This function is used to get the current neon lights of a vehicle. == Syntax == <syntaxhighlight lang="javascript"> vehicle.getNeonColor() </syntaxhighlight> == Return Values...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function is used to get the current neon lights of a vehicle.

Syntax

vehicle.getNeonColor()

Return Values

  • object

Example

This example gets the neon lights from the vehicle, in which the player sits.

mp.events.add('playerCommand', (player, cmd) => {
    let arr = cmd.split(' ');
    if (arr[0] == 'getneon' && player.vehicle) {
        player.notify(player.vehicle.getNeonColor().toString());
    }
});