fix vehicle
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
var blipBase = null;
|
var blipBase = null;
|
||||||
var markerBase = null;
|
var markerBase = null;
|
||||||
var colshapeBase = null;
|
var colshapeBase = null;
|
||||||
var vehicle = null;
|
var vehRemoteID = null;
|
||||||
|
|
||||||
var interval = null;
|
var interval = null;
|
||||||
|
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
State = false;
|
State = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
mp.events.add('SERVER:MuellmannBCSErstellen', (jsonPosArr, veh) => {
|
mp.events.add('SERVER:MuellmannBCSErstellen', (jsonPosArr, veh: VehicleMp) => {
|
||||||
let posArr = JSON.parse(jsonPosArr);
|
let posArr = JSON.parse(jsonPosArr);
|
||||||
vehicle = veh;
|
vehRemoteID = veh.remoteId;
|
||||||
for (var i = 0; i < posArr.length; i++) {
|
for (var i = 0; i < posArr.length; i++) {
|
||||||
let pos = new mp.Vector3(posArr[i].x, posArr[i].y, posArr[i].z - 1)
|
let pos = new mp.Vector3(posArr[i].x, posArr[i].y, posArr[i].z - 1)
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
//mp.events.callRemote('CLIENT:ImShape', JSON.stringify(Shape));
|
//mp.events.callRemote('CLIENT:ImShape', JSON.stringify(Shape));
|
||||||
|
|
||||||
garbageToCollect.forEach((colshape, blip) => {
|
garbageToCollect.forEach((colshape, blip) => {
|
||||||
if (!colshape || colshape != currentShape) return;
|
if (!colshape || colshape != currentShape) { return; }
|
||||||
|
|
||||||
if (mp.players.local.vehicle) { mp.events.call("renderTextOnScreen", "Steige aus dem Müllwagen aus um den Müllsack zu entnehmen."); return; }
|
if (mp.players.local.vehicle) { mp.events.call("renderTextOnScreen", "Steige aus dem Müllwagen aus um den Müllsack zu entnehmen."); return; }
|
||||||
if (hasBinBag) { mp.gui.chat.push("Du trägst bereits einen Müllsack!"); return; }
|
if (hasBinBag) { mp.gui.chat.push("Du trägst bereits einen Müllsack!"); return; }
|
||||||
@@ -92,6 +92,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mp.gui.chat.push("test");
|
||||||
if (currentShape == colshapeDumptruck) {
|
if (currentShape == colshapeDumptruck) {
|
||||||
if (!hasBinBag) {
|
if (!hasBinBag) {
|
||||||
hasBinBag = false;
|
hasBinBag = false;
|
||||||
@@ -138,6 +139,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function createMarker() {
|
function createMarker() {
|
||||||
|
let vehicle;
|
||||||
|
if (vehRemoteID)
|
||||||
|
vehicle = mp.vehicles.atRemoteId(vehRemoteID);
|
||||||
if (vehicle != null) {
|
if (vehicle != null) {
|
||||||
var boneIndex2 = vehicle.getBoneIndexByName("platelight");
|
var boneIndex2 = vehicle.getBoneIndexByName("platelight");
|
||||||
var boneIndex1 = vehicle.getBoneIndexByName("chassis_dummy");
|
var boneIndex1 = vehicle.getBoneIndexByName("chassis_dummy");
|
||||||
|
|||||||
Reference in New Issue
Block a user