โญ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 integrationConfig.HonorPoolEnabled&Config.HonorPoolTickMsโ enable and tune honor poolConfig.DogHashes/Config.CatHashesโ define which animals are considered dogs or catsBonus/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, thehonorAdded()function inconfig.luawill 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, thehonorRemoved()function inconfig.luawill 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:
ignoreAddFunctionandignoreRemoveFunctionare optional parameters (default =false).These allow you to bypass the default functions
honorAdded()andhonorRemoved()inconfig.luaif 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)
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