Pegar o ID atravйs do nъmero
#2

tente:

pawn Code:
//no topo do gm:
//no topo do gm:
new chamoufunc = 0;
forward GetPlayerNumber(numero[]);
//No onplayercomandText
    if(strcmp(cmd, "/nome", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new x_nr[256];
            x_nr = strtok(cmdtext, idx);
            if(!strlen(x_nr)) {
                SendClientMessage(playerid, COLOR_WHITE, "USE: /nome [telefone]");
                return 1;
            }
            chamoufunc = playerid;
            GetPlayerNumber(strval(x_nr));
        }
        return 1;
    }
//no final do gm
public GetPlayerNumber(numero[])
{
    for(new i = 0; i <= MAX_PLAYERS; ++i)
    {
        if(numero == PlayerInfo[i][numero])
        {
            new tnome[MAX_PLAYER_NAME];
            GetPlayerName(i, tnome, sizeof(tnome) );
            //aqui vocк poe suas funзхes...
        }
    }
    return 1;    //ID Invбlido
}
Reply


Messages In This Thread
Pegar o ID atravйs do nъmero - by Ricop522 - 09.03.2011, 19:33
Re: Pegar o ID atravйs do nъmero - by SergioBr - 09.03.2011, 20:00
Re: Pegar o ID atravйs do nъmero - by Ricop522 - 09.03.2011, 20:10
Re: Pegar o ID atravйs do nъmero - by leandro123456 - 09.03.2011, 20:17
Re: Pegar o ID atravйs do nъmero - by Ricop522 - 09.03.2011, 20:24
Re: Pegar o ID atravйs do nъmero - by leandro123456 - 09.03.2011, 20:29

Forum Jump:


Users browsing this thread: 2 Guest(s)