SA-MP Forums Archive
Dialog Problem - 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 Problem (/showthread.php?tid=307351)



Dialog Problem - SnG.Scot_MisCuDI - 30.12.2011

Ok im having another problem.. My dialog works except! The list option 2 and 3. There are 5 options you can choose but the UFO and Gas wont work. It doenst do anything

List item 2 and 3 are the ones not working. but 4 works fine
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/attacho", true))
    {
        ShowPlayerDialog(playerid, vmenu, DIALOG_STYLE_LIST, "Object Attacher By: SnG.Scot_MisCuDi", "Cock \nDragon \nUFO \nGas \nRemove", "Attach", "Cancel");
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == vmenu)
    {
        if(response)
    {
        if(listitem == 0)   // Cock
        {
        SetPlayerAttachedObject(playerid, 0, 16776, 2, 0.000000, 0.000000, 0.000000, 0.000000, 90.000000, 180.000000, 0.050000, 0.050000, 0.050000);
        SetPlayerAttachedObject(playerid, 1, 321, 1, -0.200000, 0.349999, -0.150000, 90.000000, 180.000000, 0.000000, 3.000000, 3.000000, 3.000000);
        }
        if(listitem == 1)   // dragon
        {
        SetPlayerAttachedObject(playerid, 0, 3528, 1, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.0000, 0.00000, 0.0000);
        }
        if(listitem == 2)   // ufo
        {
         SetPlayerAttachedObject(playerid, 0, 16778, 1, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.0000, 0.00000, 0.0000);
        }
        if(listitem == 3)   // gas
        {
        SetPlayerAttachedObject(playerid, 0, 1686, 1, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.0000, 0.00000, 0.0000);
        }
        if(listitem == 4)   // remove
        {
        RemovePlayerAttachedObject(playerid, 0);
        RemovePlayerAttachedObject(playerid, 1);
        }
    }
            return 1;
        }
}
#endif



Re: Dialog Problem - SnG.Scot_MisCuDI - 30.12.2011

bump


Re: Dialog Problem - ғαιιοцт - 31.12.2011

Put a print(); above those two SetPlayerAttachedObject lines that aren't working.

If your print message shows, the objectID doesn't work for attaching objects.


Re: Dialog Problem - Jefff - 31.12.2011

all
0.0000, 0.00000, 0.0000);
to
1.0000, 1.00000, 1.0000);


Re: Dialog Problem - ғαιιοцт - 31.12.2011

Oh yes

But why is listitem 1 working then?


Re: Dialog Problem - SnG.Scot_MisCuDI - 31.12.2011

oh changing the 0 to 1 worked thanks