😡
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 Add Your Webhook (Old & New File Structure)
  • 🔄New Files: Using server/discord_log.lua
  • Step 1: Obtain Your Webhook URL
  • Step 2: Locate the discord_log.lua File
  • Step 3: Insert Your Webhook URL
  • 🗂️ Old Files: Using editable_server.lua
  • Step 1: Obtain Your Webhook URL
  • Step 2: Locate the editable_server.lua File
  • Step 3: Insert Your Webhook URL
  • Step 4: Test the Webhook
  • ⚠️ Troubleshooting & Security Tips
  1. Development Guide

How to Add Webhooks

How to Add Your Webhook (Old & New File Structure)

Webhooks are essential for integrating external services like Discord with your FiveM server. They can be used to log player activity, send notifications, or track in-game events. Below you will find instructions for both the old file structure (editable_server.lua) and the new file structure (server/discord_log.lua).


🔄New Files: Using server/discord_log.lua

This is the recommended and updated method for configuring your webhook.

Step 1: Obtain Your Webhook URL

Create or Use an Existing Webhook: Set up a webhook using your preferred platform (e.g., Discord). Once created, copy the webhook URL.

Keep the URL Secure: Treat your webhook URL like a password. Never share it publicly or store it in unsecured locations.

Step 2: Locate the discord_log.lua File

Access Your Server Files: Connect to your server using FTP or a file manager.

Navigate to the Correct Path: Go to the server directory inside your script folder and locate the discord_log.lua file: resources/[your_script]/server/discord_log.lua

Open the File: Use a text editor such as VS Code or Notepad++ to open it.

Step 3: Insert Your Webhook URL

Find the configuration section that looks like this:

discord = {
    ['webhook'] = 'https://discord.com/api/webhooks/xxxxxxxx/xxxxxxxx',
    ['name'] = 'Rainmad Scripts',
    ['image'] = 'https://cdn.discordapp.com/avatars/869260464775921675/dff6a13a5361bc520ef126991405caae.png?size=1024',
}

Replace the 'webhook' value with your actual Discord webhook URL. Paste it inside the quotation marks. Do not change any other lines unless necessary.

Step 4: Test Your Webhook

  • Restart Your Server to apply the changes.

  • Perform an action that triggers the webhook (e.g., player join, command usage).

  • Check your Discord channel to see if the message was sent.


🗂️ Old Files: Using editable_server.lua

This method was used in older versions of the script.

Step 1: Obtain Your Webhook URL

Create or Use an Existing Webhook: If you haven't already, create a webhook in your preferred service (e.g., Discord, Slack). Copy the webhook URL provided by the service.

Keep the URL Secure: Treat your webhook URL like a password. Do not share it publicly or expose it in unsecured locations.

Step 2: Locate the editable_server.lua File

Access Your Server Files: Connect to your server via FTP or your file manager. Navigate to the directory where your server's scripts are stored.

Open editable_server.lua: Locate the editable_server.lua file in the script directory. Open the file using a text editor like Notepad++ or VS Code.

Step 3: Insert Your Webhook URL

Find the Webhook Section: Search for a comment like -- Webhooks. You should see a block like this:

discord = {
    ['webhook'] = 'https://discord.com/api/webhooks/xxxxxxxx/xxxxxxxx',
    ['name'] = 'Rainmad Scripts',
    ['image'] = 'https://cdn.discordapp.com/avatars/869260464775921675/dff6a13a5361bc520ef126991405caae.png?size=1024',
}

Replace the placeholder webhook URL with your actual one, keeping it inside the quotation marks.

Step 4: Test the Webhook

  • Restart your server.

  • Perform an action that would trigger the webhook.

  • Check your Discord (or other service) to ensure it was received.


⚠️ Troubleshooting & Security Tips

  • Webhook not working? Double-check the URL for typos and ensure it’s placed correctly in the respective file.

  • No events triggered? Confirm that the server is set up to fire the events linked to the webhook.

  • Security Reminder: Never share your webhook URL publicly. Treat it like a password.

PreviousCommon IssuesNextTarget Options Configuration

Last updated 17 days ago