ItsMods

Full Version: Need a plugin that hides all ! Admin commands
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 !
maybe blame the coder in question for being lazy and not hiding the chat.
Maybe this will work. Compile this using Sailor Moons Plugin Maker.

CSHARP Code
  1. Using Addon;
  2.  
  3. public override ChatType OnSay(string Message, ServerClient Client)
  4. {
  5. if (Message.StartsWith("!"))
  6. {
  7. return ChatType.ChatNone;
  8. }
  9. return ChatType.ChatContinue;
  10. }


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
(07-27-2013, 08:24)Bandarigoda123 Wrote: [ -> ]Maybe this will work. Compile this using Sailor Moons Plugin Maker.

CSHARP Code
  1. Using Addon;
  2.  
  3. public override ChatType OnSay(string Message, ServerClient Client)
  4. {
  5. if (Message.StartsWith("!"))
  6. {
  7. return ChatType.ChatNone;
  8. }
  9. return ChatType.ChatContinue;
  10. }


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

Cant Compile,There's a error:
Please check your code, error found!
Please compile this plugin for me.
here, try it.

[attachment=2720]

LOL, the error might be that. Tongue

here the full one, forgot somethings.

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using Addon;
  5.  
  6. namespace Hide
  7. {
  8. public class Hide : CPlugin
  9. {
  10. public override void OnServerLoad()
  11. {
  12. ServerPrint("Hide Commands Plugin by SShattered Loaded");
  13. }
  14. public override ChatType OnSay(string Message, ServerClient Client)
  15. {
  16. if (Message.StartsWith("!"))
  17. {
  18. return ChatType.ChatNone;
  19. }
  20. return ChatType.ChatContinue;
  21. }
  22. }
  23. }
(07-27-2013, 10:24)Bandarigoda123 Wrote: [ -> ]here, try it.



LOL, the error might be that. Tongue

here the full one, forgot somethings.

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using Addon;
  5.  
  6. namespace Hide
  7. {
  8. public class Hide : CPlugin
  9. {
  10. public override void OnServerLoad()
  11. {
  12. ServerPrint("Hide Commands Plugin by SShattered Loaded");
  13. }
  14. public override ChatType OnSay(string Message, ServerClient Client)
  15. {
  16. if (Message.StartsWith("!"))
  17. {
  18. return ChatType.ChatNone;
  19. }
  20. return ChatType.ChatContinue;
  21. }
  22. }
  23. }

My ! commands are not working xD please fix
Of course your commands won't work, the code above will prevent anything starting with ! from been used, download the permissions plugin and use that.

http://www.itsmods.com/forum/Thread-Rele...lugin.html
@Sylvester
Do as what @SgtLegend said.