Gangwar Fix #7

This commit is contained in:
VegaZ
2021-03-29 23:06:39 +02:00
parent 58c0af2d55
commit d9569972d3
2 changed files with 15 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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();
}