85 {
86 array<Man> players = new array<Man>();
87 array<string> playerUIDs = new array<string>();
88
89 if (
g_Game.IsMultiplayer() ||
g_Game.IsDedicatedServer())
90 {
91 g_Game.GetPlayers(players);
92 foreach(Man player: players)
93 {
94 if (!player)
95 continue;
96
97 PlayerIdentity identity = player.GetIdentity();
98 if (!identity)
99 continue;
100
101 string playerUIDToAdd = identity.
GetId();
102 if (playerUIDs.Find(playerUIDToAdd) == -1)
103 playerUIDs.Insert(playerUIDToAdd);
104 }
105 }
106 else
107 {
108 playerUIDs.Insert("-1");
109 }
110
113 {
115 if (playerUIDs.Find(playerUIDToRemove) == -1)
116 {
118 }
119 }
120
121 playerUIDs.Clear();
122 }
proto string GetId()
unique id of player (hashed steamID, database Xbox id...) can be used in database or logs
ref map< string, ref PlayerSandstormData > m_PlayerData