Hey there,
I have issues setting up a simple GUI with NUI, here’s my JS code :
window.addEventListener('message', function(event) {
if (event.data.updateHUD == true) {
$('#Balance').text(event.data.Balance);
}
});
Yes, I also checked if my HTML has the right id.
And here’s my lua script :
SendNUIMessage({ updateBalance = true, Balance = values.Balance["balance"] })
I’ve checked if the script is called by adding console debugging after this line, it’s called. No error.
I’ve checked if values.Balance["balance"]
is not nil, it isn’t.
Any idea ?
Thanks