Installation

2 min readUpdated 2 weeks ago

Overview

ML Recoil adds per-weapon recoil, progressive spray and damage tuning to FiveM. Staff tune every weapon in an admin panel and try it in a private test range, and the changes apply to every player at once.

Quick Start

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

ml_recoil must start after ml_bridge, ox_lib and oxmysql. Start ml_skills before it if you use the skill rules.

Database

Tables are created automatically on first start:

  • ml_recoil_weapons: weapon profiles saved from the admin panel
  • ml_recoil_settings: global settings and skill rules saved from the admin panel

_INSTALL/schema.sql holds the same schema.

Item Registration

No Items Required

ML Recoil registers no inventory items. It works on the weapons players already hold.

Verify

In game, equip a configured weapon such as WEAPON_PISTOL and fire. The camera kicks up with a slight sideways spread and climbs during sustained fire. Staff open the panel with /recoil.

  • No recoil on a weapon: the weapon has no profile. Add it from the admin panel or to Config.Weapons.
  • Damage unchanged: check Config.DamageSystem.Enabled and that the weapon has a value in shared/vanilla_damage.lua.
  • A config change does nothing: a value saved from the panel overrides the file. Reset the weapon from the panel.
  • /recoil does nothing: the player needs one of Config.AdminPermissions.