molfar_audit / Rules / LUA003

LUA003 Deprecated API

warning Lua code

RegisterServerEvent, the old esx:getSharedObject / QBCore:GetObject events, or looping over GetPlayerIdentifiers.

Why it matters

Deprecated APIs keep working for now but are slower, unsupported, or will be removed.

How to fix

Use the modern replacement shown below.

Reported
RegisterServerEvent('job:pay')
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
for _, id in ipairs(GetPlayerIdentifiers(src)) do ... end
Fixed
RegisterNetEvent('job:pay')
local ESX = exports.es_extended:getSharedObject()
local license = GetPlayerIdentifierByType(src, 'license')

Not a problem in your case?

Add -- molfar-audit-ignore LUA003 on the reported line (or the line above it), or ignore it in config.json: "ignore": [{ "rule": "LUA003", "resource": "your_resource" }].