"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
#2

Bump.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)