Fix missing client arg in cash update netevent

This commit is contained in:
Vortrex
2020-12-27 12:33:56 -06:00
parent 32074599a1
commit accb342fd2

View File

@@ -1604,7 +1604,7 @@ function getClanFromParams(params) {
// ---------------------------------------------------------------------------
function updatePlayerCash(client) {
triggerNetworkEvent("ag.money", getClientCurrentSubAccount(client).cash);
triggerNetworkEvent("ag.money", client, getClientCurrentSubAccount(client).cash);
}
// ---------------------------------------------------------------------------
@@ -1757,4 +1757,17 @@ function isAtPayAndSpray(position) {
return false;
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
async function waitUntil(condition) {
return new Promise((resolve) => {
let interval = setInterval(() => {
if (!condition()) {
return
}
clearInterval(interval);
resolve();
}, 1)
});
}