Koja Scripts
FREE

Installation

Dependencies, server.cfg start order and the owned-vehicles table nitro needs.

Installation

This page takes you from the downloaded archive to a running HUD. It takes about five minutes; the only setting you must check is the owned-vehicles table used by nitro.

Requirements

ResourceRequiredWhat the HUD uses it for
koja-libYesFramework detection, player data, money, fuel, inventory, key binds, callbacks
oxmysqlYesReading and saving nitro per vehicle
A frameworkYesESX (es_extended), QBCore (qb-core), QBox (qbx_core) or ox_core
pma-voiceNoThe voice range bar. Without it the bar does not change
esx_statusESX onlyHunger and thirst on ESX
ox_fuel or LegacyFuelNoFuel level. Without either, the native fuel level is shown

Install

  1. Put the resource in resources

    Unpack the archive and keep the folder name koja-hud.
    resources/
    └── [koja]/
        ├── koja-lib/
        └── koja-hud/
    The folder name is the resource name. Other resources call exports['koja-hud'], so renaming the folder breaks every export call — silently.
  2. Add it to server.cfg

    Start it after its dependencies:
    server.cfg
    ensure oxmysql
    ensure koja-lib
    ensure koja-hud
  3. Point nitro at your owned-vehicles table

    Open editable/shared/config.lua and set the table that stores player vehicles:
    editable/shared/config.lua
    KOJA.Nitro = {
        -- ...
        Tables = {
            GaragesTable = 'owned_vehicles', -- ESX
            OwnerColumn = 'owner'
        },
    }
    FrameworkGaragesTableOwnerColumn
    ESXowned_vehiclesowner
    QBCore / QBoxplayer_vehiclescitizenid
    The HUD adds a nitro column to that table on start. If you do not want nitro at all, set KOJA.Nitro.Enabled = false instead — the server side then does nothing.
  4. Restart the server

    Restart the server, or run ensure koja-hud in the server console. The nitro column is created as soon as oxmysql connects.

Check that it works

  1. Join the server. The status bars appear about a second after your character has loaded.
  2. Type /settings in chat. The settings menu opens.
  3. Get in a vehicle. The speedometer appears and the minimap switches on.

To test notifications, the progress bar and the text UI without writing code, set KOJA.Debug = true and restart the resource — it registers /testnotify, /testprogress, /testtextui and /hidetextui. Turn it off again before going live.

Next steps