I want to be able to put my own, custom data in there.
For example: If I use a custom framework for player/character switching and money management, I want to be able to put character name where ‘Player_Name’ is on the screenshot and cash/account balance in their respective places.
old post content
Is there a server config, resource or native API calls that allow creation of such resource? Would this require modification of FiveM’s source?
Is this currently possible?
If yes, I’d love for someone to give me some sort of short explanation on how to do it.
Since I’ve not found anything about this anywhere on the cookbook or native docs, I’m pretty sure it does not exist and I’d like to request implementation of such API or configuration.
You mean it’s built with scaleform and can be modified with a process similar to one described here? Or a .gfx file has to be exported, edited and streamed back?
So far I’ve tried using grep on fivem codebase to “follow the data”. When not using steam, what you type in “Player name” in fivem’s connection settings is displayed in that top corner of the map.
So I started with the string ‘Player name’. Went like this:
99% of the UI features in gta are scaleform, including the pause menu, though its usage is different to typical scaleforms, I know vespura/tomgrobbe did some work on frontend menus, and I’m sure some others have, I do remember doing some weird hack that let me actually change such, maybe I could find it in 5he morning or so, as I’m on phone currently
Thanks a lot for this.
It’s a bit overkill for what I wanted to do, but it definitely pointed me in the right direction.
These need to be called every frame (that the pause menu is open).
Setting the data:
while true do
ScaleformMovieMethodAddParamTextureNameString('first line') -- Player_Name on screenshot
ScaleformMovieMethodAddParamTextureNameString('second line') -- TUESDAY 12:40 on screenshot
ScaleformMovieMethodAddParamTextureNameString('third line') -- BANK $0 CASH $0 on screenshot
ScaleformMovieMethodAddParamBool(false) -- true for singleplayer, false for multiplayer
Hiding this part of the menu entirely:
while true do
ScaleformMovieMethodAddParamBool(false) -- true shows, false hides