From 6147239844e37ecefc55c6de6404152c217e4299 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Fri, 25 Dec 2020 02:43:13 -0600 Subject: [PATCH] Fix wrong error message --- scripts/server/job/police.js | 14 ++++++-------- scripts/server/job/taxi.js | 26 +++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/scripts/server/job/police.js b/scripts/server/job/police.js index 15efba97..800dd0f5 100644 --- a/scripts/server/job/police.js +++ b/scripts/server/job/police.js @@ -20,7 +20,7 @@ function policeTazerCommand(command, params, client) { } if(!isPlayerWorking(client)) { - messageClientError(client, "You are working! Use /startwork first."); + messageClientError(client, "You are not working! Use /startwork first."); return false; } @@ -29,8 +29,6 @@ function policeTazerCommand(command, params, client) { return false; } - - return true; } @@ -48,7 +46,7 @@ function policeCuffCommand(command, params, client) { } if(!isPlayerWorking(client)) { - messageClientError(client, "You are working! Use /startwork first."); + messageClientError(client, "You are not working! Use /startwork first."); return false; } @@ -74,7 +72,7 @@ function policeArrestCommand(command, params, client) { } if(!isPlayerWorking(client)) { - messageClientError(client, "You are working! Use /startwork first."); + messageClientError(client, "You are not working! Use /startwork first."); return false; } @@ -100,7 +98,7 @@ function policeSearchCommand(command, params, client) { } if(!isPlayerWorking(client)) { - messageClientError(client, "You are working! Use /startwork first."); + messageClientError(client, "You are not working! Use /startwork first."); return false; } @@ -126,7 +124,7 @@ function policeDragCommand(command, params, client) { } if(!isPlayerWorking(client)) { - messageClientError(client, "You are working! Use /startwork first."); + messageClientError(client, "You are not working! Use /startwork first."); return false; } @@ -152,7 +150,7 @@ function policeDetainCommand(command, params, client) { } if(!isPlayerWorking(client)) { - messageClientError(client, "You are working! Use /startwork first."); + messageClientError(client, "You are not working! Use /startwork first."); return false; } diff --git a/scripts/server/job/taxi.js b/scripts/server/job/taxi.js index 2138be67..3fd3d7d8 100644 --- a/scripts/server/job/taxi.js +++ b/scripts/server/job/taxi.js @@ -6,4 +6,28 @@ // FILE: taxi.js // DESC: Provides taxi driver job functions and usage // TYPE: Job (JavaScript) -// =========================================================================== \ No newline at end of file +// =========================================================================== + +function taxiSetFareCommand(command, params, client) { + if(!canPlayerUseJobs(client)) { + messageClientError(client, "You are not allowed to use jobs."); + return false; + } + + if(!canPlayerUseTaxiJob(client)) { + messageClientError(client, "You are not allowed to use the taxi job."); + return false; + } + + if(!isPlayerWorking(client)) { + messageClientError(client, "You are not working! Use /startwork first."); + return false; + } + + if(!doesPlayerHaveJobType(client, AG_JOB_TAXI)) { + messageClientError(client, "You don't have a taxi job."); + return false; + } + + return true; +} \ No newline at end of file