Closed Armatura-Create closed 2 months ago
When launching default maps, the hostname is not always transmitted correctly; sometimes it just says Counter Strike 2 I solved this problem by simply initializing the server model 5 seconds later in OnMapStart listener
AddTimer(5.0f, () => { playerData.Clear(); serverData = new ServerData { ModuleDirectory = ModuleDirectory, GameDirectory = Server.GameDirectory, Name = ConVar.Find("hostname")!.StringValue, MaxPlayers = Server.MaxPlayers.ToString(), MapName = Server.MapName, OnlinePlayers = 0.ToString(), OnlinePlayersAndBots = 0.ToString(), OnlineBots = 0.ToString(), Timeleft = 60.ToString(), IP = Config.ServerIP }; Server.ExecuteCommand("sv_hibernate_when_empty false"); ServerDataLoaded(); });
Fixed, https://github.com/NockyCZ/CS2-Discord-Utilities/releases/tag/v2.0.6
When launching default maps, the hostname is not always transmitted correctly; sometimes it just says Counter Strike 2 I solved this problem by simply initializing the server model 5 seconds later in OnMapStart listener