14.08.2014, 17:54
When a player enters the server, the view is set on LS, with the registration/logging in GUI, when he enters invalid password, the view switches to skin selection, and he can spawn using the arrows and spawn buttons below, while GUI is still asking for a password. He can spawn and move freely while the GUI is on the screen. How do i fix it ?
Code:
if (dialogid == 2) { new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "You are registered", "Please input your password below to login.", "Login", "Quit"); new tmp; tmp = dini_Int(file, "Password"); if(udb_hash(inputtext) != tmp) { SendClientMessage(playerid, COLOR_RED, "Wrong password."); ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "You are registered", "Please input your password below to login.", "Login", "Quit"); } else { gPlayerLogged[playerid] = 1; PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel"); GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid)); SendClientMessage(playerid,COLOR_WHITE, "SERVER: You have successfully logged in."); } return 1; }