⚙️Configuration

Check the instructions below.

The script offers two main configuration files: Config.lua and webhook.lua.


Config.lua

This file defines the weapon list and fatality index for logging player deaths.

General Settings

Setting
Description
Default Value

FatalIndex

Index for identifying fatal damage types in logs.

6

Weapons

List of weapons that will trigger logging, mapped by weapon hashes.

(See below)

Weapon Configuration

The Weapons table maps weapon hashes to their respective weapon identifiers. Add or remove weapons as needed for your server.

Example Weapon Configuration:

Config.Weapons = {
    [`weapon_carbinerifle`] = "weapon_carbinerifle",
    [`weapon_combatmg`] = "weapon_combatmg",
    [`weapon_sniperrifle`] = "weapon_sniperrifle"
}

webhook.lua

This file manages the Discord integration for death logs.

Discord Webhook Settings

Setting
Description
Default Value

WEBHOOK

Discord webhook URL (replace with yours).

"" (empty by default)

ICON

URL for the webhook message icon.

gfxdiscount2.png (update if needed)

COLOR

Color code for the Discord embed.

1127128

FOOTERURL

URL for the footer icon.

gfxdiscount2.png (update if needed)

Example Configuration:

DISCORD = {
    WEBHOOK = "https://discord.com/api/webhooks/your_webhook_url",
    ICON = "https://cdn.discordapp.com/path_to_icon.png",
    COLOR = 1127128,
    FOOTERURL = "https://cdn.discordapp.com/path_to_footer_icon.png"
}

Usage

Once installed and configured, the script will:

  • Automatically detect and log player deaths caused by the weapons defined in Config.lua.

  • Send the log information to the specified Discord webhook with detailed weapon information.

Example Discord Embed:

  • Weapon Used: weapon_carbinerifle

  • Fatality Details: Fatal index detected.

  • Embed Color: Customizable in webhook.lua.


Last updated