diff --git a/[esx]/es_extended/config.weapons.lua b/[esx]/es_extended/config.weapons.lua index 036dcf9c..bcdff67a 100644 --- a/[esx]/es_extended/config.weapons.lua +++ b/[esx]/es_extended/config.weapons.lua @@ -963,3 +963,33 @@ Config.Weapons = { {name = 'WEAPON_DIGISCANNER', label = _U('weapon_digiscanner'), components = {}}, {name = 'GADGET_PARACHUTE', label = _U('gadget_parachute'), components = {}} } + + local GameBuild = GetConvar("sv_enforceGameBuild", 1604) + + -- The Criminal Enterprises DLC Weapons + 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 = GetHashKey("AMMO_RIFLE")}, + tints = Config.DefaultWeaponTints, + components = { + {name = 'clip_default', label = _U('component_clip_default'), hash = GetHashKey("COMPONENT_TACTICALRIFLE_CLIP_01")}, + {name = 'clip_extended', label = _U('component_clip_extended'), hash = GetHashKey("COMPONENT_TACTICALRIFLE_CLIP_02")}, + {name = 'flashlight', label = _U('component_flashlight'), hash = GetHashKey("COMPONENT_AT_AR_FLSH_REH")}, + {name = 'grip', label = _U('component_grip'), hash = GetHashKey("COMPONENT_AT_AR_AFGRIP")}, + {name = 'suppressor', label = _U('component_suppressor'), hash = GetHashKey("COMPONENT_AT_AR_SUPP_02")} + } + } + Config.Weapons[Length + 2] = { + name = 'WEAPON_PRECISIONRIFLE', + label = _U('weapon_precisionrifle'), + ammo = {label = _U('ammo_rounds'), hash = GetHashKey("AMMO_SNIPER")}, + tints = Config.DefaultWeaponTints, + components = { + {name = 'clip_default', label = _U('component_clip_default'), hash = GetHashKey("COMPONENT_PRECISIONRIFLE_CLIP_01")}, + } + } + Config.Weapons[Length+ 3] = {name = 'WEAPON_METALDETECTOR', label = _U('weapon_metaldetector'), components = {}} + end \ No newline at end of file diff --git a/[esx]/es_extended/locales/en.lua b/[esx]/es_extended/locales/en.lua index d8775c83..9657d36a 100644 --- a/[esx]/es_extended/locales/en.lua +++ b/[esx]/es_extended/locales/en.lua @@ -208,6 +208,11 @@ Locales['en'] = { ['weapon_rpg'] = 'Rocket Launcher', ['weapon_rayminigun'] = 'Widowmaker', + -- Criminal Enterprises DLC + ['weapon_metaldetector'] = 'Metal Detector', + ['weapon_precisionrifle'] = 'Precision Rifle', + ['weapon_tactilerifle'] = 'Service Carbine', + -- Thrown ['weapon_ball'] = 'Baseball', ['weapon_bzgas'] = 'BZ Gas', diff --git a/[esx]/es_extended/server/commands.lua b/[esx]/es_extended/server/commands.lua index e4ad1cb5..2f99fdbd 100644 --- a/[esx]/es_extended/server/commands.lua +++ b/[esx]/es_extended/server/commands.lua @@ -19,11 +19,12 @@ end, true, {help = _U('command_setjob'), validate = true, arguments = { }}) ESX.RegisterCommand('car', 'admin', function(xPlayer, args, showError) - if not args.car then args.car = "Prototipo" end + local GameBuild = tonumber(GetConvar("sv_enforceGameBuild", 1604)) + if not args.car then args.car = GameBuild >= 2699 and "DRAUGUR" or "Prototipo" end xPlayer.triggerEvent('esx:spawnVehicle', args.car) end, false, {help = _U('command_car'), validate = false, arguments = { {name = 'car', help = _U('command_car_car'), type = 'any'} -}}) +}}) ESX.RegisterCommand({'cardel', 'dv'}, 'admin', function(xPlayer, args, showError) if not args.radius then args.radius = 4 end