Dialog help
#1

I made it to where when they pick 'Patrol', it will show this message box dialog telling them the items they get when they go on patrol. Problem is that when they press 'Select' for a positive response, they don't get any of the items.
Can someone help me?

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid==12)
    {
        if(response)
        switch(listitem)
        {
            case 0:
            {
                SetPlayerColor(playerid,-1);
                SetPlayerArmour(playerid,0);
                ResetPlayerWeapons(playerid);
                SetPlayerSkin(playerid,pInfo[playerid][Skin]);
            }
            case 1:
            {
                ShowPlayerDialog(playerid,13,0,"{0094FF}Patrol","Glock 9mm, nightstick, pepper spray, and body armor","Select","Cancel");
                if(!response)
                if(response)
                {
                    SetPlayerColor(playerid,COLOR_BLUE);
                    GivePlayerWeapon(playerid,22,51);
                    GivePlayerWeapon(playerid,3,0);
                    GivePlayerWeapon(playerid,41,365);
                    SetPlayerArmour(playerid,100);
                    SetPlayerSkin(playerid,281);
                }
            }
        }
        return 1;
    }
}
Reply
#2

change the dialog id
Reply
#3

You need to make new... Some like that:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid==12)
    {
        if(response)
        switch(listitem)
        {
            case 0:
            {
                SetPlayerColor(playerid,-1);
                SetPlayerArmour(playerid,0);
                ResetPlayerWeapons(playerid);
                SetPlayerSkin(playerid,pInfo[playerid][Skin]);
            }
            case 1:
            {
                ShowPlayerDialog(playerid,13,0,"{0094FF}Patrol","Glock 9mm, nightstick, pepper spray, and body armor","Select","Cancel");
               
            }
        }
        return 1;
    }

    if(dialogid==13)
    {
        if(response == 1){
           SetPlayerColor(playerid,COLOR_BLUE);
           GivePlayerWeapon(playerid,22,51);
           GivePlayerWeapon(playerid,3,0);
           GivePlayerWeapon(playerid,41,365);
           SetPlayerArmour(playerid,100);
           SetPlayerSkin(playerid,281);  
        }
           return 1;
    }
}
Reply
#4

Try to put all dialogs in 1 filterscript or gamemode, that helped me alot with this problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)