23.07.2011, 02:48
Quote:
I just wonder why you put "LOGIN_DIALOG" instead the dialogid?
|
pawn Код:
#define LOGIN_DIALOG 2
EDIT: Fixed.
pawn Код:
case LOGIN_DIALOG:
{
if(response)
{
new
uFile[35],
player_Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, player_Name, sizeof(player_Name));
format(uFile, 35, USER_DIRECTORY, player_Name);
INI_ParseFile(uFile, "LoadUserData", .bExtra = true, .extra = playerid);
if(strcmp(inputtext, SInfo[playerid][Password], true) == 0) return OnPlayerLogin(playerid, inputtext);
else return ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_INPUT, "Welcome back!", "You appear to have an account on this server!\nPlease login by typing in your password below:", "Submit", "Quit");
}
else Kick(playerid);
return 0;
}