Overcrash Posted September 19, 2018 Posted September 19, 2018 Hello how to implement an invertary system I have a database of course on mysql Thanks for your help
Joshua Posted September 19, 2018 Posted September 19, 2018 2 hours ago, Elliot said: i have same problem How is this a problem? 1
MrPancakers Posted September 19, 2018 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
Overcrash Posted September 19, 2018 Author 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
Elliot Posted September 19, 2018 Posted September 19, 2018 3 hours ago, Robson said: Its pretty easy: make it yourself thanking, i now have a invertary system, 2 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now