[HELP]How can I check a password -
burnfire - 15.03.2013
Hello.I have an simple admin FS(created by me) using YSI:INI,but I have an problem.When I type an randomly password (another than I save) the server allow player to login in without any restriction,EVEN IT'S ANOTHER PASSWORD!Now,my question it's:How can I check password?If it's possible,can you make an tutorial?Thanks
P.S:Probaly my english it's bad.That's because I am Romanian!!Hai Romania!!!
Re: [HELP]How can I check a password -
DiGiTaL_AnGeL - 15.03.2013
How about posting the command/dialog?
Re: [HELP]How can I check a password -
burnfire - 15.03.2013
Quote:
Originally Posted by DiGiTaL_AnGeL
How about posting the command/dialog?
|
If you say that...
Код:
if(dialogid == 1)
{
if(!response)
{
SendClientMessage(playerid,0xFF0000FF,"Nu te-ai logat!Vei primi KICK!!!");
Kick(playerid);
}
else
{
INI_Open(file);
new password;
new password2[128];
password = inputtext[23];
INI_ReadString("Parola",password2);
if() != 0)
{
SendClientMessage(playerid,0xFF0000FF,"Parola introdusa este gresita!");
INI_Close();
}
PInfo[playerid][level] = INI_ReadInt("Level");
PInfo[playerid][cash] = INI_ReadInt("Cash");
PInfo[playerid][coins] = INI_ReadInt("Coins");
PInfo[playerid][score] = INI_ReadInt("Score");
}
}
return 1;
}
Re: [HELP]How can I check a password -
zxc1 - 15.03.2013
You defined two variables: password, password2;
You choose that password will be the inputtext, but instead you compare the password2 variable.
->
pawn Код:
INI_ReadString("Parola",password);
Re: [HELP]How can I check a password -
burnfire - 15.03.2013
Quote:
Originally Posted by zxc1
You defined two variables: password, password2;
You choose that password will be the inputtext, but instead you compare the password2 variable.
->
pawn Код:
INI_ReadString("Parola",password);
|
So,can you put the entire script modyfied by YOU

THX
Re: [HELP]How can I check a password -
DiGiTaL_AnGeL - 15.03.2013
Use strcmp to compare the inputtext with the password:
pawn Код:
if(!strcmp(password2, inputtext))
But before, try it on a host if you're testing it on your pc now.
EDIT : you're using any plugin/function to encrypt the password?
Re: [HELP]How can I check a password -
burnfire - 15.03.2013
Quote:
Originally Posted by DiGiTaL_AnGeL
Use strcmp to compare the inputtext with the password:
pawn Код:
if(!strcmp(password2, inputtext))
But before, try it on a host if you're testing it on your pc now.
EDIT : you're using any plugin/function to encrypt the password?
|
1.
About that...I used strcmp(string compare) but I don't remove entire "If" and it remain <<<<THAT
2.I doesn't using any encription,to see user's passwords

)

3.I used again corectly strcmp,and IT'S WORK!!!(yet just in script but I'll try in server!!).I'll come with an EDIT SOON!!!THX