What's wrong with Kick ?
#8

pawn Код:
stock KickPlayer( playerid, Reason[], Reason2[], playerwhokicked )
{
    if( IsPlayerConnected( playerid ) )
    {
        new string[ 128 ], Name[ MAX_PLAYER_NAME ];

        GetPlayerName( playerid, Name, sizeof( Name ) );

        if( playerwhokicked == -255 )
        {
          format( string, sizeof( string ), "AdmCmd: %s has been kicked, reason: %s", Name, Reason );
          SendClientMessageToAll( COLOR_RED, string );
          format( string, sizeof( string ), "You have been kicked for %s.", Reason2 );
          Kick( playerid );
          print( string );
        }
        else
        {
          new KickerName[ MAX_PLAYER_NAME ];
          GetPlayerName( playerwhokicked, KickerName, sizeof( KickerName ) );
          format( string, sizeof( string ), "AdmCmd: %s has been kicked by %s, reason: %s", Name, KickerName, Reason );
          SendClientMessageToAll( COLOR_RED, string );
          format( string, sizeof( string ), "You have been kicked for %s.", Reason2 );
          Kick( playerid );
          print( string );
        }
    }
    else
    {
      printf( "KickPlayer() was called, but the playerid (%d) inserted into the function wasn't a valid ID.", playerid ) );
    }
}

//KickPlayer( playerid, "DMing", "Deathmatching", -255 );
Reply


Messages In This Thread
What's wrong with Kick ? - by SiJ - 25.01.2010, 04:57
Re: What's wrong with Kick ? - by SiJ - 25.01.2010, 14:39
Re: What's wrong with Kick ? - by -Rebel Son- - 25.01.2010, 20:04
Re: What's wrong with Kick ? - by KnooL - 25.01.2010, 20:12
Re: What's wrong with Kick ? - by SiJ - 26.01.2010, 08:59
Re: What's wrong with Kick ? - by Calgon - 26.01.2010, 09:33
Re: What's wrong with Kick ? - by SiJ - 26.01.2010, 09:42
Re: What's wrong with Kick ? - by Calgon - 26.01.2010, 09:44
Re: What's wrong with Kick ? - by SiJ - 26.01.2010, 10:52
Re: What's wrong with Kick ? - by Calgon - 27.01.2010, 11:18

Forum Jump:


Users browsing this thread: 2 Guest(s)