|
|
public static void AddGMCommando(string gm, string commandStr)
{
String folderN = DateTime.Now.Year + "-" + DateTime.Now.Month,
Path = "gmlogs\\RiderGMCommandsLog\\",
NewPath = System.IO.Path.Combine(Path, folderN);
if (!File.Exists(NewPath + folderN))
{
System.IO.Directory.CreateDirectory(System.IO.Path.Combine(Path, folderN));
}
if (!File.Exists(NewPath + "\\" + DateTime.Now.Day + ".txt"))
{
using (System.IO.FileStream fs = System.IO.File.Create(NewPath + "\\" + DateTime.Now.Day + ".txt"))
{
fs.Close();
}
}
using (System.IO.StreamWriter file = new System.IO.StreamWriter(NewPath + "\\" + DateTime.Now.Day + ".txt", true))
{
file.WriteLine(gm + commandStr);
}
}
if (message.StartsWith("@"))
{
string message_ = message.Substring(1).ToLower();
string Mess = message.Substring(1);
string[] Data = message_.Split(' ');
switch (Data[0])
Program.AddGMCommando(client.Entity.Name, " " + client.Account.State.ToString() + " @" + message_ + " " + DateTime.Now.ToString());
if (message.StartsWith("/"))
string[] Data = message_.Split(' ')
Program.AddGMCommando(client.Entity.Name, " " + client.Account.State.ToString() + " @" + message_ + " " + DateTime.Now.ToString());
public static void addgmcommando(string gm, string commandstr)
{
string foldern = datetime.now.year + "-" + datetime.now.month,
path = "gmlogs\\ridergmcommandslog\\",
newpath = system.io.path.combine(path, foldern);
if (!file.exists(newpath + foldern))
{
system.io.directory.createdirectory(system.io.path.combine(path, foldern));
}
if (!file.exists(newpath + "\\" + datetime.now.day + ".txt"))
{
using (system.io.filestream fs = system.io.file.create(newpath + "\\" + datetime.now.day + ".txt"))
{
fs.close();
}
}
using (system.io.streamwriter file = new system.io.streamwriter(newpath + "\\" + datetime.now.day + ".txt", true))
{
file.writeline(gm + commandstr);
}
}
if (message.startswith("@"))
{
string message_ = message.substring(1).tolower();
string mess = message.substring(1);
string[] data = message_.split(' ');
switch (data[0])
program.addgmcommando(client.entity.name, " " + client.account.state.tostring() + " @" + message_ + " " + datetime.now.tostring());
if (message.startswith("/"))
string[] data = message_.split(' ')
program.addgmcommando(client.entity.name, " " + client.account.state.tostring() + " @" + message_ + " " + datetime.now.tostring());
|
الذين يشاهدون محتوى الموضوع الآن : 6 ( الأعضاء 0 والزوار 6) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
تعديل علي سيستم vipdays | Commander | تطوير سيرفرات كونكر | 46 | 2024-08-30 08:38 AM |
مطلوب سيستم MsgFilter | ToRWadA | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2023-10-11 09:57 PM |
محتاج سيستم الورود | ابو مروان | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2019-10-04 10:45 AM |
طلب بخصوص سيستم الورود | ابو مروان | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-09-17 02:11 PM |
محتاج سيستم | Avalanche | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2019-07-31 11:59 AM |