The Killer Posted December 28, 2013 Share Posted December 28, 2013 hello ! i have one question why when i do this : if getElementData(player, "HitMarker") == true then outputChatBox("You did take the money you can't take it twice", player, 255, 0, 0) else givePlayerMoney(player, 1) outputChatBox("You have got $1", player, 0, 255, 0) setElementData(player, "HitMarker", true) and i hit the marker again it say : You did take the money you can't take it twice. but when i do 'reconnect' and hit it again, it give me the money !! why is that ? Link to comment
Moderators IIYAMA Posted December 28, 2013 Moderators Share Posted December 28, 2013 (edited) Cause ElementData is attached on an element. When this player/element leaves, the element is gone and so is the data. Elements are actuality in lua expressed as user-data. Every element does have it's own user-data, they are build up out several numbers and letters. When a player leaves the server his user-data can be saved at the server, but when he rejoins his user-data has been changed. But you can use the player account (or serial) instead. Edited December 28, 2013 by Guest Link to comment
The Killer Posted December 28, 2013 Author Share Posted December 28, 2013 how to Make it saves even if it gets out? Link to comment
Drakath Posted December 28, 2013 Share Posted December 28, 2013 You could use: setAccountData getAccountData 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