login 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: login problem (
/showthread.php?tid=505308)
login problem -
AhmedMohamed - 07.04.2014
it's login system, it compile good but when i entered my password it enter even if it's wrong
sorry for my bad english
login dialog:
pawn Код:
else if(dialogid == 2) // Login
{
if(response)
{
new file[64], Password[256], IP[16], Password2[256];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
WP_Hash(Password2, sizeof(Password2), inputtext);
format(Password, sizeof(Password), "%s", dini_Get(file, "Password"));
if(strcmp(Password, inputtext,true))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Invalid password.");
SSSShowDialog(playerid, 2);
return 1;
}
if(sscanf(inputtext, "s[128]", inputtext))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}You must enter a password to procceed.");
SSSShowDialog(playerid, 2);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIME, "");
SendClientMessage(playerid, COLOR_LIME, "");
SendClientMessage(playerid, COLOR_LIME, "");
format(PlayerInfo[playerid][pIP], 16, "%s", dini_Get(file, "IP"));
GetPlayerIp(playerid, IP, sizeof(IP));
dini_Set(file, "IP", IP);
PlayerInfo[playerid][pSex] = dini_Int(file, "Sex");
PlayerInfo[playerid][pAge] = dini_Int(file, "Age");
if(!PlayerInfo[playerid][pSex] || !PlayerInfo[playerid][pAge])
{
SSSShowDialog(playerid, 3);
}
else
{
LoadChar(playerid);
SpawnPlayer(playerid);
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}You have chosen to quit the server.");
Kick(playerid);
}
}
Re: login problem -
AhmedMohamed - 07.04.2014
I can't believe that, no one can help me in that problem??
I think it's easy but not for me.
Re: login problem -
lulo356 - 07.04.2014
Its saving on your LAST IP, if you change your IP, you have to enter the correct password
Re: login problem -
AhmedMohamed - 07.04.2014
can't understand, explain more please
Re: login problem -
AhmedMohamed - 08.04.2014
bumb
Re: login problem -
ChandraLouis - 08.04.2014
Why don't you try to follow this
Tutorial by Newbienoob or this
Tutorial by Kush
Re: login problem -
DerickClark - 08.04.2014
Dini is slower to read the player files. Y_ini much faster. Use Y_ini by kush, Don't forget to put the Ysi folder in include.
Re: login problem -
iBanner - 08.04.2014
Time to convert to y_ini my friend easy to learn and fast reading also who is kush?