gfxr-notify

Modern notification, input dialog, and progress bar system for RedM with a Western-themed UI built in React.

Features

  • Toast-style notifications (success, error, warning, info)

  • Cancellable progress bars with optional animations

  • Input dialogs with multiple field types (text, number, password, select, textarea)

  • Full-screen announcements

  • Customizable Western-themed design via CSS variables

  • Multi-language support (English, Turkish)

Dependencies

Dependency
Description

gfxr-bridge

Framework abstraction layer

Installation

  1. Add to server.cfg:

    ensure gfxr-bridge
    ensure gfxr-notify
  2. Build the UI (if not pre-built):

    cd resources/[gfx]/gfxr-notify/web
    npm install
    npm run build
  3. Configure:

    • config/client_config.lua - Notification settings, theme

    • config/locale.lua - Language translations

Configuration

client_config.lua

Client Exports

ShowNotification

Parameter
Type
Description

message

string

Notification text

type

string

"success", "error", "warning", "info"

duration

number|nil

Duration in ms (optional)

ShowProgressBar

Parameter
Type
Description

label

string

Progress bar label

duration

number

Duration in ms

options

table|nil

{ canCancel = true, animation = { dict = "...", anim = "..." } }

Returns: true if completed, false if cancelled.

ShowInputDialog

Parameter
Type
Description

title

string

Dialog title

inputs

table

Array of input definitions

Input types:

Returns: Table of submitted values, or nil if cancelled.

ShowAnnouncement

Server Exports

Notify

Send a notification to a specific player.

NotifyAll

Send a notification to all players.

Announce

Send an announcement to a specific player.

AnnounceAll

Send an announcement to all players.

Test Commands

Command
Description

/testnotify

Display all 4 notification types

/testprogress

Show a 5-second cancellable progress bar

/testinput

Show an input dialog with sample fields

Last updated