😡
RAINMAD Documentation
WebsiteStoreDiscordYouTube
  • Welcome to RAINMAD Scripts
  • INFORMATION
    • FAQ
    • Support and Assistance
    • Discord Roles
    • How to Update Your Asset
  • CFX Auth system
    • FiveM Asset Escrow System
  • Development Guide
    • Common Issues
    • How to Add Webhooks
    • Target Options Configuration
    • How to Translate Your Script
    • How to Integrate Your Custom Notification Script
    • How to Change the Black Money Name
    • How to Add an Item
    • How to Change the Dispatch
    • Framework Selection and Configuration
    • Finding Item Images
  • RESOURCES
    • Cargo Ship Heist
      • Installation
      • Dependencies
      • Translate Strings
      • Discord Log
      • Configuration
      • Exports
    • Below the Vault Heist
      • Installation
    • NPC Mechanic
      • Installation
      • Configuration Guide
    • Cash Exchange Heist
      • Installation
      • Dependencies
    • Drugs V: Grow, Cook & Space!
      • Installation
      • Configuration Guide
    • Drugs V: Laboratories
      • Installation
      • Configuration Guide
    • Drugs V: Goods Deal
      • Installation
      • Configuration Guide
    • Drugs V: Business Labs
      • Installation
      • Configuration Guide
    • Drugs V: Effects
      • Installation
      • Configuration Guide
      • Exports
    • Drugs V: Money Laundering
      • Installation
      • Configuration Guide
    • Bank Truck Robbery - 4 in 1!
      • Installation
      • Dependencies
      • Translate Strings
      • Discord Log
      • Events & Exports
      • Disable Mission NPC
    • House Robbery with Welding Minigame
      • Installation
      • Dependencies
      • Inventory Integration
      • Translate Strings
      • Discord Log
      • Creating a House for Robbery
      • Events & Exports
      • Disable Mission NPC
    • Lootbag
      • Installation
    • Bounty Board
      • Installation
    • Chopshop with Welding Minigame
      • Installation
      • Dependencies
      • Translate Strings
      • Discord Log
      • Events & Exports
      • Disable Mission NPC
    • Scenes: Draw everywhere
      • Installation
      • Add Text Font
      • Events & Exports
    • Vault Heist
      • Installation
      • Vehicle Mods
      • Dependencies
    • Barge Heist
      • Installation
      • Dependencies
    • Towtruck + Missions
      • Installation
    • Zombies & Dungeon
      • Installation
      • Rarity System
    • Gangs - Territory, Wars & Tribute Zones!
      • Installation
      • Add Gang & Tribute Zone
      • Events & Exports
      • Gang System for ESX
    • Camper V: Drug Caravans
      • Installation
      • Dependencies
    • Realistic Airdrop
      • Installation
    • ATM Robbery - 4 in 1!
      • Installation
    • Bobcat Security Heist
      • Installation
      • Dependencies
    • Minigame Bundle
      • Installation
      • Minigame Exports
      • Translate Strings
    • Weapon V: Realism
      • Installation
    • Boombox with Watch Party
      • Installation
      • Youtube API Key
      • Exports
    • Drop and Dead Info.
      • Installation
    • Throw Everything
      • Installation
      • Useable Items
      • Exports
      • QBCore Compatibility
      • ESX Compatibility
    • Police Riot with Interior
      • Installation
      • Dependencies
    • Dialog with NPC
      • Installation
    • Gun Store Heist
      • Installation
      • Dependencies
    • Emoji V: Share Feelings
      • Installation
    • Illegal Corners: Selling Goods
      • Installation
      • Adding a New Corner
    • Decal V: Graffiti & Vehicle Sticker
      • Installation
      • Custom Decal
      • Events & Exports
    • Hacker V: Become Hacker
      • Installation
      • Custom Hack
      • Functions & Events
    • Weed Shop Heist
      • Installation
      • Dependencies
    • Jailbreak
      • Installation
      • Dependencies
    • Vangelico Heist Final
      • Installation
      • Dependencies
    • Pets
      • Installation
      • QBCore Compatible
    • Artifact Heist
      • Installation
    • Betta Heist
      • Installation
    • Oil Rig Heist
      • Installation
      • Dependencies
    • Fleeca Heist Final
      • Installation
      • Dependencies
    • Deluxe Car Heist
      • Installation
    • Yacht Heist
      • Installation
    • Paleto Heist
      • Installation
    • Union Heist
      • Installation
    • Shop Robbery
      • Installation
    • Drug Boat Heist
      • Installation
    • Underground Heist
      • Installation
      • Dependencies
    • Van Heist
      • Installation
      • Dependencies
    • Pacific Heist
      • Installation
      • Dependencies
    • Train Heist
      • Installation
    • Humane Labs Heist
      • Installation
    • Vangelico Heist
      • Installation
    • Fleeca Heist
      • Installation
    • Casino Heist
      • Installation
      • Dependencies
      • Compatible For Rcore
    • Art Heist
      • Installation
      • Dependencies
    • Kidnapping
      • Installation
    • Graffiti War
      • Installation
Powered by GitBook
On this page
  • How to Integrate Your Custom Notification Script (Old & New File Structure)
  • 🔄 New Files: Using bridge/frameworks/client/esx.lua or qb.lua
  • Step 1: Locate the Framework File
  • Step 2: Find the madCore.showNotify Function
  • Step 3: Replace It With Your Custom Notification Script
  • Step 4: Test the Integration
  • 🗂️ Old Files: Using editable_client.lua
  • Step 1: Locate editable_client.lua
  • Step 2: Find the ShowNotification Function
  • Step 3: Integrate Your Custom Notification
  • Step 4: Test Your Integration
  • ⚠️ Troubleshooting & Best Practices
  1. Development Guide

How to Integrate Your Custom Notification Script

How to Integrate Your Custom Notification Script (Old & New File Structure)

Custom notifications help enhance player experience by using personalized or visually styled messages. Below are the instructions for both the old integration method using editable_client.lua and the new method using bridge/frameworks/client/[framework].lua files (esx.lua or qb.lua depending on your framework).


🔄 New Files: Using bridge/frameworks/client/esx.lua or qb.lua

This is the recommended method for newer versions of the script.

Step 1: Locate the Framework File

Access Your Server Files: Connect via FTP or a file manager.

Navigate to the Notification File: Go to the following directory based on your framework: resources/[your_script]/bridge/frameworks/client/ Open either esx.lua or qb.lua depending on what your server uses.

Step 2: Find the madCore.showNotify Function

Search for this function inside the file:

madCore.showNotify = function(msg)
    -- Default notification logic here
end

This function is called internally whenever the script needs to display a notification.

Step 3: Replace It With Your Custom Notification Script

Example using okokNotify:

madCore.showNotify = function(msg)
    exports['okokNotify']:Alert('Alert', msg, 3000, 'info', true)
end

You can modify it to fit any custom notification script (e.g., mythic_notify, ox_lib, etc.).

Step 4: Test the Integration

  • Restart your server.

  • Trigger an event that sends a notification.

  • Verify that the custom notification appears in-game.


🗂️ Old Files: Using editable_client.lua

This method was used in older versions of the script for managing notifications.

Step 1: Locate editable_client.lua

  • Access your server files via FTP or a file manager.

  • Navigate to the directory where your client scripts are located.

  • Open editable_client.lua using a text editor like Notepad++ or VS Code.

Step 2: Find the ShowNotification Function

Search for this default notification function:

function ShowNotification(msg)
    SetNotificationTextEntry('STRING')
    AddTextComponentString(msg)
    DrawNotification(false, true)
end

Step 3: Integrate Your Custom Notification

Replace the contents of the function with your custom notification script. For example, using okokNotify:

function ShowNotification(msg)
    exports['okokNotify']:Alert('Alert', msg, 3000, 'info', true)
end

Save the file after making changes.

Step 4: Test Your Integration

  • Restart your server.

  • Perform any action that triggers a notification.

  • Confirm that your custom notification is working in-game.


⚠️ Troubleshooting & Best Practices

  • Notification Not Showing? Ensure the custom script is installed, started in server.cfg, and referenced properly.

  • Console Errors? Check the F8 client console or server logs for syntax or export-related errors.

  • Performance Issues? Optimize the custom script and test for any FPS drops or delays.

  • Make Backups: Always back up original files before editing them.

  • Check Docs: Refer to your custom notification script's documentation for detailed usage instructions.

PreviousHow to Translate Your ScriptNextHow to Change the Black Money Name

Last updated 17 days ago