Anything wrong with this method of saving stats?
#1

pawn Код:
CMD:restartserver( playerid, params[] )
{
    new
        msgStr [ 85 ];
       
    if( accInfo [ playerid ] [ Auth ] < 4 || accLoggedIn [ playerid ] == 0 )
        return NOAUTH;
       
    for( new u; u < MAX_PLAYERS; u ++ )
    {
        ClearChat( u );
        OnPlayerDisconnect( u, 1 );
        TogglePlayerControllable( u, false );
        //Kick( u );
    }
   
    format( msgStr, sizeof( msgStr ), " The server is restarting. "#LG"Please wait..." );
    SendClientMessageToAll( -1, msgStr );
   
    SendRconCommand( "gmx" );
    return true;
}
Basically, I just call OnPlayerDisconnect for all players, and then GMX the server. Is there anyway this could bug out? What are some other solutions?
Reply


Messages In This Thread
Anything wrong with this method of saving stats? - by 2KY - 27.05.2012, 02:05
Re: Anything wrong with this method of saving stats? - by ReneG - 27.05.2012, 02:09
Re: Anything wrong with this method of saving stats? - by 2KY - 27.05.2012, 02:10
Re: Anything wrong with this method of saving stats? - by ReneG - 27.05.2012, 02:13
Re: Anything wrong with this method of saving stats? - by 2KY - 27.05.2012, 02:15
Re: Anything wrong with this method of saving stats? - by mprofitt - 27.05.2012, 02:34
Re: Anything wrong with this method of saving stats? - by JhnzRep - 27.05.2012, 05:44

Forum Jump:


Users browsing this thread: 1 Guest(s)