Overcrash 2 Posted September 19, 2018 Hello how to implement an invertary system I have a database of course on mysql Thanks for your help Share this post Link to post Share on other sites
Elliot 47 Posted September 19, 2018 i have same problem 1 Share this post Link to post Share on other sites
Joshua 169 Posted September 19, 2018 2 hours ago, Elliot said: i have same problem How is this a problem? 1 Share this post Link to post Share on other sites
Robson 2 Posted September 19, 2018 Its pretty easy: make it yourself Share this post Link to post Share on other sites
MrPancakers 108 Posted September 19, 2018 20 minutes ago, Robson said: Its pretty easy: make it yourself If it was easy for him he wouldn’t be sitting here making this thread. OP you need to think about the system, how will you create items, how will your server know who holds what, how will you be able to give someone an item and add it to their inventory. This isn’t a simple thing someone can quickly write up for you. Learning how to do things yourself is a great way to learn and posting here or in discord for assistance with your code is how you can get better assistance Share this post Link to post Share on other sites
Overcrash 2 Posted September 19, 2018 (edited) namespace rp.model { public class InventoryModel { public int id { get; set; } public String hash { get; set; } public String description { get; set; } public int type { get; set; } public int amount { get; set; } } } Quote model item using GTANetworkAPI; using System; namespace rp.model { public class ItemModel { public int id { get; set; } public String hash { get; set; } public String ownerEntity { get; set; } public int ownerIdentifier { get; set; } public int amount { get; set; } public Vector3 position { get; set; } public uint dimension { get; set; } public GTANetworkAPI.Object objectHandle { get; set; } public ItemModel Copy() { ItemModel itemModel = new ItemModel(); itemModel.id = id; itemModel.hash = hash; itemModel.ownerEntity = ownerEntity; itemModel.ownerIdentifier = ownerIdentifier; itemModel.amount = amount; itemModel.position = position; itemModel.dimension = dimension; itemModel.objectHandle = objectHandle; return itemModel; } } } Edited September 19, 2018 by Overcrash 2 Share this post Link to post Share on other sites
Elliot 47 Posted September 19, 2018 3 hours ago, Robson said: Its pretty easy: make it yourself thanking, i now have a invertary system, 2 Share this post Link to post Share on other sites