31.03.2012, 15:29
The lines
This basically says that if the player types the password correctly, then it'll return that dialog no matter what. I won't treat you like an idiot, because you aren't lol, but strcmp subtracts the two strings' ASCII values and if the strings are the same, then it'll return 0. That is why some lines look like this.
So what you would do is this.
So if strcmp subtracts the password's ASCII values with the inputtext's values, if that does not equal 0 then the two strings aren't correct, thus returning the Invalid Password dialog. Hope I helped.
EDIT:
This post explains how strcmp works.
That's how I learned lol
http://forum.sa-mp.com/showpost.php?...28&postcount=1
pawn Code:
if( !strcmp( accInfo [ playerid ] [ Password ], inputtext, false ) )
return ShowPlayerDialog( playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, etc....
pawn Code:
if(strcmp(string,string2,true) == 0)
pawn Code:
if( strcmp( accInfo [ playerid ] [ Password ], inputtext, false ) != 0 )
return ShowPlayerDialog( playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, etc....
EDIT:
This post explains how strcmp works.
That's how I learned lol
http://forum.sa-mp.com/showpost.php?...28&postcount=1