From 6232541cfb0bc8fc0f6632c6bdec5524ecceb709 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Sun, 9 May 2021 04:53:57 +1000 Subject: [PATCH] Use PrimaryIdentifier --- server/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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