"Ban" CallBack.
#1

Sometimes not good information extracted from the table "bans". If I did not ban, kick me and tells me that I have.
And when do I have to relog, to work.

OnPlayerConnect:
Код HTML:
 mysql_format(MySQLCon, query, sizeof(query), "SELECT * FROM bans WHERE IP = '%s' OR `Player` = '%e'", playerIP, GetName(playerid));
    mysql_pquery(MySQLCon, query, "OnBanCheck", "d", playerid);
Код HTML:
forward OnBanCheck(playerid);
public OnBanCheck(playerid)
{
    new rows = cache_num_rows(), query[500];
    if(rows)
    {
        SetTimerEx("KickPublic", 50, false, "i", playerid);
        return 1;
    }
    else
    {
        mysql_format(MySQLCon, query, sizeof(query), "SELECT * FROM `players` WHERE `user` = '%e' LIMIT 1", GetName(playerid));
        mysql_pquery(MySQLCon, query, "OnAccountCheck", "d", playerid);
    }
    return 1;
}
Reply


Messages In This Thread
"Ban" CallBack. - by norton2 - 22.12.2015, 08:47
Re: "Ban" CallBack. - by norton2 - 22.12.2015, 12:45

Forum Jump:


Users browsing this thread: 1 Guest(s)