pawn Код:
if(dialogid == 1244)
{
if(response)
{
if (gPlayerAccount[playerid] != 0)
{
ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,"Welcome, Please Log-In","Type your password below to log-in","Log-in","Quit");
}
else
{
ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Welcome, Please Register","Type your password below to register a new account.","Register","Quit");
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has accepted the terms and conditions.",d,m,y,h,mi,s,sendername);
LoginLog(string);
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You selected \"Refuse\", To play you must agree to the terms of condition");
Kick(playerid);
}
}
if(dialogid == 1245)
{
if(response)
{
strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
if(!strcmp(Typed[playerid], "None", true))
{
ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,"Try Again, Please Login","You didn't typed a password!\nType your password below to Login","Login","Quit");
}
else
{
OnPlayerLogin(playerid, inputtext);
}
}
else
{
Kick(playerid);
}
}
if(dialogid == 1246)
{
if(response == 1)
{
if(strlen(inputtext) < 3)
{
ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is Too Short!\nType your password below to register a new account.","Register","Quit");
return 1;
}
if(strlen(inputtext) > 20)
{
ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is too Long!\nType your password below to register a new account.","Register","Quit");
return 1;
}
OnPlayerRegister(playerid, inputtext);
}
else
{
Kick(playerid);
}
}