DyScript
  • Welcome
  • Official Store
  • Discord
  • Assets
    • ds-arcade
      • Installation
      • FAQ
      • Configuration Files
      • Mapping
    • ds-soundbuildings
      • Installation
      • FAQ
      • Configuration Files
    • ds-carkeys
      • Installation
      • FAQ
      • Configuration Files
      • Developer API
        • Client Exports
        • Serveur Exports
      • Commands
    • ds-notifications
      • Installation
      • Show code
      • FAQ
      • Developer API
        • Client Exports
        • Serveur Exports
    • ds-pedoffline
      • Installation
      • FAQ
      • Configuration Files
      • SQL
    • ds-freecam
      • Installation
      • FAQ
      • Configuration Files
Powered by GitBook
On this page
  • 1. Start Resource
  • 2. Modification es_extended
  • 3. Start Resource
  1. Assets
  2. ds-notifications

Installation

Last updated 8 days ago

1. Start Resource

Download the purchased resource from - the official site of FiveM with purchased resources.

2. Modification es_extended

Before running your script, you need to modify the following files in es_extended:

Go to client/functions.lua and make the changes below. Replace line 156:

function ESX.ShowNotification(message, notifyType, length)
    return IsResourceFound('esx_notify') and exports['esx_notify']:Notify(notifyType, length, message)
end

With:

ESX.ShowNotification = function(msg, flash, saveToBrief, hudColorIndex, title, subject, icon)
    exports['ds-notification']:addNotification(nil, nil, nil, nil, msg, 10000)
end

Then replace line 178:

function ESX.ShowAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
    AddTextEntry("esxAdvancedNotification", msg)
    BeginTextCommandThefeedPost("esxAdvancedNotification")
    if hudColorIndex then
        ThefeedSetNextPostBackgroundColor(hudColorIndex)
    end
    EndTextCommandThefeedPostMessagetext(textureDict, textureDict, false, iconType, sender, subject)
    EndTextCommandThefeedPostTicker(flash, saveToBrief == nil or saveToBrief)
end

With:

ESX.ShowAdvancedNotification = function(title, subject, msg, banner, timeout, icon)
    exports['ds-notification']:addNotification(banner, nil, title, subject, msg, 10000)
end

3. Start Resource

To start a resource in your server.cfg, ensure that it begins after your framework has been initiated. For instance, if you are using a framework like es_extended, you should start resource after it, like so:

ensure [core] # For example, here is your framework (esx/qb-core)

# DyScrypt Resources
ensure ds-notifications

# Here you run your other resources like esx_policejob etc.

Ensure there are no syntax errors or incorrect paths in your server.cfg.

CFX Portal