This commit is contained in:
Mycroft
2021-04-06 22:56:56 +01:00
parent 372774b8e4
commit 1036043629
2 changed files with 56 additions and 35 deletions
+28 -10
View File
@@ -13,12 +13,21 @@ end)
function onPlayerJoined(playerId)
local identifier
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
if string.match(v, 'license:') then
identifier = string.sub(v, 9)
break
end
if not Config.UseKashacters then
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
if string.match(v, 'license:') then
identifier = string.sub(v, 9)
break
end
end
else
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
if string.match(v, 'license:') then
identifier = v
break
end
end
end
if identifier then
if ESX.GetPlayerFromIdentifier(identifier) then
@@ -55,11 +64,20 @@ AddEventHandler('playerConnecting', function(name, setCallback, deferrals)
local playerId, identifier = source
Citizen.Wait(100)
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
if string.match(v, 'license:') then
identifier = string.sub(v, 9)
break
end
if not Config.UseKashacters then
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
if string.match(v, 'license:') then
identifier = string.sub(v, 9)
break
end
end
else
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
if string.match(v, 'license:') then
identifier = v
break
end
end
end
if identifier then