SA-MP Forums Archive
Dialog help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog help (/showthread.php?tid=308006)



Dialog help - geerdinho8 - 01.01.2012

Hey,

I made this, but i did something wrong i guess, cuz when i select something in the first dialog, the next dialog doesn't pop up.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/shop", true))
    {
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Shop","\tVehicles\n\tWeapons","Select", "Cancel");
        SendClientMessage(playerid,red,"If the shop doesn't pop up, it is unavaible for this mission!");
        return 1;
    }
    return 0;
}



public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1 && response == 1)
        {
        if(listitem == 0)
        {
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Vehicles","\tSultan $ 20.000\n\tNew Maverick $ 25.000n\tNRG-500 $ 11.000n\tSanchez $ 10.000\r\n\tSpeeder $ 17.000\r\n\tSquallo $ 17.000","Select", "Cancel");
               
        }
        if(listitem == 1)
        {
                ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Weapons","Knife $ 200\n\tDesert Eagle $ 12.000\n\tSawn-offs $ 25.000\n\tSMG $ 15.000\n\tM4 $ 24.000","Select", "Cancel");
        }
        return 1;
        }
return 1;
}
please help


Re: Dialog help - Bogdan1992 - 01.01.2012

Change this

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == && response == 1)
    {
        if(
listitem == 0)
        {
                
ShowPlayerDialog(playerid,1+1,DIALOG_STYLE_LIST,"Vehicles","\tSultan $ 20.000\n\tNew Maverick $ 25.000n\tNRG-500 $ 11.000n\tSanchez $ 10.000\r\n\tSpeeder $ 17.000\r\n\tSquallo $ 17.000","Select""Cancel");
        }
        if(
listitem == 1)
        {
                
ShowPlayerDialog(playerid,1+2,DIALOG_STYLE_LIST,"Weapons","Knife $ 200\n\tDesert Eagle $ 12.000\n\tSawn-offs $ 25.000\n\tSMG $ 15.000\n\tM4 $ 24.000","Select""Cancel");
        }
        return 
1;
    }
    return 
1;




Re: Dialog help - geerdinho8 - 01.01.2012

Not working.


Re: Dialog help - Bogdan1992 - 01.01.2012

PHP код:
    if(dialogid == 1)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                
ShowPlayerDialog(playerid,1+1,DIALOG_STYLE_LIST,"Vehicles","\tSultan $ 20.000\n\tNew Maverick $ 25.000n\tNRG-500 $ 11.000n\tSanchez $ 10.000\r\n\tSpeeder $ 17.000\r\n\tSquallo $ 17.000","Select""Cancel");
            }
            if(
listitem == 1)
            {
                    
ShowPlayerDialog(playerid,1+2,DIALOG_STYLE_LIST,"Weapons","Knife $ 200\n\tDesert Eagle $ 12.000\n\tSawn-offs $ 25.000\n\tSMG $ 15.000\n\tM4 $ 24.000","Select""Cancel");
            }
            return 
1;
        }
    } 



Re: Dialog help - geerdinho8 - 01.01.2012

Also not working


Re: Dialog help - Bogdan1992 - 01.01.2012

I've tested and worked at me


PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/shop"true))
    {
        
ShowPlayerDialog(playerid,99,DIALOG_STYLE_LIST,"Shop","\tVehicles\n\tWeapons","Select""Cancel");
        
SendClientMessage(playerid,red,"If the shop doesn't pop up, it is unavaible for this mission!");
        return 
1;
    }
    return 
0;

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 99
    { 
        if(
response
        { 
            if(
listitem == 0
            { 
                
ShowPlayerDialog(playerid,99+1,DIALOG_STYLE_LIST,"Vehicles","\tSultan $ 20.000\n\tNew Maverick $ 25.000n\tNRG-500 $ 11.000n\tSanchez $ 10.000\r\n\tSpeeder $ 17.000\r\n\tSquallo $ 17.000","Select""Cancel"); 
            } 
            if(
listitem == 1
            { 
                    
ShowPlayerDialog(playerid,99+2,DIALOG_STYLE_LIST,"Weapons","Knife $ 200\n\tDesert Eagle $ 12.000\n\tSawn-offs $ 25.000\n\tSMG $ 15.000\n\tM4 $ 24.000","Select""Cancel"); 
        } 
        return 
1
    } 
    return 
1




Re: Dialog help - geerdinho8 - 01.01.2012

What the hell! It still ain't working for me..

I get this error:



N:\17 juli\MSG\filterscripts\shop.pwn(125) : error 030: compound statement not closed at the end of file (started at line 10
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


and when i add an brace it aint working..


Re: Dialog help - geerdinho8 - 02.01.2012

Help someone?


Re: Dialog help - Gh05t_ - 02.01.2012

Quote:
Originally Posted by geerdinho8
Посмотреть сообщение
Help someone?
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 99)
    {
        if(response)
        {
            if(listitem == 0)
            {
                ShowPlayerDialog(playerid,99+1,DIALOG_STYLE_LIST,"Vehicles","\tSultan $ 20.000\n\tNew Maverick $ 25.000n\tNRG-500 $ 11.000n\tSanchez $ 10.000\r\n\tSpeeder $ 17.000\r\n\tSquallo $ 17.000","Select", "Cancel");

            }
            if(listitem == 1)
            {
                    ShowPlayerDialog(playerid,99+2,DIALOG_STYLE_LIST,"Weapons","Knife $ 200\n\tDesert Eagle $ 12.000\n\tSawn-offs $ 25.000\n\tSMG $ 15.000\n\tM4 $ 24.000","Select", "Cancel");
            }
        }
        return 1;
    }
    return 1;
}



Re: Dialog help - geerdinho8 - 02.01.2012

Still not working