Hello guys !
I created a new command but not working and i really don't know what's the problem
Here is the code:
                
            I created a new command but not working and i really don't know what's the problem
Here is the code:
[Command("ban", "ban <username> <days> <reason>")]
        public void ban(string Msg, string[] StrMsg, Packets.IS_MSO MSO)
        {
            clsConnection Conn = Connections[GetConnIdx(MSO.UCID)];
            if (StrMsg.Length > 2)
            {
                    if (Conn.IsAdmin == 1 || Conn.IsSuperAdmin == 1 || Conn.IsModerator == 1)
                    {
                        bool BanUserfound = false;
                        int Days;
                        foreach (clsConnection C in Connections)
                        {
                            string Message20 = Msg.Remove(0, C.Username.Length + 6);
                            if (C.Username == StrMsg[1] && StrMsg[1].Length > 1)
                            {
                                BanUserfound = true;
                                Message("/ban " + C.Username + Days);
                                MsgAll("^6» " + C.PlayerName + " ^6was banned by " + Conn.PlayerName);
                                MsgAll("^6» Reason: ^7" + Message20);
                            }
                        }
                        if (BanUserfound == false)
                        {
                            InSim.Send_MTC_MessageToConnection("^7» Wrong username.", MSO.UCID, 0);
                        }
                    }
            }
            else
            {
                InSim.Send_MTC_MessageToConnection("^7» Wrong command", MSO.UCID, 0);
            }
        }