Add RefuseCollector Job and other misc
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
{
|
||||
"combination": [
|
||||
{
|
||||
"_id": 0,
|
||||
"Top": 0,
|
||||
"Torso": 0,
|
||||
"Undershirt": 2
|
||||
},
|
||||
|
||||
{
|
||||
"_id": 1,
|
||||
"Top": 1,
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
{
|
||||
"combination": [
|
||||
|
||||
{
|
||||
"_id": 0,
|
||||
"Top": 0,
|
||||
"Torso": 0,
|
||||
"Undershirt": 15
|
||||
},
|
||||
{
|
||||
"_id": 1,
|
||||
"Top": 1,
|
||||
|
||||
155
ReallifeGamemode.Client/Jobs/RefuseCollector.ts
Normal file
155
ReallifeGamemode.Client/Jobs/RefuseCollector.ts
Normal file
@@ -0,0 +1,155 @@
|
||||
export default function RefuseCollector() {
|
||||
|
||||
var State = false;
|
||||
var Traegt = false;
|
||||
var HintenVoll = false;
|
||||
var MuellSack = null;
|
||||
var BlipTonneHinten = null;
|
||||
var CheckpointTonneHinten = null;
|
||||
var ShapeTonneHinten = null;
|
||||
var BlipTonneBase = null;
|
||||
var CheckpointTonneBase = null;
|
||||
var ShapeTonneBase = null;
|
||||
var vehicle = null;
|
||||
|
||||
var BlipTonne = [];
|
||||
var ShapeTonne = [];
|
||||
|
||||
|
||||
|
||||
mp.events.add('SERVER:MuellmannStatusTrue', () => {
|
||||
State = true;
|
||||
});
|
||||
|
||||
mp.events.add('SERVER:MuellmannStatusFalse', () => {
|
||||
State = false;
|
||||
});
|
||||
|
||||
mp.events.add('SERVER:MuellmannBCSErstellen', (jsonPosArr, veh) => {
|
||||
|
||||
let posArr = JSON.parse(jsonPosArr);
|
||||
vehicle = veh;
|
||||
for (var i = 0; i < posArr.length; i++) {
|
||||
let pos = new mp.Vector3(posArr[i].x, posArr[i].y, posArr[i].z - 1)
|
||||
BlipTonne.push(mp.blips.new(1, pos, { name: 'Müllmann', color: 45, shortRange: false }));
|
||||
ShapeTonne.push(mp.colshapes.newSphere(posArr[i].x, posArr[i].y, posArr[i].z +0.5, 1.75));
|
||||
}
|
||||
|
||||
BlipTonneBase = mp.blips.new(1, new mp.Vector3(-535.1912, -1713.742, 19.23861 - 1), { name: 'Müllmann', color: 5, shortRange: false });
|
||||
CheckpointTonneBase = mp.markers.new(1, new mp.Vector3(-535.1912, -1713.742, 19.23861 - 1), 10, { direction: new mp.Vector3(-235.5747, -1685.475, 32.7207), color: [255, 255, 0, 150], visible: true, dimension: 0 });
|
||||
ShapeTonneBase = mp.colshapes.newSphere(-535.1912, -1713.742, 19.23861 - 1, 10);
|
||||
});
|
||||
mp.events.add('SERVER:MuellmannBCSEntfernen', () => {
|
||||
|
||||
for (var i = 0; i < BlipTonne.length; i++) {
|
||||
if (BlipTonne[i] == null) continue;
|
||||
BlipTonne[i].destroy();
|
||||
ShapeTonne[i].destroy();
|
||||
}
|
||||
BlipTonne = [];
|
||||
ShapeTonne = [];
|
||||
|
||||
if (BlipTonneHinten) BlipTonneHinten.destroy();
|
||||
BlipTonneHinten = null;
|
||||
if (CheckpointTonneHinten) CheckpointTonneHinten.destroy();
|
||||
CheckpointTonneHinten = null;
|
||||
if (ShapeTonneHinten) ShapeTonneHinten.destroy();
|
||||
ShapeTonneHinten = null;
|
||||
if (BlipTonneBase) BlipTonneBase.destroy();
|
||||
BlipTonneBase = null;
|
||||
if (CheckpointTonneBase) CheckpointTonneBase.destroy();
|
||||
CheckpointTonneBase = null;
|
||||
if (ShapeTonneBase) ShapeTonneBase.destroy();
|
||||
ShapeTonneBase = null;
|
||||
Traegt = false;
|
||||
});
|
||||
|
||||
mp.events.add("playerEnterColshape", (Shape, player) => {
|
||||
//mp.events.callRemote('CLIENT:ImShape', JSON.stringify(Shape));
|
||||
for (var i = 0; i < ShapeTonne.length; i++) {
|
||||
if (Shape != ShapeTonne[i]) continue;
|
||||
if (!Traegt) {
|
||||
if (!HintenVoll) {
|
||||
mp.events.callRemote('CLIENT:MuellmannImShape', JSON.stringify(Shape));
|
||||
Traegt = true;
|
||||
BlipTonne[i].destroy();
|
||||
BlipTonne[i] = null;
|
||||
ShapeTonne[i].destroy();
|
||||
ShapeTonne[i] = null;
|
||||
MuellSack = mp.objects.new(600967813, mp.players.local.position, { rotation: new mp.Vector3(0.0, 0.0, 0.0), alpha: 255, dimension: 0 });
|
||||
MuellSack.attachTo(mp.players.local.handle, mp.players.local.getBoneIndex(6286), 0.45, -0.9, -0.075, 270.0, 0.0, 25.0, true, true, false, false, 0, true);
|
||||
|
||||
createMarker();
|
||||
}
|
||||
else {
|
||||
mp.gui.chat.push("Der Müllwagen ist bereits voll! Fahre zur Base und lade ab!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
mp.gui.chat.push(`Du trägst bereits einen Müllsack!`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Shape == ShapeTonneHinten) {
|
||||
if (Traegt) {
|
||||
|
||||
Traegt = false;
|
||||
mp.events.callRemote('CLIENT:MuellmannAddSack');
|
||||
|
||||
if (BlipTonneHinten) BlipTonneHinten.destroy();
|
||||
BlipTonneHinten = null;
|
||||
if (CheckpointTonneHinten) CheckpointTonneHinten.destroy();
|
||||
CheckpointTonneHinten = null;
|
||||
if (ShapeTonneHinten) ShapeTonneHinten.destroy();
|
||||
ShapeTonneHinten = null;
|
||||
MuellSack.destroy();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else if (Shape == ShapeTonneBase) {
|
||||
BlipTonneBase.setRoute(false);
|
||||
mp.events.callRemote('CLIENT:MuellmannBaseSack');
|
||||
}
|
||||
});
|
||||
mp.events.add("MuellmannUpdateColshape", (jsonColShape) => {
|
||||
let ColShape = JSON.parse(jsonColShape);
|
||||
for (var i = 0; i < ShapeTonne.length; i++) {
|
||||
if (ColShape != ShapeTonne[i]) continue;
|
||||
BlipTonne[i].destroy();
|
||||
BlipTonne[i] = null;
|
||||
ShapeTonne[i].destroy();
|
||||
ShapeTonne[i] = null;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
mp.events.add("SERVER:MuellmannZuBase", () => {
|
||||
BlipTonneBase.setRoute(true);
|
||||
BlipTonneBase.setRouteColour(5);
|
||||
HintenVoll = true;
|
||||
});
|
||||
|
||||
mp.events.add("SERVER:MuellmannWiederLeer", () => {
|
||||
HintenVoll = false;
|
||||
});
|
||||
|
||||
function createMarker() {
|
||||
if (vehicle != null) {
|
||||
const playerPos = vehicle.position;
|
||||
let pos = new mp.Vector3(vehicle.position.x, vehicle.position.y - 5.5, vehicle.position.z - 1);
|
||||
if (BlipTonneHinten) BlipTonneHinten.destroy();
|
||||
BlipTonneHinten = null;
|
||||
if (CheckpointTonneHinten) CheckpointTonneHinten.destroy();
|
||||
CheckpointTonneHinten = null;
|
||||
if (ShapeTonneHinten) ShapeTonneHinten.destroy();
|
||||
ShapeTonneHinten = null;
|
||||
BlipTonneHinten = mp.blips.new(1, pos, { name: 'Müllmann', color: 24, shortRange: false });
|
||||
CheckpointTonneHinten = mp.markers.new(1, pos, 1, { direction: new mp.Vector3(-235.5747, -1685.475, 32.7207), color: [0, 255, 0, 255], visible: true, dimension: 0 });
|
||||
ShapeTonneHinten = mp.colshapes.newSphere(vehicle.position.x, vehicle.position.y - 5.5, vehicle.position.z - 1, 2);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
@@ -203,6 +203,9 @@ itemShopList(globalData);
|
||||
import taximeterInput from './Gui/taximeter';
|
||||
taximeterInput(globalData);
|
||||
|
||||
import refuseCollector from './Jobs/RefuseCollector';
|
||||
refuseCollector();
|
||||
|
||||
require('./Gui/policedepartment');
|
||||
|
||||
interface VehicleData {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export default function gangwarHandle(globalData: IGlobalData) {
|
||||
|
||||
|
||||
export default function gangwarHandle(globalData: IGlobalData) {
|
||||
|
||||
function inside(point, vs) {
|
||||
let x = point[0],
|
||||
@@ -48,7 +50,10 @@
|
||||
attacker: string;
|
||||
blip: BlipMp;
|
||||
_colshape: ColshapeMp;
|
||||
_marker: MarkerMp;
|
||||
vector: Vector3Mp;
|
||||
value: number;
|
||||
|
||||
_status: string;
|
||||
_entered: boolean;
|
||||
_isEntering: boolean;
|
||||
@@ -60,17 +65,17 @@
|
||||
leaderBlipVector: Vector3Mp;
|
||||
leaderColShape: MarkerMp;
|
||||
|
||||
constructor(name, id, x, y, range, color, rot, owner, edit, vector) {
|
||||
this._setup(name, id, x, y, range, color, rot, owner, edit, vector);
|
||||
constructor(name, id, x, y, range, color, rot, owner, edit, vector, value) {
|
||||
this._setup(name, id, x, y, range, color, rot, owner, edit, vector, value);
|
||||
}
|
||||
|
||||
_setup(name, id, x, y, range, color, rot, owner, edit, vector) {
|
||||
|
||||
_setup(name, id, x, y, range, color, rot, owner, edit, vector, value) {
|
||||
|
||||
var self = this;
|
||||
self.name = name;
|
||||
self.id = id;
|
||||
self.range = range;
|
||||
self.setColor(owner);
|
||||
self.setColor(owner);
|
||||
self.x = x;
|
||||
self.y = y;
|
||||
self.rotation = rot;
|
||||
@@ -86,12 +91,13 @@
|
||||
self.loadArea();
|
||||
self.attackBlip = null;
|
||||
self.leaderBlip = null;
|
||||
self.value = value;
|
||||
if (vector != null) {
|
||||
self.leaderBlipVector = JSON.parse(vector);
|
||||
} else {
|
||||
self.leaderBlipVector = null;
|
||||
}
|
||||
|
||||
|
||||
self.leaderColShape = null;
|
||||
}
|
||||
|
||||
@@ -123,6 +129,7 @@
|
||||
var self = this;
|
||||
|
||||
self.blip = mp.game.ui.addBlipForRadius(self.x, self.y, 1, self.range);
|
||||
|
||||
mp.game.invoke(Natives.SET_BLIP_SPRITE, self.blip, 5);
|
||||
mp.game.invoke(Natives.SET_BLIP_ALPHA, self.blip, 70);
|
||||
mp.game.invoke(Natives.SET_BLIP_COLOUR, self.blip, self.color);
|
||||
@@ -136,12 +143,15 @@
|
||||
if (self.edit == true) {
|
||||
let vector3 = mp.players.local.getRotation(2);
|
||||
self.rotation = Math.round(vector3.z);
|
||||
//self.blip.setPosition(mp.players.local.position.x, mp.players.local.position.y, 1);
|
||||
|
||||
mp.game.invoke(Natives.SET_BLIP_COORDS, self.blip, mp.players.local.position.x, mp.players.local.position.y, 1);
|
||||
self.x = mp.players.local.position.x;
|
||||
self.y = mp.players.local.position.y;
|
||||
}
|
||||
mp.game.invoke(Natives.SET_BLIP_ROTATION, self.blip, self.rotation);
|
||||
|
||||
//self.blip.setRotation(self.rotation);
|
||||
mp.game.invoke(Natives.SET_BLIP_ROTATION, self.blip, self.rotation);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -192,10 +202,10 @@
|
||||
a += 0.001
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (self.isInsideArea()) {
|
||||
mp.game.graphics.drawText(self.name, [self.x, self.y, mp.players.local.position.z + 20], {
|
||||
@@ -205,7 +215,7 @@
|
||||
outline: true,
|
||||
centre: true
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -213,7 +223,7 @@
|
||||
let dist = mp.game.gameplay.getDistanceBetweenCoords(mp.players.local.position.x, mp.players.local.position.y, mp.players.local.position.z, self.leaderBlipVector.x, self.leaderBlipVector.y, self.leaderBlipVector.z, false);
|
||||
if (self.isInsideArea() && self._status != "attack" && dist <= 6) {
|
||||
if (self.leaderBlipVector != null) {
|
||||
mp.game.graphics.drawText(self.name + "\n~y~Gang: ~s~" + self.owner + "\n~y~Wert: ~s~$~g~187", [self.leaderBlipVector.x, self.leaderBlipVector.y, self.leaderBlipVector.z], {
|
||||
mp.game.graphics.drawText(self.name + "\n~y~Gang: ~s~" + self.owner + "\n~y~Wert: ~s~$~g~" + self.value, [self.leaderBlipVector.x, self.leaderBlipVector.y, self.leaderBlipVector.z], {
|
||||
font: 7,
|
||||
color: [255, 255, 255, 185],
|
||||
scale: [0.4, 0.4],
|
||||
@@ -223,11 +233,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
startGangWar() {
|
||||
startGangWar() {
|
||||
var self = this;
|
||||
if (self._status == "normal") {
|
||||
let dist = mp.game.gameplay.getDistanceBetweenCoords(mp.players.local.position.x, mp.players.local.position.y, 0, self.leaderBlipVector.x, self.leaderBlipVector.y, self.leaderBlipVector.z, false);
|
||||
@@ -246,12 +256,14 @@
|
||||
}
|
||||
self._status = "attack";
|
||||
self.attacker = args[1];
|
||||
//self.blip.setFlashes(true);
|
||||
mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, true);
|
||||
return;
|
||||
}
|
||||
if (status == "normal") {
|
||||
self._status = "normal";
|
||||
mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false);
|
||||
//self.blip.setFlashes(false);
|
||||
mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false);
|
||||
return;
|
||||
}
|
||||
if (status == "conquered") {
|
||||
@@ -259,8 +271,10 @@
|
||||
self._status = "normal";
|
||||
self.owner = args[0];
|
||||
self.attacker = null;
|
||||
//self.blip.setFlashes(false);
|
||||
mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false);
|
||||
self.setColor(self.owner)
|
||||
//self.blip.setColour(self.color);
|
||||
mp.game.invoke(Natives.SET_BLIP_COLOUR, self.blip, self.color);
|
||||
self.setLeaderColShape();
|
||||
return;
|
||||
@@ -296,19 +310,19 @@
|
||||
self.setLeaderColShape();
|
||||
mp.game.invoke(Natives.SET_BLIP_SPRITE, self.leaderBlip, 437);
|
||||
mp.game.invoke(Natives.SET_BLIP_AS_SHORT_RANGE, self.leaderBlip, false);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
setLeaderColShape() {
|
||||
var self = this;
|
||||
let newVector = new mp.Vector3(self.leaderBlipVector.x, self.leaderBlipVector.y, self.leaderBlipVector.z - 2)
|
||||
|
||||
self.leaderColShape = mp.markers.new(1, newVector, 2, {
|
||||
color: [255, 255, 0, 150],
|
||||
visible: true,
|
||||
dimension: 0
|
||||
});
|
||||
let newVector = new mp.Vector3(self.leaderBlipVector.x, self.leaderBlipVector.y, self.leaderBlipVector.z - 2)
|
||||
|
||||
self.leaderColShape = mp.markers.new(1, newVector, 2, {
|
||||
color: [255, 255, 0, 150],
|
||||
visible: true,
|
||||
dimension: 0
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -321,7 +335,7 @@
|
||||
}
|
||||
|
||||
check() {
|
||||
var self = this
|
||||
var self = this
|
||||
if (self._entered == true) {
|
||||
if (!self.isInsideArea() || (self.isNearGround() == false)) {
|
||||
self._entered = false;
|
||||
@@ -329,7 +343,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
enter() {
|
||||
var self = this;
|
||||
self._timerCheck = setInterval(function () {
|
||||
@@ -340,8 +354,8 @@
|
||||
mp.game.audio.playSoundFrontend(1, "Enter_Capture_Zone", "DLC_Apartments_Drop_Zone_Sounds", true);
|
||||
mp.game.graphics.stopScreenEffect("MinigameTransitionIn");
|
||||
mp.game.graphics.startScreenEffect("MinigameTransitionOut", 500, false);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
mp.events.callRemote("Gangarea:Enter", JSON.stringify(self.id));
|
||||
}
|
||||
} else if (self._entered == true) {
|
||||
@@ -350,7 +364,7 @@
|
||||
if (self._status === "attack") {
|
||||
mp.game.audio.playSoundFrontend(1, "Exit_Capture_Zone", "DLC_Apartments_Drop_Zone_Sounds", true);
|
||||
mp.game.graphics.startScreenEffect("MinigameTransitionIn", 500, false);
|
||||
}
|
||||
}
|
||||
mp.events.callRemote("Gangarea:Leave", JSON.stringify(self.id));
|
||||
}
|
||||
}
|
||||
@@ -360,7 +374,7 @@
|
||||
leave() {
|
||||
var self = this;
|
||||
clearInterval(self._timerCheck);
|
||||
|
||||
|
||||
self.check();
|
||||
}
|
||||
isNearGround() {
|
||||
@@ -412,6 +426,11 @@
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
setValue(value) {
|
||||
var self = this;
|
||||
self.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
var gangturfs = [];
|
||||
@@ -453,23 +472,28 @@
|
||||
let last_blip = mp.game.invoke(Natives.GET_FIRST_BLIP_INFO_ID, 5);
|
||||
|
||||
while (mp.game.invoke(Natives.DOES_BLIP_EXIST, last_blip)) {
|
||||
mp.game.ui.removeBlip(last_blip);
|
||||
mp.game.invoke(Natives.SET_BLIP_SPRITE, last_blip, -1);
|
||||
mp.game.ui.removeBlip(last_blip);
|
||||
last_blip = mp.game.invoke(Natives.GET_NEXT_BLIP_INFO_ID, 5);
|
||||
x++;
|
||||
mp.gui.chat.push(""+x);
|
||||
}
|
||||
|
||||
let last_attackBlip = mp.game.invoke(Natives.GET_FIRST_BLIP_INFO_ID, 378);
|
||||
while (mp.game.invoke(Natives.DOES_BLIP_EXIST, last_attackBlip)) {
|
||||
mp.game.invoke(Natives.SET_BLIP_SPRITE, last_attackBlip, -1);
|
||||
mp.game.ui.removeBlip(last_attackBlip);
|
||||
last_attackBlip = mp.game.invoke(Natives.GET_NEXT_BLIP_INFO_ID, 378);
|
||||
}
|
||||
|
||||
let last_leaderBlip = mp.game.invoke(Natives.GET_FIRST_BLIP_INFO_ID, 437);
|
||||
while (mp.game.invoke(Natives.DOES_BLIP_EXIST, last_leaderBlip)) {
|
||||
mp.game.invoke(Natives.SET_BLIP_SPRITE, last_leaderBlip, -1);
|
||||
mp.game.ui.removeBlip(last_leaderBlip);
|
||||
last_leaderBlip = mp.game.invoke(Natives.GET_NEXT_BLIP_INFO_ID, 437);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mp.events.add('GangAreas:Create', (turfsJSON) => {
|
||||
var turfs = JSON.parse(turfsJSON);
|
||||
if (gangturfs.length > 0) {
|
||||
@@ -481,15 +505,25 @@
|
||||
turf.leaderColShape.destroy();
|
||||
turf.leaderColShape = null;
|
||||
}
|
||||
if (turf._marker)
|
||||
if (turf.blip != null) {
|
||||
mp.game.ui.removeBlip(turf.blip);
|
||||
}
|
||||
if (turf.leaderBlip != null) {
|
||||
mp.game.ui.removeBlip(turf.leaderBlip);
|
||||
}
|
||||
if (turf.attackBlip != null) {
|
||||
mp.game.ui.removeBlip(turf.attackBlip);
|
||||
}
|
||||
});
|
||||
}
|
||||
clearBlips();
|
||||
if (turfs.length > 0) {
|
||||
|
||||
|
||||
gangturfs = [];
|
||||
turfs.forEach(function (turf) {
|
||||
if (turf.Id != undefined) {
|
||||
gangturfs[gangturfs.length] = new Gangturf(turf.Name, turf.Id, turf.X, turf.Y, turf.Range, turf.Color, turf.Rotation, turf.Owner, false, turf.Vector);
|
||||
gangturfs[gangturfs.length] = new Gangturf(turf.Name, turf.Id, turf.X, turf.Y, turf.Range, turf.Color, turf.Rotation, turf.Owner, false, turf.Vector, turf.Value);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -497,7 +531,7 @@
|
||||
|
||||
mp.events.add('ADMIN:CreateTurf', (rangeJSON) => {
|
||||
var range = JSON.parse(rangeJSON);
|
||||
gangturfs[gangturfs.length] = new Gangturf("Reload For Name", -1, mp.players.local.position.x, mp.players.local.position.y, range, 0, mp.players.local.getHeading(), "Neutral", true, null);
|
||||
gangturfs[gangturfs.length] = new Gangturf("Reload For Name", -1, mp.players.local.position.x, mp.players.local.position.y, range, 0, mp.players.local.getHeading(), "Neutral", true, null, 0);
|
||||
});
|
||||
|
||||
mp.events.add('ADMIN:SetTurf', (name) => {
|
||||
@@ -505,7 +539,7 @@
|
||||
if (gangturfs[gangturfs.length - 1].id == -1) {
|
||||
|
||||
mp.events.callRemote("SERVER:SetTurf", JSON.stringify(gangturfs[gangturfs.length - 1].x), JSON.stringify(gangturfs[gangturfs.length - 1].y), JSON.stringify(gangturfs[gangturfs.length - 1].rotation), JSON.stringify(gangturfs[gangturfs.length - 1].range), name);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mp.events.add('ADMIN:DeleteTurf', () => {
|
||||
@@ -541,13 +575,13 @@
|
||||
|
||||
mp.events.add('CLIENT:Turf_LoadLeaderBlip', () => {
|
||||
gangturfs.forEach(function (turf) {
|
||||
turf.setLeaderBlip(false);
|
||||
turf.setLeaderBlip(false);
|
||||
});
|
||||
});
|
||||
|
||||
mp.events.add('ADMIN:Turf_CreateLeaderBlip', () => {
|
||||
gangturfs.forEach(function (turf) {
|
||||
if (turf._entered == true) {
|
||||
if (turf._entered == true) {
|
||||
turf.setLeaderBlip(true);
|
||||
}
|
||||
});
|
||||
@@ -556,8 +590,17 @@
|
||||
mp.events.add('CLIENT:StartGangwar', () => {
|
||||
gangturfs.forEach(function (turf) {
|
||||
if (turf._entered == true) {
|
||||
turf.startGangWar();
|
||||
turf.startGangWar();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
mp.events.add('CLIENT:UpdateTurfValue', (jsonValues) => {
|
||||
let values = JSON.parse(jsonValues);
|
||||
for (var i = 0; i < gangturfs.length; i++) {
|
||||
let turf = gangturfs[i];
|
||||
turf.setValue(values[i]);
|
||||
turf.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user