7 string m_PlayerPrefix2;
19 BleedingSourcesManagerServer m_BleedMgr;
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(
".");
76 if ( m_DotIndex != -1 )
78 m_PosArray[i] = m_PosArray[i].Substring( 0, m_DotIndex + 2 );
85 m_PlayerName =
"\"" + identity.GetName() +
"\"";
86 m_Pid = identity.GetId();
90 m_PlayerName =
"\"" + player.GetCachedName() +
"\"";
91 m_Pid = player.GetCachedID();
95 if ( !player.IsAlive() )
97 m_PlayerName = m_PlayerName +
" (DEAD)";
100 return "Player " + m_PlayerName +
" (id=" + m_Pid +
" pos=<" + m_PosArray[0] +
", " + m_PosArray[1] +
", " + m_PosArray[2] +
">)";
107 float dmg = damageResult.GetHighestDamage(
"Health");
108 return " into " + zone +
"(" +
component.ToString() +
") for " + dmg.ToString() +
" damage (" + ammo +
")";
112 return " into Block" +
"(" +
component.ToString() +
") for 0 damage ";
118 if (!player || !source)
120 LogPrint(
"DEBUG: PlayerKilled() player/source does not exist");
130 string playerPrefix, playerPrefix2;
133 playerPrefix2 =
GetPlayerPrefix( playerSource , playerSource.GetIdentity() );
137 if (player == source)
139 m_StatWater = player.GetStatWater();
140 m_StatEnergy = player.GetStatEnergy();
141 m_BleedMgr = player.GetBleedingManagerServer();
143 string reason =
" died.";
144 if (player.GetDrowningWaterLevelCheck())
145 reason =
" drowned.";
147 string additionalStats;
148 if (m_StatWater && m_StatEnergy)
149 additionalStats =
" Stats> Water: " + m_StatWater.Get().ToString() +
" Energy: " + m_StatEnergy.Get().ToString();
152 additionalStats = additionalStats +
" Bleed sources: " + m_BleedMgr.GetBleedingSourcesCount().ToString();
154 LogPrint(playerPrefix + reason + additionalStats);
157 else if (source.IsWeapon() || source.IsMeleeWeapon())
159 if (ExplosivesBase.Cast(source))
161 LogPrint( playerPrefix +
" killed by " + source.GetDisplayName() );
163 else if (source.IsMeleeWeapon())
165 LogPrint( playerPrefix +
" killed by " + playerPrefix2 +
" with " + source.GetDisplayName() );
169 m_Distance =
vector.Distance( player.GetPosition(), playerSource.GetPosition() );
170 LogPrint( playerPrefix +
" killed by " + playerPrefix2 +
" with " + source.GetDisplayName() +
" from " + m_Distance +
" meters " );
178 LogPrint( playerPrefix +
" killed by " + playerPrefix2 +
" with (MeleeFist)" );
183 LogPrint( playerPrefix +
" killed by " + source.GetType());
191 string playerPrefix =
GetPlayerPrefix( player , player.GetIdentity() );
192 LogPrint( playerPrefix +
" has drowned while unconscious" );
197 string playerPrefix =
GetPlayerPrefix( player , player.GetIdentity() );
198 LogPrint( playerPrefix +
" is choosing to respawn" );
203 string playerPrefix =
GetPlayerPrefix( player , player.GetIdentity() );
204 if (player.IsUnconscious())
205 LogPrint( playerPrefix +
" is disconnecting while being unconscious" );
206 else if (player.IsRestrained())
207 LogPrint( playerPrefix +
" is disconnecting while being restrained" );
212 if ( player && source )
214 string playerPrefix =
GetPlayerPrefix( player , player.GetIdentity() ) +
"[HP: " + player.GetHealth().ToString() +
"]";
215 string playerPrefix2;
219 if ( source.IsPlayer() )
222 playerSource =
PlayerBase.Cast( source.GetHierarchyParent() );
225 playerPrefix2 =
GetPlayerPrefix( playerSource , playerSource.GetIdentity() );
227 switch ( damageType )
231 if (source.IsZombie() || source.IsAnimal())
233 if (m_HitFilter == 1)
236 m_DisplayName = source.GetDisplayName();
238 LogPrint( playerPrefix +
" hit by " + m_DisplayName + m_HitMessage );
240 else if (source.IsPlayer())
242 LogPrint( playerPrefix +
" hit by " + playerPrefix2 + m_HitMessage );
244 else if ( playerSource && (source.IsMeleeWeapon() || source.IsWeapon()))
246 m_ItemInHands = source.GetDisplayName();
248 LogPrint( playerPrefix +
" hit by " + playerPrefix2 + m_HitMessage +
" with " + m_ItemInHands );
252 m_DisplayName = source.GetType();
254 LogPrint( playerPrefix +
" hit by " + m_DisplayName + m_HitMessage );
260 if ( source.IsWeapon() && playerSource )
262 m_ItemInHands = source.GetDisplayName();
263 m_Distance =
vector.Distance( player.GetPosition(), playerSource.GetPosition() );
265 LogPrint( playerPrefix +
" hit by " + playerPrefix2 + m_HitMessage +
" with " + m_ItemInHands +
" from " + m_Distance +
" meters ");
269 m_DisplayName = source.GetType();
271 LogPrint( playerPrefix +
" hit by " + m_DisplayName + m_HitMessage );
277 LogPrint( playerPrefix +
" hit by explosion (" + ammo +
")" );
282 LogPrint( playerPrefix +
" stunned by " + ammo );
286 float globalHealthDamage = damageResult.GetDamage(
"",
"Health");
287 if (ammo == DayZPlayerImplementFallDamage.FALL_DAMAGE_AMMO_HEALTH || ammo == DayZPlayerImplementFallDamage.FALL_DAMAGE_AMMO_SHOCK || ammo == DayZPlayerImplementFallDamage.FALL_DAMAGE_AMMO_HEALTH_OTHER_ATTACHMENTS)
289 if (globalHealthDamage > 0.0)
290 LogPrint(playerPrefix +
" hit by " + ammo);
292 else if ( source.GetType() ==
"AreaDamageManager" )
297 LogPrint( playerPrefix +
" hit by " + parent.GetType() +
" with " + ammo );
302 m_DisplayName = source.GetType();
304 LogPrint( playerPrefix +
" hit by " + m_DisplayName +
" with " + ammo );
310 LogPrint(
"DEBUG: PlayerHitBy() unknown damageType: " + ammo );
316 LogPrint(
"DEBUG: player/source does not exist");
324 LogPrint( m_PlayerPrefix +
" is unconscious" );
329 if ( player.IsAlive() )
333 LogPrint( m_PlayerPrefix +
" regained consciousness" );
339 if ( m_PlacementFilter == 1 )
343 m_DisplayName = item.GetDisplayName();
345 if ( m_DisplayName ==
"" )
347 LogPrint( m_PlayerPrefix +
" placed Nameless Object" +
"<" + item.GetType() +
">" );
351 LogPrint( m_PlayerPrefix +
" placed " + m_DisplayName +
"<" + item.GetType() +
">");
360 m_Message = action_data.m_Action.GetAdminLogMessage(action_data);
365 m_PlayerPrefix =
GetPlayerPrefix( action_data.m_Player , action_data.m_Player.GetIdentity() );
367 LogPrint( m_PlayerPrefix + m_Message );
375 ItemBase item = player.GetItemInHands();
386 LogPrint( m_PlayerPrefix +
" committed suicide" );
393 LogPrint( m_PlayerPrefix +
" bled out" );
403 string flagType = totem.FindAttachmentBySlotName(
"Material_FPole_Flag").ClassName();
411 LogPrint( prefix +
" has " + action + flagType +
" on " + totem.ClassName() +
" at " + totem.GetPosition());
416 GetGame().GetPlayers( m_PlayerArray );
418 if ( m_PlayerArray.Count() != 0 )
420 LogPrint(
"##### PlayerList log: " + m_PlayerArray.Count().ToString() +
" players" );
422 foreach ( Man player: m_PlayerArray )
438 LogPrint(m_PlayerPrefix +
" was teleported from: " + startPos.ToString() +
" to: " + targetPos.ToString() +
". Reason: " + reason);
proto native int ServerConfigGetInt(string name)
Server config parsing. Returns 0 if not found.
string GetInputActionName()
The class that will be instanced (moddable)
Plugin interface for controlling of agent pool system.
void PlayerKilled(PlayerBase player, Object source)
void OnContinouousAction(ActionData action_data)
void Suicide(PlayerBase player)
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)
void PlayerKilledByDrowningUncon(PlayerBase player)
void PlayerKilledByDisconnect(PlayerBase player)
void UnconStop(PlayerBase player)
void PlayerKilledByRespawn(PlayerBase player)
void TotemFlagChange(bool top, notnull PlayerBase player, notnull EntityAI totem)
string GetPlayerPrefix(PlayerBase player, PlayerIdentity identity)
void PlayerTeleportedLog(notnull PlayerBase player, vector startPos, vector targetPos, string reason)
string GetHitMessage(TotalDamageResult damageResult, int component, string zone, string ammo)
void OnEmote(PlayerBase player, EmoteBase emote)
static int GetPlayerListTimer()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DamageType
exposed from C++ (do not change)
vector m_Position
Cached world position.
proto native CGame GetGame()
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
void PlayerStat(T min, T max, T init, string label, int flags)
EditBoxWidget m_ActionsFilter