mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-11 06:04:33 +00:00
TeamKill Logging
This commit is contained in:
parent
aea38be3b5
commit
e6af4d968b
4 changed files with 32 additions and 3 deletions
18
Classic/scripts/autoexec/EnableLogs.cs
Normal file → Executable file
18
Classic/scripts/autoexec/EnableLogs.cs
Normal file → Executable file
|
|
@ -153,4 +153,22 @@ function ClassicChatLog(%client, %id, %team, %msg)
|
|||
$ClassicChatLog = stripChars($ClassicChatLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp");
|
||||
%path = $Host::ClassicChatLogPath @ formatTimeString("/yy/mm-MM/dd.log");
|
||||
export("$ClassicChatLog", %path, true);
|
||||
}
|
||||
|
||||
// Log Teamkills
|
||||
function teamkillLog(%victimID, %killerID)
|
||||
{
|
||||
if(!$Host::ClassicTeamKillLog)
|
||||
return;
|
||||
|
||||
//echo("TK Log");
|
||||
|
||||
//Note: %killerID.teamkills + 1 as this is added later
|
||||
$teamkillLog = "#P[" @ $HostGamePlayerCount @ "]" SPC formatTimeString("M-d") SPC formatTimeString("[hh:nn:a]") SPC %killerID.nameBase @ " (" @ getField(%authInfo, 0) @ "," SPC %killerID.guid @ ") teamkilled" SPC %victimID.nameBase SPC "and has" SPC (%killerID.teamkills + 1) SPC "tks. CM[" @ $CurrentMission @ "]";
|
||||
$teamkillLog = stripChars($teamkillLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp");
|
||||
|
||||
%logpath = $Host::ClassicTeamKillLogPath;
|
||||
export("$teamkillLog", %logpath, true);
|
||||
logEcho($teamkillLog);
|
||||
echo($teamkillLog);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue