diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index b4682df7b..2b4339fe8 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -52,10 +52,10 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, if Config.Multichar then local startIndex = identifier:find(":", 1) if startIndex then - self.license = ("license%s"):format(identifier:sub(startIndex, identifier:len())) + self.license = ("%s%s"):format(Config.Identifer, identifier:sub(startIndex, identifier:len())) end else - self.license = ("license:%s"):format(identifier) + self.license = ("%s:%s"):format(Config.Identifer, identifier) end if type(self.metadata.jobDuty) ~= "boolean" then @@ -968,4 +968,4 @@ local function runStaticPlayerMethod(src, method, ...) return xPlayer[method](...) end -exports("RunStaticPlayerMethod", runStaticPlayerMethod) \ No newline at end of file +exports("RunStaticPlayerMethod", runStaticPlayerMethod) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 8366c069b..272ee0577 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -380,8 +380,8 @@ function ESX.GetIdentifier(playerId) playerId = tostring(playerId) - local identifier = GetPlayerIdentifierByType(playerId, "license") - return identifier and identifier:gsub("license:", "") + local identifier = GetPlayerIdentifierByType(playerId, Config.Identifier) + return identifier and identifier:gsub(Config.Identifier .. ":", "") end ---@param model string|number @@ -650,4 +650,4 @@ end ---@return CExtendedVehicle? function ESX.GetExtendedVehicleFromPlate(plate) return Core.vehicleClass.getFromPlate(plate) -end \ No newline at end of file +end diff --git a/[core]/es_extended/shared/config/main.lua b/[core]/es_extended/shared/config/main.lua index 108d292d6..96b7d5146 100644 --- a/[core]/es_extended/shared/config/main.lua +++ b/[core]/es_extended/shared/config/main.lua @@ -64,3 +64,4 @@ if GetResourceState("ox_inventory") ~= "missing" then end Config.EnableDefaultInventory = Config.CustomInventory == false -- Display the default Inventory ( F2 ) +Config.Identifier = GetConvar("esx:identifier", "license")