Save countdown time
#1

I've been struggling with this for awhile. I'm trying to find out how to save the timer's amount if the player logs out.

Example:
pawn Код:
ThePlayer[playerid][TheFunAmount] = minute;
SetTimerEx("ForFun", minute*1000*60, false, "i", playerid);
Then I'd like to save the minutes until the timer ends if a play disconnects. But I do not really know how to save this. I have tried multiple things but it failed.

I thought of setting different timers for every minute, but my method failed.

I hope you can help me out.
Reply
#2

How you save the Player Accounts? Dini, MySQL, Standart ... ?
Reply
#3

Standard.
Reply
#4

Show me your Code of Saving the Player Account...
Reply
#5

You don't have to. Just make something up, I'll make it compatible with my script.
Reply
#6

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
You don't have to. Just make something up, I'll make it compatible with my script.
Lol'ed so hard at that. Sozz
Reply
#7

Okay, well. I don't know the right Code because I use Dini and MySQL only, here are 3 things to safe the Amount. I think one of them works
pawn Код:
fwrite(Filedirectory,ThePlayer[playerid][TheFunAmount];);
pawn Код:
new FunAmount;
FunAmount=ThePlayer[playerid][TheFunAmount];
fwrite(Filedirectory,FunAmount);
pawn Код:
new FunText[20];
format(Funtext,20,"%d",ThePlayer[playerid][TheFunAmount]);
fwrite(Filedirectory,Funtext);
Reply
#8

Alright, that's why I didn't want to give my code because I thought you didn't get my question, you don't need my login/register script to help me with this.

I meant, if the player has a timer, he will disconnect. It will check how much time the timer had left, then it will save the amount of time he had left. Then if he logs in, it will start the timer again with the amount of time the player had left before he logged out. I do not have an issue with saving, I need to know a method to check how much time the player has left.

@Stigg,
I also rofl'ed really hard at your reply. Learn how to read.
Reply
#9

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
Alright, that's why I didn't want to give my code because I thought you didn't get my question, you don't need my login/register script to help me with this.

I meant, if the player has a timer, he will disconnect. It will check how much time the timer had left, then it will save the amount of time he had left. Then if he logs in, it will start the timer again with the amount of time the player had left before he logged out. I do not have an issue with saving, I need to know a method to check how much time the player has left.

@Stigg,
I also rofl'ed really hard at your reply. Learn how to read.
I meant at the "make something up" bit, there is no problem with my reading skills smartarse. lolz..
Reply
#10

Quote:
Originally Posted by Stigg
Посмотреть сообщение
I meant at the "make something up" bit, there is no problem with my reading skills smartarse. lolz..
Then I apologize for being rude at this thread, and the other thread.

Now, let's get back on topic
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)