tweak: move things to config

This commit is contained in:
Mycroft
2022-08-20 14:06:56 +01:00
parent 14303a6906
commit 3e32a1a55f
2 changed files with 16 additions and 3 deletions
+3 -2
View File
@@ -110,7 +110,7 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin)
})
end
SetDefaultVehicleNumberPlateTextPattern(-1, 'ESX.A111')
SetDefaultVehicleNumberPlateTextPattern(-1, Config.CustomAIPlates)
FreezeEntityPosition(PlayerPedId(), false)
StartServerSyncLoops()
end)
@@ -299,10 +299,10 @@ AddEventHandler('esx:spawnVehicle', function(vehicle)
SetVehicleDirtLevel(vehicle, 0)
SetVehicleFuelLevel(vehicle, 100.0)
-- SetVehicleCustomSecondaryColour(vehicle, 55, 140, 191) -- ESX Blue
-- SetVehicleCustomPrimaryColour(vehicle, 0, 0, 0) -- white
SetEntityAsMissionEntity(vehicle, true, true) -- Persistant Vehicle
-- Max out vehicle upgrades
if Config.MaxAdminVehicles then
SetVehicleExplodesOnHighExplosionDamage(vehicle, true)
SetVehicleModKit(vehicle, 0)
SetVehicleMod(vehicle, 11, 3, false) -- modEngine
@@ -320,6 +320,7 @@ AddEventHandler('esx:spawnVehicle', function(vehicle)
SetVehicleNeonLightEnabled(vehicle, i, true)
end
SetVehicleNeonLightsColour(vehicle, 55, 140, 191) -- ESX Blue
end
end)
else
ESX.ShowNotification('Invalid vehicle model.')
+13 -1
View File
@@ -17,7 +17,7 @@ Config.EnableDebug = false -- Use Debug options?
Config.EnableDefaultInventory = true -- Display the default Inventory ( F2 )
Config.EnableWantedLevel = false -- Use Normal GTA wanted Level?
Config.EnablePVP = true -- Allow Player to player combat
Config.NativeNotify = false -- true = old esx notification
Config.NativeNotify = false -- use old native notification?
Config.Multichar = true -- Enable support for esx_multicharacter
Config.Identity = true -- Select a characters identity data before they have loaded in (this happens by default with multichar)
@@ -52,3 +52,15 @@ Config.RemoveHudCommonents = {
[21] = false, --HUD_COMPONENTS
[22] = false, --HUD_WEAPONS
}
Config.CustomAIPlates = 'ESX.A111' -- Custom plates for AI vehicles
-- Pattern string format
--1 will lead to a random number from 0-9.
--A will lead to a random letter from A-Z.
-- . will lead to a random letter or number, with 50% probability of being either.
--^1 will lead to a literal 1 being emitted.
--^A will lead to a literal A being emitted.
--Any other character will lead to said character being emitted.
-- A string shorter than 8 characters will be padded on the right.
Config.MaxAdminVehicles = true -- admin vehicles spawn with max vehcle settings