Error checking

This commit is contained in:
Vortrex
2022-08-04 05:11:46 -05:00
parent 13c039d7a9
commit 502b211840

View File

@@ -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);
}