HUDClient

setMinimapComponent

SET_MINIMAP_COMPONENT0x75A9A10948D1DEA6

The GTA V native SET_MINIMAP_COMPONENT of the HUD namespace, as LS:MP client scripts call it: the global function setMinimapComponent, in JavaScript and in Lua.

SignatureJavaScript
setMinimapComponent(
  componentId: number,
  toggle: boolean,
  overrideColor: number
): boolean
SignatureLua
setMinimapComponent(
  componentId: integer,
  toggle: boolean,
  overrideColor: integer
): boolean

Usage

JavaScript
const result = setMinimapComponent(componentId, toggle, overrideColor);
Lua
local result = setMinimapComponent(componentId, toggle, overrideColor)

Parameters

ParameterTypeJavaScriptLua
componentIdintnumberinteger
toggleBOOLbooleanboolean
overrideColorintnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

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

This native is used to colorize certain map components like the army base at the top of the map.
p2 appears to be always -1. If p2 is -1 then native wouldn't change the color.

Reference

Namespace
HUD HUD
In the game
BOOL SET_MINIMAP_COMPONENT(int componentId, BOOL toggle, int overrideColor)
Hash
0x75A9A10948D1DEA6

Open in the interactive natives reference