Searching a Developer that can make a small change to my custom clan plugin
Rust Clans customization
Discussion in 'Plugin Requests' started by Akeno Himejima, Jan 3, 2018.
-
What u need ?
-
i need to some text and a command Example
/cff off will say "Red"activated.... take care
i want /cff off will say "Red"deactivated they are safe
i think i managed to do this for the Chat Command but there is a plugin ussing CMD Command and thats not changed yet cant find it either -
Code:
[Command("cff")] void CffCmd(IPlayer player, string command, string[] args) { if(args[0]=="on") player.Reply("Red activated.... take care"); if(args[0]=="off") player.Reply("Red deactivated they are safe"); else player.Reply("Correct Usage: /Cff on|off"); }
-
-
it works without else too
-
Code:
[ChatCommand("ccf")] private void CffCommand(BasePlayer player, string command, string[] args) { if (args.Length == 0) { PrintToChat(player, lang.GetMessage("SyntaxError", this, player.UserIDString)); return; } switch (args[0].ToLower()) { case "on": { PrintToChat(player, lang.GetMessage("CffToggled", this, player.UserIDString), "enabled"); break; } case "off": { PrintToChat(player, lang.GetMessage("CffToggled", this, player.UserIDString), "disabled"); break; } default: { PrintToChat(player, lang.GetMessage("SyntaxError", this, player.UserIDString)); break; } } }