What is better (Bag-Inventory system ) [MySQL] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What is better (Bag-Inventory system ) [MySQL] (
/showthread.php?tid=657487)
What is better (Bag-Inventory system ) [MySQL] -
GospodinX - 08.08.2018
Hi guys
My questions is;
What is better to do
1)
Код:
new Inventory[MAX_PLAYERS][50];
2)
Every time when player want to use bag-inventory : select query
I want to make that player can save all weapons in Inventory + there are some items on my server which player can save in inventory
First 34 ID(from array) i need to reserve for weapons,other for my items.
So i don't know is it wrong to do with select query(When player want to see his inventory+when want to use bag-inventory).
Player can save all items in bag,but he don't will save every weapon,every items etc.So I think that is better select query,but i'm not sure is it good for server.
Re: What is better (Bag-Inventory system ) [MySQL] -
CodeStyle175 - 08.08.2018
well when you have good inventory framework, then its easier to put things into vehicle, objects and other things.
Item[itemid][OwnerType]=ITEM_OWNER_VEHICLE;
Item[itemid][OwnerID]=Vehicle[vehid][SQLid];