Installation

2 min readUpdated 2 weeks ago

Overview

ML Radiation adds radiation zones and a Geiger Counter. Players build up radiation inside zones, take damage past set levels, and lower it with cure items, protective clothing or vehicles. Radiation is saved per player.

Quick Start

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

ml_radiation must start AFTER ml_bridge. The folder must be named exactly ml_radiation.

Database

The table is created automatically on first start:

  • ml_player_radiation: radiation level per player, saved every 5 minutes and on disconnect

Item Registration

Register items from _INSTALL/ in your inventory system.

  • Geiger Counter items: with Config.RealTerminalItem = true, the shipped default, every item of Config.AdvancedItems. With false, only the item of Config.SimpleMode
  • Cure items: the items of Config.CureItems.Items, radaway by default
  • Immunity items: the items of Config.ImmunityItems.Items, if you turn them on
  • Battery recharge: the item of Config.Battery.rechargeItem, battery by default

_INSTALL/items ox.txt has ready-made definitions and _INSTALL/items images the icons.

Stream Assets

The 3D Geiger Counter model (dgm_geiger.ydr and dgm_geiger.ytyp) ships in stream/ and loads with the resource.

Verify

Start the server and use a registered Geiger Counter item. The counter opens and shows the reading of the area.

  • Geiger Counter doesn't open. Verify the item is registered in your inventory and matches the name in Config.AdvancedItems or Config.SimpleMode.
  • Resource name error on startup. The folder must be named exactly ml_radiation.
  • Radiation is not saving. Check that oxmysql is running. Look for errors related to ml_player_radiation in the console.
  • No visual effects. With the health system integration on and disableVisuals = true, ml_healthsystem draws the effects instead.