SA-MP Forums Archive
What's wrong with this code? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What's wrong with this code? (/showthread.php?tid=91870)



What's wrong with this code? - RyDeR` - 17.08.2009

I'd never worked with dini before..
The problem is: When I'm gona login it sais Your password is wrong but i typed my password right.

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(params[playerid] != strval(control))
        {
            SendClientMessage(playerid, COLOR_RED, "Password is wrong!");
        }
        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;
}
Please help..