30.01.2011, 11:52
pawn Код:
public OnPlayerConnect(playerid)
{
new Playerdata[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Playerdata,sizeof(Playerdata),"/Accounts/%s.txt",name);
if(dini_Exists(Playerdata))
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","Enter your desired password here to login","Login", "Cancel");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registration", "Write here your desired password:", "Register", "Cancel");
}
return 1;
}