private void QuitHandler(Player source, Slipe.Server.Peds.Events.OnQuitEventArgs eventArgs) { // Kick/Ban currently not working, returns "index is nil" string outputString = $"* Quit: {source.Name}#FF6464 "; outputString += eventArgs.QuitType switch { QuitType.Bad_Connection => $"has left the server (Bad Connection)", QuitType.Timed_Out => $"has left the server (Timed Out)", _ => $"has left the server.", }; ChatBox.WriteLine(outputString, new Color(0xFF6464), true); Console.WriteLine(StripColors(outputString)); }
private void HandlePlayerQuit(Player source, Slipe.Server.Peds.Events.OnQuitEventArgs eventArgs) { players.Remove((RacePlayer)source); }