Use console output utils
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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!");
|
||||
|
||||
Reference in New Issue
Block a user