script es_extended


#1

Bonjour, j’ai un gros problème je suis dans es_extended mais je n’arrive pas a savoir quoi commenter exactement pour ne plus avoir l’argent en bank afficher dans le hud.

● Machine locale
● ESX
● Nom de la ressource

RegisterNetEvent(‘esx:playerLoaded’)
AddEventHandler(‘esx:playerLoaded’, function(xPlayer)
ESX.PlayerLoaded = true
ESX.PlayerData = xPlayer

if Config.EnableHud then
	for i=1, #xPlayer.accounts, 1 do
		local accountTpl = '<div><img src="img/accounts/' .. xPlayer.accounts[i].name .. '.png"/>&nbsp;{{money}}</div>'

		ESX.UI.HUD.RegisterElement('account_' .. xPlayer.accounts[i].name, i-1, 0, accountTpl, {
			money = 0
		})

		ESX.UI.HUD.UpdateElement('account_' .. xPlayer.accounts[i].name, {
			money = ESX.Math.GroupDigits(xPlayer.accounts[i].money)
		})
	end

	local jobTpl = '<div>{{job_label}} - {{grade_label}}</div>'

	if xPlayer.job.grade_label == '' then
		jobTpl = '<div>{{job_label}}</div>'
	end

	ESX.UI.HUD.RegisterElement('job', #xPlayer.accounts, 0, jobTpl, {
		job_label   = '',
		grade_label = ''
	})

	ESX.UI.HUD.UpdateElement('job', {
		job_label   = xPlayer.job.label,
		grade_label = xPlayer.job.grade_label
	})
else
	TriggerEvent('es:setMoneyDisplay', 0.0)
end

end)