From 5ce4e217e93d8dcd2fcf4f11ed51f55bee2f2f83 Mon Sep 17 00:00:00 2001 From: Siga Date: Sat, 4 Apr 2020 18:39:39 +0200 Subject: [PATCH] debug --- ReallifeGamemode.Client/util/Gangwar.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/util/Gangwar.ts b/ReallifeGamemode.Client/util/Gangwar.ts index 1dc2e32a..c50e5211 100644 --- a/ReallifeGamemode.Client/util/Gangwar.ts +++ b/ReallifeGamemode.Client/util/Gangwar.ts @@ -469,6 +469,8 @@ export default function gangwarHandle(globalData: IGlobalData) { function clearBlips() { mp.game.gameplay.setThisScriptCanRemoveBlipsCreatedByAnyScript(true); var x = 0; + var y = 0; + var z = 0; let last_blip = mp.game.invoke(Natives.GET_FIRST_BLIP_INFO_ID, 5); while (mp.game.invoke(Natives.DOES_BLIP_EXIST, last_blip)) { @@ -476,7 +478,6 @@ export default function gangwarHandle(globalData: IGlobalData) { 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); @@ -484,6 +485,7 @@ export default function gangwarHandle(globalData: IGlobalData) { 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++ } let last_leaderBlip = mp.game.invoke(Natives.GET_FIRST_BLIP_INFO_ID, 437); @@ -491,7 +493,11 @@ export default function gangwarHandle(globalData: IGlobalData) { 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); + z++ } + 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: LeaderBlips blips not removed: " + z); } mp.events.add('GangAreas:Create', (turfsJSON) => {