[HELP] Save stats when disconnect
#1

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.
Reply
#2

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
Reply
#3

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.
Reply
#4

i gonna try it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)