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

Vehicle::getCustomPrimaryColour

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

Syntax

<syntaxhighlight lang="javascript">vehicle.getCustomPrimaryColour(r, g, b);</syntaxhighlight>

Required Arguments

  • r: int
  • g: int
  • b: int

Return value

  • object: r, g, b

Example

<syntaxhighlight lang="javascript"> mp.events.add("playerEnterVehicle", (vehicle, seat) => { // Getting RED Color of RGB when player Enter vehicle

 let rgb = vehicle.getCustomPrimaryColour(0, 0, 0); // 
 mp.gui.chat.push("Red color is: " + rgb.r); // rgb.r = from 0 to 255 depends on vehicle's color

}); </syntaxhighlight>

See also