Ignore:
Timestamp:
Jul 3, 2015, 4:16:11 PM (9 years ago)
Author:
alloc
Message:

Server fixes for A12

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/AllocsCommands/Commands/Give.cs

    r230 r238  
    1212                }
    1313
     14                public override string GetHelp () {
     15                        return "Give an item to a player by dropping it in front of that player\n" +
     16                                   "Usage:\n" +
     17                                   "   give <name / entity id> <item name> <amount>\n" +
     18                                   "Either pass the full name of a player or his entity id (given by e.g. \"lpi\").\n" +
     19                                   "Item name has to be the exact name of an item as listed by \"listitems\".\n" +
     20                                   "Amount is the number of instances of this item to drop (as a single stack).";
     21                }
     22
    1423                public override string[] GetCommands ()
    1524                {
     
    2130                        try {
    2231                                if (_params.Count != 3) {
    23                                         SdtdConsole.Instance.Output ("Usage: give <playername|entityid> <itemname> <amount>");
     32                                        SdtdConsole.Instance.Output ("Wrong number of arguments, expected 3, found " + _params.Count + ".");
    2433                                        return;
    2534                                }
     
    4655                                EntityPlayer p = GameManager.Instance.World.Players.dict [ci.entityId];
    4756
    48                                 InventoryField invField = new InventoryField (iv, n);
     57                                ItemStack invField = new ItemStack (iv, n);
    4958
    5059                                GameManager.Instance.ItemDropServer (invField, p.GetPosition (), Vector3.zero, -1, 50);
Note: See TracChangeset for help on using the changeset viewer.