[AJUDA] Ajeitar GM
#8

PlayerInfo й do outro GM, nao vai funcionar nesse novo.

pawn Код:
stock ReturnUser(PlayerName[])
{
    if(IsNumeric(PlayerName))
        return strval(PlayerName);
    else
    {
        new found=0, id;
        for(new i=0; i <= MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                new foundname[MAX_PLAYER_NAME];
                GetPlayerName(i, foundname, MAX_PLAYER_NAME);
                new namelen = strlen(foundname);
                new bool:searched=false;
                for(new pos=0; pos <= namelen; pos++)
                {
                    if(searched != true)
                    {
                        if(strfind(foundname,PlayerName,true) == pos)
                        {
                            found++;
                            id = i;
                        }
                    }
                }
            }
        }
        if(found == 1)
            return id;
        else
            return INVALID_PLAYER_ID;
    }
}
Reply


Messages In This Thread
[AJUDA] Ajeitar GM - by atsbs - 28.11.2011, 22:05
Re : [AJUDA] Ajeitar GM - by GabrielDias_Invision - 28.11.2011, 22:27
Re: [AJUDA] Ajeitar GM - by atsbs - 28.11.2011, 22:29
Re: [AJUDA] Ajeitar GM - by ViniBorn - 28.11.2011, 22:35
Re: [AJUDA] Ajeitar GM - by atsbs - 28.11.2011, 22:42
Re: [AJUDA] Ajeitar GM - by ViniBorn - 28.11.2011, 22:45
Re: [AJUDA] Ajeitar GM - by atsbs - 28.11.2011, 22:50
Re: [AJUDA] Ajeitar GM - by ViniBorn - 28.11.2011, 23:24
Re: [AJUDA] Ajeitar GM - by atsbs - 28.11.2011, 23:35

Forum Jump:


Users browsing this thread: 3 Guest(s)