SA-MP Forums Archive
ShowPlayerDialog - 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)
+--- Thread: ShowPlayerDialog (/showthread.php?tid=543229)



ShowPlayerDialog - Baltimore - 25.10.2014

How to use inputtext for number?


Re: ShowPlayerDialog - Emmet_ - 25.10.2014

Just do:

pawn Код:
new amount = strval(inputtext);
In your dialog code.


Re: ShowPlayerDialog - Anzipane - 25.10.2014

If you mean checking if the entered text is numeric you could do this:
pawn Код:
// Put this in your dialog response
if (strval(inputtext))
{
    // The text is numeric, proceed with the code..
}
else
{
    // The text is not numeric, reshow the dialog?...
}