public static List <EFTPlayer> Players() { EFTPlayer localPlayer = GetPlayerByName(Settings.USERNAME); List <EFTPlayer> playerList = AllPlayers(); playerList.ForEach(u => { u.distance = GetDistance(localPlayer.GetVector3(), u.GetVector3()); }); return(playerList); }
private static List <EFTPlayer> AllPlayers() { List <EFTPlayer> users = new List <EFTPlayer>(); int limit = PlayerCount(); for (int i = 0x0; i < limit; i++) { IntPtr playerObjAddr = Base.GetPtr(registeredPlayers, new int[] { 0x10, 0x20 + i * 0x8 }); IntPtr playerNameAddr = Base.GetPtr(playerObjAddr, new int[] { 0x398, 0x28, 0x10, 0x14 }); EFTPlayer member = new EFTPlayer(playerObjAddr); users.Add(member); } return(users); }