Problems with OnDialogResponse
#1

Код:
	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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)