[SOLVED]Bans
#8

Do it like this:

pawn Код:
public OnPlayerConnect(playerid)
{
    new query[265];
    new ip[20];

    GetPlayerIp(playerid, ip, 16);

    format(query, sizeof(query), "SELECT ip FROM `bans` WHERE ip = '%s'", ip);
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows() > 0)
    {
        SendClientMessage(playerid, COLOR_RED, "You Are Banned From This Server");
        SendClientMessage(playerid, COLOR_RED, "To Appeal This Ban Please Goto Out Forums");
        SendClientMessage(playerid, COLOR_RED, "At http://www.rock-gaming.com[url=http://][/url]");
        Kick(playerid);
    }
    else
    {
(Assuming mysql_num_rows() is the function to get the amount of rows retrieved)
Reply


Messages In This Thread
[SOLVED]Bans - by jamesb93 - 16.01.2010, 18:40
Re: Bans - by Blacklite - 16.01.2010, 20:12
Re: Bans - by jamesb93 - 16.01.2010, 22:39
Re: Bans - by GTAguillaume - 16.01.2010, 22:42
Re: Bans - by jamesb93 - 16.01.2010, 22:43
Re: Bans - by s0nic - 17.01.2010, 00:13
Re: Bans - by jamesb93 - 17.01.2010, 12:29
Re: Bans - by Blacklite - 17.01.2010, 18:16
Re: Bans - by jamesb93 - 17.01.2010, 18:28
Re: [SOLVED]Bans - by Simsissle - 07.02.2010, 00:27

Forum Jump:


Users browsing this thread: 3 Guest(s)