License revocation


Customization for esx_license

If you are an esx_license user, you need to make some change in your esx_license, as it does not have an export to delete license by default.

  1. Navigate to esx_license/server/main.lua

  2. Find function RemoveLicense

  3. Add under the export function

---@param identifier target identifier
---@param licenseType license type
---@param cb callback function
local function RemoveLicense(identifier, licenseType, cb)
    MySQL.update('DELETE FROM user_licenses WHERE type = ? AND owner = ?', {licenseType, identifier}, function(rowsChanged)
        if cb then
            cb(rowsChanged)
        end
    end)
end
exports('RemoveLicense', RemoveLicense) -- ADDED

Last updated