From 54261ecb4e59270ba3b6f8e5716970bfe9eacab9 Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:25:04 +0100 Subject: [PATCH] Add function to retrieve player's full name from character info --- client/functions.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/functions.lua b/client/functions.lua index 45034a5..b329f24 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -36,6 +36,11 @@ function QBCore.Functions.HasItem(items, amount) return exports['qb-inventory']:HasItem(items, amount) end +function exports.Functions.GetName() + local charinfo = QBCore.PlayerData.charinfo + return charinfo.firstname .. ' ' .. charinfo.lastname +end + ---@param entity number - The entity to look at ---@param timeout number - The time in milliseconds before the function times out ---@param speed number - The speed at which the entity should turn