Ragemp-roleplay-skript/Jobs/LifeGuard/LifeGuard.js
2019-04-16 13:59:07 +02:00

36 lines
1.8 KiB
JavaScript

"use strict";
/// <reference path="../../types-gtanetwork/index.d.ts" />
var marker = null;
API.onServerEventTrigger.connect(function (eventName, args) {
if (eventName == "job:generate:marker") {
var id = args[0];
if (id == 1) {
marker = null;
marker = API.createMarker(1, new Vector3(-1518.49, -1272.849, 2.459243), new Vector3(0, 0, 0), new Vector3(0, 0, 0), new Vector3(0.8, 0.8, 0.8), 255, 0, 0, 185);
API.setWaypoint(-1518.49, -1272.849);
}
else if (id == 2) {
API.deleteEntity(marker);
marker = API.createMarker(1, new Vector3(-1466.786, -1388.963, 3.138116), new Vector3(0, 0, 0), new Vector3(0, 0, 0), new Vector3(0.8, 0.8, 0.8), 255, 0, 0, 185);
API.setWaypoint(-1466.786, -1388.963);
}
else if (id == 3) {
API.deleteEntity(marker);
marker = API.createMarker(1, new Vector3(-1431.199, -1508.964, 2.710496), new Vector3(0, 0, 0), new Vector3(0, 0, 0), new Vector3(0.8, 0.8, 0.8), 255, 0, 0, 185);
API.setWaypoint(-1431.199, -1508.964);
}
else if (id == 4) {
API.deleteEntity(marker);
marker = API.createMarker(1, new Vector3(-1372.829, -1624.367, 2.725401), new Vector3(0, 0, 0), new Vector3(0, 0, 0), new Vector3(0.8, 0.8, 0.8), 255, 0, 0, 185);
API.setWaypoint(-1372.829, -1624.367);
}
else if (id == 5) {
API.deleteEntity(marker);
marker = API.createMarker(1, new Vector3(-1290.279, -1752.955, 2.71381), new Vector3(0, 0, 0), new Vector3(0, 0, 0), new Vector3(0.8, 0.8, 0.8), 255, 0, 0, 185);
API.setWaypoint(-1290.279, -1752.955);
}
}
else if (eventName == "destroyMarker") {
API.deleteEntity(marker);
}
});