mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 23:01:29 +00:00
Merge pull request #1031 from Swellington-Soares/main
refactor: update GetIdentifier to use new native
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user