Create a function for retrieving a players identifier

This commit is contained in:
Linden
2021-05-09 14:44:44 +10:00
committed by GitHub
parent eff2c7cbd9
commit b705d75404
+9
View File
@@ -239,6 +239,15 @@ ESX.GetPlayerFromIdentifier = function(identifier)
end
end
ESX.GetIdentifier = function(playerId)
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
if string.match(v, 'license') then
local identifier = string.gsub(v, 'license:', '')
return identifier
end
end
end
ESX.RegisterUsableItem = function(item, cb)
ESX.UsableItemsCallbacks[item] = cb
end