Merge pull request #1031 from Swellington-Soares/main

refactor: update GetIdentifier to use new native
This commit is contained in:
Kakarot
2023-11-09 21:29:54 -05:00
committed by GitHub
+1 -7
View File
@@ -22,13 +22,7 @@ end
---@param idtype string
---@return string?
function QBCore.Functions.GetIdentifier(source, idtype)
local identifiers = GetPlayerIdentifiers(source)
for _, identifier in pairs(identifiers) do
if string.find(identifier, idtype) then
return identifier
end
end
return nil
return GetPlayerIdentifierByType(source, idtype or "license")
end
---Gets a players server id (source). Returns 0 if no player is found.