A simple, highly secure, and lightweight resource that bridges your Multi Theft Auto: San Andreas (MTA:SA) server with Discord using webhooks. Operating 100% server-side, it ensures maximum performance and complete protection against client-side script manipulation.
- π¬ Global Chat Logging: Forwards main chat messages to Discord while respecting mute systems (
wasEventCancelled). - πͺ Join & Quit Logs: Tracks player connection and disconnection events, including quit reasons.
- βοΈ Sync Kill Logs: Tracks player kills, weapon types, suicides, and vehicle run-overs safely without server crashes.
- π‘οΈ Mention Abuse Protection: Built-in
allowed_mentionspayload prevents players from abusing@everyoneor@herepings in Discord. - π¨ Clean Name Formatting: Automatically strips MTA hex color codes (
#HEXHEX) for clean Discord logs. - β‘ 100% Server-Side: Zero client-side assets required, eliminating exploit entry points.
- β Built-in Config Validation: Automatically tests webhook URLs on server start and reports misconfigurations in the console.
- Download or clone this repository.
- Place the
mta-discord-bridgefolder inside your server'sserver/mods/deathmatch/resources/directory. - Open
config.luaand paste your Discord Webhook URLs. - Refresh resources and start the script in the server console:
refresh
start mta-discord-bridge
Because this resource sends HTTP requests via fetchRemote, it requires specific access permissions.
When you start the script for the first time, MTA will register an ACL request. You can grant access safely via the server console:
aclrequest allow mta-discord-bridge function.fetchRemote
β οΈ Security Warning: Do NOT add this resource to theAdminACL group. Granting full administrative access to logging resources is unsafe and unnecessary.
Customize your webhooks inside config.lua:
Config = {}
Config.mainWebhook = "YOUR_JOIN_QUIT_WEBHOOK"
Config.chatWebhook = "YOUR_CHAT_WEBHOOK"
Config.killWebhook = "YOUR_KILL_WEBHOOK"
If any webhook URL is missing or improperly formatted, the script will output a helpful warning message directly in your server log on startup.