Multiple Player Kicks?
#3

It's untested, and I doubt it'll work, but it's worth a try. Make sure to change the 10 that declares the array and the number inside the sscanf line to what you'd want the max kicks to be.

The problem I'm worried about is sscanf isn't going to allow parsing those extra values, in case you don't type them all, and just give an error and abort the operation. If my thinking is correct, this will not work. However, like I said, it's worth a shot.

pawn Code:
COMMAND:kicks( playerid, params[ ] )
{
    if( !IsPlayerAdmin( playerid ) ) return 0;
    new kicks[ 10 ] = { -1, ... };
    sscanf( params, "a<i>[10]", kicks );
    for( new i = 0; i < sizeof( kicks ); i++ )
    {
        if( kicks[ i ] != -1 )
        {
            KickPlayer( kicks[ i ] );
        }
    }
    return 1;
}
Reply


Messages In This Thread
Multiple Player Kicks? - by (_AcE_) - 09.08.2011, 04:41
Re: Multiple Player Kicks? - by Backwardsman97 - 09.08.2011, 05:03
Re: Multiple Player Kicks? - by Grim_ - 09.08.2011, 05:26
Re: Multiple Player Kicks? - by [L3th4l] - 09.08.2011, 05:35
Re: Multiple Player Kicks? - by Grim_ - 09.08.2011, 05:40
Re: Multiple Player Kicks? - by (_AcE_) - 09.08.2011, 16:18
Re: Multiple Player Kicks? - by MadeMan - 09.08.2011, 16:53
Re: Multiple Player Kicks? - by Stylock - 09.08.2011, 18:15

Forum Jump:


Users browsing this thread: 1 Guest(s)