From 24d98c8c471b0024cb099cf08fb1ea5905bce126 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Wed, 16 Dec 2020 07:55:36 -0600 Subject: [PATCH] Added bizblip, bizpickup, bizinfo, startroute cmd --- scripts/server/command.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/scripts/server/command.js b/scripts/server/command.js index 295d7478..2428c6f4 100644 --- a/scripts/server/command.js +++ b/scripts/server/command.js @@ -48,6 +48,9 @@ function loadCommandData() { commandData("bizdeposit", depositIntoBusinessCommand, "", getStaffFlagValue("none"), true, true), commandData("bizname", setBusinessNameCommand, "", getStaffFlagValue("none"), true, true), commandData("bizowner", setBusinessOwnerCommand, "", getStaffFlagValue("none"), true, true), + commandData("bizblip", setBusinessBlipCommand, "", getStaffFlagValue("manageBusinesses"), true, true), + commandData("bizpickup", setBusinessPickupCommand, "", getStaffFlagValue("manageBusinesses"), true, true), + commandData("bizinfo", getBusinessInfoCommand, "[id]", getStaffFlagValue("none"), true, true), ], chat: [ commandData("me", meActionCommand, "", getStaffFlagValue("none"), true, false), @@ -131,7 +134,10 @@ function loadCommandData() { commandData("cuff", policeCuffCommand, "", getStaffFlagValue("none"), true, false), commandData("detain", policeDetainCommand, "", getStaffFlagValue("none"), true, false), commandData("drag", policeDragCommand, "", getStaffFlagValue("none"), true, false), - commandData("search", policeSearchCommand, "", getStaffFlagValue("none"), true, false), + commandData("search", policeSearchCommand, "", getStaffFlagValue("none"), true, false), + + // Bus/Garbage + commandData("startroute", jobStartRouteCommand, "", getStaffFlagValue("none"), true, false), ], locale: [], messaging: [], @@ -339,7 +345,7 @@ addEventHandler("OnPlayerCommand", function(event, client, command, params) { let paramsDisplay = params; if(areParamsEmpty(params)) { paramsDisplay = "" - } + } if(!commandData) { console.warn(`[Asshat.Command] ${getClientDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`); @@ -361,13 +367,13 @@ addEventHandler("OnPlayerCommand", function(event, client, command, params) { } } - if(isClientFromDiscord(client)) { - if(!isCommandAllowedOnDiscord(command)) { - console.warn(`[Asshat.Command] ${getClientDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`); - messageClientError(client, `The [#AAAAAA]/${command} [#FFFFFF] command isn't available on discord!`); - return false; - } - } + //if(isClientFromDiscord(client)) { + // if(!isCommandAllowedOnDiscord(command)) { + // console.warn(`[Asshat.Command] ${getClientDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`); + // messageClientError(client, `The [#AAAAAA]/${command} [#FFFFFF] command isn't available on discord!`); + // return false; + // } + //} if(!doesClientHaveStaffPermission(client, getCommandRequiredPermissions(command))) { console.warn(`[Asshat.Command] ${getClientDisplayForConsole(client)} attempted to use command, but failed (no permission): /${command} ${paramsDisplay}`);