Add local money
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user