Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Forum Support

    3. Suggestions

Check if health/stamina/ability bars are displayed on screen?


Recommended Posts

I'm simply searching a way to check if the three bar combo for the health, stamina and the special ability stat is currently displayed on the screen.


I worked with this



Hashes: 0xBC4C9EA5391ECC0D 0x6214631F

function before but it looks like these bars aren't specified as hud component?


The fuel bar introduced by my fuel mod should preferably only be visible if the other stats are displayed as well. Currently it only checks for cutscence with this



Hashes: 0x49C32D60007AFA47 0x618857F2

function which works well for cutscenes but I know there are mods and/or native settings(?) which hide these three bars and I'd like to "stick" the fuel bar appearance to these.


Does somebody know a solution?

Edited by LeFix
Link to comment
Share on other sites

  • 2 weeks later...

I've spent some time looking at scaleforms and I figured out health bar, ammo and special ability bar are...scaleform items.

God, I went through so many scaleforms I can't even remember the original name (think it was "minimap"), but I saw an internal function called "HIDE_HEALTH_ARMOR".


In order to access/modify it there are lot of ways :


  1. You either edit the scaleform file itself, recompile and distribute it with your mod (I know we all hate this)
  2. Find a method to retrieve the current scaleform adress/id/pointer used by one of the game scripts from within the memory, then call the appropriate function with CALL_SCALEFORM_MOVIE_METHOD(thatScaleform, "HIDE_HEALTH_ARMOUR"). (most accurate way, and it would be a huge discovery for future mods)
  3. Hide the default hud, recreate the whole minimap+hud by yourself, and hide the health bar, not impossible, but very crazy.


Here's the proof the function actually exists :




I managed to get the mask shape (it's the item number 9 in the images array, maybe this can be accessed like a hud component somewhere?) used by this function : 4vBB1Iu.png


It works exactly the same way for the other items like the ability bar :







Edited by ins1de
Link to comment
Share on other sites

Actually the whole HUD is drawn with scaleforms, and some natives allow us to manipulate them.

  • ...

You can for example hide the wanted stars, hide the cash component etc.

What really happens inside the game is instructions being sent to the internal functions of the scaleform.


Let's say you want to display the area name with its native DISPLAY_AREA_NAME :

Call native with ScriptHookV -> Native actually calls (with or without params) scaleform subroutine -> scaleform executes internal function -> result is displayed

So when we call a native such as HIDE_HUD_AND_RADAR_THIS_FRAME it does exactly the same as described above, except the fact it calls a specific scaleform subroutine which says "Hey, I want you to hide all the components". For a long time, I thought the whole HUD was drawn with textures, in reality, it's the scaleforms themselves that use the texture files to draw them, but not natives like DRAW_SPRITE etc.


Those natives directly interact with the global HUD scaleform which we have to find the origin in the game scripts or at least in the game memory.

Now I consider the two following possibilities :

  • There are natives to enable/disable the minimap components (health, armour, airbar, special ability) but we haven't discovered/renamed them yet
  • There aren't any natives to handle those components, but there is a scaleform pointer that might be possible to retrieve, and then invoke the scaleform function with CALL_SCALEFORM_MOVIE_METHOD(scaleform, "INTERNAL_FUNCTION_NAME_THAT_HIDES_THE_COMPONENT");
Edited by ins1de
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.