find player by name? +rep!
#3

You can use the function I've made

pawn Код:
stock FindPlayerByName( name[] )
{
    for( new i = 0; i < MAX_PLAYERS; i += 1 )
    {
        if ( IsPlayerConnected( i ) )
        {
            new name2[24];
            GetPlayerName( i, name2, 24 );
            if ( strcmp ( name2, name, false ) == 0 )
            {
                return i;
                break;
            }
        }
    }
   
    return INVALID_PLAYER_ID;
}
Reply


Messages In This Thread
find player by name? +rep! - by PawnoQ - 29.01.2012, 02:31
Re: find player by name? +rep! - by [HiC]TheKiller - 29.01.2012, 02:49
Respuesta: find player by name? +rep! - by admantis - 29.01.2012, 02:51
Re: find player by name? +rep! - by PawnoQ - 29.01.2012, 02:51
Re: find player by name? +rep! - by jamesbond007 - 29.01.2012, 02:54
Re: find player by name? +rep! - by [HiC]TheKiller - 29.01.2012, 02:56
Re: find player by name? +rep! - by PawnoQ - 29.01.2012, 02:58
Re: find player by name? +rep! - by PawnoQ - 29.01.2012, 03:31
Re: find player by name? +rep! - by Babul - 29.01.2012, 04:08
Re: find player by name? +rep! - by PawnoQ - 30.01.2012, 14:12

Forum Jump:


Users browsing this thread: 1 Guest(s)