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
- When eliminating a player, if enabled, the graphical interface will open automatically, showing the damage information of the player you eliminated.
- Upon dying, if enabled, it will have a flash effect on your screen for a few seconds.
- When taking damage, if enabled, will have a shake effect on the screen with each damage taken.
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.
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.
- When eliminating a player/ped, âDEADâ appears on the display, this option can be deactivated in Config.lua
- Resmon Display damage - GTA
- Resmon Display damages - Custom HTML
- Resmon idle and taking some damage
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 |