Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Contract
      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. Support

    3. Suggestions

[V|REL] Simple healthbar


slik
 Share

Recommended Posts

Hello again. This is my second try.

This mod does nothing much, just shows a health bar and an armour bar (for those who has) for humans you're aiming on at the top of the screen. Just take a look at the screenshots.
Feel free to leave a message if it needs some improves (for example better colours or change the position).

Installation and using:

  • you need the last version of the ScriptHookV, please follow this instructions to install it
  • download and copy this file to the root directory of the game (where the GTA.exe file is located)

Download

 

original.jpeg

 

And some short videos:

 

 

 

Edited by slik
Link to comment
Share on other sites

totte1015

Very neat, but is it possible to get that bar closer to the middle of the screen?

Link to comment
Share on other sites

Very neat, but is it possible to get that bar closer to the middle of the screen?

 

I think it would be best to have the health bar on top of the ped's model.

(if ped is free aiming or targetting anything)GET_PLAYER_TARGET_ENTITY(PLAYER_PED_ID(), entity);GET_MODEL_DIMENSIONS(GET_ENTITY_MODEL(entity), &min, &max);maxH = GET_ENTITY_MAX_HEALTH(entity);coordsMAX = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(entity, max[0] +  0.12f, 0.0f, 0.1f);coords0 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(entity, max[0] -  0.12f, 0.0f, 0.1f);(if health <50)coords1 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(entity, max[0] - (0.01f * (50 * maxH - HEALTH), 0.0f, 0.1f);elsecoords1 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(entity, max[0] + (coordsMAX[0] - 0.01f * HEALTH), 0.0f, 0.1f);DRAW_LINE(*coords0, *coords1, r, g, b, a);

 

I spent like 15 mins on that, and since it's pretty late right now, it's probably wrong.

But you know what I mean.

Link to comment
Share on other sites

You draw lines to world coords? You need screen coords for that, no?

Edited by nyolc8
Link to comment
Share on other sites

diamond-optic

pretty nice!

 

flashes on and off in melee and doesnt show for first person melee, but other then that it works good

Link to comment
Share on other sites

Crimson Flam3s

Nice mod!

 

Btw I have a question about hud and health bar so you might know about this. Basically I wanna know if it's possible to disable all of the hud except for the health bar or to make it so that the health bar is always invisible and appears when you enter the weapon switch animation for example.

Link to comment
Share on other sites

why not do it like iv did it

You say it like that's a simple task.

  • Like 2
Link to comment
Share on other sites

 

why not do it like iv did it

You say it like that's a simple task.

 

i am just suggesting it thats all but yeah it's probably not a simple task but i thought i'd just suggest it i apologize if it was a bad suggestion

Edited by ZZCOOL
Link to comment
Share on other sites

Very neat, but is it possible to get that bar closer to the middle of the screen?

 

How about this:

 

original.jpeg

 

 

pretty nice!

 

flashes on and off in melee and doesnt show for first person melee, but other then that it works good

I disabled healthbar for melee combats.

 

 

why not do it like iv did it

There are a few reasons:

  • i didn't find sprites for this in the V resources
  • there is no ability to pack new sprites into the V resources (yet)
  • I'm not sure how to draw a sprite on HUD at all

So, sorry for now, but I think it will be done in the future.

 

Nice mod!

 

Btw I have a question about hud and health bar so you might know about this. Basically I wanna know if it's possible to disable all of the hud except for the health bar or to make it so that the health bar is always invisible and appears when you enter the weapon switch animation for example.

Sorry, but I'm not that good at modding to answer your question..

 

You draw lines to world coords? You need screen coords for that, no?

Yes, correct

Edited by slik
Link to comment
Share on other sites

Very nice, looks really natural. Can anyone upload a video while using this mod?

Link to comment
Share on other sites

alteredbeast

Someone knows if it's possible to prevent the game from auto healing the half of the player's health, with the scripts and tools we've already got ?

Link to comment
Share on other sites

SoulMystique

Oh, damn. Now we just need a medieval RPG mod to go with it :3

Link to comment
Share on other sites

One more simple update:

original.jpeg

 

Download links updated

thats what i was refering to putting the lifebar over the peds

Link to comment
Share on other sites

Would you mind releasing the source? I'd like to learn from it, pm it to me please if you'd not like to put it on the thread.

Link to comment
Share on other sites

Great mod, here's a short gameplay I made with the updated version.

 

 

 

Sorry about the mouse lag.

Link to comment
Share on other sites

A memory leak has been fixed in the last version of the mod. Download links are updated.

Link to comment
Share on other sites

Hey there, I'm curious how you're getting this to appear above PED heads. I'm trying to get playernames to show up above players heads for a multiplayer mod. Would you mind sharing the code?

Link to comment
Share on other sites

It's not above ped's head yet, so no magic

Oh lol, is it just above your crosshair? Or I guess center of the screen?

Link to comment
Share on other sites

FlyingAce

I would almost prefer it at the top middle of the screen or top left, having it over the character is cool but looks arcadey xD

Link to comment
Share on other sites

 

It's not above ped's head yet, so no magic

Oh lol, is it just above your crosshair? Or I guess center of the screen?

 

yep, correct, the screen coords are 0.5 - width / 2 and 0.36

Edited by slik
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
 Share

  • 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.