SA-MP Forums Archive
how to? - 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: how to? (/showthread.php?tid=137936)



how to? - Lajko1 - 30.03.2010

Hello, i want to know how to do this:

that password MUST have min 5 max 15 words

i tried this

Код:
new words;
		words = inputtext[15];
Than i put this:

Код:
if(words < 5 || words > 15)
		{
		  new stri[128];
		  SendClientMessage(playerid, 0xff7000ff, "[System]: Password Must Be Long Beetween 5 and 15 words!");
		  format(stri,256,"Welcome %s to Kljukec's Roleplay Server.\n\nYour name is not registered yet so please enter \nthe password in box!\n\nIMPORTANT:The password must have 5-15 words ",name);
			ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register",stri,"Register","Quit");
		  return 1;
		}
but it won't work normaly

how i can make this works ?


Re: how to? - Jefff - 30.03.2010

Код:
if(strlen(inputtext)...)



Re: how to? - Lajko1 - 30.03.2010

uff can i get some more code ? becouse i was never doing on this and ty for help


Re: how to? - Nero_3D - 30.03.2010

pawn Код:
new length = strlen(words);
if(5 > length || length > 15) {}



Re: how to? - Lajko1 - 30.03.2010

Код:
new length = strlen(words);
error

Код:
C:\Documents and Settings\samp\Desktop\Server 2\gamemodes\Roleplay.pwn(75) : error 017: undefined symbol "words"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: how to? - Nero_3D - 30.03.2010

... use the array, should be inputtext