FiveM Docs
es_extendedConfig

Adjustments Config

es_extended adjustments.lua explained. Toggle PvP, wanted level, dispatch, NPC density, HUD components, AI plates and Discord Rich Presence in ESX Legacy.

shared/config/adjustments.lua holds client-side game tweaks that es_extended applies when a player has loaded: PvP, wanted level, dispatch, NPC scenarios, population density, HUD components, number plates for AI traffic and Discord Rich Presence. Change them to tune the feel of the world without writing a separate resource.

Overview

FactValue
Filees_extended/shared/config/adjustments.lua
Applied byclient/modules/adjustments/*.lua on esx:playerLoaded
SideClient (file is shared)
Apply changesRestart the server; players must reconnect

Toggles

KeyTypeDefaultEffect when enabled
DisableHealthRegenerationbooleanfalseSets the health recharge multiplier to 0.
DisableVehicleRewardsbooleanfalsePlayers no longer get weapons from entering police or military vehicles. Runs every frame.
DisableNPCDropsbooleanfalseNPCs no longer drop carbine rifle, pistol and pump shotgun pickups.
DisableDispatchServicesbooleantrueTurns off all 15 AI dispatch services and the police scanner.
DisableScenariosbooleantrueDisables a list of world vehicle scenarios (parked and driving AI vehicles, police cars, boats, planes) and paparazzi.
DisableAimAssistbooleanfalseSets free-aim targeting mode, mainly affects controller players.
DisableVehicleSeatShuffbooleanfalseStops the automatic shuffle from passenger to driver seat.
DisableDisplayAmmobooleanfalseHides the ammo counter. Runs every frame.
EnablePVPbooleantrueAllows players to damage each other (friendly fire).
EnableWantedLevelbooleanfalseKeeps the normal GTA wanted level. When false, ESX clears it and sets the maximum to 0.

The key is spelled DisableVehicleSeatShuff (without the final "le"). Use it exactly like that.

RemoveHudComponents

A list indexed by HUD component ID. true hides the component.

IDComponentDefault
1Wanted starsfalse
2Weapon iconfalse
3Cashfalse
4MP cashfalse
5MP messagefalse
6Vehicle nametrue
7Area nametrue
8Vehicle classtrue
9Street nametrue
10Help textfalse
11Floating help text 1false
12Floating help text 2false
13Cash changefalse
14Reticlefalse
15Subtitle textfalse
16Radio stationsfalse
17Saving gamefalse
18Game streamfalse
19Weapon wheelfalse
20Weapon wheel statsfalse
21HUD componentsfalse
22HUD weaponsfalse

Setting [16] = true also turns the vehicle radio off and disables radio control whenever the player enters a vehicle.

Multipliers

Population density, applied every frame on each client.

KeyDefaultNative
pedDensity1.0SetPedDensityMultiplierThisFrame
scenarioPedDensityInterior0.0SetScenarioPedDensityMultiplierThisFrame (interior)
scenarioPedDensityExterior1.0SetScenarioPedDensityMultiplierThisFrame (exterior)
ambientVehicleRange1.0SetAmbientVehicleRangeMultiplierThisFrame
parkedVehicleDensity1.0SetParkedVehicleDensityMultiplierThisFrame
randomVehicleDensity1.0SetRandomVehicleDensityMultiplierThisFrame
vehicleDensity1.0SetVehicleDensityMultiplierThisFrame
shared/config/adjustments.lua
Config.Multipliers = {
    pedDensity = 0.6,
    scenarioPedDensityInterior = 0.0,
    scenarioPedDensityExterior = 0.6,
    ambientVehicleRange = 1.0,
    parkedVehicleDensity = 0.5,
    randomVehicleDensity = 0.5,
    vehicleDensity = 0.5,
}

Changing density at runtime

The client also listens to the global state bag esx:populationDensity. A server resource can set it to override pedDensity, vehicleDensity and randomVehicleDensity for everyone, for example during an event. Values must be between 0 and 1. When pedDensity is set, it also replaces both scenario ped values; when vehicleDensity is set, it also replaces parkedVehicleDensity.

server/events.lua
GlobalState["esx:populationDensity"] = { pedDensity = 0.2, vehicleDensity = 0.1, randomVehicleDensity = 0.1 }

-- back to Config.Multipliers
GlobalState["esx:populationDensity"] = nil

CustomAIPlates

TypeDefault
string"........"

Number plate pattern for AI vehicles, passed to SetDefaultVehicleNumberPlateTextPattern.

CharacterResult
1random digit 0-9
Arandom letter A-Z
.random letter or digit (50/50)
^1a literal 1
^Aa literal A
anything elsethat character

Patterns shorter than 8 characters are padded on the right.

Config.CustomAIPlates = "LS^A 1111" -- e.g. "LSA 4821"

DiscordActivity

Discord Rich Presence for every player. Disabled while appId is 0.

KeyTypeDefaultDescription
appIdnumber0Discord application ID.
assetNamestring"LargeIcon"Name of the large image asset uploaded to the application.
assetTextstring"{server_name}"Hover text of the image.
buttonstable[]Join and Discord buttonsUp to two { label, url } entries.
presencestring"{player_name} [{player_id}] | {server_players}/{server_maxplayers}"Status text.
refreshnumber60000Update interval in milliseconds.

Placeholders you can use in presence, assetText and button URLs:

PlaceholderValue
{server_name}sv_projectName convar
{server_endpoint}server IP and port
{server_players}current player count
{server_maxplayers}sv_maxClients
{player_name}FiveM name
{player_rp_name}character name
{player_id}server ID
{player_street}current street name
Config.DiscordActivity = {
    appId = 123456789012345678,
    assetName = "logo",
    assetText = "{server_name}",
    buttons = {
        { label = "Join Server", url = "fivem://connect/{server_endpoint}" },
        { label = "Discord", url = "https://discord.gg/yourserver" },
    },
    presence = "{player_rp_name} | {server_players}/{server_maxplayers}",
    refresh = 60 * 1000,
}

Frequently asked questions

Independent documentation

esx-fivem.com is a community project and is not affiliated with the ESX Framework team. Facts on this page were checked against the upstream source. Official resources: docs.esx-framework.org and github.com/esx-framework.
Edit on GitHub

Last updated on

On this page