diff --git a/scripts/client/mousecam.js b/scripts/client/mousecam.js index edb85550..08889376 100644 --- a/scripts/client/mousecam.js +++ b/scripts/client/mousecam.js @@ -20,7 +20,7 @@ function SetStandardControlsEnabled(bEnabled) if (game.standardControls === undefined) { - console.warn("game.standardControls not implemented"); + logToConsole(LOG_WARN, "game.standardControls not implemented"); return; } game.standardControls = bEnabled; @@ -93,7 +93,7 @@ function GetMouseSensitivity() { if (game.getMouseSensitivity === undefined) { - //console.error("game.getMouseSensitivity not implemented"); + //logToConsole(LOG_ERROR, "game.getMouseSensitivity not implemented"); return [0.0025,0.003]; } let MouseSensitivity = game.getMouseSensitivity(); @@ -124,7 +124,7 @@ function ProcessLineOfSight(vecStartX, vecStartY, vecStartZ, vecEndX, vecEndY, v { if (game.processLineOfSight === undefined) { - console.warn("game.processLineOfSight not implemented"); + logToConsole(LOG_WARN, "game.processLineOfSight not implemented"); return [null]; } let Result = game.processLineOfSight([vecStartX, vecStartY, vecStartZ], [vecEndX, vecEndY, vecEndZ], bCheckBuildings, bCheckVehicles, bCheckPeds, bCheckObjects, bCheckDummies, bCheckSeeThroughStuff, bIgnoreSomeObjectsForCamera); diff --git a/scripts/server/business.js b/scripts/server/business.js index ddc77bd2..7006081a 100644 --- a/scripts/server/business.js +++ b/scripts/server/business.js @@ -1688,10 +1688,6 @@ function createBusinessEntrancePickup(businessId) { } if(getBusinessData(businessId).entrancePickupModel != -1) { - console.log(getGameConfig().pickupModels); - console.warn(typeof getGame()); - console.warn(typeof VRR_GAME_GTA_VC); - console.warn(Object.keys(getGameConfig().pickupModels)) let pickupModelId = getGameConfig().pickupModels[getGame()].Business; if(getServerData().businesses[businessId].entrancePickupModel != 0) { diff --git a/scripts/server/command.js b/scripts/server/command.js index a0cd2913..49cff686 100644 --- a/scripts/server/command.js +++ b/scripts/server/command.js @@ -720,7 +720,7 @@ function processPlayerCommand(command, params, client) { } if(!doesCommandExist(toLowerCase(command))) { - console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`); + logToConsole(LOG_WARN, `[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`); let possibleCommand = getCommandFromParams(command); if(possibleCommand != false && doesPlayerHaveStaffPermission(client, getCommandRequiredPermissions(toLowerCase(possibleCommand.command)))) { @@ -732,14 +732,14 @@ function processPlayerCommand(command, params, client) { } if(!commandData.enabled) { - console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (command is disabled): /${command} ${paramsDisplay}`); + logToConsole(LOG_WARN, `[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (command is disabled): /${command} ${paramsDisplay}`); messagePlayerError(client, `The command {ALTCOLOUR}/${command} {MAINCOLOUR}is disabled!`); return false; } if(doesCommandRequireLogin(toLowerCase(command))) { if(!isPlayerLoggedIn(client)) { - console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (requires login first): /${command} ${paramsDisplay}`); + logToConsole(LOG_WARN, `[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (requires login first): /${command} ${paramsDisplay}`); messagePlayerError(client, `You must be logged in to use the {ALTCOLOUR}/${command} {MAINCOLOUR}command!`); return false; } @@ -747,7 +747,7 @@ function processPlayerCommand(command, params, client) { //if(isClientFromDiscord(client)) { // if(!isCommandAllowedOnDiscord(command)) { - // console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`); + // logToConsole(LOG_WARN, `[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`); // messagePlayerError(client, `The {ALTCOLOUR}/${command} {MAINCOLOUR} command isn't available on discord!`); // return false; // } @@ -755,7 +755,7 @@ function processPlayerCommand(command, params, client) { if(!isConsole(client)) { if(!doesPlayerHaveStaffPermission(client, getCommandRequiredPermissions(toLowerCase(command)))) { - console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (no permission): /${command} ${paramsDisplay}`); + logToConsole(LOG_WARN, `[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (no permission): /${command} ${paramsDisplay}`); messagePlayerError(client, `You do not have permission to use the {ALTCOLOUR}/${toLowerCase(command)} {MAINCOLOUR}command!`); return false; } diff --git a/scripts/server/messaging.js b/scripts/server/messaging.js index 69206846..560a003d 100644 --- a/scripts/server/messaging.js +++ b/scripts/server/messaging.js @@ -58,7 +58,7 @@ function messagePlayerNormal(client, messageText, colour = COLOUR_WHITE) { function messageAdmins(messageText, colour = getColourByName("softRed")) { // - //console.warn(`🛡️ ${plainMessage}`); + //logToConsole(LOG_WARN, `🛡️ ${plainMessage}`); let clients = getClients(); for(let i in clients) { diff --git a/scripts/server/startup.js b/scripts/server/startup.js index 46b7edbb..74bdbcec 100644 --- a/scripts/server/startup.js +++ b/scripts/server/startup.js @@ -93,20 +93,20 @@ function checkForAllRequiredModules() { logToConsole(LOG_DEBUG, "[VRR.Startup]: Checking for required modules ..."); if(!checkForHashingModule()) { - console.warn("[VRR.Startup]: Hashing module is not loaded!"); - console.warn("[VRR.Startup]: This resource will now shutdown."); + logToConsole(LOG_WARN, "[VRR.Startup]: Hashing module is not loaded!"); + logToConsole(LOG_WARN, "[VRR.Startup]: This resource will now shutdown."); thisResource.stop(); } if(!checkForMySQLModule()) { - console.warn("[VRR.Startup]: MySQL module is not loaded!"); - console.warn("[VRR.Startup]: This resource will now shutdown."); + logToConsole(LOG_WARN, "[VRR.Startup]: MySQL module is not loaded!"); + logToConsole(LOG_WARN, "[VRR.Startup]: This resource will now shutdown."); thisResource.stop(); } if(!checkForSMTPModule()) { - console.warn("[VRR.Startup]: SMTP Email module is not loaded!"); - console.warn("[VRR.Startup]: Email features will NOT be available!"); + logToConsole(LOG_WARN, "[VRR.Startup]: SMTP Email module is not loaded!"); + logToConsole(LOG_WARN, "[VRR.Startup]: Email features will NOT be available!"); } logToConsole(LOG_DEBUG, "[VRR.Startup]: All required modules loaded!"); diff --git a/scripts/shared/utilities.js b/scripts/shared/utilities.js index 5faf6201..97b63d98 100644 --- a/scripts/shared/utilities.js +++ b/scripts/shared/utilities.js @@ -1349,13 +1349,13 @@ function logToConsole(tempLogLevel, text) { if((logLevel & tempLogLevel)) { if(tempLogLevel & LOG_ERROR) { - console.error(text); + consoleError(text); return true; } else if(tempLogLevel & LOG_WARN) { - console.warn(text); + consoleWarn(text); return true; } else { - console.log(text); + consolePrint(text); return true; } }