SA-MP Forums Archive
[Ajuda] /infoacc - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] /infoacc (/showthread.php?tid=447609)



/infoacc - iStronG - 30.06.2013

Iae galera eu tava fazendo um comando para meu servidor que seria: /infoacc [Nome] ai iria mostrar ,Senha , Level , grana, sу que nгo tive muito resultado o que eu consegui fazer foi isso aqui:

pawn Код:
if(strcmp(cmd, "/infoacc", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /infoacc [ Nome_Conta ]");
                return 1;
            }
            new acc;
            tmp = strtok(cmdtext, idx);
            if(PlayerInfo[playerid][pAdmin] >= 10 || IsPlayerAdmin(playerid))
            {
                if(IsPlayerConnected(para1))
                {
                    if(acc != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(playerid, plname, sizeof(plname));
                        format(string, sizeof(string), "%s.ini", plname);
                        printf("Nick: d% Senha: d% Level: d%", , giveplayer, level,pSenha);
                       
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Voce nгo esta autorizado a usar este comando!");
            }
        }
        return 1;
    }
Gostaria que alguem pudesse me ajuda.
Obrigado.


Re: /infoacc - Chean - 30.06.2013

isso
pawn Код:
printf("Nick: d% Senha: d% Level: d%", , giveplayer, level,pSenha);
vai aparecer O NICK LEVEL E SENHA NAO NICK SENHA LVL
mude para o
pawn Код:
printf("Nick: d% level: d% Grana: d%", , giveplayer, level,pSenha);



Re: /infoacc - iStronG - 30.06.2013

Olб denovo , nгo funcionou o comando aн eu mudei um pouco olhe:

pawn Код:
if(strcmp(cmd, "/infoacc", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /infoacc [ Nome_Conta ]");
                return 1;
            }
            new acc;
            new para1;
            tmp = strtok(cmdtext, idx);
            if(PlayerInfo[playerid][pAdmin] >= 10 || IsPlayerAdmin(playerid))
            {
                if(IsPlayerConnected(para1))
                {
                    if(acc != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "%s.ini", );
                        format(string, sizeof(string), "Nick: %s", giveplayer);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "Senha: %s", pSenha);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Voce nгo esta autorizado a usar este comando!");
            }
        }
        return 1;
    }
Sу que quando chego in-game digito o comando /infoacc [Nome_Conta] , nгo aparece o nome do cara nem a senha sу aparece meu nome e o Local da senha fica sem nada.
Gostaria que alguem me ajudasse.


Re: /infoacc - Chean - 30.06.2013

SO UMA DUVIDA ISSO
pawn Код:
format(string, sizeof(string), "%s.ini", plname);
SERIA PARA MOSTRAR O NICK ??


Re: /infoacc - iStronG - 30.06.2013

Eu pensei em por isso pra quando digitar /infoacc (Nick) Buscaria o nick e a senha da pessoa.
Nгo sei se tб certo.


Re: /infoacc - XxFaTaLxX - 30.06.2013

Apareceu seu nome por causa disso:

giveplayer



Re: /infoacc - iStronG - 30.06.2013

Alguem me ajuda?


Re: /infoacc - BieeelEvolution - 01.07.2013

Tente:

pawn Код:
printf("Nick: %s level: %i Grana: %i", , giveplayer, level, GetPlayerMoney(playerid));



Re: /infoacc - iStronG - 01.07.2013

Ainda nгo deu.


Re: /infoacc - BieeelEvolution - 01.07.2013

Editei, tenta agora.