08.09.2012, 12:36
I can login with any pass, but if I /login again with the wrong pass, it says error, but if its right, I can login
Any help?
Thanks, tyler
pawn Код:
CMD:login(playerid,params[])
{
if(!fexist(Path(playerid))) return SendClientMessage(playerid,-1,"You are not registered.");
if(isnull(params)) return ShowUsageMessage(playerid,"/login [Pass]");
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),params);
if(strcmp(params,pInfo[playerid][Pass]))
{
SendClientMessage(playerid,-1,"ERROR: Wrong Pass");
}
else
{
pLogged[playerid] = 1;
INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
SendClientMessage(playerid,-1,"Welcome back! You have successfully logged in");
}
return 1;
}
Thanks, tyler