if(Rows == 1) { new content[20]; cache_get_field_content(0, "Password", content); PlayerInfo[extraid][pPassword] = strval(content); format(string, 186, ""#CBLANCO"Bienvenido(a) "#CVERDE"%s.\n\n"#CBLANCO"Tu cuenta estб registrada en nuestra base de datos, Ingrese su contraseсa:", NombreJugador(extraid)); ShowPlayerDialog(extraid, DIALOG_INGRESO, DIALOG_STYLE_PASSWORD, ""#CAZUL"Login", string, "Ingresar","Cancelar"); PlayAudioStreamForPlayer(extraid, "https://dl.dropboxusercontent.com/s/ogdhx4lf6f1b9j7/IntroSpanishRol.mp3"), LimpiarConsola(extraid, 30); }
case DIALOG_INGRESO: { if(!response) { LimpiarConsola(playerid, 30); SendClientMessage(playerid, COLOR_ROJO, "* Fuiste expulsado del servidor por cancelar el dialogo de login."); Expulsar(playerid); return 1; } if(strcmp(PlayerInfo[playerid][pPassword], inputtext, true, 128) == 0) { new Query[80]; format(Query, sizeof(Query), "SELECT * FROM `ev_cuentas` WHERE `Nombre` = '%s'", NombreJugador(playerid)); mysql_function_query(TuberiaMYSQL, Query, true, "OnQueryFinish_", "ii", 1, playerid); TogglePlayerSpectating(playerid, 0), PlayerInfo[playerid][pConectado] = 1; StopAudioStreamForPlayer(playerid); TextDrawHideForPlayer(playerid, LoginServidor[0]); TextDrawHideForPlayer(playerid, LoginServidor[1]); TextDrawHideForPlayer(playerid, LoginServidor[2]); TextDrawHideForPlayer(playerid, LoginServidor[3]); } else { new string[186]; format(string, 186, ""#CBLANCO"Bienvenido(a) "#CVERDE"%s.\n\n"#CBLANCO"Tu cuenta estб registrada en nuestra base de datos, Ingrese su contraseсa:", NombreJugador(playerid)); ShowPlayerDialog(playerid, DIALOG_INGRESO, DIALOG_STYLE_PASSWORD, ""#CAZUL"Login", string, "Ingresar","Cancelar"); Kick(playerid); } }
new string[64]; format(string, sizeof(string), "%s", inputtext); if(strcmp(PlayerInfo[playerid][pPassword], string, true) == 0)
Код:
new string[64]; format(string, sizeof(string), "%s", inputtext); if(strcmp(PlayerInfo[playerid][pPassword], string, true) == 0) |
if(Rows) { cache_get_field_content(0, "Password", PlayerInfo[extraid][pPassword]); format(string, 186, ""#CBLANCO"Bienvenido(a) "#CVERDE"%s.\n\n"#CBLANCO"Tu cuenta estб registrada en nuestra base de datos, Ingrese su contraseсa:", NombreJugador(extraid)); ShowPlayerDialog(extraid, DIALOG_INGRESO, DIALOG_STYLE_PASSWORD, ""#CAZUL"Login", string, "Ingresar","Cancelar"); PlayAudioStreamForPlayer(extraid, "https://dl.dropboxusercontent.com/s/ogdhx4lf6f1b9j7/IntroSpanishRol.mp3"), LimpiarConsola(extraid, 30); }
es lo mismo...
// Que es una cadena Код:
if(Rows) { cache_get_field_content(0, "Password", PlayerInfo[extraid][pPassword]); format(string, 186, ""#CBLANCO"Bienvenido(a) "#CVERDE"%s.\n\n"#CBLANCO"Tu cuenta estб registrada en nuestra base de datos, Ingrese su contraseсa:", NombreJugador(extraid)); ShowPlayerDialog(extraid, DIALOG_INGRESO, DIALOG_STYLE_PASSWORD, ""#CAZUL"Login", string, "Ingresar","Cancelar"); PlayAudioStreamForPlayer(extraid, "https://dl.dropboxusercontent.com/s/ogdhx4lf6f1b9j7/IntroSpanishRol.mp3"), LimpiarConsola(extraid, 30); } |
if(Rows)
{
cache_get_field_content(0, "Password", PlayerInfo[extraid][pPassword]);
format(string, 186, ""#CBLANCO"Bienvenido(a) "#CVERDE"%s.\n\n"#CBLANCO"Tu cuenta estб registrada en nuestra base de datos, Ingrese su contraseсa:", NombreJugador(extraid));
ShowPlayerDialog(extraid, DIALOG_INGRESO, DIALOG_STYLE_PASSWORD, ""#CAZUL"Login", string, "Ingresar","Cancelar");
PlayAudioStreamForPlayer(extraid, "https://dl.dropboxusercontent.com/s/ogdhx4lf6f1b9j7/IntroSpanishRol.mp3"), LimpiarConsola(extraid, 30);
}
if ( strcmp(PlayerInfo[playerid][pPassword], inputtext, false) == 0 && strlen(inputtext) == strlen(PlayerInfo[playerid][pPassword]))