Banning the IP
#1

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.

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)