public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (ev.Player.TeamRole.Role.Equals(Role.FACILITY_GUARD) && plugin.GetConfigBool("gaurd_upgrade")) { ev.Player.ChangeRole(Role.NTF_CADET); } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { // 判断有木有SCP-181 if (GlobalVar.scp181 == null) { return; } // 判断玩家是不是SCP-181 不是则退出本次事件 if (ev.Player.Name.Equals(GlobalVar.scp181.Name) == false) { return; } if (ev.Player.PlayerId != GlobalVar.scp181.PlayerId) { return; } // 如果debug模式开启了 if (plugin.GetConfigBool("scp181_debug") == true) { plugin.Info("======================SCP-181 CheckEscape [Debug]======================"); plugin.Info("SCP-181: " + ev.Player.Name + "(" + ev.Player.PlayerId + ")"); plugin.Info("Team: " + ev.Player.TeamRole.Name); } // 设置 SCP-181 出逃状态为true GlobalVar.scp181_escape = true; return; }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { /// <summary> /// Called when a player is checking if they should escape (this is regardless of class) /// <summary> plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_oncheckescape"), ev.Player.Name + " (" + ev.Player.SteamId + plugin.MultiLanguage(33) + ev.Player.TeamRole + "."); }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (SCP008.playersToDamage.Contains(ev.Player.SteamId)) { SCP008.playersToDamage.Remove(ev.Player.SteamId); } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (ev.Player.TeamRole.Role == Role.CLASSD) { AmountOfPlayersEscaped++; } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { /// <summary> /// Called when a player is checking if they should escape (this is regardless of class) /// <summary> Dictionary <string, string> variables = new Dictionary <string, string> { { "allowescape", ev.AllowEscape.ToString() }, { "ipaddress", ev.Player.IpAddress }, { "name", ev.Player.Name }, { "playerid", ev.Player.PlayerId.ToString() }, { "steamid", ev.Player.SteamId }, { "class", ev.Player.TeamRole.Role.ToString() }, { "team", ev.Player.TeamRole.Team.ToString() } }; if (ev.AllowEscape) { plugin.SendMessage(Config.GetArray("channels.oncheckescape.allowed"), "player.oncheckescape.allowed", variables); } else { plugin.SendMessage(Config.GetArray("channels.oncheckescape.denied"), "player.oncheckescape.denied", variables); } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (ev.AllowEscape) { ev.ChangeRole = Role.SPECTATOR; } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (ev.AllowEscape && AdminToolbox.ATPlayerDict.ContainsKey(ev.Player.UserID)) { AdminToolbox.ATPlayerDict[ev.Player.UserID].PlayerStats.EscapeCount++; } }
/// <summary> /// 343 Can't Escape. /// </summary> /// <param name="ev"></param> public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (Is343(ev.Player)) { ev.AllowEscape = false; } }
void IEventHandlerCheckEscape.OnCheckEscape(PlayerCheckEscapeEvent ev) { send(ev, new IdMapping() .appendId(Lib.PLAYER_ID, ev.Player) .appendId(Lib.PLAYER_EVENT_SCPDATA_ID, ev.Player.Scp079Data) .appendId(Lib.PLAYER_EVENT_TEAM_ROLE_ID, ev.Player.TeamRole) ); }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (CheckSteamIDItemNum.ContainsKey(ev.Player.SteamId) && SI_Config.keepItemsOnExtract) { CheckSteamIDItemNum[ev.Player.SteamId].Escape = true; CheckSteamIDItemNum[ev.Player.SteamId].TransferItems((GameObject)ev.Player.GetGameObject()); } else { CheckSteamIDItemNum[ev.Player.SteamId] = new UserStackData(); } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (!isEnabled) { return; } if (ev.Player.PlayerId == scpPlayer?.PlayerId) { ev.AllowEscape = false; } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (ev.Player.IsHandcuffed()) { if (ev.Player.TeamRole.Role == Smod2.API.Role.CLASSD && overrideClassd) { ev.AllowEscape = false; } if (ev.Player.TeamRole.Role == Smod2.API.Role.SCIENTIST && overrideScientist) { ev.AllowEscape = false; } } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { string[] message = File.ReadAllLines(CustomAnnouncements.PlayerEscapeFilePath); if (message.Length > 0) { if (!isPlaying) { string str = CustomAnnouncements.StringArrayToString(message, 0).Replace("$escape_class", RoleConversions.RoleConversionDict[ev.Player.TeamRole.Role]); plugin.pluginManager.Server.Map.AnnounceCustomMessage(CustomAnnouncements.ReplaceVariables(CustomAnnouncements.SpacePeriods(str))); plugin.Info("Running player escape announcement..."); Thread WaitingForPlayersHandler = new Thread(new ThreadStart(() => new PlayerEscapeHandler(str))); WaitingForPlayersHandler.Start(); } } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (GamemodeManager.GamemodeManager.GetCurrentMode().Equals(plugin)) { if (ev.Player != null && ev.Player.TeamRole.Role == Role.CLASSD) { foreach (Player player in plugin.pluginManager.Server.GetPlayers()) { if ((player.TeamRole.Team == Team.SCP) || (player.TeamRole.Team == Team.CHAOS_INSURGENCY) || (player.TeamRole.Team == Team.NINETAILFOX)) { player.Kill(); } } plugin.pluginManager.Server.Round.EndRound(); } } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (cm.GetBoolValue("rank_enabled", true)) { if (ev.AllowEscape) { DBConnection db = new DBConnection(main); if (ev.Player.TeamRole.Role == Smod2.API.Role.CLASSD) { db.AddPoint(ev.Player.SteamId, main.GetConfigInt("rank_point_escape_classd")); } else if (ev.Player.TeamRole.Role == Smod2.API.Role.SCIENTIST) { db.AddPoint(ev.Player.SteamId, main.GetConfigInt("rank_point_escape_scient")); } } } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (ev.Player.TeamRole.Role == Role.CLASSD) { if (DClassXP.Escape > 0) { ev.Player.SendConsoleMessage("You have gained " + DClassXP.Escape.ToString() + "xp for escaping as a Class-D!", "yellow"); AddXP(ev.Player.SteamId, DClassXP.Escape); } if (ChaosXP.DClassEscape > 0 && !ev.Player.IsHandcuffed()) { foreach (Player player in plugin.pluginManager.Server.GetPlayers()) { if (player.TeamRole.Team == Smod2.API.Team.CHAOS_INSURGENCY) { player.SendConsoleMessage("You have gained " + ChaosXP.DClassEscape.ToString() + "xp for " + ev.Player.Name + " escaping as a Class-D!", "yellow"); AddXP(player.SteamId, ChaosXP.DClassEscape); } } } } if (ev.Player.TeamRole.Role == Role.SCIENTIST) { if (ScientistXP.Escape > 0) { ev.Player.SendConsoleMessage("You have gained " + ScientistXP.Escape.ToString() + "xp for escaping as a Scientist!", "yellow"); AddXP(ev.Player.SteamId, ScientistXP.Escape); } if (NineTailedFoxXP.ScientistEscape > 0 && !ev.Player.IsHandcuffed()) { foreach (Player player in plugin.pluginManager.Server.GetPlayers()) { if (player.TeamRole.Team == Smod2.API.Team.NINETAILFOX) { player.SendConsoleMessage("You have gained " + NineTailedFoxXP.ScientistEscape.ToString() + "xp for " + ev.Player.Name + " escaping as a Scientist!", "yellow"); AddXP(player.SteamId, NineTailedFoxXP.ScientistEscape); } } } } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { var args = plugin.luaHookCall.Function.Call("OnCheckEscape", ev.Player, ev.ChangeRole, ev.AllowEscape); if (args.Type == DataType.Table) { var table = args.Table; var ChangeRole = table.Get("ChangeRole"); if (ChangeRole.IsNotNil()) { ev.ChangeRole = ChangeRole.ToObject <Role>(); } var AllowEscape = table.Get("AllowEscape"); if (AllowEscape.IsNotNil()) { ev.AllowEscape = AllowEscape.Boolean; } } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { if (Config.GetBoolValue("po_gamemodemanager", true)) { if (GamemodeManager.GamemodeManager.CurrentMode != plugin) { return; } } else { if (!plugin.isActive) { return; } } if (ev.AllowEscape) { ev.ChangeRole = Role.SPECTATOR; } }
public void OnCheckEscape(PlayerCheckEscapeEvent ev) { pItems.Add(ev.Player.SteamId, ev.Player.GetInventory().Select(x => x.ItemType).ToList()); }