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



[AJUDA]Senha anti-fake - Nake01 - 10.09.2011

Galera por que quando eu erro a senha nгo kick e quando acerto nгo aparece a menssagem que digitei a senha certa?
Topo GM
PHP код:
#define PASSWORD "teste" 
Dialog da Senha Anti Fake
PHP код:
    if(dialogid == 1000)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                new 
nome[24], string[256];
                   
GetPlayerName(playeridnome24);
                
format(stringsizeof string"{FF4444}Erro:{FFFFFF} Coloque a senha\n\n{FFFFFF}Bem vindo {FF4444}%s{FFFFFF}!\nVocк precisa confirmar a senha do clan! {FF4444}%s{FFFFFF}.\n{FFFFFF}Digite a senha do clan e aperte OK!"nome);
                
ShowPlayerDialog(playerid1000DIALOG_STYLE_INPUT"{33AA33}Conta:"string"OK""Sair");
                return 
0;
            }
            if(!
strcmp(inputtextPASSWORDFAKEfalse))
            {
                  new 
nome[24], string[256];
                 
GetPlayerName(playeridnome24);
                
format(stringsizeof(string), "** {FFFFFF}%s{00BFFF} confirmou que faz parte da Administraзгo!"nome);
                
SendClientMessageToAll(BLU_CHIAROstring);
                
SendClientMessage(playeridCOLOR_BLUE"Vocк confirmou que faz parte do clan!");
                
PlayerPlaySound(playerid10570.00.00.0);
                return 
1;
            }
            else
            {
                new 
nome[24], string[256];
                   
GetPlayerName(playeridnome24);
                
format(stringsizeof(string), "** {FFFFFF}%s{00BFFF} Foi kickado pelo servidor. [Motivo: {FFFFFF}Errou a senha do clan!{00BFFF}]"nome);
                
SendClientMessageToAll(BLU_CHIAROstring);
                
SendClientMessage(playeridCOLOR_PINK"*** {FFFFFF}Vocк foi kickado pelo servidor. Motivo: {FF66FF}Errou a senha do clan!{FFFFFF}.");
                
Kick(playerid);
                }
            }
            else if(!
response)
            {
                new 
nome[24], string[256];
                 
GetPlayerName(playeridnome24);
                
SendClientMessage(playeridCOLOR_PINK"*** {FFFFFF}Vocк foi kickado! Motivo: {FF66FF}Cancelou{FFFFFF}.");
                
format(stringsizeof(string), "** {FFFFFF}%s{00BFFF} Foi kickado do servidor. [Motivo: {FFFFFF}Cancelou{00BFFF}]"nome);
                
SendClientMessageToAll(BLU_CHIAROstring);
                
Kick(playerid);
                
PlayerPlaySound(playerid10850.00.00.0);
            }
    return 
1;




Re: [AJUDA]Senha anti-fake - Wendell_. - 10.09.2011

Trocar isso aqui por true nгo resolveria?
PHP код:
if(!strcmp(inputtextPASSWORDFAKEtrue)) 



Re: [AJUDA]Senha anti-fake - Bruno Pereira - 10.09.2011

Tenta assim

PHP код:
if(dialogid == 1000)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                new 
nome[24], string[256];
                   
GetPlayerName(playeridnome24);
                
format(stringsizeof string"{FF4444}Erro:{FFFFFF} Coloque a senha\n\n{FFFFFF}Bem vindo {FF4444}%s{FFFFFF}!\nVocк precisa confirmar a senha do clan! {FF4444}%s{FFFFFF}.\n{FFFFFF}Digite a senha do clan e aperte OK!"nome);
                
ShowPlayerDialog(playerid1000DIALOG_STYLE_INPUT"{33AA33}Conta:"string"OK""Sair");
                return 
0;
            }
            if(!
strcmp(inputtextPASSWORDfalse))
            {
                  new 
nome[24], string[256];
                 
GetPlayerName(playeridnome24);
                
format(stringsizeof(string), "** {FFFFFF}%s{00BFFF} confirmou que faz parte da Administraзгo!"nome);
                
SendClientMessageToAll(BLU_CHIAROstring);
                
SendClientMessage(playeridCOLOR_BLUE"Vocк confirmou que faz parte do clan!");
                
PlayerPlaySound(playerid10570.00.00.0);
                return 
1;
            }
            else
            {
                new 
nome[24], string[256];
                   
GetPlayerName(playeridnome24);
                
format(stringsizeof(string), "** {FFFFFF}%s{00BFFF} Foi kickado pelo servidor. [Motivo: {FFFFFF}Errou a senha do clan!{00BFFF}]"nome);
                
SendClientMessageToAll(BLU_CHIAROstring);
                
SendClientMessage(playeridCOLOR_PINK"*** {FFFFFF}Vocк foi kickado pelo servidor. Motivo: {FF66FF}Errou a senha do clan!{FFFFFF}.");
                
Kick(playerid);
                }
            }
            else if(!
response)
            {
                new 
nome[24], string[256];
                 
GetPlayerName(playeridnome24);
                
SendClientMessage(playeridCOLOR_PINK"*** {FFFFFF}Vocк foi kickado! Motivo: {FF66FF}Cancelou{FFFFFF}.");
                
format(stringsizeof(string), "** {FFFFFF}%s{00BFFF} Foi kickado do servidor. [Motivo: {FFFFFF}Cancelou{00BFFF}]"nome);
                
SendClientMessageToAll(BLU_CHIAROstring);
                
Kick(playerid);
                
PlayerPlaySound(playerid10850.00.00.0);
            }
    return 
1;

Ou assim:

PHP код:
if(dialogid == 1000)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                new 
nome[24], string[256];
                   
GetPlayerName(playeridnome24);
                
format(stringsizeof string"{FF4444}Erro:{FFFFFF} Coloque a senha\n\n{FFFFFF}Bem vindo {FF4444}%s{FFFFFF}!\nVocк precisa confirmar a senha do clan! {FF4444}%s{FFFFFF}.\n{FFFFFF}Digite a senha do clan e aperte OK!"nome);
                
ShowPlayerDialog(playerid1000DIALOG_STYLE_INPUT"{33AA33}Conta:"string"OK""Sair");
                return 
0;
            }
            if(
strcmp(inputtextPASSWORDfalse))
            {
                new 
nome[24], string[256];
                
GetPlayerName(playeridnome24);
                
format(stringsizeof(string), "** {FFFFFF}%s{00BFFF} Foi kickado pelo servidor. [Motivo: {FFFFFF}Errou a senha do clan!{00BFFF}]"nome);
                
SendClientMessageToAll(BLU_CHIAROstring);
                
SendClientMessage(playeridCOLOR_PINK"*** {FFFFFF}Vocк foi kickado pelo servidor. Motivo: {FF66FF}Errou a senha do clan!{FFFFFF}.");
                
Kick(playerid);
                return 
1;
            }
                   new 
nome[24], string[256];
                  
GetPlayerName(playeridnome24);
                
format(stringsizeof(string), "** {FFFFFF}%s{00BFFF} confirmou que faz parte da Administraзгo!"nome);
                
SendClientMessageToAll(BLU_CHIAROstring);
                
SendClientMessage(playeridCOLOR_BLUE"Vocк confirmou que faz parte do clan!");
                
PlayerPlaySound(playerid10570.00.00.0);
                return 
1;
            }
            else if(!
response)
            {
                new 
nome[24], string[256];
                 
GetPlayerName(playeridnome24);
                
SendClientMessage(playeridCOLOR_PINK"*** {FFFFFF}Vocк foi kickado! Motivo: {FF66FF}Cancelou{FFFFFF}.");
                
format(stringsizeof(string), "** {FFFFFF}%s{00BFFF} Foi kickado do servidor. [Motivo: {FFFFFF}Cancelou{00BFFF}]"nome);
                
SendClientMessageToAll(BLU_CHIAROstring);
                
Kick(playerid);
                
PlayerPlaySound(playerid10850.00.00.0);
            }
    return 
1;

Vou sair depois eu volto, flw .


Re: [AJUDA]Senha anti-fake - Nake01 - 10.09.2011

Testei o modo dos dois e nгo funciono


Re: [AJUDA]Senha anti-fake - Hardware - 10.09.2011

Tente isso:

pawn Код:
if(dialogid == 1000)
     {
        if(!response)
        {
            new nome[24], string[256];
            GetPlayerName(playerid, nome, 24);
            SendClientMessage(playerid, COLOR_PINK, "*** {FFFFFF}Vocк foi kickado! Motivo: {FF66FF}Cancelou{FFFFFF}.");
            format(string, sizeof(string), "** {FFFFFF}%s{00BFFF} Foi kickado do servidor. [Motivo: {FFFFFF}Cancelou{00BFFF}]", nome);
            SendClientMessageToAll(BLU_CHIARO, string);
            Kick(playerid);
            PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
            return 1;
        }
        if(strlen(inputtext) == 0)
        {
            new nome[24], string[256];
            GetPlayerName(playerid, nome, 24);
            format(string, sizeof string, "{FF4444}Erro:{FFFFFF} Coloque a senha\n\n{FFFFFF}Bem vindo {FF4444}%s{FFFFFF}!\nVocк precisa confirmar a senha do clan! {FF4444}%s{FFFFFF}.\n{FFFFFF}Digite a senha do clan e aperte OK!", nome);
            ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_INPUT, "{33AA33}Conta:", string, "OK", "Sair");
            return 0;
        }
        if(strcmp(inputtext, PASSWORD, true))
        {
            new nome[24], string[256];
            GetPlayerName(playerid, nome, 24);
            format(string, sizeof(string), "** {FFFFFF}%s{00BFFF} confirmou que faz parte da Administraзгo!", nome);
            SendClientMessageToAll(BLU_CHIARO, string);
            SendClientMessage(playerid, COLOR_BLUE, "Vocк confirmou que faz parte do clan!");
            PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
            return 1;
        }
        else
        {
            new nome[24], string[256];
            GetPlayerName(playerid, nome, 24);
            format(string, sizeof(string), "** {FFFFFF}%s{00BFFF} Foi kickado pelo servidor. [Motivo: {FFFFFF}Errou a senha do clan!{00BFFF}]", nome);
            SendClientMessageToAll(BLU_CHIARO, string);
            SendClientMessage(playerid, COLOR_PINK, "*** {FFFFFF}Vocк foi kickado pelo servidor. Motivo: {FF66FF}Errou a senha do clan!{FFFFFF}.");
            Kick(playerid);
        }
    }
    return 1;
}



Re: [AJUDA]Senha anti-fake - Nake01 - 10.09.2011

Mesma coisa


Re: [AJUDA]Senha anti-fake - StrondA_ - 10.09.2011

ITS owna: https://sampforum.blast.hk/showthread.php?tid=272861


Re: [AJUDA]Senha anti-fake - [O.z]Caroline - 10.09.2011

Testa ai:

pawn Код:
if(dialogid == 1000)
    {
        new nome[24], string[256];
        GetPlayerName(playerid, nome, 24);
        if(!response)
        {
            SendClientMessage(playerid, COLOR_PINK, "*** {FFFFFF}Vocк foi kickado! Motivo: {FF66FF}Cancelou{FFFFFF}.");
            format(string, sizeof(string), "** {FFFFFF}%s{00BFFF} Foi kickado do servidor. [Motivo: {FFFFFF}Cancelou{00BFFF}]", nome);
            SendClientMessageToAll(BLU_CHIARO, string);
            Kick(playerid);
            PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
            return  true;
        }
        if(response)
        {
            if(!strlen(inputtext))
            {
                format(string, sizeof string, "{FF4444}Erro:{FFFFFF} Coloque a senha\n\n{FFFFFF}Bem vindo {FF4444}%s{FFFFFF}!\nVocк precisa confirmar a senha do clan! {FF4444}%s{FFFFFF}.\n{FFFFFF}Digite a senha do clan e aperte OK!", nome);
                ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_INPUT, "{33AA33}Conta:", string, "OK", "Sair");
                return 0;
            }
            if(strcmp(inputtext, PASSWORDFAKE, false) != 0)
            {
                format(string, sizeof(string), "** {FFFFFF}%s{00BFFF} Foi kickado pelo servidor. [Motivo: {FFFFFF}Errou a senha do clan!{00BFFF}]", nome);
                SendClientMessageToAll(BLU_CHIARO, string);
                SendClientMessage(playerid, COLOR_PINK, "*** {FFFFFF}Vocк foi kickado pelo servidor. Motivo: {FF66FF}Errou a senha do clan!{FFFFFF}.");
                return Kick(playerid);
            }
            format(string, sizeof(string), "** {FFFFFF}%s{00BFFF} confirmou que faz parte da Administraзгo!", nome);
            SendClientMessageToAll(BLU_CHIARO, string);
            SendClientMessage(playerid, COLOR_BLUE, "Vocк confirmou que faz parte do clan!");
            PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
        }
    }



Re: [AJUDA]Senha anti-fake - Nake01 - 10.09.2011

@StrondA_
Jб tentei e deu FAIL :/ mesmo problema!

@[O.z]Caroline
Mesma coisa


Re: [AJUDA]Senha anti-fake - StrondA_ - 10.09.2011

Quote:
Originally Posted by Nake01
Посмотреть сообщение
@StrondA_
Jб tentei e deu FAIL :/ mesmo problema!

@[O.z]Caroline
Mesma coisa
Veja o jeito que estas adaptando em seu Game Mode, porque com certeza era para funcionar!