Hey guys, i have setup a RealTime script to sync the server world time with the realtime, but if i want to check the Time the time will return wrong numbers.
[Command("settime")]
public void Settime(Client player, int hrs, int min)
{
NAPI.World.SetTime(hrs, min, 0);
NAPI.Chat.SendChatMessageToPlayer(player, $"~g~[WELT ZEIT]~w~ Du hast die Zeit auf: ~y~{hrs}:{min}~w~Uhr gestellt.");
}
[Command("time")]
public void Time(Client player)
{
NAPI.Chat.SendChatMessageToPlayer(player, $"~g~[SERVER]~w~ Aktuell ist es {NAPI.World.GetTime().ToString()} Uhr");
}
}
btw. every minute the server will set the world time to real time.
NAPI.World.SetTime(DateTime.Now.Hour, DateTime.Now.Minute, 0);