ChisleLP Posted February 1, 2018 Share Posted February 1, 2018 Hello... I have one question... It's this normal? every time if i restart the server, it my "SetElementData" gone. Example I set myself an ElementData Phone number. After server Restart, it's it gone... This below its a example and running on Server side. setElementData(thePlayer, "Phone", "12388282") Thanks Link to comment
itHyperoX Posted February 1, 2018 Share Posted February 1, 2018 (edited) Are you saving it? if not, you have to save it. local phoneNumber = getElementData(thePlayer, "Phone") if phoneNumber then setAccountData(getPlayerAccount(thePlayer), "playerAccount:Phone", phoneNumber) end --then load it when player login. local phoneNumber = getAccountData(getPlayerAccount(thePlayer), "playerAccount:Phone") if phoneNumber then setElementData(thePlayer, "Phone", tonumber(phoneNumber)) end Edited February 1, 2018 by TheMOG Link to comment
pa3ck Posted February 1, 2018 Share Posted February 1, 2018 setElementData is meant to be temporary, so if a player rejoins, their elementData is cleared, if you restart the server all elementData is cleared, so yes, it is normal. 1 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