OTHERPLANET DOCS
  • 🪐About US
  • 💻Scripts
    • 🔫OP Crime Organisations
      • Installation
      • Config Files
      • Customization
      • Tablet as Item
      • Global States
      • Exports
        • Server Side
    • 🚘OP Mechanic Job
      • Installation
      • Config File
      • Setup Jobs
      • Setup Dispatch
      • Get Duty
      • Update Tablet Stats
      • Notifications/Progressbar
      • Discord Logs
    • 🗒️OP Requests
      • Installation
      • Config
      • Usage
    • 🌇OP HUD
      • Config File
      • Instalation
      • Progress Bar Usage
      • Notify Usage
      • Alcohol Status & Stamina
    • 🏎️OP Vehicle Theft
      • Installation
      • OX Inventory
      • Translate Sounds
      • Config
      • Customization
    • 🅿️OP Garages V1 (OLD)
      • Installation
      • Config
        • Main
        • Garages Locations
        • Vehicles and Brands
      • Customization
      • Vehicle Types
      • Jobs
      • Exports
      • Other
Powered by GitBook
On this page
  1. Scripts
  2. OP Stores
  3. Config Files

Functions Config

Easily integrate and modify notifications to fit your preferred notification script or framework.

-------------------
-- Notifications --
-------------------

RegisterNetEvent('op-garages:sendNotify')
AddEventHandler('op-garages:sendNotify', function(title, type, time)
    sendNotify(title, type, time)
end)

Citizen.CreateThread(function()
    sendNotify = function(title, type, time)
        -- Time in miliseconds 
        if Config.Notify == "esx" then
            Framework.ShowNotification(title, type, time)
        elseif Config.Notify == "qbcore" then
            Framework.Functions.Notify(title, type, time)
        elseif Config.Notify == "op-hud" then
            TriggerEvent('op-hud:showNotification', type, time, title) 
        end
    end
end)

Last updated 4 months ago

💻
🏪