void DonationRewardCommand(BasePlayer player, string command, string[] args) { Puts("PacketInit." + packetSent); reloadUser(player); _timer = timer.Repeat(1, 0, () => { Puts("PacketSent." + packetSent); if (player != null && packetSent == true) { var playername = player.displayName; var playerData = getConnectedPlayerDetailsData(player.userID); int amount = (int)playerData["amount"]; packetSent = false; if (amount == 0) { PrintToChat(player, GetMessage("CreditAddFail", player.UserIDString)); _timer.Destroy(); return; } else { PrintToChat(player, GetMessage("CreditAddSuccess", player.UserIDString).Replace("{amount}", amount.ToString()).Replace("{playername}", playername.ToString())); rewardUser(player); _timer.Destroy(); } } }); }
private void StopThisRagnarokBabeChatCommand(BasePlayer player, string command, string[] args) { bool isadmin = permission.UserHasPermission(player.UserIDString, RagnarokAdmin); if (!isadmin) { SendReply(player, $"You don't have permission for this."); return; } if (RagnarokIsOn) { if (RagnaEndTimer != null) { RagnaEndTimer.Destroy(); } if (RagnaTimer != null) { RagnaTimer.Destroy(); } StopThisRagnarokBabe(); SendReply(player, $"Ragnarok has stopped."); } else { SendReply(player, $"Ragnarok is already Off."); } }
void Unload() { if (AttackTimer != null) { AttackTimer.Destroy(); } }
void Unload() { eventpause?.Destroy(); eventstart?.Destroy(); ingameTimer?.Destroy(); runningman = null; }
void Unload() { Abort(); if (TimerRefresh != null) { TimerRefresh.Destroy(); } }
void OnUserDisconnected(IPlayer player) { if (target != null && activeVote && player.Id == target.Id) { server.Broadcast(lang.GetMessage("Target Disconnected", this)); activeVote = false; voteTimer?.Destroy(); voted.Clear(); target = null; } }
private void StartPeriod() { _cachedRaidTime = DateTime.UtcNow; _canRaid = false; foreach (var p in BasePlayer.activePlayerList) { PrintToChat(p, Lang("Cmd_NoRaid", p.UserIDString, GetFormattedTime((_cachedRaidTime.AddMinutes(_startMinutes) - DateTime.UtcNow).TotalSeconds))); } _startTimer = timer.Every(cFile.NoRaidCommand.CheckInterval, () => { if (UI.ShouldDestroy(_cachedRaidTime, _startMinutes)) { _canRaid = true; PrintToChat(Lang("CanRaid")); _startTimer?.Destroy(); _startUiTimer?.Destroy(); _startTimer = null; _startUiTimer = null; foreach (var p in BasePlayer.activePlayerList) { if (_uiPlayers.Contains(p.userID)) { _uiPlayers.Remove(p.userID); } CuiHelper.DestroyUi(p, _uiParent); } } }); if (cFile.Ui.Enabled) { UI.ConstructCachedUi(); _startUiTimer = timer.Every(cFile.Ui.RefreshInterval, () => { if (UI.ShouldDestroy(_cachedRaidTime, _startMinutes)) { return; } var container = UI.ConstructTimer(_cachedRaidTime, _startMinutes); foreach (var p in BasePlayer.activePlayerList) { if (!_uiPlayers.Contains(p.userID)) { CuiHelper.AddUi(p, _cachedContainer); _uiPlayers.Add(p.userID); } CuiHelper.DestroyUi(p, _timerParent); CuiHelper.AddUi(p, container); } }); } }
void Unload() { if (VotingTimer != null) { VotingTimer.Destroy(); } if (TimeCheck != null) { TimeCheck.Destroy(); } }
public void StopEvent(bool completed = false) { _eventTimer?.Destroy(); StopSpawnRoutine(); DespawnPlane(); DespawnMarker(); DespawnCrate(completed); DespawnAI(); _plugin?.DelEvent(this); }
void Unload() { if (voteTimer != null) { voteTimer.Destroy(); } foreach (var player in BasePlayer.activePlayerList) { CuiHelper.DestroyUi(player, Main); } }
public void Destroy() { if (Timer != null && !Timer.Destroyed) { Timer.Destroy(); } }
public new void Exit(IemStateManager.StateManager sm) { EmbankStateManager gsm = (EmbankStateManager)sm; IemUI.UpdateGameStatusBanner("", gsm.eg); completeTimer?.Destroy(); }
void Unload() { if (FCleanupTimer != null && !FCleanupTimer.Destroyed) { FCleanupTimer.Destroy(); } }
private void StopTimer() { if (EventTimer != null) { EventTimer.Destroy(); } }
void RunnerStop(PlayerSession session, bool admin = false) { if (session != null) { give(session); } if (admin) { Server.Broadcast("<color=#95E447>[RUN]</color> Event stopped!"); } if (!ts.Destroyed) { ts.Destroy(); } if (mark != null) { try { MapManagerServer.Instance.DeregisterMarker(mark); }catch {} } if (runningman.WorldPlayerEntity != null) { var rn = runningman.WorldPlayerEntity.GetComponent <RunnerMan>(); OnUnRegisterRunner(); rn.TryDestroy(); } runningman = null; cTimer = 0; }
public void Stop() { _onDeactivate.Invoke(this); _innerTimer?.Destroy(); _innerTimer = null; }
void Unload() { if (broadcastTimer != null) { broadcastTimer.Destroy(); } }
//////////////////////////////////////////////////////////////////////////////// void Destroytimer() { if (cargorefresh != null) { cargorefresh.Destroy(); } }
void Unload() { if (timeCheck != null) { timeCheck.Destroy(); } }
void Unload() { if (LocationUpdater != null && !LocationUpdater.Destroyed) { LocationUpdater.Destroy(); } }
void cmdEventOff(BasePlayer player, string cmd, string[] args) { if (!hasAccess(player, "runningman.admin")) { SendReply(player, string.Format(lang.GetMessage("NoPerm", this, player.UserIDString), Config["Default", "ChatName"])); return; } if (eventpause != null) { eventpause.Destroy(); eventpause = null; runningman = null; Runlog("timer eventpause stopped"); } if (eventstart != null) { eventstart.Destroy(); eventstart = null; runningman = null; Runlog("timer eventstart stopped"); } if (ingameTimer != null) { ingameTimer.Destroy(); Runlog("ingameTimer stopped"); } Runlog("Running Man has stopped"); SendReply(player, string.Format(lang.GetMessage("EventStopped", this, player.UserIDString), Config["Default", "ChatName"])); }
void Unload() { if (announceTimer != null) { announceTimer.Destroy(); } }
void Unload() { if (currentPositionLogTimer != null) { currentPositionLogTimer.Destroy(); } }
void RunOnce() { if (chaintimer != null) { chaintimer.Destroy(); } if (Convert.ToBoolean(Config["EnableTimerOnce"]) == true) { foreach (var cmdc in Config["TimerOnce"] as Dictionary <string, object> ) { chaintimer = timer.Once(Convert.ToSingle(cmdc.Value), () => { ConsoleManager.Instance?.ExecuteCommand(cmdc.Key); Puts($"ran the command || " + cmdc.Key.ToString()); }); } } }
void RunRepeater() { if (repeater != null) { repeater.Destroy(); } if (Convert.ToBoolean(Config["EnableTimerRepeat"]) == true) { foreach (var cmd in Config["TimerRepeat"] as Dictionary <string, object> ) { repeater = timer.Repeat(Convert.ToSingle(cmd.Value), 0, () => { ConsoleManager.Instance?.ExecuteCommand(cmd.Key); Puts($"ran the command || " + cmd.Key.ToString()); }); } } }
void Unloaded() { if (g_refreshTimer != null) { g_refreshTimer.Destroy(); g_refreshTimer = null; } }
private void ResetEvent() { _currentScramble = null; _repeater?.Destroy(); _repeater = timer.Every(_config.EventTime, StartEvent); _currentTimer?.Destroy(); }
void Unload() { PrintWarning("Saving created promocodes, removing timers and existing codes..."); LoadData(); if (_timer != null && !_timer.Destroyed) { _timer.Destroy(); int timeleft = (int)NextSpawn.Subtract(DateTime.Now).TotalSeconds; data.Timer = timeleft; SaveData(); } foreach (var item in CreatedBoxes) { item.Key.entityOwner.Kill(); data.SavedCodes.Add(item.Value); SaveData(); } }
public new void Exit(IemStateManager.StateManager sm) { EmbankStateManager gsm = (EmbankStateManager)sm; gameLobbyWaitTimer.Destroy(); gameLobbyBannerTimer.Destroy(); EntitiesTakingDamage -= gsm.eg.PlayerImmortal; }
void Unloaded() { if (g_refreshTimer == null) { return; } g_refreshTimer.Destroy(); g_refreshTimer = null; }