Hello Elitepvpers, this is how you could make a report a player system for the 5165source.
First open Chat.cs and put this command for players:
Now at the buttom put:
Remember that the last 2 } have to be under the code.
Now open your OldCODB and make a folder called REPORT.
And your done, pplayers can now write ex. /report DINGDONG speedhack.
and there will appear a report with Charname, reason, reporttime.
If you like it, then a thank would be appriciated :)
Goodluck
First open Chat.cs and put this command for players:
Code:
if (Cmd[0] == "/report")
{
if (Cmd.Length == 3)
{
REPORTPLAYER(Cmd[1], Cmd[2]);
GC.LocalMessage(2000, "You have reported: " + Cmd[1] + " For: " + Cmd[2]);
}
else
{
GC.LocalMessage(2000, "use Charname + Reason");
GC.LocalMessage(2000, "Ex. /report Charname Aimbot");
GC.LocalMessage(2000, "YOU CANT MAKE SPACES IN THE REASON");
}
}
Remember that the last 2 } have to be under the code.
Code:
public static void REPORTPLAYER(string Name, string Reason)
{
if (!File.Exists(@"C:\OldCODB\REPORT\" + Name + ".rpt"))
{
FileStream FS = new FileStream(@"C:\OldCODB\REPORT\" + Name + ".rpt", FileMode.CreateNew);
BinaryWriter BW = new BinaryWriter(FS);
BW.Write(Name);
BW.Write(Reason);
BW.Write("-ReportTime: " + DateTime.Now);
BW.Close();
FS.Close();
}
}
And your done, pplayers can now write ex. /report DINGDONG speedhack.
and there will appear a report with Charname, reason, reporttime.
If you like it, then a thank would be appriciated :)
Goodluck