Framework Integration
This section guides you through the steps to integrate the HUD script with your framework, utilizing built-in functions for seamless integration.
PlayerData
PlayerData = {
seatbelt = false,
id = 0,
}STEP 1: Init
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(player)
InitHud()
end)RegisterNetEvent('QBCore:Client:OnPlayerLoaded')
AddEventHandler('QBCore:Client:OnPlayerLoaded', function()
InitHud()
end)Citizen.CreateThread(function ()
-- Wait for the player to be loaded so we get correct map position
Citizen.Wait(3000)
InitHud()
end)STEP 2: Fuel
STEP 3: Status
STEP 4: Info
STEP 5: Seatbelt
DONE
Last updated