2 filterscripts breaking eachother.
#10

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
            if(listitem == 0)
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, -2317.7593,-1634.1985,483.7031);
                SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Mount Chillad.");
            }
            if(listitem == 1)
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, 1549.2537,-1353.4073,329.4670);
                SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to High House.");
            }
    }
Thats because it doesnt work
You have to check the dialogid first, before continuing.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if( dialogid == DIALOGID ) // when the dialogid is the same as 'DIALOGID'
    {
        if( response ) // if the player pressed the first button
        {
            if(listitem == 0) // first button + first listitem
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, -2317.7593,-1634.1985,483.7031);
                SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Mount Chillad.");
            }
            if(listitem == 1)
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, 1549.2537,-1353.4073,329.4670);
                SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to High House.");
            }
        }
        else // when player presses second button
        {
       
        }
    }
    if( dialogid == DIALOGID2 ) // this will be a second dialog just for example
    {
   
    }
    return 0; // return 1; if its in your gamemode
}
Reply


Messages In This Thread
2 filterscripts breaking eachother. - by persious - 08.10.2011, 14:47
Re: 2 filterscripts breaking eachother. - by DRIFT_HUNTER - 08.10.2011, 14:56
Re: 2 filterscripts breaking eachother. - by persious - 08.10.2011, 14:58
Re: 2 filterscripts breaking eachother. - by persious - 08.10.2011, 15:01
Re: 2 filterscripts breaking eachother. - by persious - 08.10.2011, 15:05
Re: 2 filterscripts breaking eachother. - by Jafet_Macario - 08.10.2011, 15:14
Re: 2 filterscripts breaking eachother. - by persious - 08.10.2011, 15:19
Re: 2 filterscripts breaking eachother. - by persious - 08.10.2011, 15:21
Re: 2 filterscripts breaking eachother. - by Jafet_Macario - 08.10.2011, 15:25
Re: 2 filterscripts breaking eachother. - by Wesley221 - 08.10.2011, 15:26

Forum Jump:


Users browsing this thread: 3 Guest(s)