From 47d389e60c18801fa4b8eb2b9f0ba922f393a727 Mon Sep 17 00:00:00 2001 From: Mycroft Date: Fri, 23 Sep 2022 14:41:42 +0100 Subject: [PATCH] fix(es_extended): Weapons Fix Maybe? --- [esx]/es_extended/config.weapons.lua | 47 ++++------------------------ 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/[esx]/es_extended/config.weapons.lua b/[esx]/es_extended/config.weapons.lua index 74d8dcc7..53c09ae2 100644 --- a/[esx]/es_extended/config.weapons.lua +++ b/[esx]/es_extended/config.weapons.lua @@ -961,13 +961,8 @@ Config.Weapons = { -- Tools {name = 'WEAPON_FIREEXTINGUISHER', label = _U('weapon_fireextinguisher'), components = {}, ammo = {label = _U('ammo_charge'), hash = `AMMO_FIREEXTINGUISHER`}}, {name = 'WEAPON_DIGISCANNER', label = _U('weapon_digiscanner'), components = {}}, - {name = 'GADGET_PARACHUTE', label = _U('gadget_parachute'), components = {}} -} -if not IsDuplicityVersion() then - ESX.TriggerServerCallback('esx:getGameBuild', function(GameBuild) - if GameBuild >= 2699 then - local Length = #Config.Weapons - Config.Weapons[Length + 1] = { + {name = 'GADGET_PARACHUTE', label = _U('gadget_parachute'), components = {}, + { name = 'WEAPON_TACTICALRIFLE', label = _U('weapon_tactilerifle'), ammo = {label = _U('ammo_rounds'), hash = `AMMO_RIFLE`}, @@ -979,8 +974,8 @@ if not IsDuplicityVersion() then {name = 'grip', label = _U('component_grip'), hash = `COMPONENT_AT_AR_AFGRIP`}, {name = 'suppressor', label = _U('component_suppressor'), hash = `COMPONENT_AT_AR_SUPP_02`} } - } - Config.Weapons[Length + 2] = { + }, + { name = 'WEAPON_PRECISIONRIFLE', label = _U('weapon_precisionrifle'), ammo = {label = _U('ammo_rounds'), hash = `AMMO_SNIPER`}, @@ -988,36 +983,6 @@ if not IsDuplicityVersion() then components = { {name = 'clip_default', label = _U('component_clip_default'), hash = `COMPONENT_PRECISIONRIFLE_CLIP_01`}, } - } - Config.Weapons[Length+ 3] = {name = 'WEAPON_METALDETECTOR', label = _U('weapon_metaldetector'), components = {}} - end - end) -else - local GameBuild = tonumber(GetConvar("sv_enforceGameBuild", 1604)) - if GameBuild >= 2699 then - local Length = #Config.Weapons - Config.Weapons[Length + 1] = { - name = 'WEAPON_TACTICALRIFLE', - label = _U('weapon_tactilerifle'), - ammo = {label = _U('ammo_rounds'), hash = `AMMO_RIFLE`}, - tints = Config.DefaultWeaponTints, - components = { - {name = 'clip_default', label = _U('component_clip_default'), hash = `COMPONENT_TACTICALRIFLE_CLIP_01`}, - {name = 'clip_extended', label = _U('component_clip_extended'), hash = `COMPONENT_TACTICALRIFLE_CLIP_02`}, - {name = 'flashlight', label = _U('component_flashlight'), hash = `COMPONENT_AT_AR_FLSH_REH`}, - {name = 'grip', label = _U('component_grip'), hash = `COMPONENT_AT_AR_AFGRIP`}, - {name = 'suppressor', label = _U('component_suppressor'), hash = `COMPONENT_AT_AR_SUPP_02`} - } + }, + {name = 'WEAPON_METALDETECTOR', label = _U('weapon_metaldetector'), components = {}} } - Config.Weapons[Length + 2] = { - name = 'WEAPON_PRECISIONRIFLE', - label = _U('weapon_precisionrifle'), - ammo = {label = _U('ammo_rounds'), hash = `AMMO_SNIPER`}, - tints = Config.DefaultWeaponTints, - components = { - {name = 'clip_default', label = _U('component_clip_default'), hash = `COMPONENT_PRECISIONRIFLE_CLIP_01`}, - } - } - Config.Weapons[Length+ 3] = {name = 'WEAPON_METALDETECTOR', label = _U('weapon_metaldetector'), components = {}} - end -end \ No newline at end of file