i think we are Getting Closer but there is one point i dont get i tried a few other ways but look at my Code
let ped = mp.peds.new(
mp.game.joaat('s_m_m_doctor_01'),
new mp.Vector3(358.30535888671875, -589.4619750976562, 28.796092987060547),
-111.98,
mp.players.local.dimension
);
var jobBlips = new Array();
var jobMarker = new Array();
var jobVeh = new Array();
const jobVehId = jobVeh.length +1;
mp.events.add('createJobBlipRTH', (player, ID, position, name, color, shortRange) => {
jobBlips[jobBlips.length + 1] = mp.blips.new(parseInt(ID), position, {
name: name,
color: parseInt(color),
shortRange: (shortRange === 'true'),
});
jobMarker[jobMarker.length + 1] = mp.markers.new(34, position, 1,
{
direction: new mp.Vector3(0, 0, 75),
color: [255, 255, 255, 255],
visible: true,
dimension: 0
});
mp.console.logWarning(`${position}`, true, true);
});
mp.events.add('createJobSceneRTH', (player, MissionID) => {
if (MissionID == 2) {
jobVeh[jobVehId] = mp.vehicles.new(mp.game.joaat("ambulance"), new mp.Vector3(-487.798, -252.667, 35.454));
setTimeout(() => {
jobVeh[jobVehId].setDoorOpen(1, true, false);
jobVeh[jobVehId].setSiren(true);
}, 200);
}
mp.console.logWarning(`Mission Nummer: ${MissionID}`, true, true);
mp.console.logWarning(`jobVehId: ${jobVehId}`, true, true);
mp.console.logWarning(`jobVeh Length: ${jobVeh.length}`, true, true);
});
mp.events.add('removeJobBlips', (player) => {
jobBlips.forEach(function (object, index) {
jobBlips[index].destroy();
});
jobMarker.forEach(function (object, index) {
jobMarker[index].destroy();
});
jobVeh.forEach(function (object, index) {
jobVeh[index].destroy();
});
jobBlips = null;
jobBlips = new Array();
jobMarker = null;
jobMarker = new Array();
jobVeh = null;
jobVeh = new Array();
});
https://prnt.sc/FrKPaR0cr6lF This is the Debug i did
idk if i think wrong^^ iam sorry for so much Question i come from SAMP there was PAWN the Language it was way Simpler