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.
Navigate to esx_license/server/main.lua
Find function
RemoveLicense
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