if(udb_hash(inputtext) == Info[playerid][pKey])
if(!strcmp(Info[playerid][pKey],inputtext))
Es porque pKey esta vacнa. Comprueba que strlen(inputtext) sea mayor a 0, y fijate que la contraseсa no se esta almacenando en pKey
|
if(strlen(inputtext) > 0)
case DLOGIN: { if(response == 1) { if(!strlen(inputtext)) { Mensaje(playerid, COLOR_GREY, " Debes introducir tu contraseсa para continuar."); format(string, sizeof(string), "{FFFFFF}Bienvenido de nuevo, %s!\n{FFFFFF}Ingresa a continuaciуn tu contraseсa para conectarte al servidor\n\nTienes en total {E80000}3{FFFFFF} intentos de logueo.", NombreIC(playerid)); ShowPlayerDialog(playerid, DLOGIN, DIALOG_STYLE_PASSWORD, "{E80000}› {FFFFFF}Ingresar al servidor", string, "Conectar", ""); return 1; } //if (ComprobarClave(playerid, inputtext)) if(!strcmp(Info[playerid][pKey],inputtext)) { InsideMainMenu[playerid] = false; INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid); KillTimer(LoginTimer[playerid]); PlayerLogin(playerid); } else { SetPVarInt(playerid, "IntentosIngreso", GetPVarInt(playerid, "IntentosIngreso")+1); format(string, sizeof(string), " La contraseсa introducida es incorrecta. (%d/%d)", GetPVarInt(playerid, "IntentosIngreso"), LIMITE_INTENTOS_INGRESO); Mensaje(playerid, COLOR_GREY, string); if (GetPVarInt(playerid, "IntentosIngreso") == LIMITE_INTENTOS_INGRESO) { Mensaje(playerid, COLOR_ORANGE, "Has sido kickeado automбticamente. (Razуn: Lнmite de intentos de ingreso)"); Expulsar(playerid); return 1; } format(string, sizeof(string), "{FFFFFF}Bienvenido de nuevo, %s!\n{FFFFFF}Ingresa a continuaciуn tu contraseсa para conectarte al servidor\n\nTienes en total {E80000}3{FFFFFF} intentos de logueo.", NombreIC(playerid)); ShowPlayerDialog(playerid, DLOGIN, DIALOG_STYLE_PASSWORD, "{E80000}› {FFFFFF}Ingresar al servidor", string, "Conectar", ""); return 1; } }
if(!strlen(inputtext))
if(!strlen(inputtext) >0)
Gracias tio pero :
Код:
case DLOGIN: { if(response == 1) { if(!strlen(inputtext)) { Mensaje(playerid, COLOR_GREY, " Debes introducir tu contraseсa para continuar."); format(string, sizeof(string), "{FFFFFF}Bienvenido de nuevo, %s!\n{FFFFFF}Ingresa a continuaciуn tu contraseсa para conectarte al servidor\n\nTienes en total {E80000}3{FFFFFF} intentos de logueo.", NombreIC(playerid)); ShowPlayerDialog(playerid, DLOGIN, DIALOG_STYLE_PASSWORD, "{E80000}› {FFFFFF}Ingresar al servidor", string, "Conectar", ""); return 1; } //if (ComprobarClave(playerid, inputtext)) if(!strcmp(Info[playerid][pKey],inputtext)) { InsideMainMenu[playerid] = false; INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid); KillTimer(LoginTimer[playerid]); PlayerLogin(playerid); } else { SetPVarInt(playerid, "IntentosIngreso", GetPVarInt(playerid, "IntentosIngreso")+1); format(string, sizeof(string), " La contraseсa introducida es incorrecta. (%d/%d)", GetPVarInt(playerid, "IntentosIngreso"), LIMITE_INTENTOS_INGRESO); Mensaje(playerid, COLOR_GREY, string); if (GetPVarInt(playerid, "IntentosIngreso") == LIMITE_INTENTOS_INGRESO) { Mensaje(playerid, COLOR_ORANGE, "Has sido kickeado automбticamente. (Razуn: Lнmite de intentos de ingreso)"); Expulsar(playerid); return 1; } format(string, sizeof(string), "{FFFFFF}Bienvenido de nuevo, %s!\n{FFFFFF}Ingresa a continuaciуn tu contraseсa para conectarte al servidor\n\nTienes en total {E80000}3{FFFFFF} intentos de logueo.", NombreIC(playerid)); ShowPlayerDialog(playerid, DLOGIN, DIALOG_STYLE_PASSWORD, "{E80000}› {FFFFFF}Ingresar al servidor", string, "Conectar", ""); return 1; } } Код:
if(!strlen(inputtext)) Код:
if(!strlen(inputtext) >0) |