DayZ 1.24
Loading...
Searching...
No Matches
AnalyticsManagerServer.c
Go to the documentation of this file.
2{
3 const string STAT_DISTANCE = "dist";
4 const string STAT_PLAYTIME = "playtime";
5 const string STAT_PLAYERS_KILLED = "players_killed";
6 const string STAT_INFECTED_KILLED = "infected_killed";
7 const string STAT_LONGEST_SURVIVOR_HIT = "longest_survivor_hit";
8
10 {
11 player.StatRegister(STAT_DISTANCE);
12 player.StatRegister(STAT_PLAYTIME);
13 player.StatRegister(STAT_PLAYERS_KILLED);
14 player.StatRegister(STAT_INFECTED_KILLED);
16 }
17
19 {
20 player.StatUpdateByPosition(STAT_DISTANCE);
21 player.StatUpdateByTime(STAT_PLAYTIME);
22 }
23
24 //Entity-Entity hit
26 {
27 if (source)
28 {
29 Man survivor = source.GetHierarchyRootPlayer();
30 if (survivor && source.IsWeapon())
32 }
33 }
34
46
47 //Entity-Entity kill
49 {
51 if (killerEntity)
52 {
53 Man killerSurvivor = killerEntity.GetHierarchyRootPlayer();
55 {
56 if (target.IsPlayer())
58 else if (target.IsZombie())
60 }
61 }
62 }
63
64 protected void OnPlayerKilled(Man killer, EntityAI target)
65 {
66 killer.StatUpdate(STAT_PLAYERS_KILLED, 1);
67 }
68
70 {
71 killer.StatUpdate(STAT_INFECTED_KILLED, 1);
72 }
73}
void OnPlayerKilled(Man killer, EntityAI target)
void OnEntityKilled(Object killer, EntityAI target)
void OnEntityHit(EntityAI source, Man target)
void OnPlayerDisconnect(Man player)
void OnPlayerToPlayerHit(Man shooter, Man target)
void OnInfectedKilled(Man killer, EntityAI target)
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.