73 for (
int i = 0; i < 3; i++ )
91 m_Pid = player.GetCachedID();
95 if ( !player.IsAlive() )
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)
141 m_BleedMgr = player.GetBleedingManagerServer();
143 string reason =
" died.";
144 if (player.GetDrowningWaterLevelCheck())
145 reason =
" drowned.";
147 string additionalStats;
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())
161 LogPrint( playerPrefix +
" killed by " + source.GetDisplayName() );
163 else if (source.IsMeleeWeapon())
165 LogPrint( playerPrefix +
" killed by " + playerPrefix2 +
" with " + source.GetDisplayName() );
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())
240 else if (source.IsPlayer())
244 else if ( playerSource && (source.
IsMeleeWeapon() || source.IsWeapon()))
260 if ( source.IsWeapon() && playerSource )
277 LogPrint( playerPrefix +
" hit by explosion (" + ammo +
")" );
282 LogPrint( playerPrefix +
" stunned by " + ammo );
286 float globalHealthDamage = damageResult.
GetDamage(
"",
"Health");
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 );
310 LogPrint(
"DEBUG: PlayerHitBy() unknown damageType: " + ammo );
316 LogPrint(
"DEBUG: player/source does not exist");
329 if ( player.IsAlive() )
360 m_Message = action_data.m_Action.GetAdminLogMessage(action_data);
375 ItemBase item = player.GetItemInHands();
403 string flagType = totem.FindAttachmentBySlotName(
"Material_FPole_Flag").ClassName();
411 LogPrint( prefix +
" has " + action + flagType +
" on " + totem.ClassName() +
" at " + totem.GetPosition());
DamageType
exposed from C++ (do not change)
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
void PlayerStat(T min, T max, T init, string label, int flags)
proto native void GetPlayers(out array< Man > players)
proto native void AdminLog(string text)
proto native int ServerConfigGetInt(string name)
Server config parsing. Returns 0 if not found.
string GetInputActionName()
override bool IsMeleeWeapon()
proto string GetName()
nick (short) name of player
proto string GetId()
unique id of player (hashed steamID, database Xbox id...) can be used in database or logs
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
const int TIMER_PLAYERLIST
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)
PlayerStat< float > m_StatWater
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)
PlayerStat< float > m_StatEnergy
string GetHitMessage(TotalDamageResult damageResult, int component, string zone, string ammo)
void OnEmote(PlayerBase player, EmoteBase emote)
static int GetPlayerListTimer()
proto native float GetDamage(string zoneName, string healthType)
proto native float GetHighestDamage(string healthType)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto string ToString(bool simple=true)
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()