Documentation
  • 👋Introduction
  • 📚Guides
    • Useful Links
  • 🆓boii_utils
    • Installation
    • Configuration
    • Modules
    • API
      • Callbacks
      • Characters
      • Commands
      • Cooldowns
      • Debugging
      • Entities
      • Environment
      • Framework Bridge
      • Geometry
      • Items
      • Keys
      • Licences
      • Maths
      • Methods
      • Player
      • Requests
      • Strings
      • Tables
      • Timestamps
      • UI Bridges
      • Vehicles
      • Version
      • XP
      • UI Elements
Powered by GitBook
On this page
  • Accessing the Module
  • Server
  • drawtext.show(source, options)
  • drawtext.hide(source)
  • notifications.send(source, options)
  • Client
  • drawtext.show(options)
  • drawtext.hide()
  • notifications.send(options)
  1. boii_utils
  2. API

UI Bridges

Provides a unified API for handling DrawText UI and Notifications across multiple FiveM resources. Automatically routes to the appropriate underlying implementation based on what's active.


Accessing the Module

local DRAWTEXT <const> = exports.boii_utils:get("modules.drawtext")
local NOTIFY <const> = exports.boii_utils:get("modules.notifications")

Server

drawtext.show(source, options)

Displays drawtext UI for a specific client.

Parameters

Name
Type
Description

source

number

Player server ID

options

table

Drawtext options

â”” message

string

Text message to display

â”” icon

string

Optional icon (depends on system)

Example

DRAWTEXT.show(1, { message = "Hello, player!", icon = "info" })

drawtext.hide(source)

Hides drawtext UI for a specific client.

Parameters

Name
Type
Description

source

number

Player server ID

Example

DRAWTEXT.hide(1)

notifications.send(source, options)

Sends a notification to a specific client.

Parameters

Name
Type
Description

source

number

Player server ID

options

table

Notification options

â”” type

string

Notification type (e.g., info)

â”” message

string

Notification message

â”” duration

number

Duration in ms

Example

NOTIFY.send(1, { type = "info", message = "You received $500", duration = 5000 })

Client

drawtext.show(options)

Displays drawtext UI locally on the client.

Parameters

Name
Type
Description

options

table

Drawtext options

â”” message

string

Text message to display

â”” icon

string

Optional icon

Example

DRAWTEXT.show({ message = "Press E to interact", icon = "info" })

drawtext.hide()

Hides the drawtext UI locally on the client.

Example

DRAWTEXT.hide()

notifications.send(options)

Displays a notification on the client.

Parameters

Name
Type
Description

options

table

Notification options

â”” type

string

Notification type (e.g., success)

â”” message

string

Notification message

â”” duration

number

Duration in ms

Example

NOTIFY.send({ type = "success", message = "Mission Complete!", duration = 3000 })
PreviousTimestampsNextVehicles

Last updated 1 month ago

🆓