Posts: 384
Threads: 53
Joined: May 2010
Reputation:
0
When someone gets sent to jail IG, they have a timer depending on how wanted they are. But a lot of people just log out and log in to evade jail.
How can I save the amount of Jail time a player has? So if they some how die in jail, or if they log out How can I save the timer, and when they respawn they get sent to jail once again with the remaining time?
Posts: 115
Threads: 23
Joined: Jan 2009
Reputation:
0
You can store the remaining jail time in a variable, save it into the user file and send the player back to prison when he or she relogs.
Posts: 384
Threads: 53
Joined: May 2010
Reputation:
0
Lol yeah, I know like what is needed to do it, but
How do i actually do it? Lol.
I have a register saving system. Using Dudb
Posts: 466
Threads: 72
Joined: Jan 2010
Reputation:
0
I'm also looking for something like this
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
well you have jailtime as a PVar and it runs off a timer that decreases their time every second so, someone with 1minute in jail has a variable of 60 which decreases every second and when they quit save that variable.
then when they load data it checks if their jailtime variable is above 0 and if it is then puts them in jail.
ofc when the variable reaches 0 it removes them from jail or w/e you want it to do
Posts: 384
Threads: 53
Joined: May 2010
Reputation:
0
What i'm trying to do is save the jail time into there file so if they log out, and log in, the time continues from where they left off.
I need help with the code, I have no idea how to do it
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
I just told you how to do it, if you want the actual code request it in the script request thread