local ClientConfig = require "config.client" local _trace = Citizen.Trace function error(...) local resource = GetCurrentResourceName() print(string.format("----- RESOURCE ERROR -----")) print(...) print(string.format("------ PLEASE REPORT THIS TO STAFF ------")) print(string.format("------ IDEALLY WITH CLIPS & SCREENSHOTS OF WHAT YOU'RE DOING ------")) TriggerServerEvent("Error:Server:Report", resource, ...) end ---@diagnostic disable-next-line: duplicate-set-field function Citizen.Trace(...) if type(...) == "string" then local args = string.lower(...) for _, word in ipairs(ClientConfig.errorWords) do if string.find(args, word) then error(...) return end end end _trace(...) end