12.11.2012, 16:22
I have IP's stored in the MySQL colum (IP) and I want to know how to ban the IP and how to unban the IP ingame..
Thanks.
Thanks.
pawn Код:
CMD:oban(playerid, params[])
{
new name, query[64], string[64];
if(sscanf(params,"s",name)) return SendClientMessage(playerid, COLOR_RED, "|- Error: /o(ffline)ban [name] -|");
format(query, sizeof(query), "UPDATE players SET ban = '1' WHERE Username = '%s'", name);
mysql_query(query, THREAD_NO_RESULT, name, iConnectionHandle);
format(string, sizeof(string), "You have banned %s", name);
SendClientMessage(playerid, COLOR_RED, string);
return 1;
}