Script ESX

iHUD v2

$16.00

A lightweight, modern ESX HUD that shows player stato, lavori, soldi, e un voice-talking cue via NUI. Built for performance and easy plug-in to existing ESX servers.

Caratteristiche

  • Status bars

    • Fame E Sete with animated fill and percentage labels.

    • Consumes standard ESX status events (see Integration).

  • Job display

    • Primario Lavoro and optional Second Job (grade supported).

  • Money display

    • Contanti (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 Invia messaggio NUIM.

Product facts

Framework
ESX
Resource type
Script
Included files
1 downloadable file
Add to Cart
iHUD v2 FiveM anteprima risorsa
iHUD v2
$16.00

File e manifesto

  • fxmanifest.lua
    • ui_page "NUI/index.html"
    • Carica CSS/JS/assets da NUI/src/*
    • shared_script "config.lua"
    • client_script "client/*.lua"
  • Logica client principale: client/main.lua
  • Configurazione: config.lua
  • NUI: NUI/index.html, NUI/src/css/*, NUI/src/js/{config.js,index.js,events.js}, NUI/src/images/micro.png

Configurazione (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
  }
}

Note

  • Se utilizzi un tick di stato alternativo (es. sigma_hud:onTick), il client ascolta su Config.statusEventName O ricade su "sigma_hud:onTick".

Eventi client e flusso di dati

  • Inizializzazione
    • esx:playerLoaded → HUD si inizializza con i dati del giocatore ESX.
    • All'inizializzazione viene mostrato HUD e NUI riceve:
      SendNUIMessage({ type = "init", config = Config.ACTIVED })
      
  • Aggiornamenti di stato (Fame/Sete)
    • Ascolta Config.statusEventName (predefinito esx_customui:updateStatus) ed emettere un elenco come:
      TriggerEvent("esx_customui:updateStatus", {
        { name = "hunger", percent = 48.0 },
        { name = "thirst", percent = 72.0 }
      })
      
    • HUD li mappa alle due barre di stato.
  • Lavoro / Secondo lavoro
    • esx:setJob E esx:setJob2 sono gestiti automaticamente. NUI riceve:
      SendNUIMessage({ type = "updateJob", jobs = {
        { label = job.label, grade = job.grade_label },
        { label = job2.label, grade = job2.grade_label }
      }})
      
  • Soldi
    • esx:setAccountMoney aggiorna contanti e denaro sporco:
      SendNUIMessage({ type = "updateMoney", moneys = {
        { label = "Liquide", value = cash.money },
        { label = black.label, value = black.money }
      }})
      
  • Voce (indicatore di conversazione)
    • Sondaggi NetworkIsPlayerTalking(PlayerId()); mostra/nasconde l'icona del microfono con:
      SendNUIMessage({ type = "toogleMicro", show = true/false })
      
    • Un helper per cambiare le classi di prossimità esiste in NUI (type = "changeMicro"), in modo da poterlo collegare alla tua risorsa vocale, se lo desideri.
  • Mostra/Nascondi HUD (personalizzato)
    • Attiva da qualsiasi client-side:
      TriggerEvent("iHud-V2::show", true)  -- show
      TriggerEvent("iHud-V2::show", false) -- hide
      

Installazione

  1. Trascina la cartella nella tua resources (per esempio resources/[ui]/iHud-V2).
  2. Assicurati che la risorsa:
    ensure iHud-V2
    
  3. Configurare Metodo di accesso ESX, nome evento stato, e attiva le sezioni in config.lua.
  4. Conferma che il tuo script di stato emette { name = "hunger"/"thirst", percent = <0-100> } array a Config.statusEventName.

Compatibilità e suggerimenti

  • recupero ESX
    • function la modalità prevede: ESX = exports[Config.extendedName]:getSharedObject()
    • event la modalità prevede: TriggerEvent(Config.eventNameESX, function(obj) ESX = obj end)
  • Prossimità vocale
    • Il HUD viene fornito con un indicatore di conversazione pronto all'uso. Per mostrare i livelli di prossimità (sussurro/normale/urlo), fai in modo che la tua risorsa vocale invii un messaggio NUI con type="changeMicro" e la tua classe CSS scelta.
  • Stile
    • Font e icone caricati da CDN; UI è reattivo e mantenuto minimale per i server RP.

Se lo desideri, posso adattare il testo sopra alla denominazione esatta del tuo server e includere un breve blocco “Requisiti/Dipendenze del server” (ad esempio, i nomi delle tue risorse di stato/vocali) o aggiungere screenshot.

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.

Installazione

  1. Estrarre 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.

Informazioni aggiuntive

Framework

ESX