Fix reload jobs cmd

This commit is contained in:
Vortrex
2020-12-18 19:04:04 -06:00
parent ae0909e9c5
commit b8eea6e223

View File

@@ -690,8 +690,6 @@ function takeJob(client, jobId) {
// ---------------------------------------------------------------------------
function reloadAllJobsCommand(command, params, client) {
for(let i in getServerData().jobs) {
for(let j in getServerData().jobs[i].locations) {
destroyElement(getServerData().jobs[i].locations[j].blip);
@@ -699,7 +697,7 @@ function reloadAllJobsCommand(command, params, client) {
}
}
forceAllPlayersToStopWorking();
//forceAllPlayersToStopWorking();
getServerData().jobs = null;
getServerData().jobs = loadJobsFromDatabase();
createAllJobPickups();
@@ -708,6 +706,8 @@ function reloadAllJobsCommand(command, params, client) {
messageAdminAction(`All server jobs have been reloaded by an admin!`);
}
// ---------------------------------------------------------------------------
function forceAllPlayersToStopWorking() {
getClients().forEach(function(client) {
stopWorking(client);