🔧Installations origen_notify

Remember that this resource has verified DMCA protection, and its illegal use or distribution could imply a claim for protection of Title 17 of Chapter 512 (c)(3) of the Digital Millennium Copyright Act.

We utilize the FiveM Tebex Escrow mechanism, launched in the latter part of 2021, for the verification and dissemination of our assets. Hence, any asset acquired via us can be centrally accessed and downloaded via your Keymaster profile using the following link.

Assets function exclusively on servers employing a key associated with the identical Keymaster profile. This approach guarantees the safety of the assets and restricts unauthorized usage, should the files be inadvertently shared. It's an integral component of the FiveM Tebex Escrow mechanism.

Login into Keymaster: https://keymaster.fivem.net/login


Firts Steps. Before start to installing

Prior to initiating the asset installation, verify your Server Artifacts version. It's imperative to operate on one of its recent versions for our assets to function seamlessly. This stipulation is established by FiveM in line with their Asset Escrow Framework.

Experiencing issues with FileZilla? On occasion, file transmission tools can disrupt encrypted files, causing startup issues with the asset. We advocate for the use of WinSCP, available at the given link. There have been documented challenges with FileZilla previously.

To refresh your server artifacts, locate the newest version outlined below for Windows:

Setting Up

  1. Direct yourself to the resources directory on your server; this is your asset installation point.

  2. Construct a dedicated directory for the asset, and transfer the unzipped content you downloaded earlier into this directory.

Activating the Asset

  • It's crucial to ascertain the correct startup of your asset. This could entail incorporating it into your server.cfg or possibly adjusting settings in txAdmin.

  • Post the installation of any of our assets, a server reboot is necessary to confirm appropriate synchronization with the Keymaster framework.


QBCore or ESX

QBCore Minimal: 1.2 | QBCore Recommended: 1.2.6

ESX Minimal: 1.9.4 | ESX Recommended: 1.10.1

Installation for QBCore

Step 1

Go to resources folder and put into that folder the resource

Step 2

Then go to server.cfg and put ensure origen_notify

Step 3 (Client Side)

If you want to change the Notifications for your server. In your script qb-core/client/functions.lua search for the existing Notify function. It might look something like: function QBCore.Functions.Notify(...)

When you find this section in your file, remplace this code for this code:

function QBCore.Functions.Notify(text, texttype, length) 
    exports["origen_notify"]:ShowNotification(text) 
end

Step 4 (Server Side)

Now we will proceed to replace the notifications on the server side, for this we will go to qb-core/server/functions.lua. We will look for the function QBCore.Functions.Notify(...). and we will replace it with the following code:

function QBCore.Functions.Notify(source, text, texttype, length) 
    exports["origen_notify"]:ShowNotification(source, text) 
end

Step 5 (Change the DrawText)

  1. Locate the file: In your script, qb-core/client/drawtext.lua:

  2. Replace the code with this file:

local buffer = {}

local function hideText()
    for k, v in pairs(buffer) do
        exports['origen_notify']:RemoveHelp(v)
        buffer[k] = nil
    end
end

local function drawText(text)
    if buffer[text] then return end
    local key = ""
    local formattedText = text or ""

      if string.find(formattedText, "%[.-%]") then
          key, formattedText = string.match(formattedText, "%[(.)%](.+)"), text:gsub("%[.-%]", "")
      end

      if string.find(formattedText, "%~.-%~") then
          key, formattedText = string.match(formattedText, "~(.-)~"), text:gsub("~(.-)~", "")
          if key == "INPUT_ENTER" then
              key = "F"
          else
              key = "E"
          end
      end
      if key == "" then key = "E" end
    buffer[text] = exports['origen_notify']:CreateHelp(key, formattedText or text)
end

local function changeText(text, position)
    if type(position) ~= 'string' then position = 'left' end

    SendNUIMessage({
        action = 'CHANGE_TEXT',
        data = {
            text = text,
            position = position
        }
    })
end

local function keyPressed()
    CreateThread(function() -- Not sure if a thread is needed but why not eh?
        SendNUIMessage({
            action = 'KEY_PRESSED',
        })
        Wait(500)
        hideText()
    end)
end

RegisterNetEvent('qb-core:client:DrawText', function(text, position)
    drawText(text, position)
end)

RegisterNetEvent('qb-core:client:ChangeText', function(text, position)
    changeText(text, position)
end)

RegisterNetEvent('qb-core:client:HideText', function()
    hideText()
end)

RegisterNetEvent('qb-core:client:KeyPressed', function()
    keyPressed()
end)

exports('DrawText', drawText)
exports('ChangeText', changeText)
exports('HideText', hideText)
exports('KeyPressed', keyPressed)

Step 6

Enjoy!! 😄

Last updated