mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Add a way to read the texture files from ``GTA San Andreas/models``

Open PlatinMTA opened this issue 5 months ago • 4 comments
trafficstars

Is your feature request related to a problem? Please describe.

A lot of players nowadays use a custom hud.txd file in order to change the look of their crosshair or their fist. This is fine as long as you using the default HUD and you don't intend on modernizing it, but the moment you want to modernize it you disable the ability for your users to customize their HUD, which I think is a missed opportunity.

Right now if you want to read the icon's of your player's weapons you can, using the function engineGetModelTextures. There is no alternative for reading the hud.txd files tho. I tried hacking my way into it with onPlayerModInfo but that function doesn't send the actual file that has been modified (with good reasons).

What I want is a way to read the contents of the texture files from the models folder, particularly the hud.txd, so I can adapt those textures to my HUD so players don't need to do an extra step if they want to modify the icons of my HUD.

The function should return a list of textures with their names just like engineGetModelTextures does.

Describe the solution you'd like

Add a function that lets you read the client's hud.txd (clientside of course) and possibly other texture files from the models folder since this is currently impossible.

Just to be clear, I am not asking for a function that also let's you modify these files, we already can do this with shaders... although that would be really nice if you want to have a more performant way of modifying the radar for example.

Describe alternatives you've considered

Change engineGetModelTextures to be able to get any texture that has X given name... but that seems slow.

Additional context

No response

Security Policy

  • [x] I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.

PlatinMTA avatar May 25 '25 11:05 PlatinMTA

see here : https://github.com/multitheftauto/mtasa-blue/issues/2564

ALBANDER2022 avatar May 28 '25 11:05 ALBANDER2022

see here : https://github.com/multitheftauto/mtasa-blue/issues/2564

Unrelated

PlatinMTA avatar May 28 '25 11:05 PlatinMTA

I support this. Makes sense. What about loading custom HUD.txd from the server?

Fernando-A-Rocha avatar May 28 '25 11:05 Fernando-A-Rocha

I support this. Makes sense. What about loading custom HUD.txd from the server?

I wouldn't mind if a PR added these two things, but it is unrelated to my use case. Although yes, way better than using shaders that's for sure (especially for the radar...).

PlatinMTA avatar May 28 '25 13:05 PlatinMTA