SA-MP Forums Archive
[Ajuda] Logando com qlqr senha - 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] Logando com qlqr senha (/showthread.php?tid=652342)



Logando com qlqr senha - HelderPT - 08.04.2018

Eu consigo logar na conta com qlqr senha !!

PHP код:
f(dialogid == LOGIN)
{
    if(!
response)
    {
       
SendClientMessage(playerid,-1,"{00BFFF}Voce foi kickado por nao Logar.");
       
Kick(playerid);
    }
    else {
    if(
response == 1)
    {
        
format(vfilesizeof(vfile), DIRETORIOpName(playerid));
        new 
senhaacc[256];
        
senhaacc DOF2_GetString(vfile"Senha");
        if(
strcmp(inputtextsenhaacctrue) == 0)
        {
            
pAdmin[playerid] = DOF2_GetInt(vfile"LevelAdmin");
            
pGasolina[playerid] = DOF2_GetInt(vfile"Gasolina");
            
GivePlayerGranaEx(playeridDOF2_GetInt(vfile"Dinheiro"));
            
SetPlayerWantedLevel(playeridDOF2_GetInt(vfile"Procurado"));
            
Experiencia[playerid] = DOF2_GetInt(vfile"Experiencia");
            
SetPlayerSkin(playeridDOF2_GetInt(vfile"Skin"));
            
Preso[playerid] = DOF2_GetInt(vfile"Preso");
            
pLevel[playerid] = DOF2_GetInt(vfile"Level");
            
Profissao[playerid] = DOF2_GetInt(vfile"Profissao");
            
SetSpawnInfo(playerid0232491.4192, -1958.089213.5813.7500000);
            
pFase[playerid][Logado] = 1;
            
GivePlayerGranaEx(playeridDOF2_GetInt(vfile"Dinheiro"));
            
SpawnPlayer(playerid);
            
GameTextForPlayer(playerid"~g~Logado ~n~ Com Sucesso"80001);
            
PlayerPlaySound(playerid1057000);
        }
        else {
            
SendClientMessage(playeridVermelho ,"(x) Senha Incorreta");
            
format(StringLgsizeof(StringLg), "Senha Incorreta, %s\n Tente Digitar sua Senha Novamente!"pName(playerid));
            
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_INPUT"Login"StringLg"Logar""Sair");
            }
        }
        else {
            
format(StringLgsizeof(StringLg), "{FFFAFA}Usuario: {FFD700}%s\n{FFFAFA}Conta: {00FF00}Registrada\n{FFFAFA}Digite sua Senha e Clique em Logar"pName(playerid));
            
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_INPUT"Login"StringLg"Logar""Sair");
            return 
1;
            }
        }
    } 



Re: Logando com qlqr senha - XandyMello - 08.04.2018

PHP код:
if(dialogid == LOGIN)
{
    if(!
response) {
        
SendClientMessage(playerid,-1,"{00BFFF}Voce foi kickado por nao Logar.");
           return 
Kick(playerid);
    }
    else
    {
        new 
vfile[64];
        
format(vfilesizeof(vfile), DIRETORIOpName(playerid));
        if(!
strcmp(inputtextDOF2_GetString(vfile"Senha"), true) && !isnull(inputtext))
        {
            
pAdmin[playerid] = DOF2_GetInt(vfile"LevelAdmin");
            
pGasolina[playerid] = DOF2_GetInt(vfile"Gasolina");
            
GivePlayerGranaEx(playeridDOF2_GetInt(vfile"Dinheiro"));
            
SetPlayerWantedLevel(playeridDOF2_GetInt(vfile"Procurado"));
            
Experiencia[playerid] = DOF2_GetInt(vfile"Experiencia");
            
SetPlayerSkin(playeridDOF2_GetInt(vfile"Skin"));
            
Preso[playerid] = DOF2_GetInt(vfile"Preso");
            
pLevel[playerid] = DOF2_GetInt(vfile"Level");
            
Profissao[playerid] = DOF2_GetInt(vfile"Profissao");
            
SetSpawnInfo(playerid0232491.4192, -1958.089213.5813.7500000);
            
pFase[playerid][Logado] = 1;
            
GivePlayerGranaEx(playeridDOF2_GetInt(vfile"Dinheiro"));
            
SpawnPlayer(playerid);
            
GameTextForPlayer(playerid"~g~Logado ~n~ Com Sucesso"80001);
            
PlayerPlaySound(playerid1057000);
        }
        else
        {
            
SendClientMessage(playeridVermelho ,"(x) Senha Incorreta");
            
format(StringLgsizeof(StringLg), "Senha Incorreta, %s\n Tente Digitar sua Senha Novamente!"pName(playerid));
            
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_INPUT"Login"StringLg"Logar""Sair");
        }
        return 
1;
    }




Re: Logando com qlqr senha - HelderPT - 08.04.2018

Erro: warning 219: local variable "vfile" shadows a variable at a preceding level

Linha: new vfile[64];


Re: Logando com qlqr senha - IlanZ - 08.04.2018

Jб tem uma variбvel com esse mesmo nome declarada, mude o nome ou delete uma.


Re: Logando com qlqr senha - HelderPT - 08.04.2018

Obligado !