Add local money

This commit is contained in:
Vortrex
2022-09-09 02:11:55 -05:00
parent 55c257b0a8
commit c6b6a4ad68
3 changed files with 39 additions and 36 deletions

View File

@@ -558,8 +558,6 @@ function setProfanityFilterState(state) {
updateChatBox();
}
// ===========================================================================
function processVehicleCruiseControl() {
@@ -578,4 +576,38 @@ function processVehicleCruiseControl() {
if (cruiseControl) {
setVehicleSpeed(cruiseControlSpeed);
}
}
}
// ===========================================================================
function getCurrencyString(amount) {
let tempString = currencyString;
tempString = tempString.replace("{AMOUNT}", toString(makeLargeNumberReadable(amount)));
return tempString;
}
// ===========================================================================
function updateLocalPlayerMoney() {
if (localPlayer == null) {
return false;
}
if (typeof localPlayer.money != "undefined") {
localPlayer.money = toInteger(amount);
}
if (getGame() == AGRP_GAME_GTA_IV) {
natives.setMultiplayerHudCash(amount);
}
}
// ===========================================================================
function setLocalPlayerMoney(amount) {
logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting local player money`);
localPlayerMoney = amount;
updateLocalPlayerMoney();
}
// ===========================================================================