void SET_MINIMAP_COMPONENT_POSITION(char* name, char* alignX, char* alignY, float posX, float posY, float sizeX, float sizeY);
-- -- defaults
SetMinimapComponentPosition('minimap', 'L', 'B', -0.0045, 0.002, 0.150, 0.188888)
SetMinimapComponentPosition('minimap_mask', 'L', 'B', 0.020, 0.032, 0.111, 0.159)
SetMinimapComponentPosition('minimap_blur', 'L', 'B', -0.03, 0.022, 0.266, 0.237)
Using the new (June 5th, 2020) SET_MINIMAP_COMPONENT_POSITION
native, I’m able to move the minimap around the screen, but it doesn’t automatically re-render the position of the minimap
component itself, while it does the minimap_mask
and minimap_blur
component.
If you run the following code, you will see the _mask
and _blur
component move in real time and update on the HUD accordingly, while the minimap
component will lag behind. I can “force” a re-render of the minimap
component by pressing escape and accessing the pause menu, then exiting again.
local startMinimapX, startMinimapY = -0.0045, 0.002
local i = 0.001
while i < 1 do
startMinimapX = startMinimapX + 0.001
startMinimapY = startMinimapY - 0.001
SetMinimapComponentPosition('minimap', 'L', 'B', startMinimapX, startMinimapY, 0.150, 0.188888)
SetMinimapComponentPosition('minimap_mask', 'L', 'B', startMinimapX, startMinimapY, 0.150, 0.188888)
SetMinimapComponentPosition('minimap_blur', 'L', 'B', startMinimapX, startMinimapY, 0.266, 0.237)
i = i + 0.01
Wait(100)
end
Link to native: https://github.com/citizenfx/fivem/commit/c601baf1fb132677cd372559ee9dac09a8977b93#diff-b0833dabc9bb9dd6a09e9f533d088e12