SA-MP Forums Archive
On Dialog Box.. - 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: On Dialog Box.. (/showthread.php?tid=145579)



On Dialog Box.. - Antonio [G-RP] - 02.05.2010

How do I make sure a password is less that 10 letters?

Код:
if(inputtext > 10)
{
SendClientMessage(playerid, COLOR_RED, "That password is too long! (less than 10)");
return 1;
}
??


Re: On Dialog Box.. - Anthony_Brassi - 02.05.2010

if(inputtext > 10)
{
SendClientMessage(playerid, COLOR_RED, "That password is too long! (less than 10)");
return 1;
}

inputtext > 9 i think, 10 would make so 11 and up would say that


Re: On Dialog Box.. - Steven82 - 03.05.2010

it would be

pawn Код:
> 9



Re: On Dialog Box.. - Anthony_Brassi - 03.05.2010

Quote:
Originally Posted by Steven82
it would be

pawn Код:
> 9
Quote:
Originally Posted by Anthony_Brassi
if(inputtext > 10)
{
SendClientMessage(playerid, COLOR_RED, "That password is too long! (less than 10)");
return 1;
}

inputtext > 9 i think, 10 would make so 11 and up would say that
pretty sure thats what i just said


Re: On Dialog Box.. - Correlli - 03.05.2010

pawn Код:
if(strlen(inputtext) >= 10)
{
  // your code.
}