SA-MP Forums Archive
Registration system problem - 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)
+--- Thread: Registration system problem (/showthread.php?tid=283328)



Registration system problem - NeyMar96 - 14.09.2011

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


Re: Registration system problem - Kaperstone - 14.09.2011

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


Re: Registration system problem - NeyMar96 - 15.09.2011

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))


Re: Registration system problem - Markx - 15.09.2011

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


Re: Registration system problem - iPLEOMAX - 15.09.2011

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


Re: Registration system problem - NeyMar96 - 15.09.2011

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


Re: Registration system problem - NeyMar96 - 25.09.2011

?? Help please ):


Re: Registration system problem - [MWR]Blood - 25.09.2011

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


Re: Registration system problem - NeyMar96 - 25.09.2011

It did not help me..


Re: Registration system problem - NeyMar96 - 26.09.2011

??