20.04.2010, 19:33
I've made a Dialog following this Tut: Click
This is my code (things deleted):
Why doesn't it Response anything, also if I touch the second button.
This is my code (things deleted):
pawn Код:
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Choose your thing", "1\n2, "Select", "Quit");
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 0)
{
if(response == 0)
{
SendClientMessage(playerid, rood, "You quited the server");
Kick(playerid);
}
else
{
SendClientMessage(playerid, groen, "Yes"); // I even don't get this message (?)
switch(listitem)
{
case 0:
{
SetPlayerPos(playerid, 1, 1,1);
SetPlayerFacingAngle(playerid, 1);
SendClientMessage(playerid, groen, "Yes 1");
}
case 1:
{
SetPlayerPos(playerid, 1, 1,1);
SetPlayerFacingAngle(playerid, 1);
SendClientMessage(playerid, groen, "Yes 2");
}
}
}
}
return 1;
}