44 m_HitFilter =
GetGame().ServerConfigGetInt(
"adminLogPlayerHitsOnly");
45 m_PlacementFilter =
GetGame().ServerConfigGetInt(
"adminLogPlacement");
47 m_PlayerListFilter =
GetGame().ServerConfigGetInt(
"adminLogPlayerList");
51 if (m_PlayerListFilter == 1)
54 m_Timer.Run(TIMER_PLAYERLIST,
this,
"PlayerList",
NULL,
true);
73 for (
int i = 0;
i < 3;
i++)
75 m_DotIndex = m_PosArray[
i].
IndexOf(
".");
77 m_PosArray[
i] = m_PosArray[
i].
Substring(0, m_DotIndex + 2);
83 m_PlayerName =
"\"" +
identity.GetName() +
"\"";
88 m_PlayerName =
player.GetCachedName();
89 m_Pid =
player.GetCachedID();
94 m_PlayerName = m_PlayerName +
" (DEAD)";
96 return "Player " + m_PlayerName +
" (id=" + m_Pid +
" pos=<" + m_PosArray[0] +
", " + m_PosArray[1] +
", " + m_PosArray[2] +
">)";
104 return " into " +
zone +
"(" +
component.ToString() +
") for " +
dmg.ToString() +
" damage (" +
ammo +
")";
107 return " into Block" +
"(" +
component.ToString() +
") for 0 damage ";
115 LogPrint(
"DEBUG: PlayerKilled() player/source does not exist");
130 m_StatWater =
player.GetStatWater();
131 m_StatEnergy =
player.GetStatEnergy();
132 m_BleedMgr =
player.GetBleedingManagerServer();
134 if (m_StatWater && m_StatEnergy && m_BleedMgr)
135 LogPrint(
playerPrefix +
" died. Stats> Water: " + m_StatWater.Get().ToString() +
" Energy: " + m_StatEnergy.Get().ToString() +
" Bleed sources: " + m_BleedMgr.GetBleedingSourcesCount().ToString());
136 else if (m_StatWater && m_StatEnergy && !m_BleedMgr)
137 LogPrint(
playerPrefix +
" died. Stats> Water: " + m_StatWater.Get().ToString() +
" Energy: " + m_StatEnergy.Get().ToString());
144 if (
source.IsMeleeWeapon())
189 if (m_HitFilter != 1 && (
source.IsZombie() ||
source.IsAnimal()))
191 m_DisplayName =
source.GetDisplayName();
195 else if (
source.IsPlayer())
199 m_ItemInHands =
source.GetDisplayName();
205 m_DisplayName =
source.GetType();
215 m_ItemInHands =
source.GetDisplayName();
222 m_DisplayName =
source.GetType();
245 else if (
source.GetType() ==
"AreaDamageManager")
253 m_DisplayName =
source.GetType();
261 LogPrint(
"DEBUG: PlayerHitBy() unknown damageType: " +
ammo);
266 LogPrint(
"DEBUG: player/source does not exist");
273 LogPrint(m_PlayerPrefix +
" is unconscious");
282 LogPrint(m_PlayerPrefix +
" regained consciousness");
288 if (m_PlacementFilter == 1)
292 m_DisplayName =
item.GetDisplayName();
294 if (m_DisplayName ==
"")
295 LogPrint(m_PlayerPrefix +
" placed unknown object");
297 LogPrint(m_PlayerPrefix +
" placed " + m_DisplayName);
312 LogPrint(m_PlayerPrefix + m_Message);
320 LogPrint(m_PlayerPrefix +
" committed suicide");
327 LogPrint(m_PlayerPrefix +
" bled out");
337 string flagType =
totem.FindAttachmentBySlotName(
"Material_FPole_Flag").ClassName();
350 GetGame().GetPlayers(m_PlayerArray);
352 if (m_PlayerArray.Count() != 0)
354 LogPrint(
"##### PlayerList log: " + m_PlayerArray.Count().ToString() +
" players");
DamageType
exposed from C++ (do not change)
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
vector m_Position
Cached world position.
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
EditBoxWidget m_ActionsFilter
The class that will be instanced (moddable)
void PlayerKilled(PlayerBase player, Object source)
void OnContinouousAction(ActionData action_data)
void Suicide(PlayerBase player)
BleedingSourcesManagerServer m_BleedMgr
void LogPrint(string message)
autoptr array< Man > m_PlayerArray
void UnconStart(PlayerBase player)
void PlayerHitBy(TotalDamageResult damageResult, int damageType, PlayerBase player, EntityAI source, int component, string dmgZone, string ammo)
void BleedingOut(PlayerBase player)
void OnPlacementComplete(Man player, ItemBase item)
void DirectAdminLogPrint(string str)
PlayerStat< float > m_StatWater
void UnconStop(PlayerBase player)
void TotemFlagChange(bool top, notnull PlayerBase player, notnull EntityAI totem)
string GetPlayerPrefix(PlayerBase player, PlayerIdentity identity)
PlayerStat< float > m_StatEnergy
string GetHitMessage(TotalDamageResult damageResult, int component, string zone, string ammo)
static int GetPlayerListTimer()
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto string ToString(bool beautify=true)
Vector to string.
proto native CGame GetGame()
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'. Returns -1 when not found.