Fix Medic

This commit is contained in:
VegaZ
2021-04-04 15:18:30 +02:00
parent 3dd15de267
commit 1e7f2deac9
4 changed files with 53 additions and 11 deletions

View File

@@ -1,5 +1,6 @@
using System.Timers;
using GTANetworkAPI;
using ReallifeGamemode.Server.Factions.Medic;
using ReallifeGamemode.Server.Finance;
using ReallifeGamemode.Server.Job;
using ReallifeGamemode.Server.Managers;
@@ -11,6 +12,7 @@ namespace ReallifeGamemode.Server.Util
public class ThreadTimers
{
private static Timer timer500 = new Timer(500); //0.5 seconds timer
private static Timer timer1000 = new Timer(1000); //1 seconds timer
private static Timer timer2500 = new Timer(2500); //2.5 seconds timer
private static Timer timer10000 = new Timer(10000); // 10 second timer
private static Timer timer60000 = new Timer(60000); //60 seconds timer
@@ -39,6 +41,14 @@ namespace ReallifeGamemode.Server.Util
});
}
private static void Timer1000_Elapsed(object sender, ElapsedEventArgs e)
{
NAPI.Task.Run(() =>
{
Medic.UpdateTaskTimeLeft();
});
}
private static void Timer60000_Elapsed(object sender, ElapsedEventArgs e)
{
NAPI.Task.Run(() =>