30.12.2012, 18:22
My problem is
when i put an emty text on the dialog
it will accept and will let the player log in help me
but when i put a wrong password it will not accept
when i put an emty text on the dialog
it will accept and will let the player log in help me
but when i put a wrong password it will not accept
pawn Код:
public OnPlayerLogin(playerid,pasword[])
{
new attemts = 3;
if(!strcmp(pasword,pData[playerid][pPass]))
{
SendClientMessage(playerid,C_WHITE,"Welcome Back");
INI_ParseFile(pFiles(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
}
else
{
attemts -= 1;
new l_msg[500];
format(l_msg,sizeof(l_msg),"Welcome Back "CGREEN"%s"CWHITE" This Account is registred \nPlease Enter your password to login \n\n "CRED"[ Error ]: You have entered a invalid password \n you have %d more attemts left",pName(playerid),attemts);
ShowPlayerDialog(playerid,D_LOGIN,PASSWORD,servername(),l_msg,"login","cancel");
if(attemts == 0 )
{
return BotKick(playerid,"Failure to Login");
}
}
return 1;
}