diff --git a/ReallifeGamemode.Client/util/Gangwar.ts b/ReallifeGamemode.Client/util/Gangwar.ts index c5d518ec..c1d57dc2 100644 --- a/ReallifeGamemode.Client/util/Gangwar.ts +++ b/ReallifeGamemode.Client/util/Gangwar.ts @@ -557,6 +557,18 @@ }); }); + mp.events.add('CLIENT:Turf_Conquered', (jsonId, jsonStatus, jsonOwner) => { + var id = JSON.parse(jsonId); + var status = JSON.parse(jsonStatus); + var owner = JSON.parse(jsonOwner); + + gangturfs.forEach(function (turf) { + if (turf.id == id) { + turf.updateArea(status, owner); + } + }); + }); + mp.events.add('CLIENT:setAttackBlip', (bool, id) => { gangturfs.forEach(function (turf) { if (turf.id == id) { diff --git a/ReallifeGamemode.Server/Gangwar/Turf.cs b/ReallifeGamemode.Server/Gangwar/Turf.cs index 07bba0eb..5886022e 100644 --- a/ReallifeGamemode.Server/Gangwar/Turf.cs +++ b/ReallifeGamemode.Server/Gangwar/Turf.cs @@ -283,6 +283,9 @@ namespace ReallifeGamemode.Server.Gangwar c.ResetData("GotInsideOfTurf"); } this.playerInGangwar = null; + this.status = "conquered"; + + NAPI.ClientEvent.TriggerClientEventForAll("CLIENT:Turf_Conquered", JsonConvert.SerializeObject(this.TurfID), JsonConvert.SerializeObject(this.status), JsonConvert.SerializeObject(this.Owner)); Gangwar.loadTurfs(); Gangwar.loadTurfs_ToAllPlayers(); }