SA-MP Forums Archive
[HELP] Save stats when disconnect - 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] Save stats when disconnect (/showthread.php?tid=249155)



[HELP] Save stats when disconnect - Fredden1993 - 17.04.2011

I need something that save your stats when you disconnect. I'm using a Dini registration system and I only got the two commands, /login and /register but no function that save a players stats.

Anyeone got any ideas? It have to be Dini.


Re: [HELP] Save stats when disconnect - Stigg - 17.04.2011

Quote:
Originally Posted by Fredden1993
Посмотреть сообщение
I need something that save your stats when you disconnect. I'm using a Dini registration system and I only got the two commands, /login and /register but no function that save a players stats.

Anyeone got any ideas? It have to be Dini.
http://forum.sa-mp.com/showthread.ph...ighlight=stats


Re: [HELP] Save stats when disconnect - Mean - 17.04.2011

pawn Код:
public OnPlayerDisconnect( playerid, reason )
{
    new file[ 128 ], name[ 24 ];
    GetPlayerName( playerid, name, 24 );
    format( file, sizeof file, "Folder/%s.txt", name ); // Change the filepath
    dini_IntSet( file, "Score", GetPlayerScore( playerid ) )
    return 1;
}
Example of score saving.


Re: [HELP] Save stats when disconnect - mickos - 07.05.2012

i gonna try it