[HELP] Password 3 to 20 characters - 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: [HELP] Password 3 to 20 characters (
/showthread.php?tid=177942)
[HELP] Password 3 to 20 characters -
WThieves - 19.09.2010
Hi there all, i have a (pretty nooby) question,
I know this may seem simple for some of you, but i've never done this part of a login system.
Here's the Question:
How do i force people to use passwords at least between the 3 and 20 characters.
And also, how do i stop someone from logging in if he/she doesn't enter anything as a pass? (i've recently found out that if i enter nothing as a password i get logged in wether i have a pass or not).
I'm using a dialog system (a bit like the one from GF but THIS IS NOT a GF question).
So could anybody help me at this one, i'd appreciate it if you do.
Thanks in advance

.
Ps, sorry for the caps, forgot how to make words red.
Re: [HELP] Password 3 to 20 characters -
Vince - 19.09.2010
pawn Код:
if(!(3 <= strlen(inputtext) <= 20))
return SendClientMessage(playerid, red, "The password you supplied is either too short or too long.");
Should do the trick.
Re: [HELP] Password 3 to 20 characters -
WThieves - 19.09.2010
Alright gonna try it, now i gotta find out where to put it :P (forgot where).