27.02.2017, 15:03
Hi everyone,
I'm making a system to save different kind of items like skin, weapons and wearable items.
I've a table on my database that contains all items info(model id, amount, name, the function..)
When I start the server, this information are copied in an array called items, that is similar on structure of my table.
So, on opening of trading dialog, the script searches inside the array any item that belonging to current business.
The inventory is an array that store only the item id and amount, the other information are keep from items array.
account_items is the inventory table
Is that a good way to store items? How to improve if this isn't?
Thanks in advanced.
I'm making a system to save different kind of items like skin, weapons and wearable items.
I've a table on my database that contains all items info(model id, amount, name, the function..)
When I start the server, this information are copied in an array called items, that is similar on structure of my table.
So, on opening of trading dialog, the script searches inside the array any item that belonging to current business.
The inventory is an array that store only the item id and amount, the other information are keep from items array.
account_items is the inventory table
Is that a good way to store items? How to improve if this isn't?
Thanks in advanced.