This command didn't kick me
#1

Okay, I've logged in to RCON, and typed /kick 0 testreason ( 0 is the player ID ).

pawn Код:
COMMAND:kick( playerid, params[ ] )
{
    if ( IsPlayerAdmin( playerid ) )
    {
        new
            toplayerid,
            reason;

        if ( sscanf( params, "us[128]", toplayerid, reason ) )
        {
            SendClientMessage( playerid, 0xFFFFFF, "Syntax Error: /Kick < Playerid > < Reason >" );
            return 1;
        }

        if ( toplayerid == INVALID_PLAYER_ID )
        {
            SendClientMessage( playerid, 0xFFFFFF, "Input Error: Player is not connected or it is yourself." );
            return 1;
        }
       
        new
            kickString[ 128 ],
            adminName[ 24 ],
            kickedName[ 24 ];

        GetPlayerName( playerid, adminName, 24 );
        GetPlayerName( toplayerid, kickedName, 24 );

        format( kickString, 128, "{EE5555}Admin Command {FFFFFF}: Player %s was kicked by Administrator %s with the reason : %s.",
        kickedName, adminName, reason );

        SendClientMessageToAll( 0xFFFFFF, kickString );

        Kick( toplayerid );
    }
    return 1;
}
EDIT: Also, vehicle will create more.
The X Y position is same, but the Z is higher.
Reply


Messages In This Thread
This command didn't kick me - by Basicz - 15.12.2010, 09:09
Re: This command didn't kick me - by Benjo - 15.12.2010, 09:35
Re: This command didn't kick me - by Basicz - 15.12.2010, 09:36
Re: This command didn't kick me - by Benjo - 15.12.2010, 10:13

Forum Jump:


Users browsing this thread: 1 Guest(s)