From c173278f6590706be52036404fdddb79bc042b04 Mon Sep 17 00:00:00 2001 From: Lukas Moungos Date: Wed, 4 Dec 2019 20:44:50 +0100 Subject: [PATCH] fix blip --- ReallifeGamemode.Client/util/Gangwar.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ReallifeGamemode.Client/util/Gangwar.ts b/ReallifeGamemode.Client/util/Gangwar.ts index ae9fbb0a..447eba34 100644 --- a/ReallifeGamemode.Client/util/Gangwar.ts +++ b/ReallifeGamemode.Client/util/Gangwar.ts @@ -218,12 +218,10 @@ setAttackBlip(bool) { var self = this; if (bool) { - self.attackBlip = mp.game.ui.addBlipForRadius(self.x, self.y, 1, 3); + self.attackBlip = mp.game.ui.addBlipForRadius(self.x, self.y, 1, 20); mp.game.invoke(Natives.SET_BLIP_SPRITE, self.attackBlip, 378); - mp.game.invoke(Natives.SET_BLIP_FLASHES, self.attackBlip, true); } else if (!bool) { - mp.game.invoke(Natives.SET_BLIP_ALPHA, self.blip, 0); - mp.game.invoke(Natives.SET_BLIP_FLASHES, self.attackBlip, false); + mp.game.invoke(Natives.SET_BLIP_SPRITE, self.attackBlip, 5); } } @@ -251,13 +249,15 @@ if ((!self._entered)) { if (self.isInsideArea() && (self.isNearGround() == true)) { self._entered = true; - mp.game.audio.playSoundFrontend(1, "Enter_Capture_Zone", "DLC_Apartments_Drop_Zone_Sounds", true); + if (this.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; - mp.game.audio.playSoundFrontend(1, "Exit_Capture_Zone", "DLC_Apartments_Drop_Zone_Sounds", true); + if (this.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)); } } @@ -363,6 +363,8 @@ mp.game.ui.removeBlip(last_blip); last_blip = mp.game.invoke(Natives.GET_NEXT_BLIP_INFO_ID, 5); } + + } mp.events.add('GangAreas:Create', (turfsJSON) => {