/find
#2

pawn Код:
CMD:find( playerid, params[ ] )
{
    if( isnull( params ) ) return SendClientMessage( playerid, 0xAFAFAFAA, "USAGE: /Find [PlayerName]" );
    new
        count,
        name[ MAX_PLAYER_NAME ],
        sz_Find[ 256 ] = "{FFFFFF}"
    ;
    foreach(new i : Player)
    {
        GetPlayerName( i, name, MAX_PLAYER_NAME );
        if( strfind( name, params, true ) != -1 )
        {
            format( sz_Find, sizeof( sz_Find ), "%s%s(ID:%d)\n", sz_Find, name, i );
            count++;
        }
    }
    if( !count ) SendClientMessage( playerid, -1, "No results" );
    else ShowPlayerDialog( playerid, 9001, DIALOG_STYLE_MSGBOX, "Find", sz_Find, "Ok", "" );
    return 1;
}
Reply


Messages In This Thread
/find - by kalanerik99 - 28.11.2013, 18:44
Re: /find - by Konstantinos - 28.11.2013, 19:13

Forum Jump:


Users browsing this thread: 1 Guest(s)