Skip to content

Conversation

@Xenius97
Copy link
Contributor

@Xenius97 Xenius97 commented Dec 3, 2025

Closes #4591

This PR adds new functions to take full control of F11 map and adds ability to use custom radar textures (currently if you update MTA then it will overwrite everytime).
To use custom textures you need to place into new "cegui/radar" folder with -custom suffix.
This can be overwritten by lua scripts.

New functions:


bool setPlayerMapImage(string/texture, size = 1024/2048)

This will replace radar image based on size (compatible with new user resolution settings)


bool resetPlayerMapImage((optional) size = 1024/2048)

This will restore default radar image.


bool setPlayerMapOpacity(0-255)

This will set custom opacity for radar when opened.

bool resetPlayerMapOpacity()

This will reset custom opacity.


Test resource:
radar.zip

@Fernando-A-Rocha
Copy link
Contributor

Awesome!

Just a problem tho: F11 map is purposely called Player Map on MTA to distinguish from the minimap (Radar), do the disable function should be disablePlayerMap ?

@Fernando-A-Rocha
Copy link
Contributor

Also, bool resetPlayerMapImage should not take any parameters in my opinion, to restore to the map size defined by the client in their settings automatically

@Xenius97
Copy link
Contributor Author

Xenius97 commented Dec 3, 2025

Awesome!

Just a problem tho: F11 map is purposely called Player Map on MTA to distinguish from the minimap (Radar), do the disable function should be disablePlayerMap ?

i've renamed to this

Also, bool resetPlayerMapImage should not take any parameters in my opinion, to restore to the map size defined by the client in their settings automatically

if you don't add a parameter for it, it will reset both, argument for this are optional

@Fernando-A-Rocha
Copy link
Contributor

Fernando-A-Rocha commented Dec 3, 2025

To discuss: what about replacing the blip images? I believe for the F11 map they are .png but for the radar minimal they are textures part of HUD.txd that you can replace with a shader...?

@Xenius97
Copy link
Contributor Author

Xenius97 commented Dec 3, 2025

To discuss: what about replacing the blip images? I believe for the F11 map they are .png but for the radar minimal they are textures part of HUD.txd that you can replace with a shader...?

F11 blips are managed here too, so i think we can make a function for replacing those. I think default radar images can be replaced via shader.

@Fernando-A-Rocha
Copy link
Contributor

Fernando-A-Rocha commented Dec 3, 2025

To discuss: what about replacing the blip images? I believe for the F11 map they are .png but for the radar minimal they are textures part of HUD.txd that you can replace with a shader...?

F11 blips are managed here too, so i think we can make a function for replacing those. I think default radar images can be replaced via shader.

To me it's weird that F11 blips represent the blips with separate PNG images. These MTA blips are created using createBlip function, drawn using GTASA textures in the minimap, so I don't think it has been a good choice to make separate images for them since they are already in the game files (hud.txd).

Could you make it so the F11 blips use the GTASA textures so they can only be replaced using shaders, affecting F11 map and minimap at the same time?
I don't see why anyone would want separate blip images does the same blip in minimap and full map... But correct me if I'm wrong.

@FileEX
Copy link
Member

FileEX commented Dec 4, 2025

This will completely disable F11 radar map, prevoriusly this was only possible with onClientKey workaround.

toggleControl('radar', false)

@FileEX FileEX added the enhancement New feature or request label Dec 4, 2025
@Xenius97
Copy link
Contributor Author

Xenius97 commented Dec 4, 2025

This will completely disable F11 radar map, prevoriusly this was only possible with onClientKey workaround.

toggleControl('radar', false)

omg ty, i'm really blind, i've removed disablePlayerMap

@Xenius97 Xenius97 requested a review from tederis December 4, 2025 13:02
@Fernando-A-Rocha
Copy link
Contributor

This will completely disable F11 radar map, prevoriusly this was only possible with onClientKey workaround.

toggleControl('radar', false)

omg ty, i'm really blind, i've removed disablePlayerMap

I know it's just naming and it doesn't affect anything, but the F11 map (player-map) strings/commands really should not be called "radar" because that refers to the minimap 😔

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change the map image serverside or stop updating the radar map on every update

4 participants