GraphicsClient

terraingridSetColours

TERRAINGRID_SET_COLOURS0x5CE62918F8D703C7

The GTA V native TERRAINGRID_SET_COLOURS of the GRAPHICS namespace, as LS:MP client scripts call it: the global function terraingridSetColours, in JavaScript and in Lua.

SignatureJavaScript
terraingridSetColours(
  lowR: number,
  lowG: number,
  lowB: number,
  lowAlpha: number,
  r: number,
  g: number,
  b: number,
  alpha: number,
  highR: number,
  highG: number,
  highB: number,
  highAlpha: number
): void
SignatureLua
terraingridSetColours(
  lowR: integer,
  lowG: integer,
  lowB: integer,
  lowAlpha: integer,
  r: integer,
  g: integer,
  b: integer,
  alpha: integer,
  highR: integer,
  highG: integer,
  highB: integer,
  highAlpha: integer
)

Usage

JavaScript
terraingridSetColours(
  lowR, lowG, lowB, lowAlpha, r, g, b, alpha, highR, highG, highB, highAlpha
);
Lua
terraingridSetColours(
    lowR, lowG, lowB, lowAlpha, r, g, b, alpha, highR, highG, highB, highAlpha
)

Parameters

ParameterTypeJavaScriptLua
lowRintnumberinteger
lowGintnumberinteger
lowBintnumberinteger
lowAlphaintnumberinteger
rintnumberinteger
gintnumberinteger
bintnumberinteger
alphaintnumberinteger
highRintnumberinteger
highGintnumberinteger
highBintnumberinteger
highAlphaintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

This native is used along with these two natives: terraingridActivate and terraingridSetParams.
This native sets the colors for the golf putting grid. the 'min...' values are for the lower areas that the grid covers, the 'max...' values are for the higher areas that the grid covers, all remaining values are for the 'normal' ground height.

Reference

Namespace
Graphics GRAPHICS
In the game
void TERRAINGRID_SET_COLOURS(int lowR, int lowG, int lowB, int lowAlpha, int r, int g, int b, int alpha, int highR, int highG, int highB, int highAlpha)
Hash
0x5CE62918F8D703C7

Open in the interactive natives reference