23.05.2016, 17:52
Код:
public OnAccountCheck(playerid) { SetPlayerCameraPos(playerid, -192.3700, 883.2700, 13.7500); SetPlayerCameraLookAt(playerid, -192.6300, 884.2400, 13.8200); SetPlayerPos(playerid, -195.7553, 895.5865, 8.6920); new rows, fields, string[128]; cache_get_data(rows, fields, mysql); if(rows) { new tmp[129]; cache_get_field_content(0, "Password", tmp); format(PlayerInfo[playerid][pPass], 129, "%s", tmp); //cache_get_field_content(0, "password", PlayerInfo[playerid][pPass], mysql, 129); format(string, sizeof(string), "Welcome back %s!\n\nPlease type in your password to log back into the server!", GetNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "BCRP - Login", string, "Login", "Quit"); } else { format(string, sizeof(string), "Welcome %s!\n\nWe have noticed you do not have an account registered with us!\nPlease type a password to register a new account:", GetNameEx(playerid)); ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "BCRP - Register", string, "Register", "Quit"); } return 1; }