Inventory
Last read Never
Help me create one sv and cl side for my gamemode please. or show me an example!
depending on how you want it to work, but more or less just this for the base
- serverside database to store items, can structure it however such as:
- <steamid> | <inventory data as json> (not recommended)
- <steamid> | <item id> | <quantity> for every item
- when a player joins, fetch their inventory from the database, you can store it under ply.Inventory or wherever, then sync the data with the client
- when a change is made to the inventory, update the database & sync with the client
that's pretty much it tbh
BullyHunter:
depending on how you want it to work, but more or less just this for the base
serverside database to store items, can structure it however such as:
<steamid> | <inventory data as json> (not recommended)
<steamid> | <item id> | <quantity> for every item
when a player joins, fetch their inventory from the database, you can store it under ply.Inventory or wherever, then sync the data with the client
when a change is made to the inventory, update the database & sync with the client
that's pretty much it tbh
Not really good at designing the clientside, I'll need that, thanks for that info.
done ty.
Users viewing this thread
Nobody