Hello,i need help
#1

Hello i need help ,i am using zcmd (Command:Test)
i need help in how to ban ISP and how to get it
Like /banip and /getip ,i want to make it /banisp and /getisp
Please help me
Reply
#2

Command: GetIP
pawn Код:
CMD:getip(playerid, params[])
{
    new targetid;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /ip [playerid]");
    if(targetid == INVALID_PLAYER_ID) return SendErrorMessage(playerid, "Invalid Player ID);
    new ip[16];
    GetPlayerIp(targetid, ip, sizeof(ip));
    new string[128];
    format(string, sizeof(string), "
%s{AFAFAF}'s IP: {FFFF00}%s {AFAFAF}.", GetColorNameID(playerid), ip);
    SendClientMessage(playerid, 0xAFAFAFFF, string);
    return 1;
}
Command: BanIP
pawn Код:
CMD:banip(playerid,params[])
{
    new string[128], ip[15];
    if(sscanf(params,"s",ip)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /banip [IP]");
    format(string, sizeof(string), "banip %s", ip);
    SendRconCommand(string);
    format(string, sizeof(string), "%s has successfully IP Banned %s", GetName(playerid), ip);
    SaveIn("BanIpLog",string);
    format(string, sizeof(string), "%s {AFAFAF}has successfully IP Banned {00FF00}%s {AFAFAF}.", GetColorNameID(playerid), ip);
    MessageToAdmins(0xAFAFAFFF, string);
    format(string, sizeof(string), "reloadbans");
    SendRconCommand(string);
    return 1;
}
+Rep if i helped you
Reply
#3

thanks alot for reply but i am asking how to ban ISP not IP ,i mean how to ban Internal IP address and how to get it
Reply
#4

I THINK you can't
Reply
#5

It's working on alot of servers ,how I can't do it ? ,please help
Reply
#6

Hello there.
If you are looking to ban ISP ( Which means Internet Service Provider ) It will make a whole country or an area banned, No IPs will be accepted and they will be all rejected.
You can login into the rcon and ban the IP
Quote:

IP Begins.*.*.*

<< This will make the whole country banned.
Reply
#7

Thanks for replys but I want to ban someone PC ,I want to ban the internal IP address which begin with 192.168.x.x
And want to know how to know it ,I want to make that for evaders to ban their PC
Reply
#8

I'm not sure it's possible.
Reply
#9

You can range ban a player. There are several filterscripts released. Here is one of them:

https://sampforum.blast.hk/showthread.php?tid=446692
Reply
#10

Okay bro ,thanks for reply ,I saw it and it works good but how to get the player internal IP to ban it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)