What's wrong with Kick ?
#7

Quote:
Originally Posted by CalgonX
pawn Код:
stock KickPlayer( playerid, Reason[], 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 );
          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 );
          Kick( playerid );
          print( string );
        }
    }
    else
    {
      printf( "KickPlayer() was called, but the playerid (%d) inserted into the function wasn't a valid ID.", playerid ) );
    }
}
I need two reasons in that function.. One will be shown only for player, another will be shown for everyone..
And SendFMessage is SendPlayerFormattedMessage from useful functions, it works..
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: 4 Guest(s)