VMS Cityhall
-- Licenses:
SV.removeLicense = function(src, xPlayer, xIdentifier, licenseName)
if GetResourceState('esx_license') == 'started' then
--[[
By default export exports['esx_license']:RemoveLicense does not exist in esx_license
Go to our documentation and add this export according to the guide.
]]
local success, response = pcall(function()
exports['esx_license']:RemoveLicense(xIdentifier, licenseName)
end)
if not success then
library.Debug(
'You have not implemented custom export RemoveLicense() in your esx_license, there is a tutorial in our documentation.',
'warn')
end
if GetResourceState('vms_driveschoolv2') == 'started' then
TriggerEvent('esx_license:getLicenses', src, function(licenses)
TriggerClientEvent('vms_driveschoolv2:cl:getLicenses', src, licenses)
end)
end
elseif GetResourceState('Buty-license') == 'started' then
exports['Buty-license']:RemoveLicense(xIdentifier, 'driving', licenseName)
elseif GetResourceState('bcs_licensemanager') == 'started' then
exports.bcs_licensemanager:RevokeLicense(src, licenseName, xPlayer.source)
else
if Config.Core == "QB-Core" then
local licensesList = xPlayer.PlayerData.metadata['licences']
licensesList[licenseName] = false
xPlayer.Functions.SetMetaData('licences', licensesList)
if GetResourceState('vms_driveschoolv2') == 'started' then
TriggerClientEvent('vms_driveschoolv2:cl:getLicenses', src)
end
end
end
end
Last updated on