SA-MP Forums Archive
Kind of Ban player? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Kind of Ban player? (/showthread.php?tid=370235)



Kind of Ban player? - Admigo - 19.08.2012

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


Re: Kind of Ban player? - Zebb - 19.08.2012

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.


Re: Kind of Ban player? - Admigo - 19.08.2012

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?


Re: Kind of Ban player? - ELiiTEJaMzZ - 19.08.2012

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.