22.08.2012, 07:23
I made a DIALOG you can check out here.
And look what's wrong on your dialog.
And look what's wrong on your dialog.
pawn Код:
#define DIALOG_BUYTOYS 23786
ShowPlayerDialog(playerid, DIALOG_BUYTOYS, DIALOG_STYLE_LIST, "BUYTOYS", "Toy1\nToy2\nToy3\nToy4\nToy5", "Buy", "Cancel");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_BUYTOYS){
if(response){
switch(listitem)){
case 0:
{
//Selected Item: "Toy1"
}
case 1:
{
//Selected Item: "Toy2"
}
case 2:
{
//Selected Item: "Toy3"
}
case 3:
{
//Selected Item: "Toy4"
}
case 4:
{
//Selected Item: "Toy5"
}
}
}
else{
//The player has pressed "Buy".
switch(listitem{
case 0:
{
//Selected Item: "Toy1"
}
case 1:
{
//Selected Item: "Toy2"
}
case 2:
{
//Selected Item: "Toy3"
}
case 3:
{
//Selected Item: "Toy4"
}
case 4:
{
//Selected Item: "Toy5"
}
}
}
}
return 0;
}