15.12.2010, 13:50
(
Последний раз редактировалось xir; 15.12.2010 в 14:28.
)
public OnPlayerConnect(playerid)
{
format(file, 128, "/Reg/%s.ini", GetName(playerid));
printf(file); // FIRST DEBUG LINE HERE
if(dini_Exists(file))
{
printf("debug: file exists"); // SECOND DEBUG LINE HERE
format(str, 128, "\nEnter your password", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login to your account", str, "Login", "Quit");
SendClientMessage(playerid, Green, "You have successfully logged in");
}
else if(!dini_Exists(file))
{
printf("debug: file does not exist"); // THIRD DEBUG LINE HERE
SendClientMessage(playerid, Green, "%s is already registered login to your account");
return 1;
}
{
format(str, 128, "\nEnter a password", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register your account", str, "Register", "Quit");
}
return 1;
}
format(file,128,"Reg/%s.ini",GetName(playerid));