17.03.2017, 15:37
I type my password and press enter but nothing happend
it not show DIALOG_SEX
it not show DIALOG_SEX
Код:
if(dialogid == DIALOG_REGISTER) { if(!response) { Kick(playerid); } else { if(strlen(inputtext) < 5) { SendClientMessage(playerid, COLOR_RED, "Mat Khau Phai Hon 5 Ki Tu."); ShowMainMenuDialog(playerid, 2); //return ShowPlayerDialog(playerid, RegisterDialog, DIALOG_STYLE_INPUT, "Register", "Welcome player!\nYour account has not been registered yet. Please fill in your desired password:", "Register", "Quit"); } else { new query[512], playername[MAX_PLAYER_NAME], playerip[16]; GetPlayerName(playerid, playername, sizeof(playername)); GetPlayerIp(playerid, playerip, sizeof(playerip)); WP_Hash(Player[playerid][Password], 129, inputtext); mysql_format(mysql, query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Password`, `IP`, `Level`, `Admin`, `Vip`, `Money`, `Token`, `PosX`, `PosY`, `PosZ`, `PosA`) VALUES ('%e', '%e', '%e', 1, 0, 0, 500, 0, 1.00000, 1.00000, 1.00000, 1.00000)", playername, Player[playerid][Password], playerip); mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid); } } }
Код:
forward OnAccountRegister(playerid); public OnAccountRegister(playerid) { Player[playerid][ID] = cache_insert_id(); printf("[Dang Ky Moi] Tai Khoan Moi. Database ID: [%d]", Player[playerid][ID]); TogglePlayerSpectating(playerid, 1); ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_LIST, "{COLOR_RED}Gioi Tinh Cua Ban La Gi ?", "Nam\nNu", "Dong Y", "Huy"); //SetSpawnInfo(playerid, 0, 23, 1.00000, 1.00000, 1.00000, 1.00000, 0, 0, 0, 0, 0, 0); //SpawnPlayer(playerid); return true; }
Код:
stock ShowMainMenuDialog(playerid, frame) { new titlestring[64]; new string[512]; switch(frame) { case 1: { format(titlestring, sizeof(titlestring), "{3399FF}Dang Nhap - %s", GetPlayerNameEx(playerid)); format(string, sizeof(string), "Nhap Mat Khau De Dang Nhap : %s", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,titlestring,string,"Dang Nhap","Thoat"); } case 2: { format(titlestring, sizeof(titlestring), "{3399FF}Dang Ky - %s", GetPlayerNameEx(playerid)); format(string, sizeof(string), "Nhap Mat Khau De Dang KY : %s", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,titlestring,string,"Dang Ky","Thoat"); } case 3: { format(titlestring, sizeof(titlestring), "{3399FF}Dang nhap - %s", GetPlayerNameEx(playerid)); format(string, sizeof(string), "Mat Khau Khong Hop Le!\nNhap Mat Khau De Dang Nhap : %s",GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,titlestring,string,"Dang nhap","Thoat"); } } }