# Installation > Setup guide for ML Camps Category: CAMPS · Source: https://miciomods.it/docs/ml-camps-installation · Last updated: 2026-07-09 ## Overview ML Camps adds raidable NPC camps with a full server-side lifecycle: a camp sits idle until a player walks in, spawns its defenders, tracks the fight, pays out loot on clear, and respawns on a cooldown. Camps are created and managed entirely in-game through an admin panel with a map view, a live overview and per-NPC group editing. Loot is delivered directly or through lockable crates, optionally gated behind a camp key carried by one of the defenders. ## Quick Start - Download from CFX Portal (`https://portal.cfx.re`) - Extract to your `resources` folder as `ml_camps` - Add to `server.cfg`: **server.cfg** ```cfg ensure oxmysql ensure ox_lib ensure ml_bridge ensure ml_camps ``` > **WARNING:** Load Order > > `ml_camps` must start AFTER `ml_bridge`. ## Database Tables are created automatically on first start. No manual SQL import is needed; `_INSTALL/ml_camps.sql` ships the same schema for reference. - `ml_camps`: One row per camp definition (the admin panel writes here) - `ml_camp_state`: Camp status and respawn timestamp, so cooldowns and depleted camps survive restarts - `ml_camps_settings`: Global HUD and loot-key settings saved from the panel > **INFO:** Example Camps > > On first boot, with `Config.Settings.SeedExampleCamps = true` and an empty `ml_camps` table, two example camps are seeded into the database. Move, edit or delete them freely from the panel. ## Item Registration No items are required by default. The loot key runs in `'virtual'` mode out of the box and tracks the key server-side. Only if you switch `Config.LootKey.Mode` (or the panel setting) to `'item'`, register the key item from `_INSTALL/items.lua`: **ox_inventory/data/items.lua** ```lua ['camp_key'] = { label = 'Camp Key', weight = 100, stack = false, close = true, description = 'A key looted from a camp defender. Opens the stash of the camp it came from.', }, ``` Loot table items are your own: every item name configured in a camp loot table must already exist in your inventory. ## Verify After starting, the console prints: ```bash __ ____________________ __ _______ ___ ____ / |/ / _/ ___/ _/ __ \/ |/ / __ \/ _ \/ __/ / /|_/ // // /___/ // /_/ / /|_/ / /_/ / // /\ \ /_/ /_/___/\___/___/\____/_/ /_/\____/____/___/ ML Camps - Raidable NPC Camps System -------------------------------------------------- [ml_camps] Resource started [ml_camps] Developed by Micio Mods | miciomods.it -------------------------------------------------- [ml_camps] [INFO] ml_camps server ready ``` In game, run `/campsadmin` (default command) as an admin to open the panel. Walking into a camp radius spawns its NPCs and shows the raid HUD. **Troubleshooting** - `/campsadmin` does nothing. Missing Creator permission. Grant an ACE from `Config.Permissions.Creator` (e.g. `add_ace group.admin ml_camps.creator allow`) or rely on the default admin detection - No camps anywhere. The `ml_camps` table is empty and `SeedExampleCamps` is `false`. Create a camp from the panel - No blips on the map. Check `Config.Settings.BlipsEnabled` and the per-camp Show Blip toggle - NPCs do not spawn. Invalid ped model. The console warns `Model "x" not in CDImage`; a camp that spawns 0 NPCs returns to idle - Loot items never drop. The item names in the loot tables must exist in your inventory; unknown items are skipped - Key never appears in item mode. Register `camp_key` (the console prints an error pointing to `_INSTALL/items.lua`), or switch the key mode back to 'virtual' - Camp stays cleared forever. Spawn-once camps (`respawnEnabled = false`) stay depleted by design. Use Force Reset in the Live tab to restock them