[RELEASE][ESX][STANDALONE] Bodybag for PD/EMS

Bodybag Plugin

Features

Adds a /bodybag or /bodybag ID feature for Police and EMS to place a bodybag on a dead player. Just adds extra RP for some servers.

(Player goes invisible when you place a bodybag prop on them, and when they respawn or revive, the bodybag is deleted/removed.)

Also a great feature for when a player DOA’s their character.

Read the GitHub README for more information

Download

GitHub

Demo Video (Sorry for the bad quality)

https://streamable.com/2krfp (Copy and Paste link)

Update Plans/Ideas

  • :white_check_mark: Create a standalone version. (Or implement into ESX Version)
  • :white_check_mark: Create a Config file.
  • :white_check_mark: Add option to use /bodybag OR automatically place dead players in bodybag
  • :white_check_mark: Add a keybind option.
  • :white_check_mark: Add option to set job requirements in config.
  • :white_check_mark: Option to disable job requirements altogether.
  • :white_check_mark: Add option to change command in config. (More user friendly for those with little to no coding knowledge.)
  • :white_check_mark: Add option to config to set a delay timer in config instead of bottom of client.lua
  • Create a VRP version.
  • Undecided Possibility: Option to carry to vehicle like Ambulance to take to hospital/coroners office/morgue. (Only if we get enough people requesting this)
  • Special Request: Option to use as “item”.
  • (If you have any suggestions, Please post them here and we can work on adding them in the future)

Bugs

  • If on a more rough terrain or hill, bodybag shows up underground causing it to look invisible.

Credits

Author: BTNGaming @BTNGaming
Code/Debug Help: D3v aka Deviljin112 @Deviljin112
Coding Help: bzndk @benzon83

Release History

  • 0.1.2
    • ADD: Config file with many options
    • ADD: Option for ESX or Standalone (Standalone is untested)
    • ADD: Option for Keybind and/or Command
    • Add: If both keybind and command set to false in config, Bag auto spawns on player upon death
    • FIX: More optimized and clean clode
    • ADD: Option to require specific job(s) or disable for anyone to do it.
    • ADD: Ability to choose what jobs you want to have access to command/keybind
    • ADD: Ability to set frequency for bag spawn/despawn on automatic bag spawning (Auto death bag)
    • ADD: Option to change the bag model/hash in the config.
  • 0.1.1
    • FIX: Deletes prop (bodybag) correctly upon respawn
    • ADD: Updated so only Police and EMS can use /bodybag
  • 0.1.0
    • The first proper release
    • Fixed bodybag sticking to player on revive

Dependencies

esx_police (Only if set to ESX Mode)
esx_ambulance (Only if set to ESX Mode)

24 Likes

Awesome script - definitely useful!

4 Likes

Very High Quality Release :smiley: ! Works Flawlessly

3 Likes

If anyone knows the VRP equivalent to ESX.Game.GetClosestPlayer() We will work on making a VRP compatible version also.

Also decided to create a standalone version of it. (WIP)

3 Likes

I do not have esx so I will not use it but beautiful creation and good idea for the rp of the community thanks for a nice sharing bro

2 Likes

Will be working on a standalone shortly. @Deviljin112 and Myself are literally working on this and the config system for user-friendliness as we speak.

6 Likes

Great news for the community and I thank you very much for the work and investment provided by your work bro

3 Likes

This is so sick, huge improvement for roleplay great job

2 Likes

Its amazing :slight_smile:

2 Likes

Awesome Script!!! Can’t wait to use it on duty!!!

2 Likes

Are you talking about local user_id = vRP.getUserId({player}) ?

Needs to call to get the closest player.

for ESX it’s ESX.Game.GetClosestPlayer()

And it searches for the closest player to the script caller.

Script has been updated. Here is a list of the changes.

Release History

  • 0.1.2 (Current Update)
    • ADD: Config file with many options
    • ADD: Option for ESX or Standalone (Standalone is untested)
    • ADD: Option for Keybind and/or Command
    • Add: If both keybind and command set to false in config, Bag auto spawns on player upon death
    • FIX: More optimized and clean clode
    • ADD: Option to require specific job(s) or disable for anyone to do it.
    • ADD: Ability to choose what jobs you want to have access to command/keybind
    • ADD: Ability to set frequency for bag spawn/despawn on automatic bag spawning (Auto death bag)
    • ADD: Option to change the bag model/hash in the config.

There is more but I can’t remember what at the moment.

2 Likes

vRP 0.5/vRP Old:

vRPclient.getNearestPlayer(source,{5},function(nplayer)
end)

vRP 1.0/vRPex:

local nplayer = vRPclient.getNearestPlayer(source,5)

Not working with esx

SCRIPT ERROR: Execution of native 000000002f7a49e6 in script host failed.

handler (@rrp_bodybag/server/main.lua:3)

can we drag that bodybag or is it other script?

1 Like

Good job im waiting till you can use it as an item :fire:

1 Like

Love the script man! and this idea sounds good
“Undecided Possibility: Option to carry to vehicle like Ambulance to take to hospital/coroners office/morgue. (Only if we get enough people requesting this)”

4 Likes

I would attempt at coding that in, but I dont have a VRP server to test it on.

Thanks for the tip, I might “wing it” and add it as a commit but community would have to test it.

2 Likes

Can’t replicate the issue. Everything seems to run perfectly on my side, and i’ve tested all config options. Your error is server-sided which blows my mind, since theres literally just a loop to client.lua. Not sure how to help you here.

2 Likes