Markeloff Posted September 13, 2013 Posted September 13, 2013 Well, I tried and tried but i failed. Can we save a running timer if a player quit then load it when he login? Can we save the timer in his account data then load his data when he login? Any solution to save a timer and load it onPlayerLogin?
Castillo Posted September 13, 2013 Posted September 13, 2013 You can store the timer timeleft and re-create it when they login.
Markeloff Posted September 13, 2013 Author Posted September 13, 2013 Well, how to know how much time is left?
Castillo Posted September 13, 2013 Posted September 13, 2013 The same way you created it in the first place...
Markeloff Posted September 13, 2013 Author Posted September 13, 2013 function SAVE() if getElementData ( source, "isPlayerJailed" ) then if isTimer(JTime) then getTimerDetails ( JTime ) setAccountData(getAccountName(source),----What do i write here to save ? end end end addEventHandler( "onPlayerQuit", root, SAVE)
Castillo Posted September 13, 2013 Posted September 13, 2013 getTimerDetails returns several values, the first one is the time left of the timer in milliseconds, save that value in account data.
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