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-31-2012, 01:47 PM #38
Davey
PC Master Race
goin to put this in my m8s patch xD Nice :y:
06-03-2012, 01:53 AM #39
RiGz
シェンムーHDはしてください?
Originally posted by ace
why would you make that dickhead


lmao calm down son

---------- Post added at 08:53 PM ---------- Previous post was at 08:52 PM ----------

Originally posted by FleX View Post
Is it possible on 1.13 ??


Yea its possible on 1.13 once you go to the main menu it will unban everyone from your lobby tho
06-03-2012, 04:28 AM #40
Originally posted by SatanicAmerican View Post
You guessed right. I ran into a bug and I am fixing as we speak

does putting my name on a patch but still leaving the credits part and other info about the patch maker make me a leecher ?

---------- Post added at 09:28 PM ---------- Previous post was at 09:26 PM ----------

sorry for quoting that wrong im still new to this -.-
06-03-2012, 04:38 AM #41
Originally posted by skroadee View Post
does putting my name on a patch but still leaving the credits part and other info about the patch maker make me a leecher ?

---------- Post added at 09:28 PM ---------- Previous post was at 09:26 PM ----------

sorry for quoting that wrong im still new to this -.-


sure go ahead.
06-03-2012, 04:40 AM #42
Originally posted by SatanicAmerican View Post
sure go ahead.
wait does it make me a leecher or not
06-06-2012, 03:41 AM #43
nice hacks dude!
06-06-2012, 04:01 AM #44
iiReFuZee
MW3 + BO1 Recoveries
Originally posted by Sgt.Razor View Post
nice hacks dude!


Nice post boosting dude!

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo