setMarkerColor | Multi Theft Auto: Wiki Skip to content

setMarkerColor

Client-side
Server-side
Shared

Pair: getMarkerColor

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function sets the color of the specified marker by modifying the values for red, green, blue and alpha.

OOP Syntax Help! I don't understand this!

Syntax

bool setMarkerColor ( marker theMarker, int r, int g, int b, int a )
Required Arguments
  • theMarker: The marker that you wish to set the color of.
  • r: The amount of red in the final color (0 to 255).
  • g: The amount of green in the final color (0 to 255).
  • b: The amount of blue in the final color (0 to 255).
  • a: The amount of alpha in the final color (0 to 255).

Returns

  • bool: value

Code Examples

shared
local newMarker = createMarker ( 0, 0, 2, "cylinder", 1, 255, 0, 0, 255 ) -- Create a red marker
setMarkerColor ( newMarker, 0, 255, 0, 255 ) -- Turn the red marker into a green one