Vehicle::getCustomPrimaryColour: Difference between revisions

From RAGE Multiplayer Wiki
 
Line 17: Line 17:


==See also==
==See also==
{{Vehicle_function_c}}
{{Vehicle_definition_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 11:34, 9 May 2024

Syntax

vehicle.getCustomPrimaryColour(r, g, b);

Required Arguments

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

Return value

  • object: r, g, b

Example

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
});

See also