20.01.2013, 12:24
didn't understand
hmm something like this maybe?
hmm something like this maybe?
pawn Код:
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid, 0 , DIALOG_STYLE_LIST,"Test","Blah 1\nblah 2","select","cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 0: // dialog id
{
if(!response) // when he press 'cancel'
{
SendClientMessage(playerid,-1,"Canceled.");
return 1;
}
if(listitem == 0) // when he press 'blah 1'
{
SendClientMessage(playerid, -1,"You pressed blah 1 !");
}
else if(listitem == 1) // when he press 'blah 2'
{
SendClientMessage(playerid, -1,"You pressed blah 2 !");
}
}
return 1;
}