[HELP]: Weapon Dialog
#7

Use the CallBack OnDialogResponse:


Код:
CMD:weapons(playerid, params[])
{
    ShowPlayerDialog(playerid,WEAPON_DIALOG,DIALOG_STYLE_LIST,"Weapons","Silence $500\nAK-47 $2000\nM4 $3000\nDesert Eagle $500\n9mm $200\nMP5 $300\nMicro SMG $200\nCombat Shotgun $500\nShotgun $400\nSniper Rifle $1500\nSawnoff Shotgun $500","Ok","Exit");
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == WEAPON_DIALOG)
       {
            if(response) // The First Button(OK)
           {
                if(dialoglist = 0) // The first on List: (Silence)
                {
                 return 1;
                 }
                  if(dialoglist = 1) // The second on List
                {
                 return 1;
                 }
             }
       }
    return 1;
}
i hope that i've helped you.
Reply


Messages In This Thread
[HELP]: Weapon Dialog - by Areax - 08.04.2013, 17:26
Re: [HELP]: Weapon Dialog - by Riddick94 - 08.04.2013, 17:28
Re: [HELP]: Weapon Dialog - by Areax - 08.04.2013, 18:09
Re: [HELP]: Weapon Dialog - by ReVo_ - 08.04.2013, 19:57
Re: [HELP]: Weapon Dialog - by SilverKiller - 08.04.2013, 20:24
Re: [HELP]: Weapon Dialog - by [ABK]Antonio - 08.04.2013, 20:45
Re: [HELP]: Weapon Dialog - by LukisHard - 08.04.2013, 23:51
Re: [HELP]: Weapon Dialog - by Areax - 09.04.2013, 04:04
Re: [HELP]: Weapon Dialog - by Faisal_khan - 09.04.2013, 05:23

Forum Jump:


Users browsing this thread: 1 Guest(s)