How to create this.
#2

pawn Код:
#define Dialog_Weapons          2606 //define the dialog

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == Dialog_Weapons) //The dialog "Dialog_Weapons"
    {
        if(response)
        {
            if(listitem == 0) //Get Eagle
            {
                GivePlayerWeapon(playerid, 24, 100);
            }
            if(listitem == 1) //Get MP5
            {
                GivePlayerWeapon(playerid, 29, 100);
            }
            if(listitem == 2) //Get M4
            {
                GivePlayerWeapon(playerid, 31, 100);
            }
        }
    }
    return 1;
}

CMD:weapons(playerid, params[])
{
    ShowPlayerDialog(playerid, Dialog_Weapons, DIALOG_STYLE_LIST, ":: choose your weapon", "Eagle\nMP5\nM4", "Buy", "Close");
    return 1;
}
Reply


Messages In This Thread
How to create this. - by Gangster-rocks - 19.06.2012, 21:02
Re: How to create this. - by WagnerPM - 19.06.2012, 21:12
Re: How to create this. - by Gangster-rocks - 19.06.2012, 21:21
Re: How to create this. - by Mimic - 19.06.2012, 21:24

Forum Jump:


Users browsing this thread: 1 Guest(s)