Vehicle::dashboardColor

From RAGE Multiplayer Wiki
Revision as of 14:37, 29 October 2022 by Zekiloni (talk | contribs) (Created page with "This property using for getting or setting vehicle dashboard color. Dashboard colors are 1-157. == Setter == * {{RageType|int}} color value == Getter == * {{RageType|int}} c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This property using for getting or setting vehicle dashboard color. Dashboard colors are 1-157.

Setter

  • int color value

Getter

  • int color value

Example

mp.events.addCommand('dashboardcolor', (player, _, color) => {
    if (!player.vehicle) return; // check if player in vehicle or not
    if (color < 1 || color > 157) return; // check player input good color or not
    player.vehicle.dashboardColor = parseInt(color); // set vehicle's dashboard color
});