Reference
Client exports
All are called as exports['uniqers-uipack']:Name(...). If you renamed the folder, use your folder's name.
Notifications
exports['uniqers-uipack']:Notify({ kind = 'success', -- success | error | inform | warning | police | ambulance | message title = 'Garage', -- empty: the kind's name, in the player's language text = 'Vehicle stored.', duration = 5000, icon = 'fa-solid fa-warehouse', color = '#22C55E', -- this card only image = 'https://example.com/garage.png', html = nil, -- your own markup inside the card sound = true, -- false, or { name = '...', set = '...' } interactive = false, action = nil, value = nil,})kind also understands the names other scripts use: primary, info, warn, ok, err⦠An interactive card is answered with the event uniqers-uipack:onNotifyAction(action, value) when the player clicks it or presses E on it.
Screen elements
Seven elements, one way of calling them: every call takes one options table, and every lasting element answers the same verbs. One-line elements also take a bare text: ShowHint('Go to the depot').
- Key hint with no
keyreads it out of the text:'[E] Open the garage'.PressKeyHint()flashes the key, then hides it.IsKeyHintOpen()returnsopen, text. - Text bar with no
keyshowsConfig.TextBarKey(E). - Banner
kindissuccess,errororinform;design = 1(Ticker) or2(Capsule), or leave it out for the design the player picked. sound = trueplaysConfig.DefaultSound;{ name, set }plays that one.- Every text may be an
@keyfromhtml/locales.js, so it shows in each player's language.
exports['uniqers-uipack']:ShowKeyHint({ key = 'E', text = 'Open the garage', sound = true })exports['uniqers-uipack']:PressKeyHint() exports['uniqers-uipack']:ShowInfoCard({ icon = 'fa-solid fa-flag', title = 'Objective', text = 'Reach the pier' })exports['uniqers-uipack']:ShowBanner({ text = 'Vehicle stored', kind = 'success', duration = 4000 })exports['uniqers-uipack']:ShowAlertBar({ text = 'Restricted area', duration = 6000 })World labels and text bar zones
A world label is a text with a key that stands at a place, on an entity or above another player, and does something when the key is pressed. It is drawn by the 3D prompt, so it wears the 3D Interact style each player picked.
Fixed ones go in shared/areas_config.lua (Config.WorldLabels, Config.TextBarZones). Labels and zones a resource added are removed when that resource stops.
exports['uniqers-uipack']:AddWorldLabel('pd_door', { coords = vector3(441.8, -982.0, 30.7), text = 'Open the door', key = 'E', distance = 6.0, reach = 2.0, event = 'pd:door', args = { door = 3 }, job = 'police',})Requests
Progress bar
Events: progressbar:client:progress(action, cb), progressbar:client:cancel.
Dialogs, menus, skill check
3D prompts
Radial menu
Event: uniqers-uipack:radialSelect(action, value, ctx) for entries with an action.
Target
The complete qb-target and ox_target APIs, and qtarget's through its bridge. The shape of the options decides the dialect.
qb-target: AddTargetModel, RemoveTargetModel, AddTargetEntity, RemoveTargetEntity, AddTargetNetEntity, RemoveTargetNetEntity, AddTargetBone, RemoveTargetBone, AddGlobalPed, AddGlobalVehicle, AddGlobalObject, AddGlobalPlayer, RemoveGlobalPed, RemoveGlobalVehicle, RemoveGlobalObject, RemoveGlobalPlayer, AddGlobalType, RemoveGlobalType, AddBoxZone, AddCircleZone, AddPolyZone, AddComboZone, AddEntityZone, RemoveZone, AllowTargeting, DisableTarget, DisableNUI, EnableNUI, LeftTarget, IsTargetActive, IsTargetSuccess, DrawOutlineEntity, CheckEntity, CheckBones, RaycastCamera, every Getβ¦Data and Updateβ¦Data, SpawnPed, DeletePeds, RemoveSpawnedPed, GetPeds, UpdatePedsData.
ox_target: addGlobalOption, addGlobalPed, addGlobalVehicle, addGlobalObject, addGlobalPlayer, removeGlobalOption, removeGlobalPed, removeGlobalVehicle, removeGlobalObject, removeGlobalPlayer, addModel, removeModel, addEntity, removeEntity, addLocalEntity, removeLocalEntity, addSphereZone, addBoxZone, addPolyZone, removeZone, zoneExists, getTargetOptions, disableTargeting, isActive.
Extra: SetTargetLabel(models, label), SetTargetPromptTheme(theme).
Settings and systems
Still stuck? Send us your server log on Discord and we will sort it out with you.
Ask on Discord