SetMinimapComponentPosition
DocsSetMinimapComponentPosition(name, alignX, alignY, posX, posY, sizeX, sizeY)Description
Overrides the minimap component data (from common:/data/ui/frontend.xml) for a specified component.
Parameters
| Name | Type | Description |
|---|---|---|
name | char* | The name of the minimap component to override. |
alignX | char* | Equivalent to the `alignX` field in `frontend.xml`. |
alignY | char* | Equivalent to the `alignY` field in `frontend.xml`. |
posX | float | Equivalent to the `posX` field in `frontend.xml`. |
posY | float | Equivalent to the `posY` field in `frontend.xml`. |
sizeX | float | Equivalent to the `sizeX` field in `frontend.xml`. |
sizeY | float | Equivalent to the `sizeY` field in `frontend.xml`. |
Quick Snippet: Get CoordinatesposXposY
posXposYAdd this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Returns
voidThis native does not return a value.