Hero192 Posted September 20, 2015 Share Posted September 20, 2015 Hey guys, how to save the player position when he Quit/Disconnect with Mysql? i will learn from that the mysql i already know some of it but i need examples like that many thanks for who tried to help me with example Link to comment
JR10 Posted September 20, 2015 Share Posted September 20, 2015 onPlayerQuit -> get the position, save it per account and load it when the player logs in. addEventHandler('onPlayerQuit', root, function() local x,y,z = getElementPosition(source) local pos = table.concat({x, y, z}, ',') --insert it end) Then to load it again: local x, y, z = unpack(split(pos, ',')) 1 Link to comment
LabiVila Posted September 20, 2015 Share Posted September 20, 2015 If it's only about saving player's position, I wouldn't recommend MySQL nor SQLite, you can do with account data, much easier & better 1 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