16.08.2014, 08:46
I'm using a modullar script. The following excerpt of OnPlayerConnect is part of Callbacks.pwn, which is included in Main.pwn.
Yet, for some reason, these dialogs do not show up in-game, and I'm not sure what the problem is.
pawn Код:
public OnPlayerConnect(playerid)
{
new PLAYER_NAME[MAX_PLAYER_NAME];
GetPlayerName(playerid, PLAYER_NAME, sizeof(PLAYER_NAME));
if(fexist(Path(playerid)))
{
INI_ParseFile(Path(playerid), "loadaccount_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Welcome back. This account is registered. \nInsert your password to login to your account","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registration", "Welcome! This account is not registered.\nEnter your own password to create a new account.","Register","Quit");
}
return 1;
}