Skip to content
CustomCodex edited this page Aug 19, 2024 · 3 revisions

codex-slowdown

AutoNotify

Overview

codex-slowdown is a FiveM ESX script designed to enhance roleplay realism by slowing down vehicles when their tires are shot and logging these events to a Discord webhook.


Features

  • Vehicle Speed Reduction: Automatically slows down vehicles to a specified speed (e.g., 5 km/h) when any tire is shot.
  • Discord Webhook Logging: Logs tire burst events to a Discord channel using a webhook.
  • Single Log per Tire Burst: Prevents spam by sending only one log per tire burst until the vehicle’s tires are repaired or the vehicle is exited.
  • Customizable Configuration: Easily adjust settings like speed limits, webhook URLs, and log icons in config.lua.

Installation

  1. Download the Repository

    • Clone or download the repository and place it in your resources folder within your FiveM server directory.
  2. Add to server.cfg

    • Open your server.cfg file and add:
      start codex-slowdown
      
  3. Restart Your Server

    • Restart your FiveM server to apply the changes.

Configuration

Edit config.lua to customize the script:

  • Config.SlowdownSpeed: Speed (in km/h) vehicles will slow down to when a tire is burst. Default is 5.0.
  • Config.CheckFrequency: Frequency (in milliseconds) for checking tire status. Default is 100.
  • Config.OnlyPlayerVehicles: Set to true to affect only player-controlled vehicles. Default is true.
  • Config.LogTireBurst: Set to true to enable logging of tire burst events to the server console. Default is false.
  • Config.WebhookURL: Your Discord webhook URL.
  • Config.EmbedIconURL: URL for the icon in the Discord embed message.
  • Config.EmbedTitle: Title for the Discord embed message.

Usage

Once installed and configured, the script will automatically reduce vehicle speed when a tire is shot. The event will be logged to your Discord channel with a structured and non-spammy log entry.


Support and Customization

For support, customization requests, or any issues, please reach out to info@hutsakeee.nl.

You can also open an issue or submit a pull request on GitHub.


License

This script is released under the MIT License. See the LICENSE file in the repository for more details.

Clone this wiki locally