29.01.2012, 02:51
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;
}