Exports

CLIENT-SIDE NOTIFY

Use this export to send styled notifications to players.

exports['rd-interactions']:SendNotify(title, message, duration, notifyType)
  • title (string): The title of the notification.

  • message (string): The message content.

  • duration (number): Duration in milliseconds.

  • notifyType (string): Type of notification (info, success, error, etc.).


TEXTUI

Show a simple text UI:

exports['rd-interactions']:show(text, "left", "E", false)
  • text (string): The text to display.

  • "left" or "right" (string): Side of the screen where the text appears.

  • "E" (string): Key to interact (optional).

  • false (boolean): Whether to play a sound (true or false).

Hide the text UI:

exports['rd-interactions']:hide()

DOORLOCK INTERACTION

Enable an interaction at a specific coordinate:

exports['rd-interactions']:interactON(coords, interactionType)
  • coords (vector3): Position of the door.

  • interactionType (string): Use "interact_off" or "interact" depending on the state or purpose.

Disable the interaction:

exports['rd-interactions']:interactOFF()

SERVER-SIDE NOTIFY

Send a notification from the server side to a client:

TriggerClientEvent('rd-notify:SendNotify', source, "Title", "Message", duration, "type")
  • source (number): The player's server ID.

  • "Title" (string): Title of the notification.

  • "Message" (string): Content.

  • duration (number): Time in milliseconds.

  • "type" (string): Notification type.


3D TEXTUI EXPORTS

Create an interactable 3D zone in the world:

exports['rd-interactions']:CreateInteraction({
    coords = vec3(-100.3031, -1144.3539, 25.8094),
    distance = 18.0,
    interactDst = 1.0,
    name = 'name',
    options = {
        {
            label = 'Hohaaa!',
            action = function(entity, coords, args)
                print(entity, coords, json.encode(args))
                local ped = PlayerPedId()
                SetEntityCoords(ped, -100.3031, -1144.3539, 26.8094)
            end,
        },
    }
})
  • coords: Center position of the interaction zone.

  • distance: How far away players can see the interaction.

  • interactDst: How close they must be to interact.

  • name: Unique identifier for the interaction.

  • options: A list of available options (label + action).

AND TO REMOVE

exports['rd-interactions']:RemoveInteraction(name)

Last updated