[AJUDA] /irfila
#1

pessoal ja me passaram um codigo e deu serto mais agr eu to querendo assim quando um play digita /fila aparece la tu Voce Entrou Na Fila.. isso ja tem no codigo abaixo mais eu queria que o adm digitasse /irfila ai ele ia no player ou seja o player й a senha 1 ai o adm digita /irfila vai atй onde o player esta e automaticamente ele sai da fila sozinho tem como faser isso ? vlw

pawn Код:
if (strcmp("/fila", cmdtext, true, 10) == 0)
    {
        if (fila[playerid] == 1)
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Vocк ja esta na fila!");
            return 1;
        }
        fila[playerid] = 1;
        senha2++;
        senha[playerid] = senha2;
        SendClientMessage(playerid, 0xFFFFFFFF, "Voce Entrou Na Fila De Atendimento ! Aguarde Para Ser Atendido...");
        return 1;
    }
    if (strcmp("/sairfila", cmdtext, true, 10) == 0)
    {
        // Do something here
        if(fila[playerid] == 0)
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Vocк nгo esta na fila!");
            return 1;
        }
        fila[playerid] = 0;
        senha2 --;
        senha[playerid] = 0;
        SendClientMessage(playerid, 0xFFFFFFFF, "Vocк saiu da fila.");
        return 1;
    }
    if (strcmp("/verfila", cmdtext, true, 10) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] > 0)
        {
            for(new manolo; manolo < Slots; manolo++)
            {
                if(IsPlayerConnected(manolo))
                {
                    if(fila[manolo] == 1)
                    {
                        new name[MAX_PLAYER_NAME];
                        GetPlayerName(manolo, name, sizeof(name));
                        format(string, sizeof(string), "%s senha: %d", name ,senha[manolo]);
                        SendClientMessage(playerid, 0xFFFFFFFF, string);
                    }
                    return 1;
                }
            }
        }
        else
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Somente admins podem ver quem esta na fila..");
            return 1;
        }
        return 1;
    }
obs: Sem Discusao no topico por favor
Reply
#2

Vocк pode aplicar animaзхes para ele sair caminhando sozinho,ou usar um SetPlayerPos para mudar o local.

3001 Post denovo ¬¬
Reply
#3

como assim nao intendi ??
Reply
#4

me add msn ae power gugutb@hotmail.com
Reply
#5

zbt eu ja te adicionei a um tempao vc que nao aceita ou nao fica on sei la lcg.14@hotmail.com add ai
Reply
#6

desculpa ai galera mais eu presiso muito de ajuda nisso aki ;P
Reply
#7

tente usar isto:

pawn Код:
//
    if(strcmp(cmd, "/irfila", true) == 0)
    {
        new tmp[128];
        tmp = strtok(cmdtext, idx);
        if(strlen(tmp) == 0)
                {
                    SendClientMessage(playerid, 0xFFFFFFFF, "USE: /irfila [numero]");
                    return 1;
                }
        for(new i; i < MAX_PLAYERS; i++)
        {
            if(fila[i] == tmp)
            {
                new Float:x, Float:y, Float:z;
                GetPlayerPos(i, x, y, z);
                SetPlayerPos(playerid,x, y, z);
                fila[i] = 0;
                return 1;
            }
        }
        return 1;
    }
Reply
#8

@sergio_xd
Alguem sabe se funciona?
Reply
#9

Deve funfar agora que o cara foi ban sу testando \e/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)