SA-MP Forums Archive
Help on saving stats - 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)
+--- Thread: Help on saving stats (/showthread.php?tid=381903)



Help on saving stats - MrKnifeGuy - 01.10.2012

I need help.I want to make a saving script where you get saved every 15 seconds and the data will be saved in a folder please help


Re: Help on saving stats - trapstar2020 - 01.10.2012

pawn Код:
under gamode into
SetTimer("message", 1000, false);
//dont goes atop of you script
forward SaveStats(playerid;
//anywhere to the bottom
Public SaveStats(playerid)
{
//info goes here
}



Re: Help on saving stats - mamorunl - 01.10.2012

Quote:
Originally Posted by trapstar2020
Посмотреть сообщение
pawn Код:
under gamode into
SetTimer("message", 1000, false);
//dont goes atop of you script
forward SaveStats(playerid;
//anywhere to the bottom
Public SaveStats(playerid)
{
//info goes here
}
"Every 15 seconds" - your code saves once and in one second. Also, you are missing a closing brace.


Re: Help on saving stats - trapstar2020 - 01.10.2012

SetTimer("SaveStats", 15000, false); //better and no itz missing nothing


Re: Help on saving stats - newbienoob - 01.10.2012

Quote:
Originally Posted by trapstar2020
Посмотреть сообщение
pawn Код:
under gamode into
SetTimer("message", 1000, false);
//dont goes atop of you script
forward SaveStats(playerid;
//anywhere to the bottom
Public SaveStats(playerid)
{
//info goes here
}
I thought it should be
pawn Код:
SetTimer("SaveStats", 1000, false); //instead of "message"
Btw, he said every 15 seconds;
pawn Код:
SetTimer("SaveStats", 15000, false); //change 1000 to 15000
And he said, EVERY. So you should repeat the timer by changing "false" to "true"
pawn Код:
SetTimer("SaveStats", 15000, false);



Re: Help on saving stats - trapstar2020 - 01.10.2012

yeah i fixed it watch right above u


Re: Help on saving stats - Ghost_Boii - 01.10.2012

I Need Nice stats system with dialog


Re: Help on saving stats - trapstar2020 - 01.10.2012

create a dialog list and make a option save stats and add this in listitem
SaveStats(playerid);


Re: Help on saving stats - mamorunl - 01.10.2012

Quote:
Originally Posted by trapstar2020
Посмотреть сообщение
yeah i fixed it watch right above u
It's still at false


Re: Help on saving stats - MrKnifeGuy - 01.10.2012

And I want it to save in my server files automatically with all its data in it will this only do?