| Rev | Line | |
|---|
| [75] | 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 |
|
|---|
| 4 | public class ListPlayersExtended : ConsoleCommand
|
|---|
| 5 | {
|
|---|
| 6 | public ListPlayersExtended(ConsoleSdtd cons) : base(cons) {
|
|---|
| 7 | }
|
|---|
| 8 |
|
|---|
| 9 | public override string Description ()
|
|---|
| 10 | {
|
|---|
| 11 | return "lists all players with extended attributes";
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | public override string[] Names () {
|
|---|
| 15 | return new string[] { "listplayersextended", "lpe" };
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | public override void Run (string[] _params)
|
|---|
| 19 | {
|
|---|
| 20 | World w = this.m_Console.gameManager.World;
|
|---|
| 21 | int num = 0;
|
|---|
| 22 | foreach (KeyValuePair<int, EntityPlayer> current in w.playerEntities.dict)
|
|---|
| 23 | {
|
|---|
| 24 | m_Console.md000a (string.Concat (new object[]
|
|---|
| 25 | {
|
|---|
| 26 | string.Empty,
|
|---|
| 27 | ++num,
|
|---|
| 28 | ". id=",
|
|---|
| 29 | current.Value.fd0087,
|
|---|
| 30 | ", ",
|
|---|
| 31 | current.Value.EntityName,
|
|---|
| 32 | ", pos=",
|
|---|
| 33 | current.Value.GetPosition (),
|
|---|
| 34 | ", rot=",
|
|---|
| 35 | current.Value.rotation,
|
|---|
| 36 | ", remote=",
|
|---|
| 37 | current.Value.fd00aa,
|
|---|
| 38 | ", health=",
|
|---|
| 39 | current.Value.Health,
|
|---|
| 40 | ", deaths=",
|
|---|
| 41 | current.Value.Died,
|
|---|
| 42 | ", zombies=",
|
|---|
| 43 | current.Value.KilledZombies,
|
|---|
| 44 | ", players=",
|
|---|
| 45 | current.Value.KilledPlayers,
|
|---|
| 46 | ", score=",
|
|---|
| 47 | current.Value.Score,
|
|---|
| 48 | ", ",
|
|---|
| 49 | SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (current.Value.EntityName)
|
|---|
| 50 | }));
|
|---|
| 51 | }
|
|---|
| 52 | m_Console.md000a ("Total of " + w.playerEntities.list.Count + " in the game");
|
|---|
| 53 | }
|
|---|
| 54 | }
|
|---|
| 55 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.