mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 20:01:27 +00:00
feat: Support for the latest Criminal Enterprises DLC
Enforce your gamemode to build `2699` to use them :)
This commit is contained in:
@@ -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
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user