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 MessageServerClient Client)
        {
            List<
stringNames = new List<string>(File.ReadAllLines(path));

            for (
int i 0Names.Counti++)
            {
                
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}"NewNameMessage), 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: 67)
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

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