Skip to content

AradAshkan/FiveM-Anti-Spoofer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿšจ Arad's Setwarn & Anti-Cheat System ๐Ÿ›ก๏ธ

Welcome to Arad's Setwarn & Anti-Cheat System, a powerful Lua script designed for FiveM servers using the ESX framework. This system allows server admins to manage player warnings and detect potential spoofers with ease, all while integrating seamlessly with your MySQL database and Discord for alerts! ๐ŸŽ‰

โœจ Features

  • Setwarn Command ๐Ÿ“

    • Admins can issue warnings to players using their Steam Hex.
    • Supports adding, updating, and removing warnings.
    • Displays warnings to admins every 5 seconds for active warned players.
    • Usage: /setwarn [SteamHex] [Warn Text] or /setwarn [SteamHex] to remove.
  • Anti-Cheat System ๐Ÿ”

    • Monitors player HWIDs to detect potential spoofers.
    • Compares player HWIDs against a banlist table in the database.
    • Alerts admins in-game and sends notifications to a Discord webhook when a suspicious player is detected.
  • Database Integration ๐Ÿ—„๏ธ

    • Stores warnings in a setwarn table with details like Steam Hex, warning note, admin name, and timestamp.
    • Supports checking for banned HWIDs in a banlist table.
  • Discord Webhook Alerts ๐Ÿ“ข

    • Sends real-time notifications to your Discord server when a spoofer is detected.

๐Ÿ› ๏ธ Installation

  1. Clone the Repository ๐Ÿ“ฅ

    git clone https://github.com/aradashkan/FiveM-Anti-Spoofer.git
  2. Add to Your Server ๐Ÿ–ฅ๏ธ

    • Copy the script folder to your server's resources directory.
    • Add ensure Anti-Spoofer to your server.cfg.
  3. Set Up the Database ๐Ÿ—ƒ๏ธ

    • Import the provided setwarn.sql file into your MySQL database to create the setwarn table.
    • Ensure your banlist table exists with a hwid column for the anti-cheat system.
  4. Configure Discord Webhook ๐ŸŒ

    • Replace "Your_Discord_Webhook_URL_Here" in the script with your actual Discord webhook URL.
  5. Restart Your Server ๐Ÿ”„

    • Restart your FiveM server or use refresh followed by start Anti-Spoofer.

๐Ÿ“š Database Setup

The script requires a MySQL database with the following tables:

setwarn Table

Stores player warnings with details.

CREATE TABLE IF NOT EXISTS `setwarn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `identifier` varchar(255) NOT NULL,
  `note` text DEFAULT NULL,
  `admin` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

banlist Table

Stores banned HWIDs for the anti-cheat system (ensure it has a hwid column).

๐ŸŽฎ Usage

  • Set a Warning:

    /setwarn steam:1100001xxxxxxx "Breaking server rules"
  • Remove a Warning:

    /setwarn steam:1100001xxxxxxx
  • Admin Notifications:

    • Admins with permission_level > 0 receive in-game warnings every 5 seconds for active warned players.
    • Spoofer alerts are sent to admins and Discord when a player's HWID matches a banned one.

๐Ÿ›ก๏ธ Permissions

  • The /setwarn command requires admin level 5 (es:addAdminCommand level 5).
  • Only admins with permission_level > 0 receive warning and spoofer alerts.

๐ŸŒŸ Contributing

Contributions are welcome! ๐Ÿ™Œ Feel free to open issues or submit pull requests to improve the script. Make sure to follow the code style and test your changes.

๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.

๐Ÿ™ Credits

Enjoy keeping your FiveM server safe and organized! ๐Ÿš€

About

๐Ÿšจ FiveM Warn & Anti-Cheat ๐Ÿ›ก๏ธ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages