27.01.2012, 15:35
(
Последний раз редактировалось Ricop522; 20.02.2012 в 00:23.
)
Fxxxxxxxxed
//This is on playerconnect
new query[200], ip[16];
GetPlayerName(playerid, pname, sizeof pname);
GetPlayerIp(playerid, ip, 16);
format(query, sizeof(query), "SELECT * FROM `Banned` WHERE `User` LIKE '%s' OR `IP` LIKE '%s' LIMIT 1", pname, ip);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() >= 1)
{
format(query, sizeof(query), "UPDATE `Banned` SET IP='%s' WHERE `User` LIKE '%s'", ip, pname);
mysql_query(query);
SendClientMessage(playerid, COLOR_SILVER, "You are banned from this server");
TogglePlayerControllable(playerid, 0);
Kick(playerid);
}
mysql_free_result();