IP address ban
#7

Take a look at this script: https://sampforum.blast.hk/showthread.php?tid=186695
pawn Code:
public rplayer_OnConnect(playerid)
{
    new string[128], fstring[288], IP[16];
    GetPlayerIp(playerid, IP, 16);
    GetPlayerName(playerid, kPlayerName[playerid], MAX_PLAYER_NAME);
    format(fstring, sizeof(fstring), "Bans/%s.ban", IP);
    if(dini_Exists(fstring)){
        format(string, sizeof(string), "YOU ARE BANNED! Reason: %s", dini_Get(fstring, "BanReason"));
        SendClientMessage(playerid, COLOR_RED, string);
        Kick(playerid);
        return 1;
    }
    return 1;
}
So instead of "You have been banned from this server" you'll see "YOU ARE BANNED! Reason: {reason}"
I wouldn't use the include itself if I was you, because my server crashed once (only once) with it. Just take a look at the script and try to put it in your gamemode or filterscript.
Reply


Messages In This Thread
IP address ban - by Pooh7 - 27.05.2011, 19:17
Re: IP address ban - by Raimis_R - 27.05.2011, 19:23
Re: IP address ban - by rati555 - 27.05.2011, 19:24
Re: IP address ban - by Pooh7 - 27.05.2011, 20:27
Re: IP address ban - by ironmenpr17 - 27.05.2011, 22:04
Re: IP address ban - by Biesmen - 27.05.2011, 22:20
Re: IP address ban - by Kwarde - 27.05.2011, 23:33

Forum Jump:


Users browsing this thread: 1 Guest(s)