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-06-2012, 11:32 PM #2
J
Who’s Jim Erased?
This makes me cry. But now I'm going to go ban everyone on bypass :evil:
05-06-2012, 11:37 PM #3
Jango
I love my kitteh
Originally posted by SatanicAmerican View Post
It only ends if you go to the main menu (host) which will probz never happen! Enjoy!


What does that mean exactly? As in you go to the main menu and then it will end.
05-06-2012, 11:38 PM #4
Originally posted by Jango View Post
What does that mean exactly? As in you go to the main menu and then it will end.


It means if you are in a game, back out, and go to the main menu (spec ops, campaign, multiplayer) it will be reset.
05-06-2012, 11:40 PM #5
Jango
I love my kitteh
Originally posted by SatanicAmerican View Post
It means if you are in a game, back out, and go to the main menu (spec ops, campaign, multiplayer) it will be reset.


Alright. Sounds good.
05-06-2012, 11:49 PM #6
Originally posted by Ace
Why would you make that dickhead


To stop leachers from joining your lobby..

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

aerosoul94, bob7up, GodDrinksPepsi, I am Mara, jack4au, Cmd-X, The NGU Jew, WiiHOMEBREW
05-06-2012, 11:57 PM #7
Cmd-X
It's been awhile.
Originally posted by SatanicAmerican View Post
To stop leachers from joining your lobby..


Lmao! You're hilarious! That dude called you a dickhead and you're just all chill and shit.. Lmao I love you Drack
05-07-2012, 12:19 AM #8
Pauly
Banned
brb banning everyone

The following 3 users say thank you to Pauly for this useful post:

bob7up, JokerRey, Vampytwistッ
05-07-2012, 12:21 AM #9
JoeModZ1337
Pokemon Trainer
So You Are onna Make Everyone Hate Bypass And Never Come On It And ruin The Bypass Community Nice Man

The following 5 users groaned at JoeModZ1337 for this awful post:

Bruno, Convex, GreenTea101,
05-07-2012, 12:31 AM #10
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


What banning people from using "your" patch ruins bypass?

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

The following user thanked Jakes625 for this useful post:

bob7up

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo