Vehicle::getColor: Difference between revisions

From RAGE Multiplayer Wiki
(Fixed british spelling)
No edit summary
Line 4: Line 4:
=== Required Arguments ===
=== Required Arguments ===
*'''id:''' int
*'''id:''' int
ID 0 - Primary Color
ID 1 - Secondary Color
===Return value===
===Return value===
*'''integer:''' color
*'''integer:''' color

Revision as of 19:50, 14 August 2018

Syntax

vehicle.getColor(id);

Required Arguments

  • id: int

ID 0 - Primary Color ID 1 - Secondary Color

Return value

  • integer: color

Example

let primaryColor = player.vehicle.getColor(0)
let secondaryColor = player.vehicle.getColor(1)

// If the vehicle primary color was black the following would return 0
console.log(primaryColor)

See also