[PAID] [UPDATED!] MFPD-Bodybag: Realistic Bodybag with ANIMATION and Coroner!

3.0 MASSIVE UPDATE IS OUT!

NOW IT SUPPORTS TO PLACE MULTIPLE BODYBAGS!

2.0 was a big one with language configurations, modify the existent ones or add more!

PREVIEW: NOW IT CAN HANDLE MULTIPLE BODIES (PLAYER/NPC)

PREVIEW 2: CORONER PICKUP UP INDIVIDUALLY EACH ONE:

Get your bodybag here :heart:

Config.Languages = {
    ["en"] = { 
        
        bodybag_interaction = "Place in bodybag",
        call_coroner = "Call coroner",
    },
    ["de"] = { 

        bodybag_interaction = "In die Leichentüte legen",
        call_coroner = "Leichenschauer rufen",
    }
}

Config.CurrentLanguage = "en"  -- Default language

MFPD - Bodybag brings a more immersive way to bring more life when you are dealing with dead corpses while also providing you the transportation needed!

This resources uses the bodybag prop model → "xm_prop_body_bag, which you can change in the config.lua avaliable inside the folder.

Base Requirements: ox_lib, ox_target.

Get your bodybag here :heart:

PREVIEW - UPDATED:


All the configurations avaliable below:

Config = Config or {}

Config.Debug = false  -- Set this to false to disable debugging

Config.Framework = 'Standalone' -- Options: 'ESX', 'QBCore', 'Standalone'

Config.Languages = {
    ["en"] = { 
        
        bodybag_interaction = "Place in bodybag",
        call_coroner = "Call coroner",
    },
    ["de"] = { 

        bodybag_interaction = "In die Leichentüte legen",
        call_coroner = "Leichenschauer rufen",
    }
}

Config.CurrentLanguage = "en"  -- Default language


Config.ESX = {
    AllowedJobs = { -- Define allowed jobs for ESX
        'ambulance', 
        'coroner'
    }
}

Config.QBCore = {
    AllowedJobs = { -- Define allowed jobs for QBCore
        'ambulance',
        'coroner'
    }
}

Config.HospitalLocations = {
    {name = "LS Morgue", coords = vec3(238.6728, -1381.861, 33.73852)},
    {name = "Paleto Bay Care", coords = vec3(-244.9511, 6333.368, 32.48932)},
    -- Add more locations here
}


Config.BlacklistedModels = {
    GetHashKey("a_c_deer"), -- Example: Deer
    GetHashKey("a_c_coyote"), -- Example: Coyote
    -- Add more model hashes here.
}

-- Model Settings
Config.BodyBagModel = "xm_prop_body_bag" -- The model of the bodybag
Config.CoronerModel = "policeold2" -- The vehicle model of the coroner
Config.CoronerPedModel = "s_m_y_autopsy_01" -- The ped model of the coroner

-- Animation Configuration
Config.PickupAnimDict = "amb@medic@standing@kneel@base" -- New dictionary with kneeling animation
Config.PickupAnimName = "base" -- Specific animation for kneeling and examining
Config.PickupAnimDuration = 5000 -- Duration of the animation in milliseconds

-- Vehicle Distances
Config.VehicleStopDistance = 10.0 -- Distance at which the vehicle stops from the bodybag
Config.CoronerApproachDistance = 5.5 -- Distance at which the coroner stops near the bodybag
Config.CoronerArrivalDistance = 4.0 -- Distance at which the coroner stops to park by the bodybag

-- Time Settings
Config.VehicleWaitTime = 20000 -- Time in milliseconds for how long the vehicle drives before despawning

-- Blip Settings
Config.BlipSprite = 225 -- Blip sprite for the coroner vehicle
Config.BlipFlashes = true -- Blip flashes when the coroner arrives

-- Speed Settings
Config.DriveSpeed = 10.0 -- Speed at which the coroner drives to the bodybag
Config.DriveStyle = 537396031 -- Driving style for the coroner when driving

-- Coroner Spawn Distance
Config.MinCoronerSpawnDistance = 300 -- Minimum distance for coroner spawn
Config.MaxCoronerSpawnDistance = 500-- Maximum distance for coroner spawn

Get your bodybag here :heart:

:floppy_disk: INSTALATION :floppy_disk::

First Method: Drag MFPD-Bodybag to your server resources folder and go to your server.cfg and add ensure MFPD-Bodybag

Second Method: Create or add this resource to your scripts folders e.g: [Scripts];

Every resource inside this folder with brackets will start up with the server by just adding ensure [Scripts] !

Code is accessible No
Subscription-based No
------------------------------------- ----------------------------
Lines (approximately) 520+
------------------------------------- ----------------------------
Requirements ox_lib, ox_target
------------------------------------- ----------------------------
Support Yes (Via DM or Comments on post)
------------------------------------- ----------------------------
5 Likes

Great idea but It would be best if this worked with players too!

2 Likes

I can look into implementing into players too!

2 Likes

Nice release ! i wait for implmenting for player too ! it’s nice for scene dead rp !

1 Like

RESOURCE HAS BEEN UPDATED! ANYONE WHO PURCHASED CAN RE-DOWNLOAD YOUR ASSET AGAIN!

Thank you for all the support, it means a lot :heart:

2 Likes

maybe a good update would be if the player already revive at a location what you want. like hospital. when you put him in a body bag. so they dont have to wait the hole ride to the hospital.

and if they revive they lose everything what he have in the inventory.

and a question. is this script open source??

1 Like

Thank you all for the ideas! When I made this resource, I did not know how many communities would really want, that’s why I kept simple, but I will look into allowing a selection of respawn too and the inventory, as of any other changes requested!

The code is not avaliable.

1 Like

thanks. yes i know that you have the credits of it and i only use it on my own server.
i already bought it. maybe i can find some new updates. and i will let you know.

do you have a discord or something?

1 Like

Yes, you can add me “zvipeer”

I’m still looking into the best way I can update so the respawn selection (which hospital do you want the player to revive) so it works well and with nice ui/menu to select, I want to keep it without any additional dependencies, but it could happen to need one to keep things prettier, looking into the options rn

i should use the pillbox hospital because thats the most common.
i think you dont have to use a ui. because when i ambulance you declare to dead. then you go in you go in body bag. and you revive in a hospital. you can configurate the respawn point in de config.
so other people with other hospitals can set to them own.

1 Like

seems for me the players dont end up “invisible/ in the bag” when i tested on an NPC it spawned 2 bags, 1 the npc was in and was able to take away, the other stayed

1 Like

I’m sorry for the inconvenience caused, sadly I wasn’t able to perform a good player integration. I still have an updated version, which only works for NPCs only unfortunately, I was going to update the post, but my personal life turned into a turmoil, so the updated post got delayed.

If you do not want the NPC only feature, I can and will provide refund of your purchase, again, sorry.

its all good, ill still use it, i just have to have an admin clear the bag after… maybe if thats an option? /clearbag, so that not only an admin can clear the prop ? would still be useful, thanks for the quick reply

1 Like

I’ll update with the version which the bag should clear correctly, then it does not need to delete the bag by yourself

1 Like

eta on when this will be out i recently bought it?

This change was already implemented, sorry for not making it clear, it has been some days since I’ve already synced everything, so you will not face any problems with the bag, just remember to re-download the asset if you are using an old version.

Quick notes:

Fixes/Improvements in sync with players around as reported in my edited post some days ago.
Added language options in config.lua recently so you can translate to your desire language the target options.

1 Like

Is it possible for more than one coordinates for morgue?

Because we have a morgue in Paleto and another one of course in LS that is vanilla.

We want to basically teleport someone to the morgue if they died in Los Santos and if they are in Blaine County then teleport them into morgue that we have in Paleto.

1 Like

Of course! Sorry for the delayed response, I’ve added logic to handle distance based coords, so they will teleport automatically to the closest coords set in the Config.HospitalCoords, so if he is closer to LS Morgue, he will be TP’ed there and so on.

Re-download your asset and if found any error or bugs, you can report back to me!

Update:

Early Testing, report any bugs

Config Update: The Config.HospitalCoords array now supports multiple locations

Client Update: Now the resource loops through the list of hospital coordinates upon target selection and calculates the distance from the player’s death coordinates to each coord. It selects the closest one.

-- Hospital Coordinates
Config.HospitalCoords = {
    vec3(238.6728, -1381.861, 33.73852), -- LS Coroner
    vec3(-244.9511, 6333.368, 32.48932), --  Paleto Bay Care
    vec3(1839.642334, 3672.933594, 34.276688), -- Example: Sandy Shores
	-- Just add more locations here if needed.
}

@LegacysMaps

@MajorFivePD Just tested it. Does it search for the closest morgue to the persons death location? Or does it just randomly choose one of the locations to teleport their body to?

for example something like:

local function GetNearestHospital(Ped)
    local Hospitals = Config.Hospitals
    Hospitals = {}
    for _, hospital in ipairs(Hospitals) do
        local X, Y, Z, Heading, Name = hospital.X, hospital.Y, hospital.Z, hospital.Heading, hospital.Name
        local Distance = Vdist(GetEntityCoords(Ped), X, Y, Z)
        table.insert(Hospitals, { Distance = Distance, X = X, Y = Y, Z = Z, Heading = Heading, Name = Name })
    end

    local ClosestHospital = Hospitals[1]
    for _, hospital in ipairs(Hospitals) do
        if hospital.Distance < ClosestHospital.Distance then
            ClosestHospital = hospital
        end
    end

    return ClosestHospital
end
1 Like