This commit is contained in:
Lukas Moungos
2019-12-04 21:03:29 +01:00
parent 542f9353d8
commit 6d5e24c955
2 changed files with 7 additions and 4 deletions

View File

@@ -218,7 +218,7 @@
setAttackBlip(bool) {
var self = this;
if (bool) {
self.attackBlip = mp.game.ui.addBlipForRadius(self.x, self.y, 1, 20);
self.attackBlip = mp.game.ui.addBlipForRadius(self.x, self.y, 1, 60);
mp.game.invoke(Natives.SET_BLIP_SPRITE, self.attackBlip, 378);
mp.game.invoke(Natives.SET_BLIP_AS_SHORT_RANGE, self.attackBlip, false);
@@ -251,15 +251,18 @@
if ((!self._entered)) {
if (self.isInsideArea() && (self.isNearGround() == 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.events.callRemote("Gangarea:Enter", JSON.stringify(self.id));
}
} else if (self._entered == true) {
if (!self.isInsideArea() || (self.isNearGround() == 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.events.callRemote("Gangarea:Leave", JSON.stringify(self.id));
}
}

View File

@@ -205,7 +205,7 @@ namespace ReallifeGamemode.Server.Gangwar
a.TriggerEvent("CLIENT:win");
}
this.Owner = FactionName;
ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte erfolgreich das Gebiet ~g~" + getName() + "~w~ verteidigen.", dbContext.Factions.Where(f => f.Name == getOwner()).FirstOrDefault());
ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte erfolgreich das Gebiet ~g~" + getName() + "~w~ erobern.", dbContext.Factions.Where(f => f.Name == getOwner()).FirstOrDefault());
Turfs turf = dbContext.Turfs.Where(t => t.Id == getId()).FirstOrDefault();
turf.Owner = this.Owner;
turf.FactionId = dbContext.Factions.Where(f => f.Name == this.Owner).FirstOrDefault().Id;