07.01.2011, 15:08
pawn Код:
if( dialogid == 4 )
{
if( response )
{
if( GetPVarInt( playerid, "BadLogins" ) < 3 )
{
new
Failas[ 51 ]
;
format( Failas, 51, "DuomenuBaze/Zaidejai/%s.ini", PlayerNick( playerid ) );
if( CheckPassword( Failas, inputtext ) )
{
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] Succesfully "#h_Raudona"logged in" );
}
else
{
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"You have been kicked "#h_Raudona"from server. ["#h_Orandzine"3 bad logins]" );
Kick( playerid );
}
}
else
{
SetPVarInt( playerid, "BadLogins", GetPVarInt( playerid, "BadLogins" ) + 1 );
new
Stringas[ 145 ]
;
format( Stringas, 145, ""#h_Raudona"The inputted "#h_Balta"password is BAD.\n"#h_Zalia"Try again. "#h_Raudona"You can try to login: "#h_Geltona"%d times", 3 - GetPVarInt( playerid, "BadLogins" ) );
ShowPlayerDialog( playerid, 4, DIALOG_STYLE_INPUT, ""#h_Geltona"Prisi"#h_Zalia"jun"#h_Raudona"gimas", Stringas, "Login", "Leave" );
}
}
else
{
Kick( playerid );
}
}