Jump to content
  • Global

    Global

    Chatroom Rules

    • NO SE DA SOPORTE EN CHATBOX
    • NO SPAM
    • NO FLOOD

Recommended Posts

  • Usuario
Posted

Veran, estuve creando un sistema de registro e ingreso, ya lo he terminado y no da ningun error en pawn, cuando pongo /registrar me registra todo bien en la carpeta, pero cuando intento iniciar sesion me dice contraseña incorrecta.

 

Alguna idea?

  • Usuario
Posted (edited)


dcmd_ingresar(playerid,params[])

{

if (pInfo[playerid][Logueado] == 1) return SendClientMessage(playerid,COLOR_ROJO,"ERROR: Ya estas logueado!");

if (!udb_Exists(NombreJugador2(playerid))) return SendClientMessage(playerid,COLOR_ROJO,"ERROR: Esta cuenta no existe! Usa /registrar.");

if (strlen(params)==0) return SendClientMessage(playerid,COLOR_ROJO,"USA: /ingresar [contraseña]'");

if (udb_CheckLogin(NombreJugador2(playerid),params))

{

new arvhivoingresar[256], tmp3[100], string[128];

format(arvhivoingresar,sizeof(arvhivoingresar),"/TheSunZone/Usuarios/%s.sav",udb_encode(NombreJugador2(playerid)) );

GetPlayerIp(playerid,tmp3,100);

dini_Set(arvhivoingresar,"ip",tmp3);

CargarJugador(playerid);

PlayerPlaySound(playerid,1057,0.0,0.0,0.0);

if(pInfo[playerid][Nivel] > 0) {

format(string,sizeof(string),"Has ingresado exitosamente. Nivel de Administrador: %d", pInfo[playerid][Nivel] );

return SendClientMessage(playerid,COLOR_VERDE,string);

} else return SendClientMessage(playerid,COLOR_VERDE,"Has ingresado exitosamente");

}

else

{

SendClientMessage(playerid,COLOR_ROJO,"ERROR: Contraseña incorrecta!");

}

return 1;

}

 

Edited by LucasCarvallo
  • Usuario
Posted

a pero usas udb D: no se como se usa ese include, creo q es del ladmin... fijate como esta el cmd de logeo del ladmin y te guias con eso, pero veo todo bien aplicado exepto la funcion checklogin de udb, como no se como funciona el include no te puedo ayudar, pero podrias ingresar y comprobar la cuestion con dini, ese si entiendo, no te puedo ayudar con dini porque no se como tienes guardado el password, osea el nombre de la variable que lo contiene dentro del archivo. si supiera eso sabria darte un ejemplo

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...