fix(es_extended): Weapons Fix Maybe?

This commit is contained in:
Mycroft
2022-09-23 14:41:42 +01:00
committed by GitHub
parent 26f5327d3a
commit 47d389e60c
+6 -41
View File
@@ -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