06.12.2015, 04:47
pawn Код:
mysql_format(MySQLCon, query, sizeof(query), "SELECT * FROM bans WHERE IP = '%s' AND `Player` = '%e'", playerIP, GetName(playerid));
new Cache:result = mysql_query(MySQLCon, query);
if(cache_num_rows() > 0)
{
SetTimerEx("KickPublic", 50, false, "i", playerid);
return 1;
}
cache_delete(result);
pawn Код:
mysql_format(MySQLCon, query, sizeof(query), "SELECT * FROM bans WHERE IP = '%s' AND `Player` = '%e'", playerIP, GetName(playerid));
mysql_tquery(MySQLCon, query, "OnBanCheck", "i", playerid);
forward OnBanCheck(playerid);
public OnBanCheck(playerid)
{
if(cache_num_rows() > 0)
{
SetTimerEx("KickPublic", 50, false, "i", playerid);
return 1;
}
return 1;
}