11.06.2015, 12:20
Код:
public ShowDialogs(playerid) { 799 new playername[64], string[500]; 800 GetPlayerName(playerid, playername, MAX_PLAYER_NAME); 801 if (dini_Exists(AddDirFile(dir_userfiles, playername))) 802 { 803 if(dini_Int(AddDirFile(dir_userfiles, playername), "adminlevel") >= 1) 804 { 805 format(string,sizeof(string),"{FFFFFF}The username {00997A}%s {FFFFFF}is {FF0000}protected.\n{FFFFFF}Please type in the password for this account below in order to login.\n\n{A6A6A6}If this is not your account, leave and reconnect to the server with a different username.", playername); 806 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login*", string, "Login", "Quit"); 807 } 808 else 809 { 810 format(string,sizeof(string),"{FFFFFF}The username {00997A}%s {FFFFFF}is {00FF00}registered.\n{FFFFFF}Please type in the password for this account below in order to login.\n\n{A6A6A6}If this is not your account, leave and reconnect to the server with a different username.", playername); 811 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login*", string, "Login", "Quit"); 812 } 813 } 814 else 815 { 816 format(string,sizeof(string),"{FFFFFF}The account {FF0000}%s {FFFFFF}is {FF0000}not registered.\n{FFFFFF}Please type in the password for this account below in order to register.", playername); 817 ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registering...",string, "Register", "Quit"); 818 } 819 }