30.07.2012, 22:00
It doesnt matter what i type in, it always works. I want my password to work ONLY.
What's wrong with this?
What's wrong with this?
pawn Код:
case DIALOG_LOGIN:
{
if (!response) return Kick (playerid);
if(response)
{
new hashed_password[ 129 ];
WP_Hash( hashed_password, sizeof ( hashed_password ), inputtext );
if( strlen ( inputtext ) < 1) return SendClientMessage(playerid,COLOR_RED,"~ Insert Password."), ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login To Your Account.","Enter your password.","Okay","Exit");
if( !strcmp(hashed_password, userData[playerid][Password]))
{
userData[ playerid ][ Admin_Level ] = dini_Int(user_account_path(playerid),"AdminLevel");
GivePlayerMoney( playerid, userData[ playerid ][ Money ] );
SetPlayerScore( playerid, userData[ playerid ][ Score ] );
userData[playerid][Bankmoney] = dini_Int(user_account_path(playerid),"Bankmoney");
return 1;
}
else
{
return SendClientMessage(playerid,COLOR_RED,"~ Wrong Password!"), ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login To Your Account.","Enter your password.","Okay","Exit");
}
}
}