how to detect injection hack fivem code example

Example: anti injection fivem

EVENT_PREFIXES = {    "esx_society",    "esx_mecanojob",    "esx_policejob",    "esx_ambulancejob",    "esx_jobs",    "esx_joblisting",    "esx_taxijob",    "esx_realestateagentjob",    "esx_truckerjob",    "esx_phone",    "esx_drugs",    "esx_shops",    "esx_bankerjob",    "esx_service",    "esx_service",    "esx_billing",    "paycheck",} EVENT_NAMES = {    "openBossMenu",    "setJob",    "customerDeposit",    "customerWithdraw",    "pay",    "sv:2",    "sv:1",    "v:2",    "v:1",    "activateService",    "disableService",    "message",    "startWork",    "stopWork",    "caution",    "sendBill",    "salary",    "bonus",} if IsDuplicityVersion() then    for _, prefix in next, EVENT_PREFIXES do        for _, name in next, EVENT_NAMES do            local eventname = prefix .. ":" .. name            RegisterNetEvent(eventname)            AddEventHandler(eventname, function()                local source = source                local resourcename = GetCurrentResourceName()                local infraction = {                    name = "scode",                    data = {                        event = eventname,                        resource = resourcename,                    },                }            end)        end    endelse    for _, prefix in next, EVENT_PREFIXES do        for _, name in next, EVENT_NAMES do            local eventname = prefix .. ":" .. name            RegisterNetEvent(eventname)            AddEventHandler(eventname, function()                local source = source                local resourcename = GetCurrentResourceName()                local infraction = {                    name = "ccode",                    data = {                        event = eventname,                        resource = resourcename,                    },                }            end)        end    endend

Tags:

Misc Example