BigBrother Posted September 24, 2013 Posted September 24, 2013 Hello, I'm starting a new roleplay gamemode, and I'd like to optimize it. I don't want to make SQL requests at each time I have to change a user data, so I had the idea to create a table at the connection of the user, and to store in it all the informations which could be changes during the game session. At the logout, I just have to make a request to update all the content of the table in the SQL table But, using this method requires to create a table for each connected player, so How can I create dynamicly a table ? Regards,
Moderators IIYAMA Posted September 24, 2013 Moderators Posted September 24, 2013 myTable = {} myTable[player] = {} Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Tete omar Posted September 24, 2013 Posted September 24, 2013 Or read lua tables tutorial: http://lua-users.org/wiki/TablesTutorial
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