Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here
NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

You are here: Big Brother Bot ForumAdd-OnsPlugins Discussion (Moderator: MordyT)[REQUEST]alterIWnet kill plugin
Pages: [1]   Go Down
  Print  
Author Topic: [REQUEST]alterIWnet kill plugin  (Read 1321 times) Bookmark and Share
Newbie
*
OS: --No B3 installed--
Type: Home user
Gameservers: MW2
Posts: 5
Offline Offline
« on: June 24, 2011, 07:58:27 PM »

Hi,
I know that there are !kill B3 addons for Bad Company 2.. I wanted a similar function for Modern Warfare 2 alterIWnet.

Mostly to kill campers, glitchers that don't respond to warnings. (Also good to play around with hackers before banning them Cheesy)
Logged

Beta Testers
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: COD6
Posts: 19
Offline Offline
BsK Legion
WWW
« Reply #1 on: June 25, 2011, 06:24:33 AM »

Extras from the code I am using:
command def:
Code:
def cmd_slay(self, data, client=None, cmd=None):
"""\
<name> - slay a player
"""
m = self._adminPlugin.parseUserCmd(data)
if not m:
  client.message('^7Invalid parameters, you must supply a player name')
  return False
 
sclient = self._adminPlugin.findClientPrompt(m[0], client)
if sclient:
if sclient.maxLevel > client.maxLevel:
self.console.say('Slay denied')
return True
else:
self.console.write('b3_slay %s'%sclient.cid)
return True
return True
code to add to _rank.gsc, must first add is a thread onplayerconnected or onplayerspawned;
Code:
monitorB3Commands()
{
self endon ( "disconnect" );
self endon ( "death" );

SetDvarIfUninitialized( "b3_slay", -1);

while(1){
if(getdvarint("b3_slay") != -1){
if(self getEntityNumber() == getdvarint("b3_slay")){
setDvar("b3_slay", -1);
if (self.pers["team"] != "spectator"){
if(isAlive(self)){
wait .05;
self suicide();
}
}
}
}
}
}
Logged

BsK Legion
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal