From 45c4b666082dc77d42365750a613f2c847a94c1e Mon Sep 17 00:00:00 2001 From: Arctos2win <116841243+Arctos2win@users.noreply.github.com> Date: Sun, 3 Sep 2023 11:20:57 +0200 Subject: [PATCH] improve fetching identifier in es_extended ( same way as in multichar ) --- [core]/es_extended/server/functions.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 5284362b..91586005 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -287,12 +287,9 @@ function ESX.GetIdentifier(playerId) if fxDk == 1 then return "ESX-DEBUG-LICENCE" end - for _, v in ipairs(GetPlayerIdentifiers(playerId)) do - if string.match(v, 'license:') then - local identifier = string.gsub(v, 'license:', '') - return identifier - end - end + + local identifier = GetPlayerIdentifierByType(playerId, 'license') + return identifier and identifier:gsub('license:', '') end ---@param model string|number