SA-MP Forums Archive
Problems with OnDialogResponse - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problems with OnDialogResponse (/showthread.php?tid=144936)



Problems with OnDialogResponse - leapfish - 29.04.2010

Код:
	if(dialogid == 2)
	{
		if(response)
		{
			if(listitem == 0)
			{
			if(GetPVarInt(playerid, "InMission") == 0)
			{
				SendClientMessage(playerid, COLOR_LGREEN, "You have successfully accepted the Mission");
				SetPVarInt(playerid, "InMission", 1);
        TogglePlayerControllable(playerid,1);
			}
      else
			{
      SendClientMessage(playerid, COLOR_RED, "Please quit any other mission before.");
      }
 			if(listitem == 1)
			{
			if(GetPVarInt(playerid, "InMission") == 1)
		  {
				SendClientMessage(playerid, COLOR_LGREEN, "You have successfully quit the Mission");
				TogglePlayerControllable(playerid,1);
			}
      else
			{
      SendClientMessage(playerid, COLOR_RED, "You haven't accepted this mission first.");
      }
    }
   }
 }
}
return 1;
}
Hello I have problems with OnDialogResponse function..
The first part of a code works great
Код:
if(listitem == 0)
     {
     if(GetPVarInt(playerid, "InMission") == 0)
     {
      SendClientMessage(playerid, COLOR_LGREEN, "You have successfully accepted the Mission");
      SetPVarInt(playerid, "InMission", 1);
        TogglePlayerControllable(playerid,1);
     }
      else
     {
      SendClientMessage(playerid, COLOR_RED, "Please quit any other mission before.");
      }
Now when I try to choose second option in dialog, it doesn't do anything, just nothing.... Dialog closes....

Please can anyone help me how to fix so the 2nd itemlist will work also, PLEASE HELP ME!