[Ajuda] Ajuda
#1

Entгo estou adaptando minha tela login para android e adcionei um dialog para selecionar pc ou android ele seleciona pc e aparece o textdraw de login mбs eu quero saber como que eu adapto essa tela login para dialog para qnd ele selecionar android ir para uma tela de dialog em vez de textdraw?
Reply
#2

Vб atй a response da dialog, e mostra outra dialog para ele, simples...
Exemplo:
PHP Code:
if(response == 1//botгo esquerdo, 0 botгo direito
{
ShowPlayerDialog(...parametros...);

Reply
#3

Nгo й isso eu sei fazer mas й transformar em dialog exemplo... Quando ele selecionar android aparecer

Logar
Registrar
Site
Discord
Sair

Em dialog
Reply
#4

Nгo entгo vocк nгo sabe usar a funзгo, й isto ?
Ex.:
PHP Code:
ShowPlayerDialog(playeriddialogidDIALOG_STYLE_LIST,"Titulo","Item1 \n Item2 \n Item3 \n""Botao 1""Botao 2");
// quando se usa \n dentro de um texto, voce esta quebrando a linha, e dentro da dialog com estilo de list, isso cria mais itens. 
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/Dialog_Styles
https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#5

Tinha dado um branco aki relembrei como que faz kkk, eu fiz sу o registro e login e deu certo mas ai eu fui fazer o resto da tela o sair novidades creditos etc ai entгo eu fiz aki de 2 modos o 1є foi
if(response == 1)


if(response)
{
switch(listitem)
{
case 0:

Mбs os 2 deram erros vou mandar o codigo aki e os erros


Code:
 case DIALOG_ANDROID:
        {
            if(response == 0)
            {
                UserInfo[playerid][user_android] = 0;
                PlayAudioStreamForPlayer(playerid, "https://65381g.ha.azioncdn.net/8/d/2/9/DjMichaelTok-keys-n-krates-all-the-time-tove-lo-flip-1bcf3b.mp3");
                ClearChatbox(playerid);
				showTelaLogin(playerid);
                SalvarConta(playerid);
                GameTextForPlayer(playerid, "~w~PLATAFORMA ~r~PC ~w~SELECIONADA", 5000, 1);
                return true;
            }
            if(response == 1)
            {
                UserInfo[playerid][user_android] = 1;
                ShowPlayerDialog(playerid, DIALOG_TELAANDROID, DIALOG_STYLE_LIST,"{00FF04}Brasil {FFFF00}Play{0044FF}Fox{FFFFFF}","Logar\nRegistrar\nSite\nDiscord\nCreditos\nNovidades\nSair", "Selecionar", "");
                ClearChatbox(playerid);
                SalvarConta(playerid);
                GameTextForPlayer(playerid, "~w~PLATAFORMA ~g~ANDROID~w~ SELECIONADA", 5000, 1);
                return true;
            }
            return true;
        }//esssa parte й pra selecionar android ou pc aki ta certo й o codigo de baixo que estб dando erro 
		case DIALOG_TELAANDROID:
		{
		    if(response)
            {
            switch(listitem)
            {
			case 0:
		{
  			new loginstring[255];
		   ShowPlayerDialog(playerid, DIALOG_CONECTAR_0, DIALOG_STYLE_PASSWORD,"{00FF04}Brasil {FFFF00}Play{0044FF}Fox{FFFFFF} - Logando:",loginstring,"Logar","Esperar");
   		   callcmd::registrarbot(playerid, inputtext);
		}
            case 1:
		{
		    new loginstring[255];
		    ShowPlayerDialog(playerid, DIALOG_CONECTAR_1, DIALOG_STYLE_PASSWORD,"{00FF04}Brasil {FFFF00}Play{0044FF}Fox{FFFFFF} - Registro:",loginstring,"Registrar","Esperar");
            callcmd::registrarbot(playerid, inputtext);
        }
			case 2:
        {
            format(gs_Buffer, 120, "{FFFFFF}Brasil Play Fox\n\n");
			strcat(gs_Buffer, "\n{FF0000}Nosso Discord: https://discord.gg/wkAKqxx \n");
   	 		ShowPlayerDialog(playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, "\t{FFFFFF}Brasil {FF0000}Play {FFFFFF}Fox - Discord", gs_Buffer, "Fechar", "");
        }
            case 3:
        {
            ReturnCommand(dc);
        }
			case 4:
        {
            ReturnCommand(creditos);
            return 1;
        }
            case 5:
        {
            ReturnCommand(novidades);
		}
		    case 6:
		{
		    Kick(playerid);
		}
      }
	}
Code:
D:\Downloads\BPS\gamemodes\Projeto.pwn(38698) : loose indentation
D:\Downloads\BPS\gamemodes\Projeto.pwn(38733) : loose indentation
D:\Downloads\BPS\gamemodes\Projeto.pwn(38733) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(38776) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(38799) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(38836) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(38840) : warning 225: unreachable code
D:\Downloads\BPS\gamemodes\Projeto.pwn(38840) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(38936) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(38947) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(38965) : warning 225: unreachable code
D:\Downloads\BPS\gamemodes\Projeto.pwn(38965) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(38987) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39039) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39101) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39131) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39159) : warning 225: unreachable code
D:\Downloads\BPS\gamemodes\Projeto.pwn(39159) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39250) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39338) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39420) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39435) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39454) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39490) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39526) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(39535) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(40302) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(40321) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(40344) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(40358) : error 014: invalid statement; not in switch
D:\Downloads\BPS\gamemodes\Projeto.pwn(40392) : error 014: invalid statement; not in switch
Esses sгo os erros do 2є modo o do 1є eu nгo salvei
Reply
#6

Sгo erros de mб identaзгo.
https://sampforum.blast.hk/showthread.php?tid=256961
https://sampforum.blast.hk/showthread.php?tid=467985
Reply
#7

Manda essa preguiзa pra lб, tabule o cуdigo (formataзгo padrгo) que vocк irб ver que tem algo errado no cуdigo.
Reply
#8

Descobri oq era.... Faltava uma chave ali no final
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)