Changeset 145 for binary-improvements/7dtd-server-fixes/src/CustomCommands
- Timestamp:
- Aug 30, 2014, 6:32:41 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/CustomCommands/ShowInventory.cs
r144 r145 29 29 } 30 30 31 string steamid = PersistentContainer.Instance.Players.GetSteamID (_params[0], true);31 string steamid = PersistentContainer.Instance.Players.GetSteamID (_params [0], true); 32 32 if (steamid == null) { 33 33 m_Console.SendResult ("Playername or entity/steamid id not found or no inventory saved (first saved after a player has been online for 30s)."); … … 35 35 } 36 36 37 Log.Out ( "SteamID: " + steamid); 38 39 Player p = PersistentContainer.Instance.Players[steamid]; 40 41 Log.Out ("Player"); 42 37 Player p = PersistentContainer.Instance.Players [steamid]; 43 38 PersistentData.Inventory inv = p.Inventory; 44 45 Log.Out ("Inv");46 39 47 40 m_Console.SendResult ("Belt of player:"); 48 41 for (int i = 0; i < inv.belt.Count; i++) { 49 m_Console.SendResult (string.Format (" Slot {0}: {1:000} * {2}", i, inv.belt[i].count, inv.belt[i].itemName)); 42 if (inv.belt [i] != null) 43 m_Console.SendResult (string.Format (" Slot {0}: {1:000} * {2}", i, inv.belt [i].count, inv.belt [i].itemName)); 50 44 } 51 45 m_Console.SendResult (string.Empty); 52 46 m_Console.SendResult ("Bagpack of player:"); 53 47 for (int i = 0; i < inv.bag.Count; i++) { 54 m_Console.SendResult (string.Format (" Slot {0}: {1:000} * {2}", i, inv.bag[i].count, inv.bag[i].itemName)); 48 if (inv.bag [i] != null) 49 m_Console.SendResult (string.Format (" Slot {0}: {1:000} * {2}", i, inv.bag [i].count, inv.bag [i].itemName)); 55 50 } 56 51 m_Console.SendResult (string.Empty);
Note:
See TracChangeset
for help on using the changeset viewer.