Necesito ayuda con un login en MySQL
#1

Bueno la cosa es asн; he estado intentando solucionar un error que tengo ocn un cуdigo escrito en mysql. En mysql_log.txt no dice NADA no tira ningъn warning ni nada. El tema es que el jugador tendrнa que spawnear en las coordenadas donde se desconectу y recibir las variables jConexion y jRegistrado en 1 y 0 pero las recibe en 0 y 48. Aquн los cуdigos:
pawn Код:
case THREAD_CHECK_ACCOUNT:
        {
            if(Filas == 1)
            {
                new contenido[8];
                cache_get_field_content(0, "SQLID", JugadorInfo[extraid][jSQLID]);
                cache_get_field_content(0, "Clave", JugadorInfo[extraid][jClave]);
                cache_get_field_content(0, "Email", JugadorInfo[extraid][jEmail]);
                cache_get_field_content(0, "Registrado", JugadorInfo[extraid][jRegistrado]);
Despuйs en OnPlayerSpawn
pawn Код:
if(JugadorInfo[playerid][jConexion] == 1 && JugadorInfo[playerid][jRegistrado] == 0)
    {
        LimpiarChat(playerid, 50);
        format(string, sizeof(string), GM_NAME" » "E_COLOR_BLANCO"Bienvenido a Los Angeles, %s. Su ъltima visita fue el dd-mm-aa a las hh:ss", NombreIC(nombre));
        Mensaje(playerid, AZULSITO, string);
        SetPlayerPos(playerid, JugadorInfo[playerid][jCoordX], JugadorInfo[playerid][jCoordY], JugadorInfo[playerid][jCoordZ]);
        SetPlayerColor(playerid, COLOR_BLANCO);
        SetPlayerVirtualWorld(playerid, JugadorInfo[playerid][jVirtualWorld]);
        SetPlayerInterior(playerid, JugadorInfo[playerid][jInterior]);
        FijarVida(playerid, JugadorInfo[playerid][jVida]);
        FijarChaleco(playerid, JugadorInfo[playerid][jChaleco]);
        SetPlayerSkin(playerid, JugadorInfo[playerid][jSkin]);
        GivePlayerMoney(playerid, JugadorInfo[playerid][jDinero]);
    }
Osea ese cуdigo no me lo reconoce, de hecho no me reconoce ninguno. Osea deja pasar OnPlayerSpawn como si nada :S їquй debo hacer? їquй tengo mal?
Reply
#2

Que tienes en OnPlayerDisconnect?
Reply
#3

tengo una banda de lнneas pero para resumir es asн
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
 GuardarCuenta(playerid);
 return 1;
}
stock GuardarCuenta(playerid)
{
    Mensaje(playerid, ROJO, "Su cuenta estб siendo guardada.");
   
    format(Query, sizeof(Query), "UPDATE `cuentas` SET `ip` = '%s', `email` = '%s', `Registrado` = '%d', `Nivel` = '%d', `Sexo` = '%d', `GrupoSanguineo` = '%d', `Edad` = '%d', `Pais` = '%d', `DiaNacimiento` = '%d', `MesNacimiento` = '%d', `AnoNacimiento` = '%d' WHERE `username` = '%s'",
    JugadorInfo[playerid][jIP], JugadorInfo[playerid][jEmail], JugadorInfo[playerid][jRegistrado], JugadorInfo[playerid][jNivel],
    JugadorInfo[playerid][jSexo], JugadorInfo[playerid][jGrupoSanguineo], JugadorInfo[playerid][jEdad],
    JugadorInfo[playerid][jPais], JugadorInfo[playerid][jDiaNacimiento], JugadorInfo[playerid][jMesNacimiento], JugadorInfo[playerid][jAnoNacimiento],NombreOOC(playerid));
    mysql_function_query(MainPipeline, Query, true, "OnQueryFinish", "ii", THREAD_NO_RESULT, playerid);
   
    format(Query, sizeof(Query), "UPDATE `cuentas` SET `Altura` = '%d', `Peso` = '%d', `Raza` = '%d', `ColorOjos` = '%d', `ColorCabello` = '%d', `EstadoCivil` = '%d', `Experiencia` = '%d', `HorasJugadas` = '%d', `Interior` = '%d', `VirtualWorld` = '%d', `Skin` = '%d', `PuntosRol` = '%d', `Donador` = '%d', `TiempoDonador` = '%d', `Administrador` = '%d' WHERE `username` = '%s'",
    JugadorInfo[playerid][jAltura], JugadorInfo[playerid][jPeso], JugadorInfo[playerid][jRaza], JugadorInfo[playerid][jColorOjos], JugadorInfo[playerid][jColorCabello],
    JugadorInfo[playerid][jEstadoCivil], JugadorInfo[playerid][jExperiencia], JugadorInfo[playerid][jHorasJugadas], JugadorInfo[playerid][jInterior],
    JugadorInfo[playerid][jVirtualWorld], JugadorInfo[playerid][jSkin], JugadorInfo[playerid][jPuntosRol], JugadorInfo[playerid][jDonador], JugadorInfo[playerid][jTiempoDonador], JugadorInfo[playerid][jAdministrador],NombreOOC(playerid));
    mysql_function_query(MainPipeline, Query, true, "OnQueryFinish", "ii", THREAD_NO_RESULT, playerid);
   
    format(Query, sizeof(Query), "UPDATE `cuentas` SET `Lider` = '%d', `Miembro` = '%d', `DivisionLAPD` = '%d', `DivisionLAED` = '%d', `Frecuencia` = '%d', `Trabajo` = '%d', `Trabajo2` = '%d', `Contrato` = '%d', `Dinero` = '%d', `CuentaBancaria` = '%d', `EstiloCaminar` = '%d', `EstiloPelea` = '%d'  WHERE `username` = '%s'",
    JugadorInfo[playerid][jLider], JugadorInfo[playerid][jMiembro], JugadorInfo[playerid][jDivisionLAPD], JugadorInfo[playerid][jDivisionLAED], JugadorInfo[playerid][jFrecuencia], JugadorInfo[playerid][jTrabajo], JugadorInfo[playerid][jTrabajo2],
    JugadorInfo[playerid][jContrato], JugadorInfo[playerid][jDinero], JugadorInfo[playerid][jCuentaBancaria], JugadorInfo[playerid][jEstiloCaminar], JugadorInfo[playerid][jEstiloPelea],NombreOOC(playerid));
    mysql_function_query(MainPipeline, Query, true, "OnQueryFinish", "ii", THREAD_NO_RESULT, playerid);
    GetPlayerPos(playerid,JugadorInfo[playerid][jCoordX],JugadorInfo[playerid][jCoordY], JugadorInfo[playerid][jCoordZ]);
    GetPlayerHealth(playerid,JugadorInfo[playerid][jVida]); GetPlayerArmour(playerid,JugadorInfo[playerid][jChaleco]);
    format(Query, sizeof(Query), "UPDATE `cuentas` SET `Fuerza` = '%d', `HabilidadBoxeo` = '%d', `HabilidadKneehead` = '%d', `HabilidadKungFu` = '%d', `HabilidadEscNormal` = '%d', `HabilidadEscCombate` = '%d', `HabilidadMP5` = '%d', `HabilidadAK47` = '%d', `HabilidadM4` = '%d', `HabilidadSniper` = '%d', `Muertes` = '%d', `Asesinatos` = '%d', `Arrestos` = '%d', `NivelBusqueda` = '%d', `Vida` = '%f', `Chaleco` = '%f', `CoordX` = '%f', `CoordY` = '%f', `CoordZ` = '%f' WHERE `username` = '%s'",
    JugadorInfo[playerid][jFuerza], JugadorInfo[playerid][jHabilidadBoxeo], JugadorInfo[playerid][jHabilidadKneehead], JugadorInfo[playerid][jHabilidadKungFu], JugadorInfo[playerid][jHabilidadEscNormal],
    JugadorInfo[playerid][jHabilidadEscCombate], JugadorInfo[playerid][jHabilidadMP5], JugadorInfo[playerid][jHabilidadAK47], JugadorInfo[playerid][jHabilidadM4], JugadorInfo[playerid][jHabilidadSniper], JugadorInfo[playerid][jMuertes], JugadorInfo[playerid][jAsesinatos],
    JugadorInfo[playerid][jArrestos], JugadorInfo[playerid][jNivelBusqueda], JugadorInfo[playerid][jVida], JugadorInfo[playerid][jChaleco], JugadorInfo[playerid][jCoordX],
    JugadorInfo[playerid][jCoordY], JugadorInfo[playerid][jCoordZ],NombreOOC(playerid));
    mysql_function_query(MainPipeline, Query, true, "OnQueryFinish", "ii", THREAD_NO_RESULT, playerid);
   
    Mensaje(playerid, ROJO, "El proceso de guardado de su cuenta ha sido exitoso.");
    JugadorInfo[playerid][jConexion] = 1;
    return 1;
}
Reply
#4

Tambiйn tenemos;

pawn Код:
forward OnQueryFinish(resultid, extraid, ConnectionHandle);
public OnQueryFinish(resultid, extraid, ConnectionHandle)
{
    new Filas, Campos, string[256];
    if(resultid != THREAD_NO_RESULT)
    {
        cache_get_data(Filas, Campos);
    }
    switch(resultid)
    {
        case THREAD_CHECK_ACCOUNT:
        {
            if(Filas == 1)
            {
                new contenido[8];
                cache_get_field_content(0, "SQLID", JugadorInfo[extraid][jSQLID]);
                cache_get_field_content(0, "Clave", JugadorInfo[extraid][jClave]);
                cache_get_field_content(0, "Email", JugadorInfo[extraid][jEmail]);
                cache_get_field_content(0, "Registrado", JugadorInfo[extraid][jRegistrado]);
                cache_get_field_content(0, "Nivel", JugadorInfo[extraid][jNivel]);
                cache_get_field_content(0, "Sexo", JugadorInfo[extraid][jSexo]);
                cache_get_field_content(0, "GrupoSanguineo", JugadorInfo[extraid][jGrupoSanguineo]);
                cache_get_field_content(0, "Edad", JugadorInfo[extraid][jEdad]);
                cache_get_field_content(0, "Pais", JugadorInfo[extraid][jPais]);
                cache_get_field_content(0, "DiaNacimiento", JugadorInfo[extraid][jDiaNacimiento]);
                cache_get_field_content(0, "MesNacimiento", JugadorInfo[extraid][jMesNacimiento]);
                cache_get_field_content(0, "AnoNacimiento", JugadorInfo[extraid][jAnoNacimiento]);
                cache_get_field_content(0, "Altura", JugadorInfo[extraid][jAltura]);
                cache_get_field_content(0, "Peso", JugadorInfo[extraid][jPeso]);
                cache_get_field_content(0, "Raza", JugadorInfo[extraid][jRaza]);
                cache_get_field_content(0, "ColorOjos", JugadorInfo[extraid][jColorOjos]);
                cache_get_field_content(0, "ColorCabello", JugadorInfo[extraid][jColorCabello]);
                cache_get_field_content(0, "EstadoCivil", JugadorInfo[extraid][jEstadoCivil]);
                cache_get_field_content(0, "HorasJugadas", JugadorInfo[extraid][jHorasJugadas]);
                cache_get_field_content(0, "Interior", JugadorInfo[extraid][jInterior]);
                cache_get_field_content(0, "VirtualWorld", JugadorInfo[extraid][jVirtualWorld]);
                cache_get_field_content(0, "Skin", JugadorInfo[extraid][jSkin]);
                cache_get_field_content(0, "PuntosRol", JugadorInfo[extraid][jPuntosRol]);
                cache_get_field_content(0, "Donador", JugadorInfo[extraid][jDonador]);
                cache_get_field_content(0, "TiempoDonador", JugadorInfo[extraid][jTiempoDonador]);
                cache_get_field_content(0, "Administrador", JugadorInfo[extraid][jAdministrador]);
                cache_get_field_content(0, "Lider", JugadorInfo[extraid][jLider]);
                cache_get_field_content(0, "Miembro", JugadorInfo[extraid][jMiembro]);
                cache_get_field_content(0, "Rango", JugadorInfo[extraid][jRango]);
                cache_get_field_content(0, "DivisionLAPD", JugadorInfo[extraid][jDivisionLAPD]);
                cache_get_field_content(0, "DivisionLAED", JugadorInfo[extraid][jDivisionLAED]);
                cache_get_field_content(0, "Frecuencia", JugadorInfo[extraid][jFrecuencia]);
                cache_get_field_content(0, "Trabajo", JugadorInfo[extraid][jTrabajo]);
                cache_get_field_content(0, "Trabajo2", JugadorInfo[extraid][jTrabajo2]);
                cache_get_field_content(0, "Contrato", JugadorInfo[extraid][jContrato]);
                cache_get_field_content(0, "Dinero", JugadorInfo[extraid][jDinero]);
                cache_get_field_content(0, "CuentaBancaria", JugadorInfo[extraid][jCuentaBancaria]);
                cache_get_field_content(0, "Alcoholemia", JugadorInfo[extraid][jAlcoholemia]);
                cache_get_field_content(0, "Drogadiccion", JugadorInfo[extraid][jDrogadiccion]);
                cache_get_field_content(0, "EstiloCaminar", JugadorInfo[extraid][jEstiloCaminar]);
                cache_get_field_content(0, "EstiloPelea", JugadorInfo[extraid][jEstiloPelea]);
                cache_get_field_content(0, "Fuerza", JugadorInfo[extraid][jFuerza]);
                cache_get_field_content(0, "HabilidadBoxeo", JugadorInfo[extraid][jHabilidadBoxeo]);
                cache_get_field_content(0, "HabilidadKneehead", JugadorInfo[extraid][jHabilidadKneehead]);
                cache_get_field_content(0, "HabilidadKungFu", JugadorInfo[extraid][jHabilidadKungFu]);
                cache_get_field_content(0, "HabilidadEscNormal", JugadorInfo[extraid][jHabilidadEscNormal]);
                cache_get_field_content(0, "HabilidadEscCombate", JugadorInfo[extraid][jHabilidadEscCombate]);
                cache_get_field_content(0, "HabilidadMP5", JugadorInfo[extraid][jHabilidadMP5]);
                cache_get_field_content(0, "HabilidadAK47", JugadorInfo[extraid][jHabilidadAK47]);
                cache_get_field_content(0, "HabilidadM4", JugadorInfo[extraid][jHabilidadM4]);
                cache_get_field_content(0, "HabilidadSniper", JugadorInfo[extraid][jHabilidadSniper]);
                cache_get_field_content(0, "Muertes", JugadorInfo[extraid][jMuertes]);
                cache_get_field_content(0, "Asesinatos", JugadorInfo[extraid][jAsesinatos]);
                cache_get_field_content(0, "Arrestos", JugadorInfo[extraid][jArrestos]);
                cache_get_field_content(0, "NivelBusqueda", JugadorInfo[extraid][jNivelBusqueda]);
                cache_get_field_content(0, "Vida", contenido); JugadorInfo[extraid][jVida] = floatstr(contenido);
                cache_get_field_content(0, "Chaleco", contenido); JugadorInfo[extraid][jChaleco] = floatstr(contenido);
                cache_get_field_content(0, "CoordX", contenido); JugadorInfo[extraid][jCoordX] = floatstr(contenido);
                cache_get_field_content(0, "CoordY", contenido); JugadorInfo[extraid][jCoordY] = floatstr(contenido);
                cache_get_field_content(0, "CoordZ", contenido); JugadorInfo[extraid][jCoordZ] = floatstr(contenido);
                cache_get_field_content(0, "Experiencia", JugadorInfo[extraid][jExperiencia]);
            }
            else if(!Filas)
            {
                //
            }
        }
        case THREAD_CHECK_PASS:
        {
            if(Filas == 1)
            {
                cache_get_field_content(0, "Clave", JugadorInfo[extraid][jClave]);
                format(string, sizeof(string), "El personaje %s se encuentra registrado en nuestra base de datos.\n\nColoca la contraseсa en el siguiente campo si deseas iniciar sesiуn:", NombreOOC(extraid));
                ShowPlayerDialog(extraid, LOGIN, DIALOG_STYLE_PASSWORD,GM_NAME" - Iniciar sesiуn",string,"Enviar","Salir");
            }
            else if(!Filas)
            {
                GetPlayerIp(extraid, JugadorInfo[extraid][jIP], 16);
                format(string, sizeof(string), "El personaje %s no se encuentra registrado en nuestra base de datos.\n\nColoca una contraseсa si deseas registrarte con este nombre:", NombreOOC(extraid));
                ShowPlayerDialog(extraid, REGISTRO, DIALOG_STYLE_PASSWORD,GM_NAME" - Registrar personaje",string,"Enviar","Salir");
            }
        }
    }
    return 1;
}
En OnGameModeInit iniciamos el stock.
pawn Код:
stock IniciarConexionMySQL()
{

    printf("Iniciando conexiуn: (Servidor: '%s', Usuario: '%s', Clave: '%s', Base de Datos: '%s')", MySQL_Servidor, MySQL_Usuario, MySQL_Clave, MySQL_BD);
    MainPipeline = mysql_connect(MySQL_Servidor, MySQL_Usuario, MySQL_BD,MySQL_Clave);
    printf(" ");
    if(mysql_ping() == 1)
    {
        printf("Conexiуn a la base de datos terminada.");
    }
    else
    {
        print("Conexiуn a la base de datos no realizada.");
        mysql_close();
        SendRconCommand("exit");
    }
    printf(" ");
    printf(" ");
    printf(" ");
    printf(" ");
    printf(" ");
    printf(" ");
    return 1;
}
Es un GM de 0 que venimos haciendo de hace dos semanas los dos.
Reply
#5

їTe guarda bien los datos en GuardarCuentas? їPodrнas colocar el cуdigo donde asigna jConexion y jRegistrado? En este caso, їse asignan bien? Yo siempre probaba a crear un comando de prueba, para comprobar donde estaba el error. Quizб es que no os guarde bien, esto lo sabrйis si con un comando externo no os lo guarda (o si no os guarda demбs conexiones), si sн os guarda de esta manera, entonces comprobad que se asigne bien en ambos casos y se guarde al instante hacia la base de datos. Si de esta manera no se guarda, ya es que habrб algъn fallo en la carga de OnPlayerSpawn.

Suerte.
Reply
#6

Lo que no entiendo es por quй al loguear se asignan valores nunca asignados por mн a las variables... En ninguna parte del GM ni algo externo a йste por ejemplo, le asigno valores a jConexion distintos a 0 y 1, y siempre controlo el por defecto, pero mi problema es que hice un cmd de pruebas y me dice que el valor de jLider y todas las variables del enum, es por ejemplo, 49, 50, etc, siendo que NUNCA se asignan a ese valor tales.
Reply
#7

Posiblemente sea por la mal asignaciуn de un cargado de datos, una string fallida, un float fallido en un nъmero que no es; un comando de mysql sobre guardado/escrito de datos mal ejecutado.

Intenta sacar algo en claro de йsto.

https://sampforum.blast.hk/showthread.php?tid=337810
Reply
#8

cache_get_field_content devuelve los datos en su tercer parбmetro como string, despues de haberlo obtenido se debe convertir a integer con strval, o a float segъn el tipo.
Reply
#9

La variable "contenido" esta de bonito?
La funciуn "cache_get_field_content" obtiene valores en cadena de carбcteres ("strings") y lo que tu quieres obtener es un nъmero por lo que deberнas obtener el valor con la variable de bonito y luego usar "strval" para entregarle el numйrico a "JugadorInfo[extraid][jRegistrado]".


pawn Код:
case THREAD_CHECK_ACCOUNT:
        {
            if(Filas == 1)
            {
                new contenido[8];
                cache_get_field_content(0, "SQLID", JugadorInfo[extraid][jSQLID]);
                cache_get_field_content(0, "Clave", JugadorInfo[extraid][jClave]);
                cache_get_field_content(0, "Email", JugadorInfo[extraid][jEmail]);
                cache_get_field_content(0, "Registrado", JugadorInfo[extraid][jRegistrado]);
Reply
#10

Quote:
Originally Posted by DesingMyCry
Посмотреть сообщение
La variable "contenido" esta de bonito?
La funciуn "cache_get_field_content" obtiene valores en cadena de carбcteres ("strings") y lo que tu quieres obtener es un nъmero por lo que deberнas obtener el valor con la variable de bonito y luego usar "strval" para entregarle el numйrico a "JugadorInfo[extraid][jRegistrado]".


pawn Код:
case THREAD_CHECK_ACCOUNT:
        {
            if(Filas == 1)
            {
                new contenido[8];
                cache_get_field_content(0, "SQLID", JugadorInfo[extraid][jSQLID]);
                cache_get_field_content(0, "Clave", JugadorInfo[extraid][jClave]);
                cache_get_field_content(0, "Email", JugadorInfo[extraid][jEmail]);
                cache_get_field_content(0, "Registrado", JugadorInfo[extraid][jRegistrado]);
Contenido la uso para floatstr, para los floats.

pawn Код:
forward OnQueryFinish(resultid, extraid, ConnectionHandle);
public OnQueryFinish(resultid, extraid, ConnectionHandle)
{
    new Filas, Campos, string[256];
    if(resultid != THREAD_NO_RESULT)
    {
        cache_get_data(Filas, Campos);
    }
    switch(resultid)
    {
        case THREAD_CHECK_ACCOUNT:
        {
            if(Filas == 1)
            {
                new contenido[8];
                cache_get_field_content(0, "SQLID", JugadorInfo[extraid][jSQLID]);
                cache_get_field_content(0, "Clave", JugadorInfo[extraid][jClave]);
                cache_get_field_content(0, "Email", JugadorInfo[extraid][jEmail]);
                cache_get_field_content(0, "Registrado", JugadorInfo[extraid][jRegistrado]);
                cache_get_field_content(0, "Nivel", JugadorInfo[extraid][jNivel]);
                cache_get_field_content(0, "Sexo", JugadorInfo[extraid][jSexo]);
                cache_get_field_content(0, "GrupoSanguineo", JugadorInfo[extraid][jGrupoSanguineo]);
                cache_get_field_content(0, "Edad", JugadorInfo[extraid][jEdad]);
                cache_get_field_content(0, "Pais", JugadorInfo[extraid][jPais]);
                cache_get_field_content(0, "DiaNacimiento", JugadorInfo[extraid][jDiaNacimiento]);
                cache_get_field_content(0, "MesNacimiento", JugadorInfo[extraid][jMesNacimiento]);
                cache_get_field_content(0, "AnoNacimiento", JugadorInfo[extraid][jAnoNacimiento]);
                cache_get_field_content(0, "Altura", JugadorInfo[extraid][jAltura]);
                cache_get_field_content(0, "Peso", JugadorInfo[extraid][jPeso]);
                cache_get_field_content(0, "Raza", JugadorInfo[extraid][jRaza]);
                cache_get_field_content(0, "ColorOjos", JugadorInfo[extraid][jColorOjos]);
                cache_get_field_content(0, "ColorCabello", JugadorInfo[extraid][jColorCabello]);
                cache_get_field_content(0, "EstadoCivil", JugadorInfo[extraid][jEstadoCivil]);
                cache_get_field_content(0, "HorasJugadas", JugadorInfo[extraid][jHorasJugadas]);
                cache_get_field_content(0, "Interior", JugadorInfo[extraid][jInterior]);
                cache_get_field_content(0, "VirtualWorld", JugadorInfo[extraid][jVirtualWorld]);
                cache_get_field_content(0, "Skin", JugadorInfo[extraid][jSkin]);
                cache_get_field_content(0, "PuntosRol", JugadorInfo[extraid][jPuntosRol]);
                cache_get_field_content(0, "Donador", JugadorInfo[extraid][jDonador]);
                cache_get_field_content(0, "TiempoDonador", JugadorInfo[extraid][jTiempoDonador]);
                cache_get_field_content(0, "Administrador", JugadorInfo[extraid][jAdministrador]);
                cache_get_field_content(0, "Lider", JugadorInfo[extraid][jLider]);
                cache_get_field_content(0, "Miembro", JugadorInfo[extraid][jMiembro]);
                cache_get_field_content(0, "Rango", JugadorInfo[extraid][jRango]);
                cache_get_field_content(0, "DivisionLAPD", JugadorInfo[extraid][jDivisionLAPD]);
                cache_get_field_content(0, "DivisionLAED", JugadorInfo[extraid][jDivisionLAED]);
                cache_get_field_content(0, "Frecuencia", JugadorInfo[extraid][jFrecuencia]);
                cache_get_field_content(0, "Trabajo", JugadorInfo[extraid][jTrabajo]);
                cache_get_field_content(0, "Trabajo2", JugadorInfo[extraid][jTrabajo2]);
                cache_get_field_content(0, "Contrato", JugadorInfo[extraid][jContrato]);
                cache_get_field_content(0, "Dinero", JugadorInfo[extraid][jDinero]);
                cache_get_field_content(0, "CuentaBancaria", JugadorInfo[extraid][jCuentaBancaria]);
                cache_get_field_content(0, "Alcoholemia", JugadorInfo[extraid][jAlcoholemia]);
                cache_get_field_content(0, "Drogadiccion", JugadorInfo[extraid][jDrogadiccion]);
                cache_get_field_content(0, "EstiloCaminar", JugadorInfo[extraid][jEstiloCaminar]);
                cache_get_field_content(0, "EstiloPelea", JugadorInfo[extraid][jEstiloPelea]);
                cache_get_field_content(0, "Fuerza", JugadorInfo[extraid][jFuerza]);
                cache_get_field_content(0, "HabilidadBoxeo", JugadorInfo[extraid][jHabilidadBoxeo]);
                cache_get_field_content(0, "HabilidadKneehead", JugadorInfo[extraid][jHabilidadKneehead]);
                cache_get_field_content(0, "HabilidadKungFu", JugadorInfo[extraid][jHabilidadKungFu]);
                cache_get_field_content(0, "HabilidadDesert", JugadorInfo[extraid][jHabilidadDesert]);
                cache_get_field_content(0, "HabilidadEscNormal", JugadorInfo[extraid][jHabilidadEscNormal]);
                cache_get_field_content(0, "HabilidadEscCombate", JugadorInfo[extraid][jHabilidadEscCombate]);
                cache_get_field_content(0, "HabilidadMP5", JugadorInfo[extraid][jHabilidadMP5]);
                cache_get_field_content(0, "HabilidadAK47", JugadorInfo[extraid][jHabilidadAK47]);
                cache_get_field_content(0, "HabilidadM4", JugadorInfo[extraid][jHabilidadM4]);
                cache_get_field_content(0, "HabilidadSniper", JugadorInfo[extraid][jHabilidadSniper]);
                cache_get_field_content(0, "Muertes", JugadorInfo[extraid][jMuertes]);
                cache_get_field_content(0, "Asesinatos", JugadorInfo[extraid][jAsesinatos]);
                cache_get_field_content(0, "Arrestos", JugadorInfo[extraid][jArrestos]);
                cache_get_field_content(0, "NivelBusqueda", JugadorInfo[extraid][jNivelBusqueda]);
                cache_get_field_content(0, "Vida", contenido); JugadorInfo[extraid][jVida] = floatstr(contenido);
                cache_get_field_content(0, "Chaleco", contenido); JugadorInfo[extraid][jChaleco] = floatstr(contenido);
                cache_get_field_content(0, "CoordX", contenido); JugadorInfo[extraid][jCoordX] = floatstr(contenido);
                cache_get_field_content(0, "CoordY", contenido); JugadorInfo[extraid][jCoordY] = floatstr(contenido);
                cache_get_field_content(0, "CoordZ", contenido); JugadorInfo[extraid][jCoordZ] = floatstr(contenido);
                cache_get_field_content(0, "Experiencia", JugadorInfo[extraid][jExperiencia]);
            }
            else if(!Filas)
            {
                //
            }
        }
        case THREAD_CHECK_PASS:
        {
            if(Filas == 1)
            {
                cache_get_field_content(0, "Clave", JugadorInfo[extraid][jClave]);
                format(string, sizeof(string), "El personaje %s se encuentra registrado en nuestra base de datos.\n\nColoca la contraseсa en el siguiente campo si deseas iniciar sesiуn:", NombreOOC(extraid));
                ShowPlayerDialog(extraid, LOGIN, DIALOG_STYLE_PASSWORD,GM_NAME" - Iniciar sesiуn",string,"Enviar","Salir");
            }
            else if(!Filas)
            {
                GetPlayerIp(extraid, JugadorInfo[extraid][jIP], 16);
                format(string, sizeof(string), "El personaje %s no se encuentra registrado en nuestra base de datos.\n\nColoca una contraseсa si deseas registrarte con este nombre:", NombreOOC(extraid));
                ShowPlayerDialog(extraid, REGISTRO, DIALOG_STYLE_PASSWORD,GM_NAME" - Registrar personaje",string,"Enviar","Salir");
            }
        }
    }
    return 1;
}
En fin, harй eso.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)