1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

[SOLVED] Accessing / Editing the Player's Inventory in SSC

Discussion in 'Development Questions' started by MrGgggg243, Nov 9, 2016.

Tags:
  1. MrGgggg243

    MrGgggg243 Level 2

    Joined:
    Aug 17, 2014
    Messages:
    35
    Hi!

    Probably a noob question, but - How do I access / edit the player's inventory. From what I've discovered, the TPlayer.inventory[] array consists of the items in the main inventory, TPlayer.armor[] holds the armor slots, TPlayer.dyes[] holds the dye slots - but I can't find the arrays that contain the accessory slots, the mounts/pets etc slots, etc.

    What's the easiest way to examine the player's inventory and easily update particular slots?

    I know how to use the NetMessage - I'm just unsure of which slot index corresponds to which slot AND how to easily examine what item's the player has in said slots.

    Thanks for the help :)
     
  2. Professor X

    Professor X Spam Cleaner 9000.5
    TShock Mod TShock Contributor

    Joined:
    Aug 18, 2014
    Messages:
    246
  3. MrGgggg243

    MrGgggg243 Level 2

    Joined:
    Aug 17, 2014
    Messages:
    35