SetMarkerColor: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (needs checking)
mNo edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
{{Needs Checking|Client side only the alpha value defaults to 255}}
This function sets the color of the specified marker by modifying the values for red, green and blue.
This function sets the color of the specified marker by modifying the values for red, green and blue.



Revision as of 15:42, 7 September 2018

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

Syntax

bool setMarkerColor ( marker theMarker, int r, int g, int b, int a )

OOP Syntax Help! I don't understand this!

Method: Marker:setColor(...)
Counterpart: getMarkerColor


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).

Example

newmarker = createMarker ( 1000, 1000, 1000, 1, 255, 0, 0, 255 )  -- Create a red marker
setMarkerColor ( newmarker, 0, 255, 0, 255 )                      -- Turn the red marker into a green one

See Also