Body Damages V2 [ ESX / QBCore / STANDALONE ][PAID]

Explanation:

This is the second version of my Body Damages script, with new improvements, new graphical interface, including the old one and the classic version which was not released in the previous version and some more features.

Well, this script was developed for the Roleplay server to have a greater immersion with doctors.

However, this script can be used on any type of server, for example, ZUMBI servers, be creative.

It shows the player, the damage he has taken, what damage he has taken, if he is injured, shot, cuts, punches, drowning, run over, explosion, fall and much more.

Graphic interface:

  • The script has 3 types of interface, you can choose which one you like best.

  • Template: new

  • Template: classic

  • Template: old

  • The GUI template can be changed easily in Config.lua
  • You can set the position of the Body on the x, y screen the way you like it, if you like it centered, in the corner, higher or lower, place it the way you like it.
  • You can set the size of the GUI ‘scale’, but anything above 1.0 may look weird.
  • The entire interface can be translated easily in the configuration.
  • To access the information from the new and classic interface, it is necessary to press H to enable the focus (mouse) and thus be able to better visualize the information and press the keys.

Commands :

  • There are two commands, /health and /diag
  • /health - Shows your damage taken information.
  • /diag - Shows the damage taken information of the player next to you.
  • These two commands can be changed easily in Config.lua

Resources :

  • GUI information is reset once the player’s maximum health is restored.
  • The body image changes automatically if the ped is male or female.
  • To close the graphical interface, just type the command again or press ESC, DELETE, BACKSPACE or the right mouse button.
  • Indicates various injuries (bruises, gunshots, cuts and punches).

  • Indicates the cause of death

6_Morte

  • When eliminating a player, if enabled, the graphical interface will open automatically, showing the damage information of the player you eliminated.

yEBqjKi.gif

  • Upon dying, if enabled, it will have a flash effect on your screen for a few seconds.

t0xepcz.gif

  • When taking damage, if enabled, will have a shake effect on the screen with each damage taken.

EeHyTIw.gif

Database:

  • Now this script has saved player diagnostics.
  • You can disable this function in Config.lua.
  • You can define how many diagnoses each player can have.
  • When exceeding the diagnosis limit, the script will remove the oldest diagnosis from the player and add the new one.
  • This is interesting, because in the medical roleplay, you can have medical files, data from the players in the hospital, for example.
  • Use: oxmysql, but it can be easily converted to other mysql

Display Damages:

  • The script has two types of display damages, a GTA own and a custom html.
  • GTA - Using this display, the resmon will be a little high, but it doesn’t affect the FPS.
  • Custom HTML - Using this display, you will have a lower resmon, it doesn’t affect FPS.
  • You can choose what you like best.
  • You can disable this function in Config.lua.

Display damages - GTA

  • You can set the color you want, or leave it in RGB mode
  • You can choose some types of display that you want to display on the screen.

H55Yv36.gif

ipdJ8sz.gif

Display damages - Custom HTML

  • You can set the color you want, or leave it in RGB mode
  • You can choose some types of display that you want to display on the screen.

8yps66W.gif

TUj8x8i.gif

  • When eliminating a player/ped, “DEAD” appears on the display, this option can be deactivated in Config.lua

mflZgrj.gif

  • Resmon Display damage - GTA

wXFADH3.gif

  • Resmon Display damages - Custom HTML

XdL6QZP.gif

kwL1XlJ.gif

  • Resmon idle and taking some damage

Vbo6Js9.gif

Update 2.1

  • NUI interface

    • Some optimizations have been made to all VueJS code.

    • Added a new body template (templateImg = ‘new’).

    • Added new bruised images (templateImg=‘new’).

    • Added new ‘diagnosis’ image (templateImg = ‘new’).

    • Added new ‘dead’ image (templateImg=‘new’).

    • Added a new function, which shows the last weapon that dealt damage to the player, available only in template = ‘new’.

  • Code

    • Some fixes and optimizations have been made
  • Permission

    • You can now set a permission for the command that checks for damage taken on another player.
    • Go to config.lua and add permissionToVerifyAnotherPlayer, if left blank, everyone can access the command.
  • Event

    • Added an event that allows opening menus
    • For example, you have a medical menu and you want the interface to open for it, just call this event
    • Checks player’s own damage → TriggerEvent(“mxOpenBodyDamages”, ‘me’)
    • Check the damage of the next player → TriggerEvent(“mxOpenBodyDamages”, ‘player’)
  • New settings (Config.lua)

    • showLastWeapon (true/false) - Enables the last weapon that dealt damage in the interface
    • templateImg
      • default - current interface
      • new - new images
    • permissionToVerifyAnotherPlayer
    • Comments were added to max_health and min_health indicating the value of each framework, if not changed

Additional information

  • It is necessary to modify the Game build of your server to 2802 higher +
  • If you use TxAdmin, just go to Setting, FxServer and add

+set sv_enforceGameBuild 2802

  • Or directly in server.cfg

set sv_enforceGameBuild 2802

Update 2.2 (Database)

  • With this small update, it will be necessary to clean the entire Bodydamages table, otherwise it will give information errors, since the way it was stored has been modified.
  • Minor database performance update.
  • The script was saving the player’s entire damage information vector unnecessarily, making the table very heavy depending on the use and number of players.
  • Now only save the information you really need.
  • Removed some unnecessary database queries.
  • Now the database is only called when starting the server, inserting and deleting

Update 2.3

Removed

  • Custom reason death last damage

Fixes

  • Now the entire table with damage information is processed on the client side, sending only what is necessary to save to the server.
  • Removed a variable that prevented showing the last weapon that caused damage in the interface.
  • Now when the player gets hurt alone, the damage will be counted, before it wasn’t.
  • The classic interface was fixed, it was not showing the damage.
  • All vector keys have been changed and optimized.
  • Fix translate.
  • Optimizations in html vuejs.

New features

  • Added some animations when the player receives some damage, there are few variations
  • Added time that the player will spend with this animation, default is 30 seconds.
  • You can define whether every time the player receives damage, the time increases.
  • Added Heart Monitor that shows the player’s life.
  • The heart monitor has variations in the display animation, normal (green), damage (blue), critical (yellow), almost dying (red), dead (straight white line).
  • The monitor has a ‘shock’ button, which works like a defibrillator (Good for Roleplay)
  • You can define whether the defibrillator will require an item (does not remove the item when using), or whether it is authorized for use without an item, or disabled.
  • The defibrillator has a success percentage, which can be defined in ‘config.lua’.
  • You can set the attempts for the defibrillator to be successful, otherwise it will not work.
  • When using the defibrillator and managing to revive the player, he will gain a little life, but will still need someone to lift him up.
  • You can set the life the player receives upon successful defibrillator.
  • When using the defibrillator, it will have a shock effect on the player (particle), you can disable this in ‘config.lua’.
  • When using the defibrillator, there will be an animation of the player trying to help the other, you can disable this in ‘config.lua’.
  • The particle is synchronized with everyone on the server, in this case, anyone nearby.
  • It is now possible to use healing items for each type of damage the player receives.
  • Just go to ‘config.lua’ and search for ‘itemsCure’ and define the items.
  • Remembering that it is necessary to register the item on your server.
  • By setting the label and item to false, it will not be possible to perform the cure.
  • Another player can heal someone nearby.
  • In the interface, when hovering the mouse over the damage, the player will be shown which item he should use.

Database

  • It will be necessary to delete all data from the database.
  • This is necessary, because all keys have been modified.

Animation damages

Items Cure

Heartbeat

Defibrillator Shock

To use the new version, just download it again in your keymaster assets, there you have the old version 2.2 and the new version 2.3

See our other scripts: (New versions coming soon)
Mx Show Damage (new)
Mx Crafting V2 (new)
Mx Custom Car V2 (new update)
Tattoos Shop and Degrade Hair
Mx Custom Car
Body Damages
Mx Keycodes
Mx Crafting
Fix Wiring [FREE]
Lockpick minigame [FREE]

You can buy this script here: Tebex

The script is not encrypted or blocked by IP.

Code is accessible Yes
Subscription-based No
Lines (approximately) 1400
Requirements Standalone or Esx or QBCore
Support Yes
4 Likes

Can it be used with ambulance script so medic person can see how the other player got injured?

1 Like

If I understand correctly, yes, you can, just be close to the player and give the /diag command, which will show the other player’s damage

1 Like

I bought it, somehow if I shoot some’s left side like left leg, then I check with /diag it shows the injury at right side of the body.

1 Like

It’s like this, you visualize it the other way around, if the person who shot you visualizes it from the front, it will look like it’s on the left leg, but it’s on the right, the character in the NUI doesn’t change, it doesn’t have the back

Seen from the front

I even went to check if I was wrong, but it’s right.
image

The visualization in the nui does not change according to the character’s vision, that is, it was on the right

The view is the same as for /health

Is not there any way to fix it like in NUI reverse it?

This is not a bug, it’s just a way the player is looking, not always the player will be looking from the front, he can be sideways, behind his back.
Not even GTA differentiates this, it doesn’t matter how you look at it, if you look at the player and shoot in the left leg, GTA counts as the right leg, because it’s not in the attacker’s view, but in the one who is suffering the damage, the victim, the same, is equal to /health
And there is no way to revert, because you would have to change information, which is not little.
I used this script on my old server, and nobody ever talked about it.

it is compatible with qb-ambulancejob part body?

1 Like

In principle yes, the script does not need and does not influence qb-ambulancejob, he is independent, it should work well.

Wow! Amazing stuff :blush: :+1:

1 Like

love the idea, is it possible for certain items to heal certain injury types? how does healing work?

1 Like

It is possible to do, at the moment, the healing happens when the player recovers 100% of the life

yeah we would want it to heal specific injuries only to enhance medical RP like burn cream etc…, is there any documentation how to implement this?

There is no documentation for now, but I may be looking at how to do this tomorrow, which framework do you use? I will think of something.

we use qbcore, if this is possible would 100% purchase!

there is also a script for that you should look for that

If we brought the old one is there an upgrade or discount for V2?

1 Like

Sorry for the delay, so as more resources have been added, and healing items will probably be added, those who have the previous version will have a 15% discount, just send me a private message

anyway to disable the death animation and keep the ragdoll?

The script does not use animation or a ragdoll arrow, what is shown in the video is from the framework itself, so if you use something different, it will not interfere and you will not need to edit