SA-MP Forums Archive
[Ajuda] Spawn - 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] Spawn (/showthread.php?tid=481546)



Spawn - Agamaster - 16.12.2013

Eu consegui mudar um pouco, mas ainda aparece assim:
1є eu entro e coloco minha senha e clico em Logar /imageshack/img21/7431/zum5.png
2є aparece isso e clico em Spawn /imageshack/img845/816/kb8c.png
3є apareзo no lugar onde desloguei /imageshack/img844/9674/b0k4.png
Tem como fazer assim :
1є eu entro e coloco minha senha e clico em Logar /imageshack/img21/7431/zum5.png
2є apareзo no lugar onde desloguei /imageshack/img844/9674/b0k4.png
Pf jб to procurando isso faz tempo ainda nгo achei em baixo o link do GM (denovo kkkk)
http://pastebin.com/jqEuvkf5


Respuesta: Spawn - ViniKuliveguisky - 16.12.2013

coloca SpawnPlayer(playerid); la no DIALOG do LOGAR


Re: Spawn - DannielCooper - 16.12.2013

nгo entendi..


Re: Spawn - Agamaster - 16.12.2013

Nгo funciona ve se no teu funciona ( ViniKuliveguisky )


Re: Spawn - DannielCooper - 16.12.2013

me explica melhor, quem sabe eu posso te ajudar.. '-'


Re: Spawn - Agamaster - 16.12.2013

1є coloco minha senha e clico em Logar /imageshack/img21/7431/zum5.png
2є clico em Spawn /imageshack/img845/816/kb8c.png
3є apareзo no lugar onde desloguei /imageshack/img844/9674/b0k4.png
Tem como fazer assim :
1є coloco minha senha e clico em Logar /imageshack/img21/7431/zum5.png
2є apareзo no lugar onde desloguei /imageshack/img844/9674/b0k4.png
Tem como fazer isso (GM no topo)


Respuesta: Spawn - ViniKuliveguisky - 16.12.2013

Funciona sim Agamaster no meu eu fiz assim '-'.

Tem que ser dentro do Respondo do teu Dialog de Login. Ali depois que ele faz a comparaзгo para ver se a senha й correta.


Re: Spawn - Agamaster - 16.12.2013

Onde, ainda n intendi entre isso ?
pawn Код:
format(girismsg,256,"Seja Bem Vindo\n\nNick: %s\n\nSenha:",playername3);
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Quit");



Respuesta: Spawn - ViniKuliveguisky - 16.12.2013

й na callback OnPlayerDialogResponse (acho que й assim o nome).
La dentro vocК procura pelo dialog "12346" e coloca dentro do "response" que tem a comparaзгo da senha que deu "true".

Se nгo entendeu mostra a dialog "12346"


Re: Spawn - Agamaster - 16.12.2013

N intendi,
pawn Код:
if(dialogid == 12346)
                {
                        Encrypt(inputtext);
                        new string2[128];
                        new playername2[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, playername2, sizeof(playername2));
                        format(string2, sizeof(string2), ACCOUNTS_FOLDER, playername2);
                        new File: UserFile = fopen(string2, io_read);
                        if ( UserFile )
                        {
                                new PassData[256];
                                new keytmp[256], valtmp[256];
                                fread( UserFile , PassData , sizeof( PassData ) );
                                keytmp = ini_GetKey( PassData );
                                if( strcmp( keytmp , "Senha" , true ) == 0 )
                                {
                                        valtmp = ini_GetValue( PassData );
                                        strmid(AccountInfo[playerid][aSenha], valtmp, 0, strlen(valtmp)-1, 255);
                                }
                                if(strcmp(AccountInfo[playerid][aSenha],inputtext, true ) == 0)
                                {
                                                    if(strlen(inputtext))
                                                                {
                                        for(new p = 0; p < strlen(AccountInfo[playerid][aSenha]); p++)
                                        {
                                                inputtext[p] = '?';
                                        }
                                        SetTimerEx("LogIn", LOGIN_DELAY*1000, 0, "d", playerid);
                                        printf("%s esta logando.",playername2);
                                        new key[256];
                                        new Data[256];
                                        while ( fread( UserFile , Data , sizeof( Data ) ) )

                                        {
                                                key = ini_GetKey( Data );
                                                /*if(strcmp(key, "AdminLevel", true) == 0) // This is only an example if you want to add more stuff to store in a file.

                                                {
                                                        val = ini_GetValue( Data );
                                                        AccountInfo[playerid][AdminLevel] = strval(val); // Uncommenting this will give you errors if the variable isn't defined.

                                                }
                                                */


                                        }
                                        fclose(UserFile);
                                                                        }
                                }
                                else
                                {
                                        if(strlen(inputtext))
                                        {
                                                new girismsg[256];
                                                printf("%s esta usando senha errada.",playername2);
                                                format(girismsg,256,"SENHA ERRADA\n\nSenha:");
                                                ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Quit");
                                                login[playerid] = 1;
                                                registro[playerid] = 0;
                                                fclose(UserFile);
                                                return 1;
                                        }
                                }
                                if(!strlen(inputtext))
                                {
                                        new girismsg[256];
                                        printf("%s nao esta entrando com senha.",playername2);
                                        format(girismsg,256,"SENHA ERRADA\n\nSenha:");
                                        ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Quit");
                                        login[playerid] = 1;
                                        registro[playerid] = 0;
                                        fclose(UserFile);
                                        return 1;
                                }
                        }
                }