07-27-2013, 05:31
can someone make a plugin that hides all ! admin commands in chat, for example when i type !yell all Hi the message shows on players hud and in chat also, i need a plugin that hides all chat commands that starts with !
- Using Addon;
-
- public override ChatType OnSay(string Message, ServerClient Client)
- {
- if (Message.StartsWith("!"))
- {
- return ChatType.ChatNone;
- }
- return ChatType.ChatContinue;
- }
(07-27-2013, 07:51)hillbilly Wrote: [ -> ]maybe blame the coder in question for being lazy and not hiding the chat.
(07-27-2013, 08:24)Bandarigoda123 Wrote: [ -> ]Maybe this will work. Compile this using Sailor Moons Plugin Maker.
CSHARP Code
Using Addon; public override ChatType OnSay(string Message, ServerClient Client) { if (Message.StartsWith("!")) { return ChatType.ChatNone; } return ChatType.ChatContinue; }
As I assume It may hide the cmds with !. Try and tell
I don't know if this will crash the server, anyway just have a try
(07-27-2013, 07:51)hillbilly Wrote: [ -> ]maybe blame the coder in question for being lazy and not hiding the chat.
LOL.....yeah, I have seen this in many plugins
- using System;
- using System.Collections.Generic;
- using System.IO;
- using Addon;
-
- namespace Hide
- {
- public class Hide : CPlugin
- {
- public override void OnServerLoad()
- {
- ServerPrint("Hide Commands Plugin by SShattered Loaded");
- }
- public override ChatType OnSay(string Message, ServerClient Client)
- {
- if (Message.StartsWith("!"))
- {
- return ChatType.ChatNone;
- }
- return ChatType.ChatContinue;
- }
- }
- }
(07-27-2013, 10:24)Bandarigoda123 Wrote: [ -> ]here, try it.
LOL, the error might be that.
here the full one, forgot somethings.
CSHARP Code
using System; using System.Collections.Generic; using System.IO; using Addon; namespace Hide { public class Hide : CPlugin { public override void OnServerLoad() { ServerPrint("Hide Commands Plugin by SShattered Loaded"); } public override ChatType OnSay(string Message, ServerClient Client) { if (Message.StartsWith("!")) { return ChatType.ChatNone; } return ChatType.ChatContinue; } } }