diff --git a/server/main.lua b/server/main.lua index cf4e90b5..57ff5640 100644 --- a/server/main.lua +++ b/server/main.lua @@ -14,8 +14,8 @@ function onPlayerJoined(playerId) local identifier for k,v in ipairs(GetPlayerIdentifiers(playerId)) do - if string.match(v, 'license:') then - identifier = string.sub(v, 9) + if string.match(v, Config.PrimaryIdentifier) then + identifier = string.gsub(v, Config.PrimaryIdentifier..':', '') break end end @@ -65,8 +65,8 @@ AddEventHandler('playerConnecting', function(name, setCallback, deferrals) Citizen.Wait(100) for k,v in ipairs(GetPlayerIdentifiers(playerId)) do - if string.match(v, 'license:') then - identifier = string.sub(v, 9) + if string.match(v, Config.PrimaryIdentifier) then + identifier = string.gsub(v, Config.PrimaryIdentifier..':', '') break end end