[AJUDA] /mudarsenha
#1

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
Reply
#2

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

ID 2.
Reply
#4

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

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;
        }
    }
Reply
#6

para resolver isto й muito fбcil,

apenas:

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

este meu tutorial explica tudinho;
Reply
#7

Funcionou cynic. Obrigado.

E aos outros que postaram, obrigado tambйm.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)