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



DIALOG_STYLE_LIST - leitao85 - 30.01.2013

Ola Galera, sou novo com programaзгo e estou com duvidas em relaзгo ao menu. Estou criando esse meu primeiro codigo, ele apresenta um problema, o menu aparece mas quando eu clico em alguma opзгo ele apenas fecha e nгo faz nada!
PHP код:
#define DIALOG_TYPE_MAINMENU 200
#define    DIALOG_TYPE_BICICLETAS 201
#define    DIALOG_TYPE_MOTOS 202
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_TYPE_MAINMENU)
    {
        if(!
response)
        {
            
SetCameraBehindPlayer(playerid);
        }
        if(
response)
        {
            switch(
listitem)
            {
                  case 
0ShowPlayerDialog(playeridDIALOG_TYPE_BICICLETASDIALOG_STYLE_LIST"Bicicletas""Bike\nBMX\nMountain Bike\n\nBack""Pegar""Fechar");
                    case 
1ShowPlayerDialog(playeridDIALOG_TYPE_MOTOSDIALOG_STYLE_LIST"Motos""NRG-500\nFaggio\nFCR-900\nPCJ-600\nFreeway\nBF-400\nPizzaboy\nWayfarer\nCop Bike\nSanchez\nQuad\n\nBack""Pegar""Fechar");
            }
        }
    }
    if(
dialogid == DIALOG_TYPE_BICICLETAS)
    {
        if(!
response)
        {
            
SetCameraBehindPlayer(playerid);
        }
        if(
response)
        {
            switch(
listitem)
            {
                case 
0aCreateThing(playerid5091);
                 case 
1aCreateThing(playerid4812);
                case 
2aCreateThing(playerid5103);
                 case 
3ShowPlayerDialog(playeridDIALOG_TYPE_MAINMENUDIALOG_STYLE_LIST"Car Spawn""Bicicletas\nMotos""Ir""Fechar");
            }
        }
    }
    if(
dialogid == DIALOG_TYPE_MOTOS)
    {
        if(!
response)
        {
            
SetCameraBehindPlayer(playerid);
        }
        if(
response)
        {
            switch(
listitem)
            {
                case 
0aCreateThing(playerid5224);
                  case 
1aCreateThing(playerid4625);
                  case 
2aCreateThing(playerid5216);
                  case 
3aCreateThing(playerid4617);
                  case 
4aCreateThing(playerid4638);
                  case 
5aCreateThing(playerid5819);
                  case 
6aCreateThing(playerid44810);
                  case 
7aCreateThing(playerid58611);
                  case 
8aCreateThing(playerid52312);
                  case 
9aCreateThing(playerid46813);
                  case 
10aCreateThing(playerid47114);
                  case 
11:ShowPlayerDialog(playeridDIALOG_TYPE_MAINMENUDIALOG_STYLE_LIST"Car Spawn""Bicicletas\nMotos""Ir""Fechar");
              }
        }
    }
    return 
1;
}
stock aCreateThing(playeridthingidorderid)
{
    new 
Float:XFloat:YFloat:ZFloat:Angle;
    
GetPlayerPos(playeridXYZ);
    
GetPlayerFacingAngle(playeridAngle);
    if(
IsPlayerInAnyVehicle(playerid)) DestroyVehicle(GetPlayerVehicleID(playerid));
    if(
thingid != 597 || thingid != 596 || thingid != 598 || thingid != 599 || thingid != 497 || thingid != 427)
    {
        
Vehicle[orderid] = CreateVehicle(thingidXY3Anglerandom(126), random(126), 30);
    }
    else
    {
        
Vehicle[orderid] = CreateVehicle(thingidXY3Angle0130);
    }
    
PutPlayerInVehicle(playeridVehicle[orderid], 0);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/v2"true))
    {
        {
             
ShowPlayerDialog(playeridDIALOG_TYPE_MAINMENUDIALOG_STYLE_LIST"Car Spawn""Bicicletas\nMotos""Ir""Fechar");
            return 
1;
        }
    }
    return 
0;




Re: DIALOG_STYLE_LIST - Wellington1999 - 30.01.2013

Код:
#define DIALOG_STYLE_LIST 203



Re: DIALOG_STYLE_LIST - leitao85 - 30.01.2013

Quote:
Originally Posted by Wellington1999
Посмотреть сообщение
Код:
#define DIALOG_STYLE_LIST 203
Eai amigo, eu declarei do tipo da janela, mas nao deu certo, a janela aparece em um quadrado diferente do que o normal e sem as opзхes que eu fiz.
Nesse topico do SAMP Wiki ele nao fala pra declara o tipo da janela!!


Re: DIALOG_STYLE_LIST - tonisantolia - 30.01.2013

Quote:
Originally Posted by leitao85
Посмотреть сообщение
Eai amigo, eu declarei do tipo da janela, mas nao deu certo, a janela aparece em um quadrado diferente do que o normal e sem as opзхes que eu fiz.
Nesse topico do SAMP Wiki ele nao fala pra declara o tipo da janela!!
Nгo liga o cara й lesado..

Tente por return e veja se funciona..

Exemplo:
pawn Код:
case 0: return ShowPlayerDialog(playerid, DIALOG_TYPE_BICICLETAS, DIALOG_STYLE_LIST, "Bicicletas", "Bike\nBMX\nMountain Bike\n\nBack", "Pegar", "Fechar");
Faзa isso com todos


Re: DIALOG_STYLE_LIST - leitao85 - 30.01.2013

vixi, coloquei o return em todos e mesmo assim nao funciono, continua do mesmo jeito!
vlw pela dica!


Re: DIALOG_STYLE_LIST - leitao85 - 13.02.2013

mais alguem pode ajudar?


Re: DIALOG_STYLE_LIST - Etton - 13.02.2013

Faz Debug


Re: DIALOG_STYLE_LIST - leitao85 - 14.02.2013

onde eu Debugo com o Pawno que vem com o servidor?


Re: DIALOG_STYLE_LIST - leitao85 - 22.02.2013

Galera, eu baixei esse FilterScript aqui de corrida, e ele apresenta o mesmo erro com DIALOG. Sera q num ta faltando algum arquivo?