[Ajuda] DIALOG_STYLE_LIST
#1

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;

Reply
#2

Код:
#define DIALOG_STYLE_LIST 203
Reply
#3

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!!
Reply
#4

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
Reply
#5

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

mais alguem pode ajudar?
Reply
#7

Faz Debug
Reply
#8

onde eu Debugo com o Pawno que vem com o servidor?
Reply
#9

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


Forum Jump:


Users browsing this thread: 1 Guest(s)