From b705d75404431bfb667eac5192ce72020255b52f Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Sun, 9 May 2021 14:44:44 +1000 Subject: [PATCH] Create a function for retrieving a players identifier --- server/functions.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/functions.lua b/server/functions.lua index b3fe38a9..a87a5a70 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -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