Check pickup is supported
This commit is contained in:
@@ -3192,6 +3192,7 @@ function createJobLocationPickup(jobId, locationId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (areServerElementsSupported()) {
|
if (areServerElementsSupported()) {
|
||||||
|
if (isGameFeatureSupported("pickup")) {
|
||||||
let pickup = createGamePickup(pickupModelId, tempJobData.locations[locationId].position, getGameConfig().pickupTypes[getGame()].job);
|
let pickup = createGamePickup(pickupModelId, tempJobData.locations[locationId].position, getGameConfig().pickupTypes[getGame()].job);
|
||||||
if (pickup != false) {
|
if (pickup != false) {
|
||||||
tempJobData.locations[locationId].pickup = pickup;
|
tempJobData.locations[locationId].pickup = pickup;
|
||||||
@@ -3204,6 +3205,7 @@ function createJobLocationPickup(jobId, locationId) {
|
|||||||
setEntityData(pickup, "v.rp.label.jobType", tempJobData.databaseId, true);
|
setEntityData(pickup, "v.rp.label.jobType", tempJobData.databaseId, true);
|
||||||
addToWorld(pickup);
|
addToWorld(pickup);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let blipModelId = -1;
|
let blipModelId = -1;
|
||||||
if (isGameFeatureSupported("blip")) {
|
if (isGameFeatureSupported("blip")) {
|
||||||
@@ -3573,7 +3575,7 @@ function createJobUniformCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
createJobUniform(jobId, skinIndex);
|
createJobUniform(jobId, skinIndex);
|
||||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} created uniform with skin {ALTCOLOUR}${getGameConfig().skins[skinIndex][1]} (${getGameConfig().skins[skinIndex][0]}){MAINCOLOUR} for job {jobYellow}${getJobData(jobId).name}`);
|
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} created uniform with skin {ALTCOLOUR}${getGameConfig().skins[getGame()][skinIndex][1]} (${getGameConfig().skins[skinIndex][0]}){MAINCOLOUR} for job {jobYellow}${getJobData(jobId).name}`);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user