31.03.2013, 07:32
(
Last edited by emokidx; 02/04/2013 at 12:08 PM.
)
Fixed.
https://sampforum.blast.hk/showthread.php?tid=419858
I am guessing something is wrong with this, because when I tried to print the password, it printed nothing.
https://sampforum.blast.hk/showthread.php?tid=419858
pawn Code:
public CheckAccount(playerid)
{
if(IsPlayerConnected(playerid))
{
new rows, fields;
cache_get_data(rows, fields, conhandle);
if(rows)
{
new temp[33];
cache_get_row(0, 0, temp, conhandle), PlayerInfo[playerid][SQLid] = strval(temp);
cache_get_row(0, 1, PlayerInfo[playerid][Pass], conhandle);
cache_get_row(0, 2, temp, conhandle), PlayerInfo[playerid][Banned] = strval(temp);
cache_get_row(0, 3, temp, conhandle), PlayerInfo[playerid][BanTime] = strval(temp);
if(PlayerInfo[playerid][Banned] == 1)
{
format(str, sizeof(str), "The account \"%s\" is banned for %i days. If this is your account please post an unban appeal in the forums", GetPnameid(playerid), PlayerInfo[playerid][BanTime]);
KickWithMessage(playerid, str);
return 1;
}
ShowPlayerDialog(playerid, loginid, DIALOG_STYLE_INPUT, "Login","Your username is registered! Please login with your password below!","Login","Quit");
}
else return ShowPlayerDialog(playerid, registerid, DIALOG_STYLE_INPUT, "Register","Your username is not registered! Please register with a password below!","Register","Quit");
}
return 1;
}