SA-MP Forums Archive
Save countdown time - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Save countdown time (/showthread.php?tid=242828)



Save countdown time - Biesmen - 20.03.2011

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.


AW: Save countdown time - Pablo Borsellino - 20.03.2011

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


Re: Save countdown time - Biesmen - 20.03.2011

Standard.


AW: Save countdown time - Pablo Borsellino - 20.03.2011

Show me your Code of Saving the Player Account...


Re: Save countdown time - Biesmen - 20.03.2011

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


Re: Save countdown time - Stigg - 20.03.2011

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


AW: Save countdown time - Pablo Borsellino - 20.03.2011

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);



Re: Save countdown time - Biesmen - 20.03.2011

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.


Re: Save countdown time - Stigg - 20.03.2011

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..


Re: Save countdown time - Biesmen - 20.03.2011

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