mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-14 07:34:36 +00:00
Refined tklog
This commit is contained in:
parent
c5c670eca4
commit
848ea5ff70
1 changed files with 17 additions and 3 deletions
|
|
@ -161,10 +161,24 @@ function teamkillLog(%victimID, %killerID)
|
||||||
if(!$Host::ClassicTeamKillLog)
|
if(!$Host::ClassicTeamKillLog)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//echo("TK Log");
|
//Killer tks / Victim tks
|
||||||
|
|
||||||
//Note: %killerID.teamkills + 1 as this is added later
|
//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 @ "]";
|
%ktk = %killerID.teamkills + 1;
|
||||||
|
%vtk = %victimID.teamkills;
|
||||||
|
|
||||||
|
//Stage in warnings
|
||||||
|
%s = "";
|
||||||
|
if(!%killerID.isAdmin) //Admins dont get warnings
|
||||||
|
{
|
||||||
|
if(%ktk >= $Host::TKWarn1 && %ktk < $Host::TKWarn2)
|
||||||
|
%s = "[Warned]";
|
||||||
|
else if(%ktk >= $Host::TKWarn2 && %ktk < $Host::TKMax)
|
||||||
|
%s = "[Warned 2]";
|
||||||
|
else if(%ktk >= $Host::TKMax)
|
||||||
|
%s = "[Kicked]";
|
||||||
|
}
|
||||||
|
|
||||||
|
$teamkillLog = %s @ formatTimeString("M-d") SPC formatTimeString("[hh:nn:a]") SPC %killerID.nameBase @ " (" @ %killerID.guid @ ")[" @ %ktk @ " tks] teamkilled" SPC %victimID.nameBase @ "[" @ %vtk @ " tks]. #P[" @ $HostGamePlayerCount @ "]" SPC "CM[" @ $CurrentMission @ "]";
|
||||||
$teamkillLog = stripChars($teamkillLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp");
|
$teamkillLog = stripChars($teamkillLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp");
|
||||||
|
|
||||||
%logpath = $Host::ClassicTeamKillLogPath;
|
%logpath = $Host::ClassicTeamKillLogPath;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue