MySQL R34 - Banning Player
#1

Alright so banning the player works fine, though this doesn't:

pawn Код:
stock CheckBan(playerid)
    {
        new dquery[256];
        format(dquery, sizeof(dquery), "SELECT FROM `bans` WHERE `IP` = '%s'", getIP(playerid));
        mysql_tquery(SQL, dquery, "", "");
        mysql_store_result();
       
        if(mysql_num_rows() > 0)
        {
            new reason[128], admin[25], pIp[25];
            cache_get_field_content(0, "Reason", reason);
            cache_get_field_content(0, "BannedBy", admin);
            cache_get_field_content(0, "IP", pIp);
            new string[1024];
           
            format(string, sizeof(string), "You have been blocked from playing here at Rural Roleplay.\n\nInformation of this ban:\n\n\nBanning Administrator: %s\nReason For Ban: %s\n\nYour Name: %s\nYour IP: %s - This IP is blocked", admin, reason, RemoveUnderScore(playerid), getIP(playerid));
            ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Information", string, "Exit", "");
           
            printf("%s", string);
            Kick(playerid);
        }
        else return 1;
        return 1;
       
    }
Reply


Messages In This Thread
MySQL R34 - Banning Player - by sammp - 18.01.2014, 19:45
Re: MySQL R34 - Banning Player - by Gh0s7 - 18.01.2014, 19:47
Re: MySQL R34 - Banning Player - by sammp - 18.01.2014, 20:02
Re: MySQL R34 - Banning Player - by Vince - 18.01.2014, 20:12
Re: MySQL R34 - Banning Player - by sammp - 18.01.2014, 20:15
Re: MySQL R34 - Banning Player - by InglewoodRoleplay - 18.01.2014, 20:25
Re: MySQL R34 - Banning Player - by sammp - 18.01.2014, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)