12.05.2012, 13:16
What is the matter with this
pawn Код:
if(dialogid == 2)
{
if (!response) return Kick( playerid );
if ( response )
{
if( !strlen ( inputtext ) ) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Welcome.Please log-in","You have enteCOLOR_RED an "COLOR_RED"invalid"COLOR_WHITE" password\n"COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to log-in", #Register, #Quit);
new hashed_password[129];
WP_Hash( hashed_password, sizeof ( hashed_password ), inputtext );
new INI:File = INI_Open( user_account_path( playerid ) );
INI_SetTag(File, "statistics" );
INI_WriteString(File, "Password", hashed_password );
INI_WriteInt(File, "Cash", 0 );
INI_WriteInt(File, "Admin", 0 );
INI_WriteInt(File, "Deaths", 0 );
INI_WriteInt(File, "Score", 0 );
INI_Close(File);
SetSpawnInfo( playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
SpawnPlayer( playerid );
}
}
else if(dialogid == 3)
{
if ( !response ) return Kick ( playerid );
if( response )
{
new
hashed_password[ 129 ];
WP_Hash( hashed_password, sizeof ( hashed_password ), inputtext );
if( !strcmp ( hashed_password, userData[ playerid ][ Password ] ) )
{
INI_ParseFile(user_account_path ( playerid ), "load_user_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney( playerid, userData[ playerid ][ Money ] );
SetPlayerScore( playerid, userData[ playerid ][ Score ] );
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_RED"You have entered an incorrect password.\n"COLOR_WHITE"Type your password below to login.","Login","Quit");
}
return 1;
}
}
}
return 1;
}