Script ESX

iHUD v2

$16.00

A lightweight, modern ESX HUD that shows player status, zawody, pieniądze, i voice-talking cue via NUI. Built for performance and easy plug-in to existing ESX servers.

Cechy

  • Status bars

    • Hunger I Thirst with animated fill and percentage labels.

    • Consumes standard ESX status events (see Integration).

  • Job display

    • Podstawowy Praca 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 Wyślij wiadomość NUIM.

Product facts

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

Pliki i manifest

  • fxmanifest.lua
    • ui_page "NUI/index.html"
    • Ładuje CSS/JS/zasoby z NUI/src/*
    • shared_script "config.lua"
    • client_script "client/*.lua"
  • Główna logika klienta: client/main.lua
  • Konfiguracja: config.lua
  • NUI: NUI/index.html, NUI/src/css/*, NUI/src/js/{config.js,index.js,events.js}, NUI/src/images/micro.png

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

Uwagi

  • Jeśli używasz alternatywnego znacznika statusu (np. sigma_hud:onTick), klient nasłuchuje Config.statusEventName Lub powraca do "sigma_hud:onTick".

Client events & data flow

  • Inicjalizacja
    • esx:playerLoaded → HUD inicjalizuje się z danymi gracza ESX.
    • Po inicjalizacji HUD jest wyświetlany, a NUI otrzymuje:
      SendNUIMessage({ type = "init", config = Config.ACTIVED })
      
  • Aktualizacje statusu (Głód/Pragnienie)
    • Nasłuchuj Config.statusEventName (domyślnie esx_customui:updateStatus) i wyemituj listę taką jak:
      TriggerEvent("esx_customui:updateStatus", {
        { name = "hunger", percent = 48.0 },
        { name = "thirst", percent = 72.0 }
      })
      
    • HUD mapuje je na dwa paski statusu.
  • Praca / Druga praca
    • esx:setJob I esx:setJob2 są obsługiwane automatycznie. NUI otrzymuje:
      SendNUIMessage({ type = "updateJob", jobs = {
        { label = job.label, grade = job.grade_label },
        { label = job2.label, grade = job2.grade_label }
      }})
      
  • Pieniądze
    • esx:setAccountMoney aktualizuje gotówkę i czarne pieniądze:
      SendNUIMessage({ type = "updateMoney", moneys = {
        { label = "Liquide", value = cash.money },
        { label = black.label, value = black.money }
      }})
      
  • Głos (wskaźnik rozmowy)
    • Ankiety NetworkIsPlayerTalking(PlayerId()); pokazuje/ukrywa ikonę mikrofonu za pomocą:
      SendNUIMessage({ type = "toogleMicro", show = true/false })
      
    • Pomocnik do zmiany klas zbliżeniowych znajduje się w NUI (type = "changeMicro"), dzięki czemu możesz go połączyć ze swoim zasobem głosowym, jeśli chcesz.
  • Pokaż/Ukryj HUD (niestandardowe)
    • Wyzwalanie z dowolnego miejsca po stronie klienta:
      TriggerEvent("iHud-V2::show", true)  -- show
      TriggerEvent("iHud-V2::show", false) -- hide
      

Instalacja

  1. Upuść folder do swojego resources (e.g. resources/[ui]/iHud-V2).
  2. Upewnij się, że zasób:
    ensure iHud-V2
    
  3. Skonfiguruj Metoda dostępu ESX, nazwa zdarzenia statusu, i przełączać sekcje w config.lua.
  4. Skrypt potwierdzający Twój status emituje { name = "hunger"/"thirst", percent = <0-100> } tablice do Config.statusEventName.

Kompatybilność i wskazówki

  • Pobieranie ESX
    • function tryb oczekuje: ESX = exports[Config.extendedName]:getSharedObject()
    • event tryb oczekuje: TriggerEvent(Config.eventNameESX, function(obj) ESX = obj end)
  • Voice proximity
    • HUD jest wyposażony w mówiący wskaźnik od razu po wyjęciu z pudełka. Aby wyświetlić poziomy bliskości (szept/normalny/krzyk), niech Twój zasób głosowy wyśle wiadomość NUI z type="changeMicro" i twoja wybrana klasa CSS.
  • Stylizacja
    • Czcionki i ikony ładowane z CDN; UI jest responsywny i utrzymywany w minimalnym rozmiarze dla serwerów RP.

Jeśli chcesz, mogę dostosować powyższy tekst do dokładnych nazw Twojego serwera i dołączyć krótki blok “Wymagania serwera / Zależności” (np. nazwy zasobów statusu/głosu) lub dodać zrzuty ekranu.

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.

Instalacja

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

Informacje dodatkowe

Framework

ESX