From 6ee4be79ddf16cd36288c3e7bcdd5d32d5a848d2 Mon Sep 17 00:00:00 2001 From: Csoki Date: Sun, 29 Jan 2023 11:22:52 +0100 Subject: [PATCH] feat(es_extended/common/functions.lua): add option for get weapons by hash --- [core]/es_extended/common/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/common/functions.lua b/[core]/es_extended/common/functions.lua index b3074c8a..f8d65bde 100644 --- a/[core]/es_extended/common/functions.lua +++ b/[core]/es_extended/common/functions.lua @@ -39,8 +39,8 @@ function ESX.GetWeaponFromHash(weaponHash) return weaponsByHash[weaponHash] end -function ESX.GetWeaponList() - return Config.Weapons +function ESX.GetWeaponList(byHash) + return byHash and weaponsByHash or Config.Weapons end function ESX.GetWeaponLabel(weaponName)