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

Vehicle::dashboardColor

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

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

Setter

  • int color value

Getter

  • int color value

Example

<source lang="javascript"> 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

}); </source>