Error checking
This commit is contained in:
@@ -48,7 +48,7 @@ function removeLocalPlayerFromVehicle() {
|
|||||||
|
|
||||||
function restoreLocalCamera() {
|
function restoreLocalCamera() {
|
||||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Camera restored`);
|
logToConsole(LOG_DEBUG, `[VRR.Utilities] Camera restored`);
|
||||||
if (isCustomCameraSupported()) {
|
if (isGameFeatureSupported("customCamera")) {
|
||||||
game.restoreCamera(true);
|
game.restoreCamera(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -350,6 +350,10 @@ function setPlayerWeaponDamageEnabled(clientName, state) {
|
|||||||
|
|
||||||
function setLocalPlayerCash(amount) {
|
function setLocalPlayerCash(amount) {
|
||||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting local player money`);
|
logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting local player money`);
|
||||||
|
if (localPlayer == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof localPlayer.money != "undefined") {
|
if (typeof localPlayer.money != "undefined") {
|
||||||
localPlayer.money = toInteger(amount);
|
localPlayer.money = toInteger(amount);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user