Vehicle::pearlescentColor

From RAGE Multiplayer Wiki
Revision as of 15:33, 24 October 2019 by M4xf0x (talk | contribs) (Created page with "This function is used to set the pearlescent color of a vehicle. Using the Vehicle colors. == Syntax == <syntaxhighlight lang="javascript"> int vehicle.pear...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function is used to set the pearlescent color of a vehicle. Using the Vehicle colors.

Syntax

int vehicle.pearlescentColor

Example

This example sets red pearlescent color for the vehicle, in which the player sits.

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