08.04.2013, 23:51
Use the CallBack OnDialogResponse:
i hope that i've helped you.
Код:
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; }