SA-MP Forums Archive
Dialog doesent do anything? - 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: Dialog doesent do anything? (/showthread.php?tid=214560)



Dialog doesent do anything? - Spiral - 21.01.2011

Hey so, heres the ShowPlayerDialog:

pawn Код:
ShowPlayerDialog(playerid, 72, DIALOG_STYLE_INPUT, "Registration", "Your gender has been set to male.\nPlease enter your desired age\nPlease use the ages between 16-99", "Continue", "Kick me");
Heres the response:
pawn Код:
if(dialogid == 72)
    {
      if(!response)
      {
         ShowPlayerDialog(playerid, 72, DIALOG_STYLE_INPUT, "Registration", "Please enter your desired age\nPlease use the ages between 16-99", "Continue", "Kick me");
      }
      if(!(strval(inputtext) >= 16 && strval(inputtext) <= 99))
      {
         PlayerInfo[playerid][pAge] = strval(inputtext);
         ShowPlayerDialog(playerid,73,DIALOG_STYLE_LIST,"How did you arrive into Los Santos?","Train\nPlane\nBoat\nCar","Select", "Kick");
         return 1;
      }
      else
      {
         ShowPlayerDialog(playerid, 72, DIALOG_STYLE_INPUT, "Registration", "Please enter your desired age\nPlease use the ages between 16-99", "Continue", "Kick me");
      }
    }
When I enter my age for ex. 21 then it returns nothing and doesent show me the dialog id 73. Any help?


Re: Dialog doesent do anything? - Scenario - 21.01.2011

pawn Код:
if(strval(inputtext) > 15 && strval(inputtext) < 100)



Re: Dialog doesent do anything? - Mike Garber - 21.01.2011

Yep, as "Realcop228" said. You did if(! (which means "If NOT").


Re: Dialog doesent do anything? - Spiral - 21.01.2011

Still doesent work, shows me nothing.


Re: Dialog doesent do anything? - Scenario - 21.01.2011

I'm not sure how much this will do, but try removing the return in this:

pawn Код:
if(strval(inputtext) > 15 && strval(inputtext) < 100)
      {
         PlayerInfo[playerid][pAge] = strval(inputtext);
         ShowPlayerDialog(playerid,73,DIALOG_STYLE_LIST,"How did you arrive into Los Santos?","Train\nPlane\nBoat\nCar","Select", "Kick");
         return 1;
      }