Перейти к содержанию

Vehicle::pearlescentColor

Материал из RAGE MP Wiki Archive

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

Syntax

<syntaxhighlight lang="javascript"> int vehicle.pearlescentColor </syntaxhighlight>

Example

This example sets red pearlescent color for the vehicle, in which the player sits. <syntaxhighlight lang="javascript"> mp.events.add('playerCommand', (player, cmd) => {

   let arr = cmd.split(' ');
   if (arr[0] == 'pcolor' && player.vehicle) {
       player.vehicle.pearlescentColor = 45;
   }

}); </syntaxhighlight>