Fix wrong error message
This commit is contained in:
@@ -20,7 +20,7 @@ function policeTazerCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!isPlayerWorking(client)) {
|
if(!isPlayerWorking(client)) {
|
||||||
messageClientError(client, "You are working! Use /startwork first.");
|
messageClientError(client, "You are not working! Use /startwork first.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,8 +29,6 @@ function policeTazerCommand(command, params, client) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +46,7 @@ function policeCuffCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!isPlayerWorking(client)) {
|
if(!isPlayerWorking(client)) {
|
||||||
messageClientError(client, "You are working! Use /startwork first.");
|
messageClientError(client, "You are not working! Use /startwork first.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +72,7 @@ function policeArrestCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!isPlayerWorking(client)) {
|
if(!isPlayerWorking(client)) {
|
||||||
messageClientError(client, "You are working! Use /startwork first.");
|
messageClientError(client, "You are not working! Use /startwork first.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +98,7 @@ function policeSearchCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!isPlayerWorking(client)) {
|
if(!isPlayerWorking(client)) {
|
||||||
messageClientError(client, "You are working! Use /startwork first.");
|
messageClientError(client, "You are not working! Use /startwork first.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,7 +124,7 @@ function policeDragCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!isPlayerWorking(client)) {
|
if(!isPlayerWorking(client)) {
|
||||||
messageClientError(client, "You are working! Use /startwork first.");
|
messageClientError(client, "You are not working! Use /startwork first.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +150,7 @@ function policeDetainCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!isPlayerWorking(client)) {
|
if(!isPlayerWorking(client)) {
|
||||||
messageClientError(client, "You are working! Use /startwork first.");
|
messageClientError(client, "You are not working! Use /startwork first.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,3 +7,27 @@
|
|||||||
// DESC: Provides taxi driver job functions and usage
|
// DESC: Provides taxi driver job functions and usage
|
||||||
// TYPE: Job (JavaScript)
|
// TYPE: Job (JavaScript)
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user