change gangwar

This commit is contained in:
Michael
2020-07-30 21:02:56 +02:00
parent 6ab7ccc36f
commit 98ac7c7bf3
3 changed files with 16 additions and 10 deletions

View File

@@ -258,7 +258,7 @@ export default function (globalData: IGlobalData): void {
}) })
} }
if (att_score > 0 && def_score > 0) { if (att_score >= 1 && def_score < 200) {
mp.game.graphics.drawText("~y~" + def + " " + def_score + " : " + att_score + " " + att, [0.07, 0.55], mp.game.graphics.drawText("~y~" + def + " " + def_score + " : " + att_score + " " + att, [0.07, 0.55],
{ {
font: 4, font: 4,

View File

@@ -241,24 +241,25 @@
self._status = "attack"; self._status = "attack";
self.attacker = args[1]; self.attacker = args[1];
//self.blip.setFlashes(true); //self.blip.setFlashes(true);
mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, true); //mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, true);
return; return;
} }
if (status == "normal") { if (status == "normal") {
self._status = "normal"; self._status = "normal";
//self.blip.setFlashes(false); //self.blip.setFlashes(false);
mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false); //mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false);
return; return;
} }
if (status == "conquered") { if (status == "conquered") {
mp.game.graphics.stopScreenEffect("MinigameTransitionIn"); //mp.game.graphics.stopScreenEffect("MinigameTransitionIn");
self._status = "normal"; self._status = "normal";
self.owner = args[0]; self.owner = args[0];
self.attacker = null; self.attacker = null;
//self.blip.setFlashes(false); //self.blip.setFlashes(false);
mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false); //mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false);
self.setColor(self.owner) self.setColor(self.owner)
//self.blip.setColour(self.color); self.blip.setColour(self.color)
mp.game.invoke(Natives.SET_BLIP_COLOUR, self.blip, self.color); mp.game.invoke(Natives.SET_BLIP_COLOUR, self.blip, self.color);
self.setLeaderColShape(); self.setLeaderColShape();
return; return;
@@ -333,8 +334,8 @@
self._entered = true; self._entered = true;
if (self._status == "attack") { if (self._status == "attack") {
mp.game.audio.playSoundFrontend(1, "Enter_Capture_Zone", "DLC_Apartments_Drop_Zone_Sounds", true); mp.game.audio.playSoundFrontend(1, "Enter_Capture_Zone", "DLC_Apartments_Drop_Zone_Sounds", true);
mp.game.graphics.stopScreenEffect("MinigameTransitionIn"); //mp.game.graphics.stopScreenEffect("MinigameTransitionIn");
mp.game.graphics.startScreenEffect("MinigameTransitionOut", 500, false); //mp.game.graphics.startScreenEffect("MinigameTransitionOut", 500, false);
} }
mp.events.callRemote("Gangarea:Enter", JSON.stringify(self.id)); mp.events.callRemote("Gangarea:Enter", JSON.stringify(self.id));
} }
@@ -343,7 +344,7 @@
self._entered = false; self._entered = false;
if (self._status === "attack") { if (self._status === "attack") {
mp.game.audio.playSoundFrontend(1, "Exit_Capture_Zone", "DLC_Apartments_Drop_Zone_Sounds", true); mp.game.audio.playSoundFrontend(1, "Exit_Capture_Zone", "DLC_Apartments_Drop_Zone_Sounds", true);
mp.game.graphics.startScreenEffect("MinigameTransitionIn", 500, false); //mp.game.graphics.startScreenEffect("MinigameTransitionIn", 500, false);
} }
mp.events.callRemote("Gangarea:Leave", JSON.stringify(self.id)); mp.events.callRemote("Gangarea:Leave", JSON.stringify(self.id));
} }
@@ -473,7 +474,12 @@
mp.game.invoke(Natives.SET_BLIP_SPRITE, last_leaderBlip, -1); mp.game.invoke(Natives.SET_BLIP_SPRITE, last_leaderBlip, -1);
mp.game.ui.removeBlip(last_leaderBlip); mp.game.ui.removeBlip(last_leaderBlip);
last_leaderBlip = mp.game.invoke(Natives.GET_NEXT_BLIP_INFO_ID, 437); last_leaderBlip = mp.game.invoke(Natives.GET_NEXT_BLIP_INFO_ID, 437);
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);
y++
z++ z++
} }
mp.gui.chat.push("DEBUG: Turf blips not removed: " + x); mp.gui.chat.push("DEBUG: Turf blips not removed: " + x);
mp.gui.chat.push("DEBUG: Attack blips not removed: " + y); mp.gui.chat.push("DEBUG: Attack blips not removed: " + y);

View File

@@ -163,7 +163,7 @@ namespace ReallifeGamemode.Server.Gangwar
this.takeOver(this.Owner); this.takeOver(this.Owner);
} }
timerCount += 1; timerCount += 1;
if (timerCount >= 900) //change to 900 (seconds) before release for testing reasons change to whatever you like if (timerCount >= 10) //change to 900 (seconds) before release for testing reasons change to whatever you like
{ {
if (this.Att_Score > this.Def_Score) if (this.Att_Score > this.Def_Score)
{ {