Add local money
This commit is contained in:
@@ -8,38 +8,6 @@
|
||||
// TYPE: Client (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let currencyString = "${AMOUNT}";
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
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`);
|
||||
localPlayerCash = amount;
|
||||
updateLocalPlayerMoney();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -92,6 +92,9 @@ let serverData = {
|
||||
jobs: [],
|
||||
};
|
||||
|
||||
let localPlayerCash = 0;
|
||||
let localPlayerMoney = 0;
|
||||
let localPlayerMoneyInterval = null;
|
||||
|
||||
let currencyString = "${AMOUNT}";
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -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