X3D Use Item

Description

Every consumable in one script — medicine, bandages, an AED, repair kits, ammo, loot boxes and buff food.

Works with ESX or standalone. No ox_lib, no particular inventory.


Features

  • [+] Easy to set up: tune everything in config, or edit it from the web builder
  • [+] Meds and bandages heal a percentage, with percent and time set per item
  • [+] AED revives a nearby downed player, with radius and CPR time you set
  • [+] Plug in your own death screen by setting the revive event
  • [+] Repair kit with its own radius and repair time
  • [+] Ammo tops up the weapon in hand, limited per type, with a cap you set
  • [+] Loot boxes open several at a time, with a per-use maximum
  • [+] Food heals and applies timed buffs through any buff system
  • [+] Body armor as a consumable vest, or a rental one limited to an area
  • [+] Helmet worn as real clothing, blocks critical hits
  • [+] Anti-spam lock, checked on the server: no item, no effect
  • [+] Optional bag-space check before opening a box, switch it in config

What is in it

Group What it does
Meds / bandages Heal a percentage of health, with an animation and a medical bag prop
AED CPR that revives a downed player nearby, with the range checked server-side
Repair kit Fixes body, engine and tyres while preserving dirt level and fuel
Ammo Tops up the weapon in hand, capped per type
Loot boxes Open several at once, with an optional bag-space check first
Food Heals and applies timed buffs through any buff system
Body armor Raises armor, in a consumable vest and a rental one limited to an area
Helmet Worn as real clothing, blocks critical hits, breaks when shot, and survives a relog

Safe by construction

Every use is checked on the server:

  • An in-flight lock — one action at a time per player; spamming the key does nothing
  • The item is verified before it is taken, never taken first and checked after
  • Distance is re-checked at the end, not only at the start — start CPR and run off and it fails
  • The client saying "done" is not enough — the server re-checks timing and conditions itself

Fits what you already run

Everything is detected, and nothing is required:

  • Progress bar — ox_lib if present, then esx_progressbar, otherwise it draws its own with natives
  • Notifications — esx_notify, then ox_lib, then the game's own feed
  • Buffs — x3d_useitem:effect fires every time, so any buff system can listen
  • Reviving — point Config.ReviveEvent at your death screen, esx_ambulancejob:revive included
  • Fuel — the repair kit keeps the fuel level and dirt as they were, no fuel script needed

Making it yours

Every item lives in shared/config.lua, add or remove as you like. All text sits in locales.lua in Thai and English, switched with Config.Locale.

Version history

  • 1.1.2 — Released 13/10/2026 00:19
  • 1.0.0 — Released 24/09/2026 09:05
Same category

Related scripts

View all products
Read more

Posts that cover this script