# Radiation

A comprehensive radiation system for FiveM servers that adds realistic radiation zones, effects, and protection mechanics to your server.

## Features

* Multiple radiation zone types (Circle and Polygon)
* Realistic radiation effects and damage system
* Customizable radiation levels and rates
* Protection items system
* Visual and audio effects
* Framework support (ESX and QB-Core)
* Blip system for radiation zones
* UI system for radiation monitoring

## Installation

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

## Dependencies

* PolyZone

## Configuration

### Framework Selection

```lua
Config.Framework = 'qb' -- 'esx' or 'qb'
```

### Radiation Zones

You can create multiple radiation zones with different types:

#### Circle Zone

```lua
{
    name = "Zone Name",
    type = "circle",
    coords = vector3(x, y, z),
    radius = 100.0,
    multiplier = 2.0,
    blip = {
        enabled = true,
        sprite = 84,
        color = 49,
        scale = 1.2,
        label = "Zone Label"
    }
}
```

#### Polygon Zone

```lua
{
    name = "Zone Name",
    type = "polygon",
    points = {
        vector3(x1, y1, z1),
        vector3(x2, y2, z2),
        -- Add more points as needed
    },
    minZ = 25.0,
    maxZ = 35.0,
    multiplier = 1.5,
    blip = {
        enabled = true,
        center = vector3(x, y, z),
        sprite = 84,
        color = 49,
        scale = 1.0,
        label = "Zone Label"
    }
}
```

### Radiation Levels

```lua
Config.RadiationLevels = {
    warning = 10.0,    -- 100 mSv - DNA damage threshold
    critical = 500.0,   -- 500 mSv - Acute radiation syndrome
    maxLevel = 1000.0,  -- 1000 mSv - Lethal dose
    damageStart = 500.0 -- Start damage at warning level
}
```

### Radiation Rate

```lua
Config.RadiationRate = {
    increase = 10,     -- mSv per second in radiation zone
    decrease = 50      -- Natural radiation decrease rate
}
```

### Protection Items

```lua
Config.Items = {
    reducer = {
        name = "radiation_pills",
        reduction = 50.0, -- Reduces radiation by 50%
        duration = 300 -- 5 minutes
    },
    blocker = {
        name = "radiation_blocker",
        reduction = 100.0, -- Blocks all radiation
        duration = 180 -- 3 minutes
    }
}
```

## Commands

* `/radiation` - Toggle radiation UI
* `/radtest` - Test radiation UI
* `/debugrad` - Force show radiation UI (debug)

## Exports

### Client Side

```lua
-- Get current radiation level
exports['hate-radiation']:GetRadiationLevel()
```

## Notes

* The script is protected with Escrow encryption
* Server and client files are encrypted
* Only config.lua is accessible for customization
* Make sure to properly configure the radiation zones and items according to your server's needs

## Security Notice

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