When I login it says Wrong Password.. WTH is the problem? Help..
#1

When I login it says Wrong Password.. WTH is the problem? Help..


pawn Код:
dcmd_gir(playerid, params[])
{
    new pass[128]; new oyunism[128], Isim[MAX_PLAYER_NAME], control[265];
    GetPlayerName(playerid, Isim, MAX_PLAYER_NAME);
    format(oyunism, sizeof(oyunism), "/RAdmin/Hesaplar/%s.ini",Isim);
    if(Girilmis[playerid] == 1)
    {
      SendClientMessage(playerid, COLOR_RED, "Zaten giris yapilmis");
    }
    if(sscanf(params, "s", pass)) SendClientMessage(playerid, COLOR_YELLOW, "[Kullanim] /gir <sifre>");
    else
    {
        if(dini_Exists(oyunism))
        {
        control = dini_Get(oyunism, "Sifre");
        if(control[playerid] != pass[playerid])
        {
            SendClientMessage(playerid, COLOR_RED, "Wrong Password!"); // And I gave a good password :S And it says Wrong pass.
        }
        else
        {
            Girilmis[playerid] = 1;
            Para[playerid] = dini_Int(oyunism, "Para");
            Score[playerid] = dini_Int(oyunism, "Score");
            Adminlik[playerid] = dini_Int(oyunism, "Adminlik");
      SendClientMessage(playerid, COLOR_LIGHTGREEN, "Basari ile giris yaptiniz!");
    }
    }
        else
        {
        SendClientMessage(playerid, COLOR_RED, "Bu hesap daha kayitli degil! /kayit <sifre> yazarak bir hesap olusturunz.");
        }
}
return 1;
}
My Login system..
Reply
#2

Use strcmp for comparing strings.
And use control[MAX_PLAYERS][256] so you can then compare like control[playerid]
Reply
#3

Quote:
Originally Posted by dice7
Use strcmp for comparing strings.
And use control[MAX_PLAYERS][256] so you can then compare like control[playerid]
Is this right?

if(control[playerid] != pass[playerid])
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)