Docs / D1 UI

D1 UI · Installation

Requirements

  • ox_lib, ox_target and oxmysql (recent versions)
  • Qbox (qbx_core), QB-Core or ESX Legacy (es_extended): detected automatically

1. Download

Download d1_ui from your Keymaster and put the folder in your resources (for example resources/[d1]/d1_ui). Do not rename it.

2. Hook ox_lib and ox_target

D1 UI draws everything through one small file. Add it as the first client script in both resources:

-- ox_lib/fxmanifest.lua  and  ox_target/fxmanifest.lua
client_scripts {
    '@d1_ui/hook.lua', -- must be the first line
    -- ...the rest stays as it is
}

3. server.cfg

ensure oxmysql
ensure ox_lib
ensure ox_target
ensure d1_ui

add_ace group.admin d1_ui.admin allow

d1_ui must start after ox_lib, ox_target and oxmysql. The tables are created by themselves on the first start.

4. Done

Restart the server and type /uiadmin in game to choose the server style.

Commands

Command Who What it does
/uiadmin admins (ACE d1_ui.admin) Theme editor for the whole server
/myui everyone Each player's own styles, sizes and positions
/moveui everyone Drag things around the screen
/cinema everyone Hide the whole UI (screenshots and clips)
/notifications everyone Last notifications
/announce [seconds] text staff Big announcement for everyone

Every name can be changed in Config.Commands.

Configuration

Almost everything is better changed from /uiadmin: what you save there lives in the database and wins over config.lua. The file is only the first start.

  • Config.Bridge.Framework: 'auto', 'qbx', 'qb' or 'esx'
  • Config.Bridge.Locale: 'en' or 'es'
  • Config.Announcements: show txAdmin announcements and scheduled restarts with the D1 style
  • Config.SuggestLight: offers the light mode to players with low FPS
  • Config.Context: optional VIP statebag or server event that styles can react to

Turn it off without uninstalling

setr d1_ui 0   # back to stock ox_lib
setr d1_ui 1   # D1 UI again

Problems?

  • Nothing changes in game: check that @d1_ui/hook.lua is the first client script in ox_lib and ox_target, and that d1_ui starts after them.
  • Database errors: oxmysql must be started before d1_ui.
  • Still stuck? Open a ticket on our Discord with your framework, the d1_ui version and the F8 error.