SkatCh 0 Posted November 3, 2014 (edited) guys please i need some help i create a vip system and i want to keep the time working even if the player logout is that possible . just a part from my script: local timers = { } function startTime ( thePlayer ) if not ( timers [ thePlayer ] ) then timers [ thePlayer ] = setTimer ( function () if ( isElement ( thePlayer ) ) then local timeLeft = getElementData ( thePlayer, "time" ); if ( timeLeft ) then if ( timeLeft > 0 ) then if ( ( timeLeft - 1 ) > 0 ) then setElementData ( thePlayer, "time", timeLeft - 1 ); else remove ( thePlayer ); end else remove ( thePlayer ); end end else return; end end, 1000, -1 ); end end Edited November 3, 2014 by Guest Share this post Link to post
Castillo 49 Posted November 3, 2014 Well, of course not, because 'thePlayer' will be destroyed once the player leaves the server, so setElementData will stop working. Share this post Link to post
SkatCh 0 Posted November 3, 2014 i already make it with setAccountData/getAccountData . so what can i do to keep timer decreasing. Share this post Link to post