Dialog no response :s
#5

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        switch(dialogid)
        {
            case DIALOG_TDM:
            {
                switch(listitem)
                {
                    case 0:
                    {
                        ResetPlayerWeapons(playerid);
                        BlueTeam{playerid} = true;
                        TDM[BluePlayers]++;
                        SetPlayerTeam(playerid, TeamBlue);
                        new rand = random(sizeof BluePos);
                        SetPlayerPos(playerid, BluePos[rand][0], BluePos[rand][1], BluePos[rand][2]);
                        SetPlayerFacingAngle(playerid, BluePos[rand][3]);
                        ShowPlayerDialog(playerid, DIALOG_TDM1, DIALOG_STYLE_LIST, "Team Death Match [TDM] - "blue"Blue Team", ""blue"Uzi, Tec-9, MP5 and 9mm\nM4, Combat Shotgun, AK-47 and Silenced 9mm\nSniper, Desert Eagle and Grenade", "Ok", "Cancel");
                    }
                    case 1:
                    {
                        ResetPlayerWeapons(playerid);
                        RedTeam{playerid} = true;
                        TDM[RedPlayers]++;
                        SetPlayerTeam(playerid, TeamRed);
                        new rand = random(sizeof RedPos);
                        SetPlayerPos(playerid, RedPos[rand][0], RedPos[rand][1], RedPos[rand][2]);
                        SetPlayerFacingAngle(playerid, RedPos[rand][3]);
                        ShowPlayerDialog(playerid, DIALOG_TDM1, DIALOG_STYLE_LIST, "Team Death Match [TDM] - "red"Red Team", ""red"Uzi, Tec-9, MP5 and 9mm\nM4, Combat Shotgun, AK-47 and Silenced 9mm\nSniper, Desert Eagle and Grenade", "Ok", "Cancel");
                    }
                }
                return true;
            }
            case DIALOG_TDM1:
            {
                switch(listitem)
                {
                    case 0:
                    {
                        Guns{playerid} = 0;
                        GivePlayerWeapon(playerid, 28, 900);
                        GivePlayerWeapon(playerid, 32, 900);
                        GivePlayerWeapon(playerid, 29, 900);
                        GivePlayerWeapon(playerid, 22, 900);
                    }
                    case 1:
                    {
                        Guns{playerid} = 1;
                        GivePlayerWeapon(playerid, 31, 900);
                        GivePlayerWeapon(playerid, 27, 900);
                        GivePlayerWeapon(playerid, 30, 900);
                        GivePlayerWeapon(playerid, 23, 900);
                    }
                    case 2:
                    {
                        Guns{playerid} = 2;
                        GivePlayerWeapon(playerid, 34, 900);
                        GivePlayerWeapon(playerid, 24, 900);
                        GivePlayerWeapon(playerid, 16, 900);
                    }
                }
                return 1;
            }
        }
        return 1;
}
Quote:
Originally Posted by LarzI
Посмотреть сообщение
pawn Код:
if( !response ) //if the second button was pressed
{
    //here put the code when a player presses cancel.
}
Now it works thanks but there is another problem ..
It only works if I put it as a mode and I do want to put it as a filter script ..
Reply


Messages In This Thread
Dialog no response :s - by benel1 - 04.02.2013, 09:51
Re: Dialog no response :s - by Jarnu - 04.02.2013, 09:59
Re: Dialog no response :s - by benel1 - 04.02.2013, 11:39
Re: Dialog no response :s - by LarzI - 04.02.2013, 12:03
Re: Dialog no response :s - by benel1 - 04.02.2013, 12:38
Re: Dialog no response :s - by LarzI - 04.02.2013, 13:15
Re: Dialog no response :s - by Gamer_007 - 04.02.2013, 13:55
Re: Dialog no response :s - by LarzI - 04.02.2013, 13:58
Re: Dialog no response :s - by benel1 - 04.02.2013, 14:18
Re: Dialog no response :s - by Gamer_007 - 04.02.2013, 14:39

Forum Jump:


Users browsing this thread: 1 Guest(s)