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

Vehicle::pearlescentColor

Материал из RAGE MP Wiki Archive
Версия от 15:33, 24 октября 2019; imported>M4xf0x (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...")
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

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>