diff --git a/scripts/client/utilities.js b/scripts/client/utilities.js index adf038f7..05000645 100644 --- a/scripts/client/utilities.js +++ b/scripts/client/utilities.js @@ -48,7 +48,7 @@ function removeLocalPlayerFromVehicle() { function restoreLocalCamera() { logToConsole(LOG_DEBUG, `[VRR.Utilities] Camera restored`); - if (isCustomCameraSupported()) { + if (isGameFeatureSupported("customCamera")) { game.restoreCamera(true); } }; @@ -350,6 +350,10 @@ function setPlayerWeaponDamageEnabled(clientName, state) { function setLocalPlayerCash(amount) { logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting local player money`); + if (localPlayer == null) { + return false; + } + if (typeof localPlayer.money != "undefined") { localPlayer.money = toInteger(amount); }