/FIveM_Discord_Log

Script to report some logs on your Discord server for FiveM

Primary LanguageLuaGNU General Public License v3.0GPL-3.0

JOIN THE DISCORD FOR SUPPORT

Licence Licence Discord Status

This is a server log script for FiveM, which is used to log certain actions that are being made in the server.

🛠 Requirements

  • A Discord Server
  • FXServer

✅ Main Features

  • Basic logs:
    • Chat Logs (Messages typed in chat)
    • Join Logs (When i player is connecting to the sever)
    • Leave Logs (When a player disconnects from the server)
    • Death Logs (When a player dies/get killed)
    • Shooting Logs (When a player fires a weapon)
    • Resource Logs (When a resouce get started/stopped)
  • Plugin Support
    • Easy way to add more logs to JD_logs with plugins. (More plugins will be released soon!)
  • Optional custom logs
    • Easy to add with the export.

🔧 Download & Installation

  1. Download the files
  2. Put the JD_logs folder in the server resource directory
  3. Add this to your server.cfg
ensure JD_logs

📝 Creating Custom Logs

  1. Add the following code to your function/command.
    This code needs to be added in the resource of the action you want to log.
exports.JD_logs:discord('EMBED_MESSAGE', PLAYER_ID, PLAYER_2_ID, 'COLOR', 'WEBHOOK_CHANNEL')

EMBED_MESSAGE: This will be the message send in the top of the embed.
PLAYER_ID: This will send the player to the script to get the info. (This needs to be a server id)
PLAYER_2_ID: This will send the second player's to the script to get the info. (This needs to be a server id)
COLOR: This will be the color of the embed. (You can use Decimal colors or Hex colors.)
WEBHOOK_CHANNEL: This will be the webhook channel listed in the config.lua.

  1. Create a discord channel with webhook and add this to the webhooks.
local webhooks = {
	all = "DISCORD_WEBHOOK",
	chat = "DISCORD_WEBHOOK",
	joins = "DISCORD_WEBHOOK",
	leaving = "DISCORD_WEBHOOK",
	deaths = "DISCORD_WEBHOOK",
	shooting = "DISCORD_WEBHOOK",
	resources = "DISCORD_WEBHOOK",
	WEBHOOK_CHANNEL = "DISCORD_WEBHOOK", <------
}

This can be found in the config.lua

❓ For more questions you can join the discord here: https://discord.gg/m4BvmkG

📦 Change Log
V1.3.0 • Added Plugin Support
V1.1.6 • Fixed Death logs issue
V1.1.5 • Bug fix/code clean up
V1.1.4 • Bug fixes
V1.1.3 • Bug fixes
V1.1.2 • Added: License Identifier Config.license = true
• Added: Player IP address Config.IP = true
V1.1.1 • Added hex color code support. (Old decimal color codes will still work.)
• Added option to hide player info on exports. (Very simple just change the PLAYER_ID to 0 and it wont show any info.)
V1.1.0 • Reworked Export function. (Now with identifier support)
V1.0.4 • Added Nearest Postal For This Postal Map
• Added check if the identifier is available ( Prevents some errors :slight_smile: )
• Fixed some small bugs
V1.0.3 • Added Discord Identifier
• Added Steam Profile URL
• Fixed Death Reason
• Player commited suicide
• Player was murdered
• Player Died (Other reasons like getting run over or random explosions)
V1.0.2 • Added more Customizations
  • Bot's Username
  • Bot's Avatar
  • Embed Community Name
  • Embed Community Logo
• Color settings for default Events
• Added Player ID to default Events
• Added Option to enable/disable Player ID
• Added option to enable/disable Steam ID
V1.0.1 • Added option to disable Shooting Logs
V1.0.0 • All log channel
• Log to seperate channels
• Log from server or client side
• Easy changeble Avatar and Username