Foreach
#2

Try using this:
pawn Код:
stock GetPlayeridMid(name[])
{
        foreach(Player, i)
        {
            new gPlayerName[MAX_PLAYER_NAME];
            GetPlayerName(i, gPlayerName, MAX_PLAYER_NAME);
            if(strfind(gPlayerName, name, true) != -1)
            {
                return i;
                break;
            }
        }
    return INVALID_PLAYER_ID;
}
Reply


Messages In This Thread
Foreach - by Moron - 08.12.2012, 13:03
Re: Foreach - by Threshold - 08.12.2012, 13:10
Re: Foreach - by Moron - 08.12.2012, 13:31
Re: Foreach - by Threshold - 08.12.2012, 13:33
Re: Foreach - by Moron - 08.12.2012, 13:41
Re : Foreach - by Vukilore - 08.12.2012, 13:44
Re: Re : Foreach - by Moron - 08.12.2012, 13:49
Re: Foreach - by Moron - 08.12.2012, 15:11

Forum Jump:


Users browsing this thread: 1 Guest(s)