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 DiscussionPlugins by Courgettespawn kill detector plugin for CoD?
Pages: [1]   Go Down
  Print  
Author Topic: spawn kill detector plugin for CoD?  (Read 908 times) Bookmark and Share
Beta Testers
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: MW2 (aIW)
Posts: 187
Offline Offline
WWW
« on: July 16, 2011, 10:16:11 PM »

Hi Courgette

I´ve seen this interesting topic "spawn kill detector help" from Virtus

http://forum.bigbrotherbot.net/the-code-bin/spawn-kill-detector-help/


 and your name included in this code ( took this from the topic)

Code:
__version__ = '1.0'
    __author__  = [color=red]'Courgette'[/color]
     
    import b3
    import b3.events
    import b3.plugin
import time
     
     
    class Tutorial1Plugin(b3.plugin.Plugin):

spawntime = {}
     
        def onStartup(self):
            # get the admin plugin so we can register commands
            self._adminPlugin = self.console.getPlugin('admin')
     
            if not self._adminPlugin:
                # something is wrong, can't start without admin plugin
                self.error('Could not find admin plugin')
                return
     
        def onStartup(self):
        if self.console.gameName not in SUPPORTED_PARSERS:
            self.error("This game is not supported by this plugin")
            self.disable()
            return

        self.registerEvent(EVT_CLIENT_AUTH)

        self._workerThread = threading.Thread(target=self._worker)
        self._workerThread.setDaemon(True)
        self._workerThread.start()

        self._checkConnectedPlayers()

def onEvent(self,event, client)
if event.type == b3.events.EVT_CLIENT_SPAWN:
spawntime[client.guid] = int(time.time())
self.console.write('bigtext "test %s"' % (spawntime[client.guid]))
if event.type == b3.events.EVT_CLIENT_DISCONNECT:
del spawntime[client.guide]
if event.type == event.type == b3.events.EVT_CLIENT_KILL:
if int(time.time()) <= (spawntime[event.target] + 5):
self.console.write('bigtext "DO NOT SPAWN KILL"')


I was wondering if a plugin like this could be working for CoD, or if you have already developed it.

Thank you very much.

Greetings
Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3484
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #1 on: July 17, 2011, 01:57:02 AM »

I'm not the one beind this code. I guess my name appears here only because of a copy-paste from the plugin tutorial

Sent from my HTC Legend using Tapatalk
« Last Edit: July 17, 2011, 11:15:06 PM by Courgette » Logged

Jr. Member
**
OS: Windows
Type: Gameserver Rental Co.
Gameservers: Homefront
Posts: 13
Offline Offline
« Reply #2 on: July 17, 2011, 02:47:00 PM »

yeah, copy pasted from tut and forgot to not include that.
Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal