Kind of Ban player?
#1

Heey all,

What kind of ban is better to put in my admin console when someone is hacking?
Rangeban?
Is this the right code to range ban someone?
Код:
CMD:rban(playerid, params[])
{
    if(PlayerInfo[playerid][vLevel] == 3 || IsPlayerAdmin(playerid))
    {
    new targetid, reason[64], string[128], ip[20];
    if(sscanf(params, "uz", targetid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "/rban"#COL_GREEN#"[PlayerID/PartOfName] [Reason]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE#"[ERROR]"#COL_LRED#" Player not connected!");
    {
        new pTargetName[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pName,sizeof(pName));
        GetPlayerName(targetid,pTargetName,sizeof(pTargetName));
        format(string, sizeof(string), ""#COL_ORANGE#"[SERVER]"#COL_LRED#" Admin %s has Range banned %s: %s", pName,  pTargetName, reason);
        SendClientMessageToAll(COLOR_RED,string);
        GetPlayerIp(targetid, ip, sizeof(ip));
        strdel(ip, strlen(ip)-2, strlen(ip));
        format(ip, 128,"%s**", ip);
        format(ip, 128,"banip %s", ip);
        SendRconCommand(ip);
    }
    }
    return 1;
}
Thanks Admigo
Reply
#2

A range ban may affect other IPs in the same range, but would be a good option.
Else use a regular IP ban, just not account bans.
Reply
#3

So what ban i better can make for the console if they hack because the hackers will change them ip?
The regular ban or The range ban?
Reply
#4

I suggest that you use the gcpi function to obtain the players game serial and blacklist that, instead of range banning as VPNs will most likely avoid this completely.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)