> For the complete documentation index, see [llms.txt](https://hate-development.gitbook.io/hate-development-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hate-development.gitbook.io/hate-development-docs/area-loot-system.md).

# Area Loot System

A comprehensive loot system for FiveM servers that creates dynamic loot spawns in designated areas, similar to DayZ's loot system.

## Features

* Dynamic loot spawning in configurable areas
* Support for both QB-Core and ESX frameworks
* Multiple progress bar system support (ox\_lib, mythic\_progbar, esx\_progressbar, qb-core)
* Multiple target system support (ox\_target, qtarget, qb-target)
* Multiple inventory system support (ox\_inventory, core\_inventory)
* Automatic loot respawning system
* Blip system for loot locations
* Outline system for better visibility
* Optimized rendering distance system
* Framework-agnostic design

## Installation

1. Download the resource
2. Place it in your resources folder
3. Add `ensure hate-dayz-loot` to your server.cfg
4. Configure the config.lua file according to your needs
5. Start your server

## Configuration

### Main Configuration Options

```lua
Config.Debug = false -- Enable/disable debug mode
Config.UseOutline = true -- Enable/disable outline system for loot objects
Config.UseBlipsOnObjects = true -- Enable/disable blips for loot objects
Config.RenderDistance = 100.0 -- Render distance in meters
```

### Progress Bar Configuration

```lua
Config.ProgressBars = {
    ["default_progressbar"] = {
        duration = 1000, -- Duration in ms
        label = "Looking for loot", -- Progress bar label
        animation = {
            animDict = 'amb@prop_human_bum_bin@base',
            anim = 'base'
        }
    }
}
```

### Loot Area Configuration

Each loot area can be configured with:

* name: Area identifier
* coords: Center coordinates
* radius: Spawn radius
* items: Array of possible items with:
  * name: Item identifier
  * object: Object model
  * chance: Spawn chance (0-100)
  * minCount: Minimum items to spawn
  * maxCount: Maximum items to spawn
  * respawnTime: Respawn time in seconds

## Framework Support

The script automatically detects and supports:

* QB-Core
* ESX

## Target System Support

The script automatically detects and supports:

* ox\_target
* qtarget
* qb-target

## Progress Bar Support

The script automatically detects and supports:

* ox\_lib
* mythic\_progbar
* esx\_progressbar
* qb-core progress bar

## Inventory System Support

The script automatically detects and supports:

* ox\_inventory
* core\_inventory

## Important Notes

* The script is protected with escrow
* Server and client files are encrypted
* The script requires one of the supported frameworks
* The script requires one of the supported target systems
* The script requires one of the supported progress bar systems
* The script requires one of the supported inventory systems

## Security Notice

This script is protected by FiveM's escrow system. The client and server-side code is encrypted and cannot be modified.
