29.11.2009, 10:14
There is:
in OnPlayerDisconnect
and the UpdatePlayer( playerid ):
pawn Код:
UpdatePlayer( playerid );
and the UpdatePlayer( playerid ):
pawn Код:
stock UpdatePlayer( playerid )
{
// Funkcija: UpdatePlayer( playerid )
// Atnaujins юaidлjo duomenш bazлs duomenis
MySQL_Check( );
if ( gPlayerLogged[ playerid ] )
{
new
string[ 1024 ],
length,
sqlid = PlayerInfo[ playerid ][ pSQLID ];
format( string, 1024, "UPDATE `zaidejai` SET WHERE `id`=%d",
PlayerInfo[ playerid ][ pSQLID ] );
length = strlen( string );
ALL STUFF TO SAVE THE ACCOUNT.
if ( strlen( string ) > length )
samp_mysql_query( string );
}
}