#define MySQL_Servidor "localhost" #define MySQL_Usuario "root" #define MySQL_BD "testrol" #define MySQL_Clave ""
Iniciando conexiуn MySQL: (Servidor: 'localhost', Usuario: 'root', Clave: '', Base de Datos: 'testrol') Conexiуn a la base de datos realizada con exito. Conexiуn a la base de datos realizada con exito.

#define MySQL_Servidor "108.61.134.226" #define MySQL_Usuario "13360_server" #define MySQL_BD "13360_server" #define MySQL_Clave "SECRETACONTRASEСA"

|
No es la configuraciуn, pasa los cуdigos que inician la conexiуn con la base de datos y el inicio de sesiуn del servidor (login).
|
case 2:
{
if(Rows == 1)
{
new pName[50]; GetPlayerName(extraid, pName, 50);
format(string, sizeof(string), "{FFFFFF}Ingrese su contraseсa para ingresar al servidor\n\n{FFFFFF}Pagina: {2961B2}www.sa-mp.com\n{FFFFFF}Foro: {2961B2}www.sa-mp.com\n\n{FFFFFF}Mбs informaciуn del servidor en la pagina/foro", pName);
ShowPlayerDialog(extraid, LOGIN, DIALOG_STYLE_PASSWORD,"{2961B2}»{FFFFFF} Ingreso sesiуn",string,"Enviar","Salir");
}
case 5:
{
if(Rows == 1)
{
new stringo[128],pName[32],query[200];
GetPlayerName(extraid, pName, 32);
format(stringo, 128, "%s{FFFFFF} fuй expulsado de la banda por %s",PlayerInfo[extraid][pExpulsando], pName);
SendRadioMessage(PlayerInfo[extraid][jMiembro], COLOR_AMARILLO, stringo,INVALID_PLAYER_ID);
SCM(extraid, COLOR_AMARILLO, stringo);
BandasInfo[PlayerInfo[extraid][jMiembro]-1][BIntegrantes]--;
format(query, 200, "UPDATE `facciones` SET `Integrantes`='%d' WHERE `id`='%d'",BandasInfo[PlayerInfo[extraid][jMiembro]-1][BIntegrantes],PlayerInfo[extraid][jMiembro]);
mysql_function_query(Conecction, query, true, "OnQueryFinish", "ii", 0, extraid);
format(query, 200, "UPDATE `usuarios` SET `Faccion`='0',`Rango`='0',`Duty`='0' WHERE `Username`='%s'",PlayerInfo[extraid][pExpulsando]);
mysql_function_query(Conecction, query, true, "OnQueryFinish", "ii", 0, extraid);
}
else if(!Rows)
{
SCM(extraid, -1, "Este jugador es invalido o no esta en tu banda");
}
}
case 6:
{
if(Rows == 1)
{
//SetTimer("cing",30000,true);
Veryfied = 1;
}
else if(!Rows)
{
VOT
}
}
}
return 1;
}
|
Lo que pasaste es como una bicicleta sin ruedas, nos diste la bicicleta pero no las ruedas..
Pasa el cуdigo que inicia la conexiуn a la base de datos, osea el que conecta a la base de datos. No hay otra manera de explicarlo, si no sabes que es, recomendarнa que aprendas un poquito mбs sobre MySQL. Saludos! |
printf("Iniciando conexiуn MySQL: (Servidor: '%s', Usuario: '%s', Clave: '%s', Base de Datos: '%s')", MySQL_Servidor, MySQL_Usuario, MySQL_Clave, MySQL_BD);
Conecction = mysql_connect(MySQL_Servidor, MySQL_Usuario, MySQL_BD,MySQL_Clave);
if(mysql_ping() == 1) //Comprobamos si se conectу
{
print("Conexiуn a la base de datos realizada con exito.");
print("Conexiуn a la base de datos realizada con exito.");
}
|
El cуdigo estб bien.
Estбs completamente seguro de que pusiste todos los datos de conexiуn a la base de datos MySQL correctamente? Usas XAMP o un hosting? Si es un hosting asegъrate de tener habilitada la conexiуn root. |
|
Activa el debug del MySQL para ver si tira algъn error.
Si no sabes como: Pone mysql_debug(1); dentro de OnGameModeInit() Y luego publica el mysql_log.txt |
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3z-R2, ©2005-2014 SA-MP Team [19:27:59] filterscripts = "" (string) [19:27:59] [19:27:59] Server Plugins [19:27:59] -------------- [19:27:59] Loading plugin: streamer.dll [19:27:59] *** Streamer Plugin v2.7 by Incognito loaded *** [19:27:59] Loaded. [19:27:59] Loading plugin: sscanf.dll [19:27:59] [19:27:59] =============================== [19:27:59] sscanf plugin loaded. [19:27:59] Version: 2.8.1 [19:27:59] © 2012 Alex "******" Cole [19:27:59] =============================== [19:27:59] Loaded. [19:27:59] Loading plugin: mysql.dll [19:27:59] plugin.mysql: R15 successfully loaded. [19:27:59] Loaded. [19:27:59] Loaded 3 plugins. [19:27:59] [19:27:59] Filterscripts [19:27:59] --------------- [19:27:59] Loaded 0 filterscripts. [19:27:59] OnScriptInit 1 [19:27:59] [19:27:59] [19:27:59] [19:27:59] ======================================= [19:27:59] | | [19:27:59] | YSI version 1.06.0002 | [19:27:59] | By Alex "******" Cole | [19:27:59] | | [19:27:59] ======================================= [19:27:59] [19:27:59] [19:27:59] [19:27:59] OnScriptInit 2 [19:27:59] OnScriptInit 3 [19:27:59] Iter_OnGameModeInit start: 500 [19:27:59] OnGameo [19:27:59] proximo PD en 33 minutos [19:27:59] Iniciando conexiуn MySQL: (Servidor: 'localhost', Usuario: 'root', Clave: '', Base de Datos: 'testrol') [19:27:59] Conexiуn a la base de datos realizada con exito. [19:27:59] Conexiуn a la base de datos realizada con exito. [19:27:59] Iter_OnGameModeInit: first [19:27:59] OnScriptInit 4