Custom framework
Everything that comes from the framework lives in functions.lua, which is open. Each function says what it receives and returns. Percentages are always 0 to 100.
With Config.Framework = "auto" the HUD already reads vRP, ESX, QBCore and QBox. Only touch functions.lua if your script is different.
What is wired by default
| Indicator | Function | vRP | ESX | QBCore / QBox |
|---|---|---|---|---|
| Hunger, thirst | Gui.Fome(), Gui.Sede() | events statusHunger, statusThirst | esx_status (esx_basicneeds) | hud:client:UpdateNeeds + metadata hunger/thirst |
| Stress | Gui.Estresse() | statusStress | esx_status stress | hud:client:UpdateStress + metadata stress |
| Health, armor, stamina, breath | Gui.Vida, Gui.Colete, Gui.Estamina, Gui.Folego | GTA | GTA | GTA |
| Voice and radio | Gui.Falando, Gui.AlcanceVoz, Gui.Radio | pma-voice or SaltyChat | same | same |
| Fuel | Gui.Combustivel(veiculo) | Config.Combustivel | same | same |
| Money, job | Gui.Carteira, Gui.Banco, Gui.Emprego | not included (server guide) | ESX.GetPlayerData() | PlayerData.money / job |
| Seatbelt | Gui.Cinto() | built into the HUD | built into the HUD | built into the HUD + seatbelt:client:ToggleSeatbelt |
QBox also reads the player’s hunger, thirst and stress state bags.
- Client guide: status, fuel, voice, seatbelt and nitro.
- Server guide: money and status sent by the server.