Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Aliases nicknames
#1
Star 


Source code
PHP Code:
using System; using Addon; using System.IO; using System.Collections.Generic; namespace SC { public class Aliases : CPlugin { string path = "plugins\\aliases.txt"; string TextColor; public override ChatType OnSay(string Message, ServerClient Client) { List<string> Names = new List<string>(File.ReadAllLines(path)); for (int i = 0; i < Names.Count; i++) { string line = Names[i]; string oldName = line.Split('=')[0]; string NewName = line.Split('=')[1]; if (!Message.StartsWith("!")) { if (oldName == Client.Name) { ServerSay(string.Format("{0}^7:^2 {1}", NewName, Message), true); return ChatType.ChatNone; } } } return ChatType.ChatContinue; } } }

Please write how to insert BB code to post "CSHARP code"

Credits:
@S3VDIT0 - Made the plugin
@frst_ - Special thanks


Attached Files
.rar   Aliases.rar (Size: 2.15 KB / Downloads: 100)
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.