Client Menu

I need to create a menu depending if a client has or doesnt have an item. It will need to loop throughout all items 300 or so and if he has one it will draw a button for it. however the data is stored on the server side. how can i use it?

Networked items are not recommended . What else can i do?


I dont really understand your post but it would be smart sending the items with datastream
For example:
[lua]datastream.StreamToClients(ply, “ItemStuffz”, ply.SomeTable)[/lua]

then on client:
[lua]datastream.Hook( “ItemStuffz”, function(,,,, decoded) LocalPlayer().SomeTable = decoded end)[/lua]

You should never have to send entire tables to the client. The best way is to have a table of items shared and just send the index to that table to the client in a usermessage. That way you are sending a single int instead of an entire table.

Oh he meant it that way…

I guess i can sent the whole table at start of the server and send a stream showing which items he owns. In shared .lua i mean.

Is there anyway to decode it?


nvm found it