[Standalone] 3D Weapon UI | botz_weaponui

Standalone DUI Weapon UI

A futuristic, standalone weapon UI for FiveM that displays ammo count and a segmented progress bar dynamically positioned near the weapon.

Features

  • Dynamic Positioning: The UI floats near the weapon/hand bone (Bone ID: 60309).
  • Standalone: Works with any framework (ESX, QBCore, Custom) as it relies on GTA natives.
  • Optimized: Separate threads for state checking and UI rendering to ensure minimal performance impact (0.00ms when idle).
  • Customizable: Users can change the ammo text color and progress bar color in-game.
  • Persistent Settings: Saves user preferences using Resource KVPs.
  • Low Ammo Warning: The UI turns red when ammo drops below 25%.

Dependencies

  • ox_lib (Required for the customization menu)

Download

Preview:

Installation

  1. Download the repository and place it in your resources folder.
  2. Ensure you have ox_lib installed and started.
  3. Add ensure botz_weaponui to your server.cfg (after ox_lib).

Configuration

The config.lua file allows you to set default values:

Config.AllowUserCustomization = true -- Enable/Disable the /weaponui command
Config.DefaultAmmoColor = "#00f0ff"
Config.DefaultProgressBarColor = "#00f0ff"

Usage

  • Equip a weapon: The UI appears automatically.
  • Shoot: The ammo count and progress bar update in real-time.
  • Customize: Type /weaponui to open the settings menu (if enabled). You can change colors or reset to defaults.

Developer Info

  • Author: Botz
  • Version: 1.0.0
7 Likes

Version 1.1:
Added Toggle visibility for UI (Player can toggle if the UI should be only shown when aiming or should the ui be shown if the player equips weapon).

1 Like

Greetings and thanks for the free release , i found a bug or something i miss , ammo bar does not work with all weapons ;/

Weird Behaviour with the script i see… I will look through the and check and update the offset for each weapon and include the offset for each weapon in the config so that it would be easier.

try a weapon with 100 or 200 bullets clip like combat mg

wow nice work :+1:

Check the Github i have released a new update hopefully that solves the issue

works prefect now, tyvm !