Guys i need some help with nui:
I have this callback on my client.js:
RegisterNuiCallbackType("takemoney");
on("__cfx_nui:takemoney", (data, cb) => {
//var amount = 200;
emitNet("blackjack:betta", amount);
console.log("funzika tuto");
console.log(amount);
})
and on the script.js, that is the NUI script, i have this function
this.TakeMoney = function(amount) {
self.myTurn = true;
console.log("chiamata a takemoney");
console.log(amount);
$.post('http://blackjack/takemoney', amount);
}
Now i was wondering: is there a way to transfer the value of amount from the nui (where i have the value this.bet) and use in the client.js to call a .lua event?