GTA default health/armour bar manipulation

Hey everyone, You all know the default health/armour bar from GTA: I was wondering if it’s possible to manually enable another part of it, like for example the vehicle boost: Can we activate it without being in a vehicle, and display the time it would take to charge up? Then, we could use that part of the HUD for something else. I tried working with the following code snippet:

BeginScaleformMovieMethod(minimap, "SETUP_HEALTH_ARMOURs")
ScaleformMovieMethodAddParamInt(0)
EndScaleformMovieMethod()

But unfortunately, it didn’t work out. Thanks in advance, Neo image image

1 Like

You don’t need to force the raw scaleforms for that. Use the following natives to manipulate the “Ability Bar”(that’s how R* calls it)

--lua. client-side.
SetAllowAbilityBarInMultiplayer(true) --allow the client to use the ability bar.
SetAbilityBarVisibilityInMultiplayer(true) --enable the bar visibility.
SetAbilityBarValue(43,100) --sets the value of the ability bar. 43 is the value, 100 is the max value for the bar to be filled. 
FlashAbilityBar(5000) --flash the ablity bar. miliseconds.


(edit: just realized the pos recorder put the watermark on the minimap… you can still see the bar tho)

Commands used in the video:

RegisterCommand('ability', function()
    SetAllowAbilityBarInMultiplayer(true)
    SetAbilityBarVisibilityInMultiplayer(true)
    SetAbilityBarValue(100,100)
    FlashAbilityBar(5000)
end)

RegisterCommand('ability2', function()
    SetAbilityBarValue(10,100)
end)

RegisterCommand('ability3', function()
    SetAbilityBarVisibilityInMultiplayer(false)
end)

I’m getting an InvokeNative Error…

Any help for that?
My Code:

                SetAllowAbilityBarInMultiplayer(true)
                SetAbilityBarVisibilityInMultiplayer(true)
                SetAbilityBarValue(GetVehicleFuelLevel(GetVehiclePedIsIn(GetPlayerPed(-1), false), GetVehicleHandlingFloat(vehicle,"CHandlingData","fPetrolTankVolume")))

Yes, make sure you run a game build higher than 1868.

Wow thx is it posibel to use a other color ? thanks in advance

probably, by streaming a modified minimap.gfx. I don’t think you can do it through lua code.