SA-MP Forums Archive
[Ajuda] Response nгo funciona... - 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] Response nгo funciona... (/showthread.php?tid=477304)



Response nгo funciona... - bruxo00 - 23.11.2013

Tenho um dialog com este cуdigo:

PHP код:
if(!response) return SendClientMessage(playerid, -1"Arroz"); 
Mas nгo funciona. Quando clico no segundo botгo simplesmente o dialog desaparece. Isto acontece se eu colocar isso, tanto no нnicio, meio ou fim do cуdigo do dialog.

Nem assim funciona:

PHP код:
if(!response)
{
    
SendClientMessage(playerid, -1"Arroz");
    
printf("123");
    return 
1;

Nem chega a essa parte do cуdigo, pois nгo "printa" o 123 na console.


Re: Response nгo funciona... - DannielCooper - 23.11.2013

o code parece estar bem feito... tenta colocar o response sem o sнmbolo not.


Re: Response nгo funciona... - CharlieBrown - 23.11.2013

pawn Код:
if(response)
{
        SendClientMessage(playerid, -1, "Sim");
        }
        else
        {
        SendClientMessage(playerid, -1, "Nao");
        return 1;
}



Re: Response nгo funciona... - bruxo00 - 23.11.2013

@Charlie

Isso й o mesmo que isto:

pawn Код:
if(!response) return SendClientMessage(playerid, -1, "Nгo");
SendClientMessage(playerid, -1, "Sim");
Mas vou tentar.

Tentei, exactamente o mesmo problema.


Re: Response nгo funciona... - PT - 23.11.2013

mostra mais code..


Re: Response nгo funciona... - bruxo00 - 23.11.2013

PHP код:
    if(dialogid == DIALOG_PAINEL)
    {
        if(!
response) return ShowPlayerDialog(playeridDIALOG_PAINELDIALOG_STYLE_LIST"Painel de Controlo"MENSAGEM_DPAINEL"Escolher""Sair");
        switch(
listitem)
        {
            case 
0:
            {
                if(
ABILCHAT == 1)
                {
                    
ABILCHAT 0;
                    
SendClientMessage(playeridInfo"O {10F441}Chat {FFFFFF}foi {AA3333}desactivado{FFFFFF}.");
                }
                else
                {
                    
ABILCHAT 1;
                    
SendClientMessage(playeridInfo"O {10F441}Chat {FFFFFF}foi {10F441}activado{FFFFFF}.");
                }
            }
            case 
1:
            {
                
ShowPlayerDialog(playeridDIALOG_PAINELVIPDIALOG_STYLE_LIST"Painel de Controlo > VIP"MENSAGEM_DPAINELVIP"Escolher""Voltar");
            }
            case 
2:
            {
                
ShowPlayerDialog(playeridDIALOG_PAINELACDIALOG_STYLE_LIST"Painel de Controlo > Anti-Cheat"MENSAGEM_DPAINELAC"Escolher""Voltar");
            }
        }
    }