> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apex-services.site/llms.txt
> Use this file to discover all available pages before exploring further.

# APEX Caretaker

> Sanitation faction with live pollution hotspots tied to consumed items.

A city sanitation faction with real-world pressure: pollution ticks up across 4 districts over time, trash props spawn at live hotspots, and caretakers clean them up for payout. Items consumed elsewhere on the server (burgers, cigs, chips) feed the pollution pipeline, so cleanup actually matters.

## Features

* 4 configurable districts (Downtown, Uptown, Vespucci, Davis) with trash thresholds LOW → CRITICAL
* Global pollution tracking — trash-generating items push district pollution up
* Live hotspots with colored severity blips, props spawn within 50m of the player
* Vehicle-based gameplay — trash trucks, drop-off radius for payouts
* Automatic decay — every 6 hours, pollution drops if unattended
* Proximity collect cooldown (3s per pickup, 10m proximity)
* second job support — primary or secondary caretaker job (ESX.JOBS!)
* Automatic table creation

## Requirements

<Card title="Required" icon="circle-check">
  `es_extended`, `ox_lib`, `oxmysql`
</Card>

## Installation

1. Drop `apex-caretaker` into `resources/`
2. `ensure apex-caretaker` — DB tables auto-create on first start

## Configuration

```lua config.lua theme={null}
Config.JobName                     = 'caretaker'
Config.AccumulationIntervalMinutes = 30
Config.AccumulationAmount          = 2
Config.DecayIntervalHours          = 6
Config.CleanupTrashReduction       = 10
Config.CleanupBonusPayment         = 15
Config.HotspotPropSpawnDistance    = 50.0
Config.AllowedVehicleModels        = { 'trash', 'trash2' }
```

Ships with 10 trash prop models cycled at hotspots, baked-in pickup + throw animations (`missfbi4prepp1`), and a per-item trash-generation table.

## Integration

Exports for orchestration:

```lua theme={null}
exports['apex-caretaker']:isCaretaker(source)
exports['apex-caretaker']:getPlayerCoords(source)
```

## Resource info

<Note>
  Code accessible: `config.lua`. Approximately 1500 lines of Lua. German (English configurable).
</Note>

<Tip>
  Pair with [APEX Caretaker App](/paid-scripts/apex-caretaker-app) for an lb-phone companion that surfaces live district stats on duty.
</Tip>
