Vehicle::setNeonColor

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

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

Syntax

vehicle.setNeonColor(int r, int g, int b)

Arguments

  • r: Red Value 0 - 255.
  • g: Green Value 0 - 255.
  • b: Blue Value 0 - 255.

Example

This example sets yellow neon lights for the vehicle, in which the player sits.

mp.events.add('playerCommand', (player, cmd) => {
    let arr = cmd.split(' ');
    if (arr[0] == 'neon' && player.vehicle) {
        player.vehicle.setNeonColor(255, 255, 0);
    }
});