64 g_Game.AdminLog( message );
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 " );
173 else if (source.IsTransport())
175 string vehicle = source.GetType();
177 Human driver = transport.CrewDriver();
180 playerPrefix2 =
GetPlayerPrefix( playerSource , playerSource.GetIdentity() );
182 playerPrefix2 =
"NO DRIVER";
184 LogPrint( playerPrefix +
" killed by " + playerPrefix2 +
" (" + vehicle +
")" );
191 LogPrint( playerPrefix +
" killed by " + playerPrefix2 +
" with (MeleeFist)" );
196 LogPrint( playerPrefix +
" killed by " + source.GetType());
204 string playerPrefix =
GetPlayerPrefix( player , player.GetIdentity() );
205 LogPrint( playerPrefix +
" has drowned while unconscious" );
210 string playerPrefix =
GetPlayerPrefix( player , player.GetIdentity() );
211 LogPrint( playerPrefix +
" is choosing to respawn" );
216 string playerPrefix =
GetPlayerPrefix( player , player.GetIdentity() );
217 if (player.IsUnconscious())
218 LogPrint( playerPrefix +
" is disconnecting while being unconscious" );
219 else if (player.IsRestrained())
220 LogPrint( playerPrefix +
" is disconnecting while being restrained" );
225 if ( player && source )
227 string playerPrefix =
GetPlayerPrefix( player , player.GetIdentity() ) +
"[HP: " + player.GetHealth().ToString() +
"]";
228 string playerPrefix2;
232 if ( source.IsPlayer() )
235 playerSource =
PlayerBase.Cast( source.GetHierarchyParent() );
238 playerPrefix2 =
GetPlayerPrefix( playerSource , playerSource.GetIdentity() );
240 switch ( damageType )
244 if (source.IsZombie() || source.IsAnimal())
253 else if (source.IsPlayer())
257 else if ( playerSource && (source.
IsMeleeWeapon() || source.IsWeapon()))
273 if ( source.IsWeapon() && playerSource )
290 LogPrint( playerPrefix +
" hit by explosion (" + ammo +
")" );
295 LogPrint( playerPrefix +
" stunned by " + ammo );
299 float globalHealthDamage = damageResult.
GetDamage(
"",
"Health");
302 if (globalHealthDamage > 0.0)
303 LogPrint(playerPrefix +
" hit by " + ammo);
305 else if ( source.GetType() ==
"AreaDamageManager" )
310 LogPrint( playerPrefix +
" hit by " + parent.GetType() +
" with " + ammo );
313 else if (source.IsTransport())
315 string vehicle = source.GetType();
317 Human driver = transport.CrewDriver();
320 playerPrefix2 =
GetPlayerPrefix( playerSource , playerSource.GetIdentity() );
322 playerPrefix2 =
"NO DRIVER";
324 LogPrint( playerPrefix +
" hit by " + playerPrefix2 +
" with " + ammo +
" (" + vehicle +
")" );
336 LogPrint(
"DEBUG: PlayerHitBy() unknown damageType: " + ammo );
342 LogPrint(
"DEBUG: player/source does not exist");
355 if ( player.IsAlive() )
401 ItemBase item = player.GetItemInHands();
429 string flagType = totem.FindAttachmentBySlotName(
"Material_FPole_Flag").ClassName();
437 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)
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()
Plugin interface for controlling of agent pool system.
proto native float GetDamage(string zoneName, string healthType)
proto native float GetHighestDamage(string healthType)
Native class for boats - handles physics simulation.
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.