28.06.2014, 10:31
Код:
case DIALOG_REGISTER: { if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit"); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Password",udb_hash(inputtext)); INI_WriteInt(File,"Cash",0); INI_WriteInt(File,"Admin",0); INI_WriteInt(File,"Kills",0); INI_WriteInt(File,"Deaths",0); INI_WriteInt(File,"Banned",0); INI_Close(File); new pname[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, pname, sizeof(pname)); format(string,256,""COL_GREEN"You have successfully registered the name "COL_WHITE"%s"COL_GREEN" with the password"COL_WHITE" %s.\n"COL_GREEN" Relog to save your stats.",pname, inputtext); ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Registered",string,"Okay",""); } else { Kick(playerid); } }