public TimedEvent battletimer(int timeoutDelay, Dictionary <string, object> args) { TimedEvent timedEvent = new TimedEvent(timeoutDelay); timedEvent.Args = args; timedEvent.OnFire += CallBack1; return(timedEvent); }
public void CallBack1(TimedEvent e) { var dict = e.Args; e.Kill(); foreach (RoyaleUser pl in server.Players) { if (inroyale.Contains(pl.UID)) { Vector3 pos = (Vector3)ds.Get("LobbySpawn", "spawn"); pl.MessageFrom("BattleRoyale", EndMessage); inroyale.Remove(pl.UID); inlobby.Add(pl.UID); pl.Inventory.ClearAll(); pl.TeleportTo(pos); } } SpawnLoot(); StartWaitTimer(); }