Login problem
#10

Like this?
pawn Код:
dcmd_login(playerid, params[])
{
    format(file,sizeof(file),PlayerFile,pName(playerid));
    if(!dini_Exists(file))
        return SendClientMessage(playerid, Red, "ERROR: Please register before you try to login.");
    else if(pInfo[playerid][Logged] == 1)
        return SendClientMessage(playerid, Red, "ERROR: You are already logged-in.");
    else if(!params[0])
        return SendClientMessage(playerid, Red, "USAGE: /login [password]");
    else
    {
        new password = num_hash(params);
        if(dini_Int(file, "Password") == password)
        {
            pInfo[playerid][Logged] = 1;
            return SendClientMessage(playerid, lBlue, "You have successfully logged in to your account.");
        }
        else
        return SendClientMessage(playerid, Red, "ERROR: Incorrect password.");
    }
}
Because that didn't work either o.O
Reply


Messages In This Thread
Login problem[SOLVED] - by [XST]O_x - 12.07.2010, 10:50
Re: Login problem - by cessil - 12.07.2010, 10:54
Re: Login problem - by [XST]O_x - 12.07.2010, 11:00
Re: Login problem - by oliverrud - 12.07.2010, 11:04
Re: Login problem - by [XST]O_x - 12.07.2010, 11:19
Re: Login problem - by novox - 12.07.2010, 11:29
Re: Login problem - by MadeMan - 12.07.2010, 12:24
Re: Login problem - by [XST]O_x - 12.07.2010, 12:25
Re: Login problem - by MadeMan - 12.07.2010, 12:33
Re: Login problem - by [XST]O_x - 12.07.2010, 12:47

Forum Jump:


Users browsing this thread: 2 Guest(s)