HomeDocumentationFlake Bodybag
⚰️

Flake Bodybag

A professional bodybag, burial, and character-kill system for FiveM. Supports ESX, QBX, and QB-Core with ox_target, qb-target, or TextUI interaction modes.

FiveMESX · QBX · QBoxmysqlLua 5.4
Purchase Script
flakedev.com

Overview

Flake Bodybag is a comprehensive death-handling system designed for serious roleplay servers. It allows players and admins to bag deceased characters, place them in coffins, bury them at designated sites, or dump them into the ocean — with full character-kill (CK) backup and restoration support.

What It Does

  • Bodybagging — Place dead players into a physical bodybag prop with progress-bar animations.
  • Coffin Placement — Transfer a bodybagged player into a weighted coffin prop for transport.
  • Burial — Bury bodybagged players at configured cemetery locations with shovel animations.
  • Ocean Dumping — Push coffins into the water at pier locations for permanent disposal.
  • Character Kill (CK) — Admins can permanently kill a character with full database backup.
  • UnCK Restoration — Restore previously CKed characters from backup with one command.
  • Gulag Integration — Optional compatibility with Flake Gulag for alternative sentencing.

Requirements

DependencyPurposeRequired
oxmysqlDatabase operations and CK backupsYes
ox_libProgress bars, callbacks, menus, TextUIYes
ESX / QBX / QB-CoreFramework for players, items, and jobsYes
ox_target or qb-targetTarget system for interactionsOptional
Target systems are optional. You can use TextUI mode instead by setting Config.System = "textui".

Installation

Step 1 — Drop the Resource

Place the flake_bodybag folder into your server's resources directory and add to server.cfg:

ensure flake_bodybag

Step 2 — Database

The script auto-creates the ck_backup table on resource start. No manual SQL is required. Ensure oxmysql is running before flake_bodybag.

Step 3 — Add Items

Add the following items to your inventory configuration if you want item requirements:

  • Bodybag — Required to bag a dead player (configurable).
  • Coffin — Required to place a bodybagged player into a coffin (configurable).
  • Shovel — Required to bury a body at a cemetery (configurable).

Step 4 — Configure

Edit config/config.lua to match your framework, target system, and desired features.

Done

Restart your server. The script will auto-detect your framework and create the CK backup table on first start.

File Structure

flake_bodybag/
├── client/
│   └── client.lua       -- Client logic, animations, target zones
├── server/
│   └── server.lua       -- Server logic, CK backup, database I/O
├── config/
│   ├── config.lua       -- Main settings (escrow-ignored)
│   ├── edits.lua        -- Notifications and TextUI (escrow-ignored)
│   └── dumpbury.lua     -- Locations and animations (escrow-ignored)
└── fxmanifest.lua   -- Resource manifest

Configuration

All configuration files are escrow-ignored and safe to modify.

Framework Settings

SettingDefaultDescription
Config.System"ox_target"Interaction mode: ox_target, qb-target, or textui
Config.DebugfalseEnable debug prints in server console
Config.AdminGroupsArrayGroups allowed to use /ck and /unck
Config.CheckDistance3.0Max distance to interact with a body
Config.Distance2.0Target interaction distance

Items

SettingDescription
Config.BodyBagItemItem name, amount, remove flag for bodybags
Config.CoffinItemItem name, required flag, remove flag for coffins
Config.ShovelItem name, required flag, remove flag for burial

Props

SettingDefaultDescription
Config.BodyBagProp"xm_prop_body_bag"Prop model for bodybags
Config.WeightedCoffinProp"prop_coffin_01"Prop model for coffins

Locations

Burial and dump sites are configured in config/dumpbury.lua. Each location supports:

  • coordsvec3(x, y, z)
  • radius — Zone radius for detection
  • pedModel — (dump only) NPC model for handoff
  • waitTime — (dump only) Delay before pickup
  • label — Display name for the location

Discord Logging

All CK, bury, dump, and UnCK actions are logged to a configurable Discord webhook. Set Config.Logs.enable to true and provide your webhook URL.

Usage

Bodybagging a Player

  1. Approach a dead player.
  2. Use your target system or press E (TextUI) to initiate bodybagging.
  3. Complete the progress-bar animation.
  4. The dead player is placed inside a bodybag prop and hidden from view.

Placing in a Coffin

  1. Approach a bodybagged player.
  2. Select Place in Coffin from the target menu.
  3. Complete the animation to replace the bodybag with a coffin prop.

Burying a Body

  1. Carry or drag the bodybag to a burial site (marked on the map if blips are enabled).
  2. Use the target option or press E to begin burying.
  3. If configured, you must have a shovel in your inventory.
  4. Complete the digging animation to finish the burial.

Dumping in the Ocean

  1. Transport the coffin to a dump pier (marked on the map if blips are enabled).
  2. Use the target option or press E to push the coffin into the water.
  3. The coffin is deleted and the player is permanently removed.

Irreversible

Burial and dumping result in character deletion (or Gulag sentencing if configured). Always confirm the target before proceeding.

Features

Character Kill (CK) System

  • Full Backup — Character data, inventory snapshot, vehicles, and metadata are saved to ck_backup.
  • Safe Deletion — The player is kicked first, then character and vehicle rows are deleted from the framework tables.
  • Discord Audit — Every CK is logged with admin name, victim name, identifiers, and timestamp.
  • Funeral Broadcast — A breaking-news announcement is shown to all online players.

UnCK Restoration

  • Use /unck to open a searchable list of all CKed characters.
  • Select a character and confirm restoration.
  • Character data and vehicles are reinserted into the framework tables.
  • The backup entry is deleted after successful restoration.

Ambulance Compatibility

  • Wasabi Ambulance
  • AK47 AmbulanceJob (ESX & QB)
  • QB-AmbulanceJob (metadata & state bags)
  • Native ped death checks (fallback)

Gulag Integration

If flake_gulag is installed and Config.GulagScript is enabled, burying or dumping will send the player to the gulag instead of deleting their character.

Commands

CommandAccessDescription
/ck [id]AdminPermanently kill a player's character with full backup
/unck [name]AdminOpen the CK restoration menu. Optional name filter.

Tip

Command names are configurable via Config.CKCommand and Config.UnCKCommand. Chat suggestions are registered automatically.

Troubleshooting

IssueFix
Target options not showingEnsure ox_target or qb-target is started and Config.System matches.
Bodybag prop not spawningVerify the prop model exists in your server build. Most use base-game props.
CK command not workingCheck that your player group is listed in Config.AdminGroups.
Backup not savingEnsure oxmysql is running and the ck_backup table was created.
Discord logs not sendingVerify the webhook URL in Config.Logs.webhook and that Config.Logs.enable is true.
Gulag not triggeringEnsure flake_gulag is started and Config.GulagScript is enabled.
Player not detected as deadCheck that your ambulance script is supported or that native death checks are enabled.
Developed by Flake Development. For support, open a ticket in our Discord.