public override void Execute(PointBlankPlayer executor, string[] args) { UnturnedPlayer[] players = new UnturnedPlayer[1]; players[0] = (UnturnedPlayer)executor; if (args.Length > 0) { if (!UnturnedPlayer.TryGetPlayers(args[0], out players)) { UnturnedChat.SendMessage(executor, Translate("PlayerNotFound"), ConsoleColor.Red); return; } } players.ForEach((player) => { if (UnturnedPlayer.IsServer(player)) { UnturnedChat.SendMessage(executor, Translate("TargetServer"), ConsoleColor.Red); return; } while (player.Items.Length > 0) { player.RemoveItem(player.Items[0]); } UnturnedChat.SendMessage(executor, Translate("ClearInventory_Success", player.PlayerName), ConsoleColor.Green); }); }
public override void Execute(PointBlankPlayer executor, string[] args) { UnturnedPlayer[] players = new UnturnedPlayer[1]; players[0] = (UnturnedPlayer)executor; if (args.Length > 0) { if (!UnturnedPlayer.TryGetPlayers(args[0], out players)) { UnturnedChat.SendMessage(executor, Translate("PlayerNotFound"), ConsoleColor.Red); return; } } players.ForEach((player) => { if (UnturnedPlayer.IsServer(player)) { UnturnedChat.SendMessage(executor, Translate("FailServer"), ConsoleColor.Red); return; } if (player.Metadata.ContainsKey("GodMode")) { player.Metadata.Remove("GodMode"); UnturnedChat.SendMessage(player, Translate("GodMode_Ungod"), ConsoleColor.Green); } else { player.Metadata.Add("GodMode", true); UnturnedChat.SendMessage(player, Translate("GodMode_God"), ConsoleColor.Green); } }); }
public override void Execute(PointBlankPlayer executor, string[] args) { UnturnedPlayer[] players = new UnturnedPlayer[1]; players[0] = (UnturnedPlayer)executor; if (args.Length > 0) { if (!UnturnedPlayer.TryGetPlayers(args[0], out players)) { UnturnedChat.SendMessage(executor, Translate("PlayerNotFound"), ConsoleColor.Red); return; } } players.ForEach((player) => { if (UnturnedPlayer.IsServer(player)) { UnturnedChat.SendMessage(executor, Translate("FailServer"), ConsoleColor.Red); return; } player.Life.sendRevive(); UnturnedChat.SendMessage(executor, Translate("Heal_Success", player.PlayerName), ConsoleColor.Green); }); }
public override void Execute(PointBlankPlayer executor, string[] args) { UnturnedPlayer[] players = new UnturnedPlayer[1]; players[0] = (UnturnedPlayer)executor; if (args.Length > 0) { if (!UnturnedPlayer.TryGetPlayers(args[0], out players)) { UnturnedChat.SendMessage(executor, Translate("PlayerNotFound"), ConsoleColor.Red); return; } } players.ForEach((player) => { if (UnturnedPlayer.IsServer(player)) { UnturnedChat.SendMessage(executor, Translate("TargetServer"), ConsoleColor.Red); return; } for (int i = 0; i < 7; i++) { Skill skl = player.USkills.skills[(int)ESkillset.DEFENSE][i]; skl.level = skl.max; } for (int i = 0; i < 7; i++) { Skill skl = player.USkills.skills[(int)ESkillset.OFFENSE][i]; skl.level = skl.max; } for (int i = 0; i < 8; i++) { Skill skl = player.USkills.skills[(int)ESkillset.SUPPORT][i]; skl.level = skl.max; } player.USkills.askSkills(player.SteamID); UnturnedChat.SendMessage(executor, Translate("MaxSkills_Success", player.PlayerName), ConsoleColor.Green); }); }
public override void Execute(PointBlankPlayer executor, string[] args) { UnturnedPlayer[] players = new UnturnedPlayer[1]; players[0] = (UnturnedPlayer)executor; if (args.Length > 0) { if (!UnturnedPlayer.TryGetPlayers(args[0], out players)) { UnturnedChat.SendMessage(executor, Translate("PlayerNotFound"), ConsoleColor.Red); return; } } players.ForEach((player) => { if (UnturnedPlayer.IsServer(player)) { UnturnedChat.SendMessage(executor, Translate("TargetServer"), ConsoleColor.Red); return; } if (player.Metadata.ContainsKey("Fly")) { player.Metadata.Remove("Fly"); player.Movement.gravity = 1; player.Stance.channel.send("tellStance", ESteamCall.OWNER, ESteamPacket.UPDATE_UNRELIABLE_BUFFER, new object[] { (byte)EPlayerStance.SWIM }); UnturnedChat.SendMessage(player, Translate("Fly_Stop"), ConsoleColor.Green); } else { player.Metadata.Add("Fly", true); player.Movement.gravity = 0; player.Stance.channel.send("tellStance", ESteamCall.OWNER, ESteamPacket.UPDATE_UNRELIABLE_BUFFER, new object[] { (byte)EPlayerStance.STAND }); UnturnedChat.SendMessage(player, Translate("Fly_Start"), ConsoleColor.Green); } }); }
public override void Execute(PointBlankPlayer executor, string[] args) { UnturnedPlayer[] players = new UnturnedPlayer[1]; players[0] = (UnturnedPlayer)executor; if (args.Length > 0) { if (!UnturnedPlayer.TryGetPlayers(args[0], out players)) { UnturnedChat.SendMessage(executor, Translate("PlayerNotFound"), ConsoleColor.Red); return; } } players.ForEach((player) => { if (UnturnedPlayer.IsServer(player)) { UnturnedChat.SendMessage(executor, Translate("TargetServer"), ConsoleColor.Red); return; } if (!player.Metadata.ContainsKey("pPosition")) { UnturnedChat.SendMessage(executor, Translate("Back_NoLocation"), ConsoleColor.Red); return; } Vector3 pos = player.Position.Duplicate(); player.Teleport((Vector3)player.Metadata["pPosition"]); if (player.Metadata.ContainsKey("pPosition")) { player.Metadata["pPosition"] = pos; } else { player.Metadata.Add("pPosition", pos); } UnturnedChat.SendMessage(executor, Translate("Back_Successful", player.PlayerName), ConsoleColor.Green); }); }
public override void Execute(PointBlankPlayer executor, string[] args) { UnturnedPlayer[] players = new UnturnedPlayer[0]; if (args.Length > 1) { if (UnturnedPlayer.TryGetPlayers(args[1], out players)) { players.ForEach((player) => { if (player.IsAdmin && (!UnturnedPlayer.IsServer(executor) && !((UnturnedPlayer)executor).HasPermission("adminessentials.commands.sudo.admin"))) { UnturnedChat.SendMessage(executor, Translate("Sudo_Admin"), ConsoleColor.Red); return; } if (player == (UnturnedPlayer)executor) { UnturnedChat.SendMessage(executor, Translate("Sudo_Self"), ConsoleColor.Red); return; } player.Sudo(args[0]); }); UnturnedChat.SendMessage(executor, Translate("Sudo_Success"), ConsoleColor.Green); return; } } if (UnturnedPlayer.IsServer(executor) || ((UnturnedPlayer)executor).HasPermission("adminessentials.commands.sudo.server")) { CommandWindow.input.onInputText(args[0]); UnturnedChat.SendMessage(executor, Translate("Sudo_Success"), ConsoleColor.Green); } else { UnturnedChat.SendMessage(executor, Translate("Sudo_Server"), ConsoleColor.Red); } }