tommymaster Posted January 5, 2018 Share Posted January 5, 2018 Hi. I am trying to make an item system, and it would work like this: setElementData (source, "hasItem", {1, 2, 3, 4}, true) I would like to remove, and add item ID-s into this table, but don't really know how. And could you please tell me, for example list the numbers into a gui list for the player? Link to comment
Tails Posted January 6, 2018 Share Posted January 6, 2018 If you don't know, you should get rid of the element data and try experimenting with just tables. Look up some tutorials on tables and get used to them then afterwards you can use element data to sync data from a table. Here are a few links: https://devilsquid.com/lua-tables/ http://www.troubleshooters.com/codecorn/lua/luatables.htm https://www.tutorialspoint.com/lua/lua_tables.htm http://lua-users.org/wiki/TablesTutorial https://en.wikibooks.org/wiki/Lua_Programming/Tables Link to comment
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