Instead of logging him in, show him the login dialog instead.
It's simple as that. |
forward OnPlayerRegister(playerid); public OnPlayerRegister(playerid) { // retrieves the ID generated for an AUTO_INCREMENT column by the sent query pInfo[playerid][UserID] = cache_insert_id(); ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Register", "You are now registered and has been logged in.", "Okay", ""); pInfo[playerid][IsLoggedIn]=true; return 1; }
forward OnPlayerRegister(playerid); public OnPlayerRegister(playerid) { // retrieves the ID generated for an AUTO_INCREMENT column by the sent query pInfo[playerid][UserID] = cache_insert_id(); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "You are now registered. Write your password below to login account", "Okay", ""); pInfo[playerid][IsLoggedIn]=false; return 1; }
[10:41:20] [plugins/mysql] cache_set_active: invalid cache id '0' [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name_int: no active cache [10:41:20] [plugins/mysql] cache_get_value_name: no active cache [10:41:20] [plugins/mysql] cache_delete: invalid cache id '0'