refactor: update GetIdentifier to use new native

This commit is contained in:
Swellington Soares
2023-10-28 03:51:39 -03:00
parent 4e184ba1c8
commit de1931911d
+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.