Registration system problem
#1

PHP код:

forward OnPlayerLogin2
(playerid,password[]);
public 
OnPlayerLogin2(playerid,password[])
{
new 
Password[64];
INI_ParseFile(UserFile(playerid), "ParsePlayerPass"falsetrue,playerid);
GetGVarString("pPass"Password64,playerid);
if(!
strcmp(password,Password,true))
{
SetPVarInt(playerid"Logged"0);
SetPVarInt(playerid"Registered"0);
SetPVarInt(playerid"BadPass"0);
SendClientMessage(playeridCOLOR_GREEN".дъзбшъ бдцмзд мщшъ, лтъ аъд шщай мбзеш гоеъ емдъзйм мщзч");
PlaySound(playerid1057);
ShowPlayerDialog(playerid,23,DIALOG_STYLE_MSGBOX,"{00FFFF}"Community_Name" // змеп дъзбшеъ","!дъзбшъ бдцмзд","айщеш","");
LoginPlayer(playerid);
}
else
{
SetPVarInt(playerid"BadPass",GetPVarInt(playerid"BadPass") - 1);
format(stringExsizeof(stringEx),".сйсод щвейд реъше мк тег %d рйсйереъ",GetPVarInt(playerid"BadPass"));
SendClientMessage(playerid,COLOR_RED,stringEx);
format(stringExsizeof(stringEx),"{FF0000}.дсйсод щдчщъ щвейд. рсд щеб",GetName(playerid));
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"{A9A9A9}"Community_Name" // змеп дъзбшеъ",stringEx,"дъзбш","ца одщшъ");
if(
GetPVarInt(playerid"BadPass") == 0SetKick(playerid,-1,"Invalid Password 3/3");
}
return 
1;
}
forward ParsePlayerPass(playerid,name[],value[]);
public 
ParsePlayerPass(playerid,name[],value[])
{
if(!
strcmp(name,"Password")) SetGVarString("pPass"value,playerid);

The problem is that it connects me every password I write
Reply
#2

can you be more specific?
and try to improve your english,because i dont understand you
Reply
#3

I tried to build a registration system but I have a problem.


The problem is connecting the user

When I to connects to user it every password I write
the problem is in this row: if(!strcmp(password,Password,true))
Reply
#4

you mean that you can write any password it would log you in?
Reply
#5

pawn Код:
if ( !strcmp(password,Password,true) && strlen(Password) ) //Check the length of the inputtext.
And you should really look up some Y_INI tutorials..
Reply
#6

Quote:
Originally Posted by Markx
Посмотреть сообщение
you mean that you can write any password it would log you in?
Yes.



Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
pawn Код:
if ( !strcmp(password,Password,true) && strlen(Password) ) //Check the length of the inputtext.
And you should really look up some Y_INI tutorials..
Now I can not connect even if the password is correct
Reply
#7

?? Help please ):
Reply
#8

Check it, it might help you.
http://forum.sa-mp.com/showthread.ph...y_ini+tutorial
Reply
#9

It did not help me..
Reply
#10

??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)