A lightweight, high-performance logging system for FiveM designed to send detailed, formatted Discord webhooks. It features automated player identifier retrieval, cooldown protection to prevent spam, and a flexible placeholder system for custom data.
- Automated Identifiers: Automatically pulls Discord ID, Steam Profile, FiveM License, and more.
- Template System: Define your webhooks in a central config with easy-to-use
{placeholder}tags. - Anti-Spam: Built-in 3-second cooldown per player to prevent webhook rate-limiting.
- Ox Lib Integration: Utilizes
ox_libfor standardized coding practices. - Multi-Context: Exports available for both Server and Client-side scripts.
- Ensure you have
ox_libinstalled as it is a shared dependency. - Place the
perc-loggingfolder into your resources directory. - Configure your Discord Webhook URLs in
server/config.lua. - Add
ensure perc-loggingto yourserver.cfg.
This is how it can look. (Using my rental script)
Use this in your server scripts to log sensitive actions.
exports['perc-logging']:SendLog(source, 'pawnshop', {
amount = 5,
item = 'Gold Watch',
money_amount = 1500,
money_type = 'money'
})Use this for client-side triggers. It automatically triggers a server event to process the log.
exports['perc-logging']:SendLog('pawnshop', {
amount = 1,
item = 'Diamond Ring',
money_amount = 5000,
money_type = 'black_money'
})