Changeset 206 for binary-improvements/7dtd-server-fixes/src/CustomCommands
- Timestamp:
- Nov 25, 2014, 8:45:46 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes/src/CustomCommands
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/CustomCommands/ListPlayersExtended.cs
r203 r206 4 4 namespace AllocsFixes.CustomCommands 5 5 { 6 public class ListPlayer sExtended: ConsoleCommand6 public class ListPlayerIds : ConsoleCommand 7 7 { 8 public ListPlayer sExtended(ConsoleSdtd cons) : base(cons)8 public ListPlayerIds (ConsoleSdtd cons) : base(cons) 9 9 { 10 10 } … … 12 12 public override string Description () 13 13 { 14 return "lists all players with extended attributes";14 return "lists all players with their IDs for ingame commands"; 15 15 } 16 16 17 17 public override string[] Names () 18 18 { 19 return new string[] { "listplayer sextended", "lpe" };19 return new string[] { "listplayerids", "lpi" }; 20 20 } 21 21 … … 26 26 int num = 0; 27 27 foreach (KeyValuePair<int, EntityPlayer> current in w.playerEntities.dict) { 28 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromEntityID (current.Key);29 string ip = string.Empty;30 if (ci != null) {31 ip = ci.networkPlayer.ipAddress;32 }33 28 m_Console.SendResult (string.Concat (new object[] 34 29 { … … 36 31 ++num, 37 32 ". id=", 38 // current.Value.4E2AA,33 current.Value.entityId, 39 34 ", ", 40 35 current.Value.EntityName, 41 ", pos=",42 current.Value.GetPosition (),43 ", rot=",44 current.Value.rotation,45 ", remote=",46 // current.Value.fd00b1,47 ", health=",48 current.Value.Health,49 ", deaths=",50 current.Value.Died,51 ", zombies=",52 current.Value.KilledZombies,53 ", players=",54 current.Value.KilledPlayers,55 ", score=",56 current.Value.Score,57 ", steamid=",58 CommonMappingFunctions.GetSteamID (ci),59 ", ip=",60 ip,61 ", ping=",62 current.Value.pingToServer63 36 } 64 37 ) … … 67 40 m_Console.SendResult ("Total of " + w.playerEntities.list.Count + " in the game"); 68 41 } catch (Exception e) { 69 Log.Out ("Error in ListPlayer sExtended.Run: " + e);42 Log.Out ("Error in ListPlayerIds.Run: " + e); 70 43 } 71 44 }
Note:
See TracChangeset
for help on using the changeset viewer.