From 5f538da0dba5c518c7fc31fef755c4e39d1ccaf2 Mon Sep 17 00:00:00 2001 From: Amir_Lynx <60301485+AmirLynx@users.noreply.github.com> Date: Tue, 1 Nov 2022 22:35:02 +0330 Subject: [PATCH] refactor(esx_license/server.lua): move to config --- [esx_addons]/esx_license/server/main.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/[esx_addons]/esx_license/server/main.lua b/[esx_addons]/esx_license/server/main.lua index ff864678..89f2efe8 100644 --- a/[esx_addons]/esx_license/server/main.lua +++ b/[esx_addons]/esx_license/server/main.lua @@ -1,9 +1,5 @@ local licenses = {} -local allowedJobs = { - ['police'] = true -} - MySQL.ready(function() local p = promise.new() MySQL.query('SELECT type, label FROM licenses', function(result) @@ -102,7 +98,7 @@ RegisterNetEvent('esx_license:removeLicense') AddEventHandler('esx_license:removeLicense', function(target, licenseType, cb) local xPlayer = ESX.GetPlayerFromId(source) if xPlayer then - if allowedJobs[xPlayer.getJob().name] then + if Config.allowedJobs[xPlayer.getJob().name] then local xTarget = ESX.GetPlayerFromId(target) if xTarget then RemoveLicense(xTarget.getIdentifier(), licenseType, cb)