Script ESX

iHUD v2

$16.00

A lightweight, modern ESX HUD that shows player status, banen, geld, en een voice-talking cue via NUI. Built for performance and easy plug-in to existing ESX servers.

Functies

  • Status bars

    • Honger En Dorst with animated fill and percentage labels.

    • Consumes standard ESX status events (see Integration).

  • Job display

    • Primair Baan and optional Second Job (grade supported).

  • Money display

    • Cash (liquid) and Black Money with clear labels.

  • Voice indicator

    • Microphone icon appears only while the player is talking (NetworkIsPlayerTalking).

    • Optional proximity classes are wired in the UI and can be toggled if you integrate with your voice system.

  • Toggleable sections

    • Enable/disable HUD blocks (Job, Job2, Money, Black Money, Micro) via config.

  • ESX-version friendly

    • Works with ESX v1 final and “legacy” styles; supports retrieving ESX via exported function or legacy event.

  • NUI first

    • Clean Inter UI (HTML/CSS/JS); all data flows through SendNUIMessage.

Product facts

Framework
ESX
Resource type
Script
Included files
1 downloadable file
Add to Cart
iHUD v2 FiveM bronvoorbeeld
iHUD v2
$16.00
ADN'S | iHud-V2 | NUI | Beautiful animations | FiveM Scripts

Bestanden & manifest

  • fxmanifest.lua
    • ui_page "NUI/index.html"
    • Laadt CSS/JS/assets van NUI/src/*
    • shared_script "config.lua"
    • client_script "client/*.lua"
  • Hoofdclientlogica: client/main.lua
  • Configuratie: config.lua
  • NUI: NUI/index.html, NUI/src/css/*, NUI/src/js/{config.js,index.js,events.js}, NUI/src/images/micro.png

Configuratie (config.lua)

Config = {
  DEBUG = false,

  -- How to get ESX:
  ESX_method   = "function",         -- "function" (export) or "event"
  eventNameESX = "esx:getSharedObject",
  extendedName = "extended",         -- e.g. "es_extended" / "extended"
  VERSION_ESX  = "final",            -- "legacy" or "final" (informational)

  -- Status source (list of {name, percent}):
  statusEventName = "esx_customui:updateStatus",

  ACTIVED = {
    JOB         = true,
    JOB2        = true,
    MONEY       = true,
    BLACK_MONEY = true,
    MICRO       = true
  }
}

Notities

  • Als je een alternatieve status-tick gebruikt (bijv. sigma_hud:onTick), luistert de client op Config.statusEventName of valt terug op "sigma_hud:onTick".

Clientgebeurtenissen & gegevensstroom

  • Initialisatie
    • esx:playerLoaded → HUD initialiseert met ESX spelergegevens.
    • Bij initialisatie wordt de HUD getoond en NUI ontvangt:
      SendNUIMessage({ type = "init", config = Config.ACTIVED })
      
  • Statusupdates (Honger/Dorst)
    • Luister naar Config.statusEventName (standaard esx_customui:updateStatus) en een lijst uitzendt zoals:
      TriggerEvent("esx_customui:updateStatus", {
        { name = "hunger", percent = 48.0 },
        { name = "thirst", percent = 72.0 }
      })
      
    • HUD koppelt die aan de twee statusbalken.
  • Functie / Secondaire Functie
    • esx:setJob En esx:setJob2 worden automatisch afgehandeld. NUI ontvangt:
      SendNUIMessage({ type = "updateJob", jobs = {
        { label = job.label, grade = job.grade_label },
        { label = job2.label, grade = job2.grade_label }
      }})
      
  • Geld
    • esx:setAccountMoney werkt contant geld en zwart geld bij:
      SendNUIMessage({ type = "updateMoney", moneys = {
        { label = "Liquide", value = cash.money },
        { label = black.label, value = black.money }
      }})
      
  • Stem (Praatindicator)
    • Polls NetworkIsPlayerTalking(PlayerId()); toont/verbergt microfoonpictogram met:
      SendNUIMessage({ type = "toogleMicro", show = true/false })
      
    • Een helper om proximity classes te wijzigen bestaat in NUI (type = "changeMicro"), zodat je het naar wens kunt koppelen aan je voice-resource.
  • HUD tonen/verbergen (aangepast)
    • Trigger vanaf elke client-side:
      TriggerEvent("iHud-V2::show", true)  -- show
      TriggerEvent("iHud-V2::show", false) -- hide
      

Installatie

  1. Drop de map in je resources (bijv. resources/[ui]/iHud-V2).
  2. Zorg voor de resource:
    ensure iHud-V2
    
  3. Configureren ESX toegangsmethode, status event naam, en secties in config.lua.
  4. Bevestig dat je statusscript uitzendt { name = "hunger"/"thirst", percent = <0-100> } arrays naar Config.statusEventName.

Compatibiliteit & tips

  • ESX ophalen
    • function modus verwacht: ESX = exports[Config.extendedName]:getSharedObject()
    • event modus verwacht: TriggerEvent(Config.eventNameESX, function(obj) ESX = obj end)
  • Stem nabijheid
    • De HUD wordt kant-en-klaar geleverd met een spraakindicator. Om proximity levels (fluisteren/normaal/schreeuwen) weer te geven, laat je voice resource een NUI bericht sturen met type="changeMicro" en je gekozen CSS klasse.
  • Styling
    • Lettertypen & pictogrammen geladen van CDN's; UI is responsief en minimaal gehouden voor RP servers.

Als je wilt, kan ik de bovenstaande tekst aanpassen aan de exacte naamgeving van je server en een kort blok “Serververeisten / Afhankelijkheden” toevoegen (bijv. de namen van je status-/voice-resources) of screenshots toevoegen.

Setup guide

The current iHUD package contains editable Lua and NUI settings but no README.

Requirements and preparation

  • ESX and a status resource that sends hunger/thirst values.
  • The configured voice and job/money events must match the server.

Installatie

  1. Uitpakken iHud-V2.
  2. Configure the status event and HUD behavior in config.lua; change NUI presentation only in the included NUI config.
  3. Start after ESX and the status/voice resources it reads.

Configuration checkpoints

  • Test health, armor, hunger, thirst, job, money and voice-talking states.
  • Verify reconnect and resolution changes without NUI errors.

Safety: Back up the affected resource and database tables, use credentials owned by your server, and complete a staging test before replacing a live resource. The full configuration remains in the download package.

Aanvullende informatie

Framework

ESX