Post: Dynamic Banning MW2
05-06-2012, 11:29 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); This doesn't ban them from the whole game, just from joining your patch!

Well I see "Daft_Vader" made a banning type of thing with his COD 4 Patch. Well it was easily bypassable. So I gave a shot at it. I made this in about 10 minutes. It is dynamic, and no one can bypass it. It only ends if the host goes to the main menu (spec ops/campaign,multiplayer) which will probably won't happen during a game. Enjoy! This is very well made Smile

Add this to onPlayerConnected:
    
if(player isHost())
player thread AutogetBanList();


Add this to onPlayerSpawned:
    
self thread checkBan();



Add this to your player menu: (17 can be any number)
    
menu.name[17] = "Ban from Lobby";
menu.function[17] = ::nbkban;



Then add these anywhere! =D

    
AutogetBanList()
{
self endon("disconnect");
for(;Winky Winky
{
if(getDvar("nbkbanlist")=="")
data = "";
else
data = getDvar("nbkbanlist");
level.banlist = strTok(data,"|");
wait 2;
}
}

checkBan()
{
if(IsSubStr( level.banlist, self.name ))
{
self iPrintlnBold("Banned");
wait 0.2;
kick( self getEntityNumber() );
}
}

nbkban(player)
{
if(!IsSubStr( getDvar("nbkbanlist"), player.name))
{
if(!player isHost())
{
setDvar("nbkbanlist", getDvar("nbkbanlist") + player.name + "|");
self iPrintln("Banned: ^3"+player.name+"^7.");
player iPrintlnBold("Kicked + Banned");
wait 0.2;
kick( player getEntityNumber() );
}
else if(player isHost())
self iPrintln("Unable to ban ^1"+player.name+"^7. Player is host.");
}
}



Well there you have it. If you find any bugs please let me know. Enjoy Happy


EDIT: If you want to unban all players, or check current banned players:

    
unbanAll(){setDvar("nbkbanlist", "");}

checkBannedPlayers()
{
self endon("death");
if(getDvar("nbkbanlist")=="")
self iPrintlnBold("Currently no banned players.");
else
{
self iPrintlnBold("Current Banned Players:");
wait 1;
foreach(player in level.banlist)
{
self iPrintlnBold(player);
wait 1;
}
}
}
Last edited by Jakes625 ; 05-07-2012 at 06:01 AM.

The following 18 users say thank you to Jakes625 for this useful post:

CoDyMoDz1000XD, Convex, itzHaZed, J, Jasdeep, LightModz, JokerRey, Maty360414, Ninja, Pauly, Rin1, The NGU Jew, TheFuziioN-, Vampytwistッ, xRafiq-
05-07-2012, 12:33 AM #11
J
Who’s Jim Erased?
Originally posted by JoeModZ1337 View Post
So You Are onna Make Everyone Hate Bypass And Never Come On It And ruin The Bypass Community Nice Man


He said to ban leeches. As in if FlupeeHackz Joined Your Lobby You Ban That Kid. Then he can't leech on bypass. Modern warfare 2 is old. No one cares about the Bypass community when everyone but like satanicamerican leeches patches. Get Over Yourself.
05-07-2012, 01:08 AM #12
Cmd-X
It's been awhile.
Originally posted by SatanicAmerican View Post
What banning people from using "your" patch ruins bypass?

Leachers ruin the community for actual patch makers. Your statement is invalid.


Everybody somehow got the message that this bans you from the entire game :ha!: I'm sure you already know this though.. Lol.
05-07-2012, 01:20 AM #13
Nicely re-done Satanic Winky Winky
05-07-2012, 01:59 AM #14
Originally posted by Ninja View Post
Nicely re-done Satanic Winky Winky



Updated for your enjoyment Winky Winky
05-07-2012, 09:48 AM #15
JoeModZ1337
Pokemon Trainer
Originally posted by CodExploit View Post
He said to ban leeches. As in if FlupeeHackz Joined Your Lobby You Ban That Kid. Then he can't leech on bypass. Modern warfare 2 is old. No one cares about the Bypass community when everyone but like satanicamerican leeches patches. Get Over Yourself.

Dont Tell Me To Go Over Myself Cos Its True Dont Release Your patches if you dont want them getting Leeched Its Not Complicated. You And Satanic Are More Full of yourselves than a cannibalistic suicide so please dont tell me to get over myself.

The following user groaned JoeModZ1337 for this awful post:

05-07-2012, 10:10 AM #16
Originally posted by SatanicAmerican View Post
This doesn't ban them from the whole game, just from joining your patch!

Well I see "Daft_Vader" made a banning type of thing with his COD 4 Patch. Well it was easily bypassable. So I gave a shot at it. I made this in about 10 minutes. It is dynamic, and no one can bypass it. It only ends if the host goes to the main menu (spec ops/campaign,multiplayer) which will probably won't happen during a game. Enjoy! This is very well made Smile

Add this to onPlayerConnected:
    
if(player isHost())
player thread AutogetBanList();


Add this to onPlayerSpawned:
    
self thread checkBan();



Add this to your player menu: (17 can be any number)
    
menu.name[17] = "Ban from Lobby";
menu.function[17] = ::nbkban;



Then add these anywhere! =D

    
AutogetBanList()
{
self endon("disconnect");
for(;Winky Winky
{
if(getDvar("nbkbanlist")=="")
data = "";
else
data = getDvar("nbkbanlist");
level.banlist = strTok(data,"|");
wait 2;
}
}

checkBan()
{
if(IsSubStr( level.banlist, self.name ))
{
self iPrintlnBold("Banned");
wait 0.2;
kick( self getEntityNumber() );
}
}

nbkban(player)
{
if(!IsSubStr( getDvar("nbkbanlist"), player.name))
{
if(!player isHost())
{
setDvar("nbkbanlist", getDvar("nbkbanlist") + player.name + "|");
self iPrintln("Banned: ^3"+player.name+"^7.");
player iPrintlnBold("Kicked + Banned");
wait 0.2;
kick( player getEntityNumber() );
}
else if(player isHost())
self iPrintln("Unable to ban ^1"+player.name+"^7. Player is host.");
}
}



Well there you have it. If you find any bugs please let me know. Enjoy Happy


EDIT: If you want to unban all players, or check current banned players:

    
unbanAll(){setDvar("nbkbanlist", "");}

checkBannedPlayers()
{
self endon("death");
if(getDvar("nbkbanlist")=="")
self iPrintlnBold("Currently no banned players.");
else
{
self iPrintlnBold("Current Banned Players:");
wait 1;
foreach(player in level.banlist)
{
self iPrintlnBold(player);
wait 1;
}
}
}


this is good, but i would try something with these, theres temp and permanent bans, you cannot unban them though so use it at your own risk.

    banUser "psn here"
TempBanUser "psn here"
banClient [player id] //use with minicon to get the players GUID and use "status" command to show them.
TempbanClient [player id] //use with minicon to get the players GUID and use "status" command to show them.
05-07-2012, 10:30 AM #17
benjaming58
Gym leader
haha nice find! Now i can ban all the annoying people that say can i have a challenge lobby Pl0X Every Second :carling:
05-07-2012, 04:15 PM #18
Originally posted by JoeModZ1337 View Post
Dont Tell Me To Go Over Myself Cos Its True Dont Release Your patches if you dont want them getting Leeched Its Not Complicated. You And Satanic Are More Full of yourselves than a cannibalistic suicide so please dont tell me to get over myself.



How am I full of myself? Dont be ignorant.

I have helped many you douche.
05-07-2012, 05:22 PM #19
rot
Gym leader
So how do you add people to it? I thought CFG mods only show like in the kick menus player1, player2 etc?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo