GangwarFix zweiter Tag 9

This commit is contained in:
VegaZ
2021-03-30 22:06:28 +02:00
parent 17f7899823
commit 136c1c06d2

View File

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