X-EnhancedRecoil

8.00 USD

X-EnhancedRecoil

Description


A recoil system for ox_inventory with full control over weapon recoil, giving much better and more realistic gunplay for roleplay server.

Adjust camerashake and camera movement to fit your needs for each individual weapon on your server

Advanced Recoil System for ox_inventory

A recoil system for ox_inventory with full control over weapon recoil, giving much better and much more realistic gunplay for roleplay server.

This recoil system is built specifically for ox_inventory, offering a completely customizable experience for FiveM roleplay servers. Designed for realism and balance, it transforms standard combat into a more immersive and skill-based experience.


Key Features

- Per-Weapon Recoil Tuning
Every weapon on your server can have its own custom shake and recoil values, allowing precise fine-tuning of camera movement and realism.

- Horizontal Recoil Multiplier
Easily adjust global horizontal recoil intensity using a single config value.

- Optional Reticle Removal
Remove the reticle for unscoped weapons to increase immersion. Scoped weapons are automatically excluded.

- Attachment-Based Modifiers
Recoil changes dynamically based on weapon components like grips, suppressors, extended or drum mags, and more. Multipliers stack for accurate tuning.


Configuration Example

```lua
-- Horizontal recoil control (global multiplier)
Config.horizontalRecoilMultiplier = 1

-- Remove reticle for unscoped weapons
Config.RemoveReticle = true

-- Recoil/shake values per weapon
Config.recoilTable = {
WEAPON_PISTOL = { shake = 0.12, recoil = 0.28 },
WEAPON_ASSAULTRIFLE = { shake = 0.07, recoil = 0.10 },
WEAPON_SNIPERRIFLE = { shake = 0.2, recoil = 1.2 },
-- and many more...
}

-- Attachment effects (stackable)
Config.componentEffects = {
at_grip = 0.9, -- reduce recoil
at_clip_drum_rifle = 1.25, -- increase recoil
at_suppressor_heavy = 0.85 -- reduce recoil
}


Compatibility

  • ox_inventory

  • Any framework using ox_inventory

  • Custom weapon packs (just add them to the config)



Installation Instructions

1. Drag and drop the resource folder into your `resources` directory.

2. Add the resource to your `server.cfg`:

3. Configure settings in `config.lua`:
- Adjust global horizontal recoil using `Config.horizontalRecoilMultiplier`.
- Set `Config.RemoveReticle` to true or false depending on your preference.
- Customize per-weapon recoil and shake values in `Config.recoilTable`.
- Modify `Config.componentEffects` to change how attachments affect recoil.

4. Restart the server or run `refresh` and `ensure your_recoil_resource_name` from the console.

The script is now active and fully functional.

For custom weapons, simply add them to the `Config.recoilTable` using the correct weapon hash (e.g., `WEAPON_MYNEWPISTOL = { shake = 0.1, recoil = 0.3 }`).