GuxFiz
DiscordTEBEX
  • Welcome To GX Documentation
  • Resources馃惂
    • gx_peds
      • Installation
      • Configuration
    • gx_announcejobv2
      • Installation
      • Configuration
      • Exports
    • gx_announcejob
      • Installation
      • Configuration
      • How Use?
    • gx_medo
      • Installation
      • Configuration
      • Exports
    • gx_createnpc
      • Installation
      • Configuration
    • gx_notify
      • Installation
      • Configuration
      • Exports
      • Integrations
Powered by GitBook
On this page
  • Notify
  • NotifyAdvanced
  • Text-Ui
  • Example Code
  1. Resources馃惂
  2. gx_notify

Exports

Exports of gx_notify Resource

Notify

exports.gx_notify:Notify("Notificaci贸n Message test")
TriggerClientEvent("gx_notify:Notify", source, "Notificaci贸n Message test")

NotifyAdvanced

exports.gx_notify:NotifyAdvanced({
    title = "Bank of YourServer",
    subject = "Transaction",
    message = "You have received ~g~$1000~s~ from YourServer",
    icon = "CHAR_BANK_MAZE",
    timeout = 10,
    flash = false
})
TriggerClientEvent("gx_notify:NotifyAdvanced", source, {
    title = "Bank of YourServer",
    subject = "Transaction",
    message = "You have received ~g~$1000~s~ from YourServer",
    icon = "CHAR_BANK_MAZE",
    timeout = 10,
    flash = false
})

Text-Ui

exports.gx_notify:Help(targetCoords, "~INPUT_CONTEXT~ - Interaction")

Example Code

-- client

RegisterCommand("client_test", function() 
    exports.gx_notify:Notify("Notificaci贸n Message test")
end)

-- server

RegisterCommand("server_test", function(source) 
    TriggerClientEvent("gx_notify:Notify", source, "Notificaci贸n Message test")
end)
-- client

RegisterCommand("client_test", function() 
    exports.gx_notify:NotifyAdvanced({
        title = "Bank of YourServer",
        subject = "Transaction",
        message = "You have received $1000 from YourServer",
        icon = "CHAR_BANK_MAZE",
        timeout = 10,
        flash = false
    })
end)

-- server

RegisterCommand("server_test", function(source) 
    TriggerClientEvent("gx_notify:NotifyAdvanced", source, {
        title = "Bank of YourServer",
        subject = "Transaction",
        message = "You have received ~g~$1000~s~ from YourServer",
        icon = "CHAR_BANK_MAZE",
        timeout = 10,
        flash = false
    })
end)
-- client
local targetCoords = vector3(-232.5460, 588.5023, 190.5363)
local radius = 2.0
Citizen.CreateThread(function()
    while true do
    Citizen.Wait(0)
    local playerPed = PlayerPedId()
    local playerCoords = GetEntityCoords(playerPed)
    local distance = #(playerCoords - targetCoords)
        if distance < radius then
            exports.gx_notify:Help(targetCoords, "~INPUT_CONTEXT~ - Interaction")
            if IsControlJustReleased(0, 38) then  -- 38 => E (button)
                print("Wow! Hello!! w-w")
            end
        end
    end
end)
PreviousConfigurationNextIntegrations

Last updated 1 month ago