Configuration

Settings.lua

Settings = {}

-- Enable debug mode (shows test commands and features if set to true)
Settings.Debug = true

-- Notification types with their visual and animation settings
Settings.NotificationTypes = {
    ["debug"] = {
        ["background-color"] = "#14141460",  -- Semi-transparent background
        ["color"] = "#757575",               -- Main accent color
        ["icon"] = "f188",                   -- FontAwesome icon
        ["title-color"] = "#fff",            -- Title text color
        ["title-fontsize"] = "14px",         -- Title font size
        ["text-color"] = "#ccc",             -- Body text color
        ["animation"] = "slide"              -- Animation: "slide", "fade", "bounce", "pop", "scale"
    },
    ["info"] = {
        ["background-color"] = "#14141460",
        ["color"] = "#2f83ff",
        ["icon"] = "f0eb",
        ["title-color"] = "#fff",
        ["title-fontsize"] = "16px",
        ["text-color"] = "#fff",
        ["animation"] = "fade"
    },
    ["warning"] = {
        ["background-color"] = "#14141460",
        ["color"] = "#ffcc00",
        ["icon"] = "f06a",
        ["title-color"] = "#fff",
        ["title-fontsize"] = "16px",
        ["text-color"] = "#fff",
        ["animation"] = "bounce"
    },
    ["error"] = {
        ["background-color"] = "#14141460",
        ["color"] = "#ff5252",
        ["icon"] = "f071",
        ["title-color"] = "#fff",
        ["title-fontsize"] = "16px",
        ["text-color"] = "#fff",
        ["animation"] = "pop"
    },
    ["success"] = {
        ["background-color"] = "#14141460",
        ["color"] = "#4caf50",
        ["icon"] = "f14a",
        ["title-color"] = "#fff",
        ["title-fontsize"] = "16px",
        ["text-color"] = "#fff",
        ["animation"] = "scale"
    },
    ["award"] = {
        ["background-color"] = "#14141460",
        ["color"] = "#9a36ff",
        ["icon"] = "f559",
        ["title-color"] = "#fff",
        ["title-fontsize"] = "16px",
        ["text-color"] = "#fff",
        ["animation"] = "scale"
    },
}

-- Notification logo settings
Settings.UseLogo = false                     -- Enable/disable logo in notifications
Settings.LogoSrc = "logo.png"                -- Path to logo image (used if UseLogo is true)
Settings.SoundVolume = 0.9                   -- Notification sound volume (0 = mute, 1 = max)

-- Text UI (2D) styling
Settings.TextUIbackgroundColor = "#14141460" -- Background color
Settings.TexTUIColor = "#fff"                -- Text color

-- 3D TextUI settings
Settings.color = "BLUE"                       -- 3D text color
Settings.Disable = {                         -- Conditions to disable 3D text UI
    onDeath = true,
    onNuiFocus = false,
    onVehicle = true,
    onHandCuff = true,
}

-- Debug commands (only registered if debug mode is enabled)
if Settings.Debug then

    -- /rd1: Sends test notifications using all defined notification types
    RegisterCommand("rd1", function(source, args, rawCommand)
        local src = source
        local title = "RD SYSTEM"
        local message = "TEST"
        local duration = 10000  -- in milliseconds

        for notifyType, _ in pairs(Settings.NotificationTypes) do
            exports['rd-interactions']:SendNotify(title, message, duration, notifyType)
        end
    end, false)

    -- /rd2: Shows a test TextUI element (e.g., "Open Boss Menu")
    RegisterCommand("rd2", function(source, args, rawCommand)
        exports['rd-interactions']:show("Open Boss Menu", "left", "G", false)
        -- Example alternative: show on right side with E key and sound
        -- exports['rd-interactions']:show("TEST", "right", "E", true)
    end, false)

    -- /rd3: Hides the currently visible TextUI
    RegisterCommand("rd3", function(source, args, rawCommand)
        exports['rd-interactions']:hide()
    end, false)
end

🐞 Settings.Debug = true

  • 'Enables debug mode' – allows test commands like /rd1, /rd2, and /rd3.


🔔 Settings.NotificationTypes = { ... }

  • 'Defines different types of notifications' – each with unique style and animation.

Each notification type (debug, info, warning, error, success, award) has:

  • 'background-color': semi-transparent background.

  • 'color': accent color (like blue, red, etc.).

  • 'icon': FontAwesome icon code.

  • 'title-color': color of the title text.

  • 'title-fontsize': font size of the title.

  • 'text-color': color of the message text.

  • 'animation': how the notification appears (e.g., 'slide', 'fade', 'pop').


🖼️ Settings.UseLogo = false

  • 'Show or hide logo in notification'false disables logo.

🖼️ Settings.LogoSrc = 'logo.png'

  • 'Path to logo image' – used only if UseLogo = true.


🔊 Settings.SoundVolume = 0.9

  • 'Controls notification sound volume'0.9 is 90%.


🖥️ Settings.TextUIbackgroundColor = "#14141460"

  • 'Background color of 2D Text UI'

🖥️ Settings.TexTUIColor = "#fff"

  • 'Text color of 2D Text UI'


🧊 3D Text UI Settings

Settings.color = 'BLUE'

  • 'Color of 3D text display'

Settings.Disable = { ... }

  • 'Conditions when 3D text UI should be hidden'

    • 'onDeath' = true → hides when player is dead.

    • 'onNuiFocus' = false → shows even if UI has focus.

    • 'onVehicle' = true → hides inside vehicles.

    • 'onHandCuff' = true → hides when handcuffed.


🧪 Debug Commands (only if Debug = true)

/rd1

  • 'Sends test notifications of all types'

/rd2

  • 'Shows a sample 2D Text UI' – e.g., 'Open Boss Menu'.

/rd3

  • 'Hides the 2D Text UI'

Last updated