using System.Linq; namespace Oxide.Plugins { [Info("NameChange", "CASHR", "1.0.0")] internal class NameChange : RustPlugin { #region Static private const string perm = "namechange.use"; #endregion #region OxideHooks private void OnServerInitialized() { Puts($"|-----------------------------------|\n| Author: CASHR |\n| VK: vk.com/cashr |\n| Discord: CASHR#6906 |\n| Email: pipnik99@gmail.com |\n|-----------------------------------|\nIf you want to order a plugin from me, I am waiting for you in discord."); permission.RegisterPermission(perm, this); } #endregion #region Function [ChatCommand("setname")] private void cmdChatsetname(BasePlayer player, string command, string[] args) { if (!permission.UserHasPermission(player.UserIDString, perm)) { player.ChatMessage("You don't have permission for use this command"); return; } if (args.Count() != 1) { player.ChatMessage("Use /setname NickName"); return; } player.displayName = args[0]; } #endregion } }