🛠️Ignored Events
Sometimes, certain events may cause issues with event protection, or you may have specific events that you don’t want to be protected for various reasons. For such cases, we’ve included an option to ignore specific events in the configuration.
🛠️ How to Use Ignored Events
In the configuration, you can define a list of events that you want to exclude from protection. The best way to figure out which events to ignore is to test your server. If you notice that certain events are being flagged or causing issues (such as false positives or triggering unintended behavior), you can add them to the Ignored Events list.
Here’s an example configuration with a set of commonly ignored events for QB-Core related servers. This base configuration has been tested on a clean install:
PrettyPacketAC.IgnoredEvents = {
["qb-core:server:GetObject"] = true,
["QBCore:GetObject"] = true,
["QBCore:Server:GetObject"] = true,
["QBCore:Server:TriggerCallback"] = true,
["qb-multicharacter:server:loadUserData"] = true,
["qb-log:server:CreateLog"] = true,
["QBCore:Server:TriggerClientCallback"] = true,
["rpc:call"] = true,
["QBCore:ToggleDuty"] = true,
["QBCore:Server:OnPlayerLoaded"] = true,
["apartments:server:CreateApartment"] = true,
["QBCore:Server:OnPlayerUnload"] = true,
["QBCore:Server:PlayerLoaded"] = true,
}
📜 Now with Regex
If you have an event you want to match you can do this and it will ignore all events that start with the event name.
["baseevents:*"] = true
📜 Instructions:
Copy and paste the event names into the
PrettyPacketAC.IgnoredEvents
table.If you’re running a different framework (other than QB-Core), you can modify the list to suit your needs. Test and add/remove events based on your server’s behavior.
Be sure to test thoroughly — events that are ignored should not be triggering unwanted protection.
⚠️ Important Considerations
Test first!: Make sure to test your server and log which events are causing issues. Only ignore events that are causing disruptions or false triggers.
Keep it updated: If you update your server or install new resources, you may need to review and update the ignored events list to accommodate any new events.
This allows you to fine-tune the protection system and ensure it works smoothly with your custom resources and events.
Once configured, your server will ignore these events from the event protection system, and you can avoid unnecessary interruptions. Let us know if you encounter any issues, and we’re happy to help! 😊
Last updated