23.08.2015, 16:53
Код:
public OnAccountCheck(playerid) { print("Reached onAccountCheck!"); new rows, fields, string[128]; cache_get_data(rows, fields, mysql); if (rows) { format(string, sizeof(string), "Name before: %s", PlayerInfo[playerid][Name]); print(string); cache_get_field_content(0, "Password", PlayerInfo[playerid][Password], mysql, 65); cache_get_field_content(0, "Salt", PlayerInfo[playerid][Salt], mysql, 11); cache_get_field_content(0, "ID", PlayerInfo[playerid][ID], mysql, 10); format(string, sizeof(string), "Name after: %s", PlayerInfo[playerid][Name]); print(string); format(string, sizeof(string), "Welcome %s!\nThis username is registered, please fill in your password.", PlayerInfo[playerid][Name]); ShowPlayerDialog(playerid, LoginDialog, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Quit"); } else { format(string, sizeof(string), "Welcome %s!\nThis username is NOT registered. Please fill in a password.", PlayerInfo[playerid][Name]); ShowPlayerDialog(playerid, RegisterDialog, DIALOG_STYLE_PASSWORD, "Register", string, "Register", "Quit"); } return 1; }
It doesn't show the name either in the 'Welcome %s..' message.
Код:
public OnPlayerConnect(playerid) { ..... GetPlayerName(playerid, PlayerInfo[playerid][Name], MAX_PLAYER_NAME); .....