Vehicle::getColor: Difference between revisions

From RAGE Multiplayer Wiki
(Change to correct function.)
(Fixed british spelling)
Line 5: Line 5:
*'''id:''' int
*'''id:''' int
===Return value===
===Return value===
*'''integer:''' colour
*'''integer:''' color
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">

Revision as of 19:49, 14 August 2018

Syntax

vehicle.getColor(id);

Required Arguments

  • id: int

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