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, 05:46 PM #20
pcfreak30
>> PCFreak30.com Happy<<
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.


Thats not even a valid statement. But going by your statement no one would release anything as no one wants their work leeched or stolen.

Now for the facts.

PPL don't even seem to appreciate what they do get. Leechers have the notion that they are supposed to be able to get mods for noting in return and that they don't even need to say thank you. Thats why there no creatibity or inspiration in COd modding. Leechers don't want to wait or learn how to mod something they just want it asap. Modders and "patch makers" are discouraged from making anything good b/c people try to steal their work and/or give no appreciation.

We should be able to release stuff to help each other WITHOUT worrying about all this crap. Its due to how people treat the ones with skill that's causing COD to slowly stop being modding. That and better game security :P.

Think about what I have said. I get so tired of this shit. FYI I am one modder who has stop actively releasing for said reasons. I have learned alot but have no interest in helping those who are not appreciative of my time. Many others feel the same.

Peace..

The following 4 users say thank you to pcfreak30 for this useful post:

JokerRey, UrbanSniper_666,
05-07-2012, 05:56 PM #21
boy do i love banning people Winky Winky
05-07-2012, 06:07 PM #22
ᴠevo
Banned
This remembers me to those minecraft clients, anyways nice work.
05-07-2012, 07:12 PM #23
Well said pc freak :y:
05-07-2012, 09:12 PM #24
Teamrider
Bounty hunter
Originally posted by rot View Post
So how do you add people to it? I thought CFG mods only show like in the kick menus player1, player2 etc?


That isn't CFG, it's GSC thats why they were talking about the bypass community
05-07-2012, 10:24 PM #25
Default Avatar
WOLF
Guest
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;
}
}
}


Hmm This will be helpful. This going to be in your next release I'm guessing? Winky Winky
05-07-2012, 10:34 PM #26
Originally posted by XxWOLFxXLeader View Post
Hmm This will be helpful. This going to be in your next release I'm guessing? Winky Winky


You guessed right. I ran into a bug and I am fixing as we speak :p
05-07-2012, 10:38 PM #27
Default Avatar
WOLF
Guest
Originally posted by SatanicAmerican View Post
You guessed right. I ran into a bug and I am fixing as we speak :p


Bug in your menu or the script?
05-08-2012, 01:12 AM #28
Convex
Ain't No Telling
Nice job Satanic, you really good with coding shit like this! =D

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo