Fix job blip bug + optimizations
This commit is contained in:
@@ -643,7 +643,7 @@ function stopWorking(client) {
|
||||
sendPlayerStopJobRoute(client);
|
||||
|
||||
let jobId = getPlayerJob(client);
|
||||
messageDiscordEventChannel(`💼 ${getPlayerName(client)} has stopped working as a ${getJobData(jobId).name}`);
|
||||
messageDiscordEventChannel(`💼 ${getCharacterFullName(client)} has stopped working as a ${getJobData(jobId).name}`);
|
||||
|
||||
switch (getJobType(jobId)) {
|
||||
case VRR_JOB_POLICE:
|
||||
@@ -2381,6 +2381,10 @@ function createJobLocationPickup(jobId, locationId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isGameFeatureSupported("pickups")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let tempJobData = getJobData(jobId);
|
||||
|
||||
if (tempJobData.pickupModel != -1) {
|
||||
@@ -2418,6 +2422,10 @@ function createJobLocationBlip(jobId, locationId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isGameFeatureSupported("blips")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let tempJobData = getJobData(jobId);
|
||||
|
||||
if (getJobData(jobId).blipModel == -1) {
|
||||
@@ -2438,8 +2446,8 @@ function createJobLocationBlip(jobId, locationId) {
|
||||
if (getGlobalConfig().jobBlipStreamInDistance == -1 || getGlobalConfig().jobBlipStreamOutDistance == -1) {
|
||||
blip.netFlags.distanceStreaming = false;
|
||||
} else {
|
||||
setElementStreamInDistance(getServerData().jobs[i].locations[j].blip, getGlobalConfig().jobBlipStreamInDistance);
|
||||
setElementStreamOutDistance(getServerData().jobs[i].locations[j].blip, getGlobalConfig().jobBlipStreamOutDistance);
|
||||
setElementStreamInDistance(blip, getGlobalConfig().jobBlipStreamInDistance);
|
||||
setElementStreamOutDistance(blip, getGlobalConfig().jobBlipStreamOutDistance);
|
||||
}
|
||||
|
||||
setElementOnAllDimensions(blip, false);
|
||||
|
||||
Reference in New Issue
Block a user