ObjectClient

setTintIndexClosestBuildingOfType

SET_TINT_INDEX_CLOSEST_BUILDING_OF_TYPE0xF12E33034D887F66

The GTA V native SET_TINT_INDEX_CLOSEST_BUILDING_OF_TYPE of the OBJECT namespace, as LS:MP client scripts call it: the global function setTintIndexClosestBuildingOfType, in JavaScript and in Lua.

SignatureJavaScript
setTintIndexClosestBuildingOfType(
  x: number,
  y: number,
  z: number,
  radius: number,
  modelHash: Hash,
  tintIndex: number
): boolean
SignatureLua
setTintIndexClosestBuildingOfType(
  x: number,
  y: number,
  z: number,
  radius: number,
  modelHash: Hash,
  tintIndex: integer
): boolean

Usage

JavaScript
const result = setTintIndexClosestBuildingOfType(x, y, z, radius, modelHash, tintIndex);
Lua
local result = setTintIndexClosestBuildingOfType(x, y, z, radius, modelHash, tintIndex)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
const result = setTintIndexClosestBuildingOfType(pos, radius, modelHash, tintIndex);
Lua · with vectors
local result = setTintIndexClosestBuildingOfType(pos, radius, modelHash, tintIndex)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
radiusfloatnumbernumber
modelHashHashnumberinteger
tintIndexintnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Reference

Namespace
Object OBJECT
In the game
BOOL SET_TINT_INDEX_CLOSEST_BUILDING_OF_TYPE(float x, float y, float z, float radius, Hash modelHash, int tintIndex)
Hash
0xF12E33034D887F66
Introduced
Game build 1103 legacy numbering
Formerly
_SET_TEXTURE_VARIATION_OF_CLOSEST_OBJECT_OF_TYPE

Open in the interactive natives reference