Merge branch 'esx-framework:main' into main

This commit is contained in:
Mathu-lmn
2022-08-01 10:36:19 +02:00
committed by GitHub
5 changed files with 69 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
# These are supported funding model platforms
patreon: esx
ko_fi: esxframework
custom: https://esx-framework.tebex.io
+26
View File
@@ -300,6 +300,32 @@ AddEventHandler('esx:spawnVehicle', function(vehicle)
ESX.Game.SpawnVehicle(model, playerCoords, playerHeading, function(vehicle)
TaskWarpPedIntoVehicle(ESX.PlayerData.ped, vehicle, -1)
SetVehicleDirtLevel(vehicle, 0)
SetVehicleFuelLevel(vehicle, 100.0)
SetVehicleCustomSecondaryColour(vehicle, 55, 140, 191) -- ESX Blue
SetVehicleCustomPrimaryColour(vehicle, 0, 0, 0) -- white
--SetVehicleCustomPrimaryColour(vehicle, 55, 140, 191) -- ESX Blue
-- SetVehicleCustomSecondaryColour(vehicle, 0, 0, 0) -- white
SetEntityAsMissionEntity(vehicle, true, true) -- Persistant Vehicle
-- Max out vehicle upgrades
SetVehicleExplodesOnHighExplosionDamage(vehicle, true)
SetVehicleModKit(vehicle, 0)
SetVehicleMod(vehicle, 11, 3, false) -- modEngine
SetVehicleMod(vehicle, 12, 2, false) -- modBrakes
SetVehicleMod(vehicle, 13, 2, false) -- modTransmission
SetVehicleMod(vehicle, 15, 3, false) -- modSuspension
SetVehicleMod(vehicle, 16, 4, false) -- modArmor
ToggleVehicleMod(vehicle, 18, true) -- modTurbo
SetVehicleTurboPressure(vehicle, 100.0)
SetVehicleNumberPlateText(vehicle, "ESX KISS")
SetVehicleNumberPlateTextIndex(vehicle, 1)
SetVehicleNitroEnabled(vehicle, true)
for i=0, 3 do
SetVehicleNeonLightEnabled(vehicle, i, true)
end
SetVehicleNeonLightsColour(vehicle, 55, 140, 191) -- ESX Blue
end)
else
ESX.ShowNotification('Invalid vehicle model.')
+30
View File
@@ -963,3 +963,33 @@ Config.Weapons = {
{name = 'WEAPON_DIGISCANNER', label = _U('weapon_digiscanner'), components = {}},
{name = 'GADGET_PARACHUTE', label = _U('gadget_parachute'), components = {}}
}
local GameBuild = tonumber(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
+5
View File
@@ -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',
+3 -2
View File
@@ -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