> For the complete documentation index, see [llms.txt](https://docs.pescripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pescripts.com/scripts/phud/installation.md).

# Installation

{% stepper %}
{% step %}

#### Install

Install the resource on your Keymaster after purchasing the script. <mark style="color:$primary;">(</mark>[<mark style="color:$primary;">https://portal.cfx.re/</mark>](https://portal.cfx.re/)<mark style="color:$primary;">)</mark>&#x20;

{% endstep %}

{% step %}

#### Drag And Drop

Please place the carplay resource on your base.
{% endstep %}

{% step %}

### Start

Next, please make sure that the **HUD** resource is added in your `server.cfg` or `resources.cfg`.\
Start this resource at the very bottom of your resources list.

{% endstep %}

{% step %}

### Config script

Configure your resource in the `config.lua` file.
{% endstep %}
{% endstepper %}

<details>

<summary>Here is the <code>config.lua</code> file. ESX/QB</summary>

```lua
-----------------------------------------------
-- PHUD - Main Configuration
-- Configuration principale
-----------------------------------------------

Config = {}

-----------------------------------------------
-- Language / Langue
-----------------------------------------------
Config.Locale = 'en' -- en, fr, de, es, ru, zh
-- FR: Langue utilisée pour les messages et l'interface
-- EN: Language used for messages and UI

-----------------------------------------------
-- Framework Settings / Paramètres Framework
-----------------------------------------------
Config.Framework = "auto" -- auto, esx, qb, standalone
-- FR: Framework utilisé (auto = détection automatique)
-- EN: Framework used (auto = automatic detection)

Config.ESXExport = "es_extended"
-- FR: Nom de la ressource ESX
-- EN: ESX resource name

-----------------------------------------------
-- Performance / Performance
-----------------------------------------------
Config.UpdateInterval = 150
-- FR: Intervalle de mise à jour en ms (plus bas = plus fluide mais plus gourmand)
-- EN: Update interval in ms (lower = smoother but more resource intensive)

Config.HideInPauseMenu = true
-- FR: Masquer le HUD quand le menu pause est ouvert
-- EN: Hide HUD when pause menu is open

-----------------------------------------------
-- Server Info / Informations Serveur
-----------------------------------------------
Config.ServerName = "PEScripts"
-- FR: Nom du serveur affiché en haut à droite
-- EN: Server name displayed in top right

Config.ServerLogo = "logo.png"
-- FR: Logo du serveur (fichier dans html/assets/)
-- EN: Server logo (file in html/assets/)

Config.LogoAnimation = "bounce"
-- FR: Animation du logo (none, pulse, glow, rotate, bounce)
-- EN: Logo animation (none, pulse, glow, rotate, bounce)
-- Note: Les animations peuvent causer une légère baisse de FPS

-----------------------------------------------
-- Discord Integration / Intégration Discord
-----------------------------------------------
Config.ShowDiscord = true
Config.DiscordInvite = "discord.gg/pescripts"
Config.DiscordLink = "https://discord.gg/pescripts"

-----------------------------------------------
-- Keybinds / Raccourcis Clavier
-----------------------------------------------
Config.DefaultKeybind = "F6" -- Open settings / Ouvrir les paramètres
Config.ToggleKeybind = "F7" -- Toggle HUD / Activer/désactiver le HUD

-----------------------------------------------
-- Minimap Settings / Paramètres Minimap
-----------------------------------------------
Config.ShowMinimap = false
-- FR: Afficher la minimap par défaut
-- EN: Show minimap by default

Config.AllowMinimapToggle = true
-- FR: Autoriser le joueur à activer/désactiver la minimap
-- EN: Allow player to toggle minimap

Config.BottomLeftHudOffset = 360
-- FR: Décalage du HUD en bas à gauche (augmenter si chevauchement avec minimap)
-- EN: Bottom left HUD offset (increase if overlapping with minimap)

-----------------------------------------------
-- HUD Position / Position du HUD
-----------------------------------------------
Config.ManualHUDOffset = {
    x = 15, -- Horizontal offset / Décalage horizontal
    y = 0   -- Vertical offset / Décalage vertical
}

Config.MoveHudWhenMinimapDisabled = true
-- FR: Déplacer automatiquement le HUD quand la minimap est désactivée
-- EN: Automatically move HUD when minimap is disabled

-----------------------------------------------
-- Default Theme / Thème par Défaut
-----------------------------------------------
Config.DefaultTheme = "clean"
-- Options: clean, darkness, neon, ocean, sunset, forest, blood, royal

Config.DefaultPosition = "bottom-center"
-- Options: top-left, top-center, top-right, bottom-left, bottom-center, bottom-right

Config.DefaultShape = "square"
-- Options: square, rounded, circle, diamond, hexagon

Config.DefaultSpeedoStyle = "minimal"
-- Options: minimal, circle, digital

Config.StatusBarStyle = "shadow"
-- Options: clean, shadow, outline, neon, gradient

Config.StatusBarAnimation = "glow"
-- Options: none, pulse, glow

-----------------------------------------------
-- Display Options / Options d'Affichage
-----------------------------------------------
Config.ShowHunger = true
Config.ShowThirst = true
Config.ShowOxygen = true
Config.ShowVehicleHUD = true
Config.ShowStatusBar = true
Config.ShowCash = true
Config.ShowBank = true
Config.ShowPlayerId = true
Config.ShowWeaponHUD = true
Config.ShowSeatbelt = true
Config.ShowRadioFrequency = true

-----------------------------------------------
-- Vehicle Settings / Paramètres Véhicule
-----------------------------------------------
Config.UseKMH = true
-- FR: Utiliser KM/H (false = MPH)
-- EN: Use KM/H (false = MPH)

Config.HideFuelWhenFull = true
-- FR: Masquer la jauge d'essence quand elle est pleine
-- EN: Hide fuel gauge when full

Config.HideEngineWhenFull = true
-- FR: Masquer la jauge moteur quand elle est pleine
-- EN: Hide engine gauge when full

Config.FuelFullThreshold = 95
-- FR: Seuil pour considérer que la jauge est "pleine" (%)
-- EN: Threshold to consider gauge as "full" (%)

-----------------------------------------------
-- System Integration / Intégration Systèmes
-----------------------------------------------
-- FR: Options: "auto" (détection automatique de tous les systèmes)
--      ou spécifier un système spécifique
-- EN: Options: "auto" (auto-detect all systems)
--      or specify a specific system
-- FR: Les systèmes personnalisés peuvent être ajoutés dans editable/*/
-- EN: Custom systems can be added in editable/*/ folders

Config.FuelSystem = "LegacyFuel"
-- Options: LegacyFuel, ox_fuel, cdn-fuel, frfuel, ps-fuel, etc.
-- FR: Voir editable/fuel/ pour les systèmes supportés
-- EN: See editable/fuel/ for supported systems

Config.NeedsSystem = "esx_status"
-- Options: esx_status, esx_basicneeds, qb-hud, okokNeeds, renewed-lib, etc.
-- FR: Voir editable/needs/ pour les systèmes supportés
-- EN: See editable/needs/ for supported systems

Config.VoiceSystem = "pma-voice"
-- Options: pma-voice, mumble-voip, saltychat, tokovoip, etc.
-- FR: Voir editable/voice/ pour les systèmes supportés
-- EN: See editable/voice/ for supported systems

-----------------------------------------------
-- Settings Saving / Sauvegarde Paramètres
-----------------------------------------------
Config.SaveSettings = true
-- FR: Sauvegarder les paramètres du joueur
-- EN: Save player settings

Config.UseKVP = true
-- FR: Utiliser KVP pour la sauvegarde (survit aux redémarrages)
-- EN: Use KVP for saving (survives restarts)

-----------------------------------------------
-- Admin Settings / Paramètres Admin
-----------------------------------------------
Config.AdminGroups = {"admin", "superadmin", "god"}
Config.AdminCommand = "pehud"

-----------------------------------------------
-- Weapon Images / Images des Armes
-----------------------------------------------
Config.WeaponImages = {
    -- Pistols / Pistolets
    ["WEAPON_PISTOL"] = "weapon_pistol.png",
    ["WEAPON_PISTOL_MK2"] = "weapon_pistol_mk2.png",
    ["WEAPON_COMBATPISTOL"] = "weapon_combatpistol.png",
    ["WEAPON_APPISTOL"] = "weapon_appistol.png",
    ["WEAPON_PISTOL50"] = "weapon_pistol50.png",
    ["WEAPON_SNSPISTOL"] = "weapon_snspistol.png",
    ["WEAPON_HEAVYPISTOL"] = "weapon_heavypistol.png",
    ["WEAPON_VINTAGEPISTOL"] = "weapon_vintagepistol.png",
    ["WEAPON_REVOLVER"] = "weapon_revolver.png",

    -- SMGs / Mitraillettes
    ["WEAPON_MICROSMG"] = "weapon_microsmg.png",
    ["WEAPON_SMG"] = "weapon_smg.png",
    ["WEAPON_SMG_MK2"] = "weapon_smg_mk2.png",
    ["WEAPON_ASSAULTSMG"] = "weapon_assaultsmg.png",
    ["WEAPON_MINISMG"] = "weapon_minismg.png",

    -- Shotguns / Fusils à pompe
    ["WEAPON_PUMPSHOTGUN"] = "weapon_pumpshotgun.png",
    ["WEAPON_PUMPSHOTGUN_MK2"] = "weapon_pumpshotgun_mk2.png",
    ["WEAPON_SAWNOFFSHOTGUN"] = "weapon_sawnoffshotgun.png",
    ["WEAPON_BULLPUPSHOTGUN"] = "weapon_bullpupshotgun.png",

    -- Assault Rifles / Fusils d'assaut
    ["WEAPON_ASSAULTRIFLE"] = "weapon_assaultrifle.png",
    ["WEAPON_ASSAULTRIFLE_MK2"] = "weapon_assaultrifle_mk2.png",
    ["WEAPON_CARBINERIFLE"] = "weapon_carbinerifle.png",
    ["WEAPON_CARBINERIFLE_MK2"] = "weapon_carbinerifle_mk2.png",
    ["WEAPON_ADVANCEDRIFLE"] = "weapon_advancedrifle.png",
    ["WEAPON_SPECIALCARBINE"] = "weapon_specialcarbine.png",
    ["WEAPON_SPECIALCARBINE_MK2"] = "weapon_specialcarbine_mk2.png",
    ["WEAPON_BULLPUPRIFLE"] = "weapon_bullpuprifle.png",
    ["WEAPON_COMPACTRIFLE"] = "weapon_compactrifle.png",

    -- Sniper Rifles / Fusils de sniper
    ["WEAPON_SNIPERRIFLE"] = "weapon_sniperrifle.png",
    ["WEAPON_HEAVYSNIPER"] = "weapon_heavysniper.png",
    ["WEAPON_HEAVYSNIPER_MK2"] = "weapon_heavysniper_mk2.png",
    ["WEAPON_MARKSMANRIFLE"] = "weapon_marksmanrifle.png",
    ["WEAPON_MARKSMANRIFLE_MK2"] = "weapon_marksmanrifle_mk2.png",

    -- Machine Guns / Mitrailleuses
    ["WEAPON_MG"] = "weapon_mg.png",
    ["WEAPON_COMBATMG"] = "weapon_combatmg.png",
    ["WEAPON_COMBATMG_MK2"] = "weapon_combatmg_mk2.png",
    ["WEAPON_GUSENBERG"] = "weapon_gusenberg.png",

    -- Heavy Weapons / Armes lourdes
    ["WEAPON_RPG"] = "weapon_rpg.png",
    ["WEAPON_GRENADELAUNCHER"] = "weapon_grenadelauncher.png",
    ["WEAPON_MINIGUN"] = "weapon_minigun.png",
    ["WEAPON_FIREWORK"] = "weapon_firework.png",
    ["WEAPON_RAILGUN"] = "weapon_railgun.png",

    -- Melee / Corps à corps
    ["WEAPON_KNIFE"] = "weapon_knife.png",
    ["WEAPON_NIGHTSTICK"] = "weapon_nightstick.png",
    ["WEAPON_HAMMER"] = "weapon_hammer.png",
    ["WEAPON_BAT"] = "weapon_bat.png",
    ["WEAPON_CROWBAR"] = "weapon_crowbar.png",
    ["WEAPON_GOLFCLUB"] = "weapon_golfclub.png",
    ["WEAPON_BOTTLE"] = "weapon_bottle.png",
    ["WEAPON_DAGGER"] = "weapon_dagger.png",
    ["WEAPON_HATCHET"] = "weapon_hatchet.png",
    ["WEAPON_MACHETE"] = "weapon_machete.png",
    ["WEAPON_SWITCHBLADE"] = "weapon_switchblade.png",
    ["WEAPON_BATTLEAXE"] = "weapon_battleaxe.png",
    ["WEAPON_POOLCUE"] = "weapon_poolcue.png",
    ["WEAPON_WRENCH"] = "weapon_wrench.png"
}

```

</details>
