Installation

2 min readUpdated 2 weeks ago

Overview

ML Loot Zones spawns lootable props inside zones that admins draw in the world, and makes existing map props lootable. Zones, categories, loot tables and world props are built from an in-game admin panel and saved in the database.

Quick Start

  1. Download from CFX Portal
  2. Extract to your resources folder as ml_lootzones
  3. Add to server.cfg:
server.cfg
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ml_lootzones
Load Order

ml_lootzones must start AFTER ml_bridge. Optional resources such as ML Inventory, ml_skills and ml_random_cloth start before it.

Database

Tables are created on first start:

  • ml_lootzones_areas: zones and their props
  • ml_lootzones_categories: zone categories and rotation rules
  • ml_lootzones_settings: global settings
  • ml_loot_types: loot types (guaranteed and chance tables)
  • ml_world_props: lootable map props
  • ml_world_prop_locations: approved positions of each map prop
  • ml_prop_categories: map prop categories
  • ml_lootzones_bp_runs, ml_lootzones_bp_outbox, ml_lootzones_bp_cache, ml_lootzones_bp_sources, ml_lootzones_bp_guard: battlepass progress queue, created by the ML Bridge module and only filled when ml_battlepass runs

Verify

The console prints:

cfg
1[ml_lootzones] Database initialized successfully.
2[ml_lootzones] Loot active. Loaded 0 areas.

With a startup delay set, the second line reads Startup delay: Xs and loot opens when it ends. Open the admin panel with /mlloot.

  • Resource does not start: check that oxmysql, ox_lib and ml_bridge start first.
  • /mlloot does nothing: the player needs admin permission in your framework or ACE.
  • Props do not spawn: enable Spawn Props on the zone and give it at least one model.
  • Density warning in the console: the zone has more props than its radius can fit. Raise the radius or lower the count.
  • Nothing to loot right after a restart: the startup delay is running. Wait, or set both values to 0 in the Settings tab.
  • A map prop cannot be looted: it needs an approved position. Detect it in the world from the admin panel.