SA-MP Forums Archive
[AJUDA] /mudarsenha - 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] /mudarsenha (/showthread.php?tid=217744)



[AJUDA] /mudarsenha - [AF]Junior - 28.01.2011

pawn Код:
//MudeSenha
    if (strcmp(cmd,"/MudarSenha",true) ==0  || strcmp(cmd,"/changepassword",true) ==0 )
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid,CINZA,"Vocк nгo estб logado!");
                return 1;
            }
            if(PlayerInfo[playerid][pVIP] >= 2)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й VIP Premium!");
                return 1;
            }
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid,CINZA,"Vocк nгo estб logado!");
                return 1;
            }
            GetPlayerName(playerid,sendername,sizeof(sendername));
            format(string,sizeof(string),"Players/%s.ini",sendername);
            new tmppass[64];
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid,CINZA1,"Use: /mudarsenha [Nova Senha]");
                SendClientMessage(playerid,CINZA1,"Guarde a senha ou tire SS da tela apertando F8 para nгo esquecer!");
                return 1;
            }
            strmid(tmppass,tmp,0,strlen(cmdtext),255);
            Encrypt(tmppass);
            OnPlayerRegister(playerid,tmppass);
            return 1;
        }
    }
Quero que sу o VIP Premium que й o "if(PlayerInfo[playerid][pVIP] >= 2)" possa mudar de senha.
Eu coloco isso e o comando diz que eu nгo sou VIP Premium, mas eu sou. Me ajudem por favor


Re: [AJUDA] /mudarsenha - CyNiC - 28.01.2011

Nгo seria <= 2? Ou < 2? Qual o id do "vip premium"?


Re: [AJUDA] /mudarsenha - [AF]Junior - 28.01.2011

ID 2.


Re: [AJUDA] /mudarsenha - CyNiC - 28.01.2011

Entгo altere para:
pawn Код:
if(PlayerInfo[playerid][pVIP] < 2)



Re: [AJUDA] /mudarsenha - Macintosh - 28.01.2011

Sу da ctrl + c e ctrl + v ^^
pawn Код:
if (strcmp(cmd,"/MudarSenha",true) ==0  || strcmp(cmd,"/changepassword",true) ==0 )
    {
        if(IsPlayerConnected(playerid))
        {
            if(!gPlayerLogged[playerid] == 1)
            {
                SendClientMessage(playerid,CINZA,"Vocк nгo estб logado!");
                return 1;
            }
            if(!PlayerInfo[playerid][pVIP] >= 2)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й VIP Premium!");
                return 1;
            }
            GetPlayerName(playerid,sendername,sizeof(sendername));
            format(string,sizeof(string),"Players/%s.ini",sendername);
            new tmppass[64];
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid,CINZA1,"Use: /mudarsenha [Nova Senha]");
                SendClientMessage(playerid,CINZA1,"Guarde a senha ou tire SS da tela apertando F8 para nгo esquecer!");
                return 1;
            }
            strmid(tmppass,tmp,0,strlen(cmdtext),255);
            Encrypt(tmppass);
            OnPlayerRegister(playerid,tmppass);
            return 1;
        }
    }



Re: [AJUDA] /mudarsenha - zSuYaNw - 28.01.2011

para resolver isto й muito fбcil,

apenas:

https://sampforum.blast.hk/showthread.php?tid=212251

este meu tutorial explica tudinho;


Re: [AJUDA] /mudarsenha - [AF]Junior - 28.01.2011

Funcionou cynic. Obrigado.

E aos outros que postaram, obrigado tambйm.