โญHonor system

A lightweight, configurable Honor System for RedM. Players gain or lose honor from good deeds and crimes. Includes a smoothing pool, Discord logs, UI texts, and server exports for easy integration.


โœจ Features

  • Honor gain/loss per action (good vs. crime)

  • Honor Pool (optional): smooths changes over time instead of instant jumps

  • Discord webhook logs with customizable display name

  • Configurable detection interval (ScanInterval)

  • Honor titles for male/female, from Living Saint โ†’ Living Demon

  • Keybind to display current honor (default LALT)

  • Extendable animal detection (DogHashes, CatHashes)

  • Server exports to read/update honor

  • StateBags for client-side access


โš™๏ธ Configuration

All configuration is done in config.lua.

  • Config.ScanInterval โ†’ frequency of crime/good deed scans (in seconds)

  • Config.DiscordWebHook & Config.DiscordName โ†’ webhook integration

  • Config.HonorPoolEnabled & Config.HonorPoolTickMs โ†’ enable and tune honor pool

  • Config.DogHashes / Config.CatHashes โ†’ define which animals are considered dogs or cats

  • Bonus/Malus values โ†’ fully adjustable (BanditKillBonus, InnocentKillMalus, etc.)


๐Ÿ–ฅ๏ธ Server Exports

The resource provides several exports to interact with the honor system from other scripts.

Add Honor

  • src โ†’ player ID

  • amount_to_add โ†’ amount of honor to give (positive number)

  • ignoreAddFunction (optional, default: false) โ†’

    • If true, the honorAdded() function in config.lua will not be triggered.

    • If false, honorAdded() will be triggered as usual.


Remove Honor

  • src โ†’ player ID

  • amount_to_remove โ†’ amount of honor to remove (positive number)

  • ignoreRemoveFunction (optional, default: false) โ†’

    • If true, the honorRemoved() function in config.lua will not be triggered.

    • If false, honorRemoved() will be triggered as usual.


Set Honor

  • src โ†’ player ID

  • new_honor_value โ†’ directly sets the playerโ€™s honor to this value (overwrites previous honor).


Get Honor

  • src โ†’ player ID

  • return โ†’ current honor value of the player (number).


โš ๏ธ Note:

  • ignoreAddFunction and ignoreRemoveFunction are optional parameters (default = false).

  • These allow you to bypass the default functions honorAdded() and honorRemoved() in config.lua if you donโ€™t want them to run.


๐Ÿ“ฆ StateBags

Each player has a StateBag key honor automatically synchronized to clients.

This makes it easy to display honor in your UI or use it in other scripts without additional events.


๐Ÿ”” Discord Integration

  • Send logs of honor changes, publications and removals directly to Discord.

  • Fully configurable webhook URL and bot name.

  • Example messages include player name, honor before/after and player coords.


๐ŸŽฎ Keybind

Default key: LALT (Config.DisplayHonorKey = 0x8AAA0AD4) Shows the playerโ€™s current honor when pressed.


๐Ÿ“Š Honor Titles

Players see dynamic descriptions of their reputation depending on honor range.

  • Separate sets for male and female characters.

  • Categories: Transcendent, Legendary, Very High, High, Neutral, Low, Very Low, Abysmal, Damned.


๐Ÿ“‘ Example Configuration (config.lua)

Below is a partial extract of the configuration file.

โ„น๏ธ The full configuration file is included in the script. This example only shows the main adjustable options.


๐Ÿ“Œ Notes

  • The script is encrypted for distribution.

  • All customization is available via config.lua.

  • Fully compatible with VORP framework and other resources through exports & StateBags.

Last updated