From 35fdca273abbf5e6ebf3e6a317027998ffc51eb1 Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Thu, 20 Nov 2025 11:15:17 +0000 Subject: [PATCH 1/3] Update main.lua --- shared/main.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shared/main.lua b/shared/main.lua index b514dd553..7b5794ef4 100644 --- a/shared/main.lua +++ b/shared/main.lua @@ -173,3 +173,11 @@ QBShared.FemaleNoGloves = { [161] = true, [165] = true } + +--- Get a shared item from a shared field +--- @param namespace 'Vehicles' | 'VehicleHashes' | 'Items' | 'Gangs' | 'Jobs' | 'Locations' | 'Weapons' +--- @param item string +--- @return table +function GetShared(namespace, item) + return QBCore.Shared[namespace][item] +end \ No newline at end of file From 98b6c5bf1f221b417ebe70e96c72673d32ddc518 Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:52:30 +0000 Subject: [PATCH 2/3] Actualizar main.lua --- shared/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/main.lua b/shared/main.lua index 7b5794ef4..68a29a9a6 100644 --- a/shared/main.lua +++ b/shared/main.lua @@ -179,5 +179,5 @@ QBShared.FemaleNoGloves = { --- @param item string --- @return table function GetShared(namespace, item) - return QBCore.Shared[namespace][item] + return QBCore.Shared[namespace]?[item] end \ No newline at end of file From 3da7c33b97e5483c05bc4d0c63bc231b74b0c533 Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Thu, 20 Nov 2025 16:07:22 +0000 Subject: [PATCH 3/3] feat: Add shared utility functions, starter items, glove data, and a GetShared helper. --- shared/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/main.lua b/shared/main.lua index 68a29a9a6..b92ba6ff2 100644 --- a/shared/main.lua +++ b/shared/main.lua @@ -180,4 +180,6 @@ QBShared.FemaleNoGloves = { --- @return table function GetShared(namespace, item) return QBCore.Shared[namespace]?[item] -end \ No newline at end of file +end + +exports('GetShared', GetShared) \ No newline at end of file