diff --git a/ReallifeGamemode.Server/Gangwar/Turf.cs b/ReallifeGamemode.Server/Gangwar/Turf.cs index a2ef678e..e93eeb7e 100644 --- a/ReallifeGamemode.Server/Gangwar/Turf.cs +++ b/ReallifeGamemode.Server/Gangwar/Turf.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using System.Timers; using GTANetworkAPI; using Microsoft.EntityFrameworkCore; @@ -113,6 +114,13 @@ namespace ReallifeGamemode.Server.Gangwar this.timerCount = 0; } + private async Task reloadGangTurfs() + { + await Task.Delay(10000); + Gangwar.loadTurfs(); + Gangwar.loadTurfs_ToAllPlayers(); + } + private void Tick(object sender, System.Timers.ElapsedEventArgs e) { if (this.status == "attack") @@ -286,8 +294,7 @@ namespace ReallifeGamemode.Server.Gangwar 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(); + reloadGangTurfs(); } public void attack(string attacker)