LucasBaker Posted June 19, 2013 Share Posted June 19, 2013 Hello, I am trying to create a script to do that to save scores but do not know much mess with MYSQL could help me? Code: function onPlayerQuit() local playerAccount = getPlayerAccount(source) if (playerAccount) then local playerScores = getElementData(source) setAccountData(playerAccount, "kills", playerScores) end end addEventHandler("onPlayerQuit", getRootElement(), onPlayerQuit) function onPlayerLogin() local playerAccount = getPlayerAccount(source) if (playerAccount) then local playerScores = getAccountData(playerAccount, "kills") if (playerScores) then setElementData(source, playerScores) end end end addEventHandler("onPlayerLogin", getRootElement(), onPlayerLogin) -- add an event handler Link to comment
Castillo Posted June 19, 2013 Share Posted June 19, 2013 Account data has nothing to do with MySQL. Link to comment
iPrestege Posted June 19, 2013 Share Posted June 19, 2013 You're not getting any data . 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