You are here: Big Brother Bot ForumCommunity DevelopersPlugin DevelopersPlugin showing player id from rcon status [COD4]
Pages: [1]   Go Down
  Print  
Author Topic: Plugin showing player id from rcon status [COD4]  (Read 729 times) Bookmark and Share
Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 17
Offline Offline
« on: September 17, 2011, 03:26:48 AM »

Hi there Wink
I need some code for b3 to show only my player id if I write eg. !status in chat/console.
Thanks in advance.
God will reward You in the future Smiley
Logged

Sr. Member
****
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD2, COD4, COD5WaW, Homefront
Posts: 173
Offline Offline
« Reply #1 on: September 17, 2011, 05:34:26 AM »

have you tried !list already?
Logged
Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 17
Offline Offline
« Reply #2 on: September 17, 2011, 05:41:19 AM »

Yep I tried but I need a code which will show only MY id from rcon status, not all of connected players. Just typing for exaple !status or whatever and it will show me my player id. Smiley
Logged
Sr. Member
****
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 180
Offline Offline
WWW
« Reply #3 on: September 18, 2011, 08:15:00 AM »

Is this what you wanted?
Code:
    def cmd_status(self, data, client, cmd=None):
        """\
        [<player>] - Shows player cid/status id.
        """
        m = self._adminPlugin.parseUserCmd(data)
        if m:
            sclient = self.findClientPrompt(m[0], client)
        else:
            sclient = client

        if sclient:
            if sclient.id == client.id:
                client.message('Your Connection ID is %s' % (client.cid))
            else:
                client.message('%s\'s Connection ID is %s' % (sclient.exactName, sclient.cid))
        else:
            return False
This is untested.
You can type !status name to get some1 elses cid or just !status to get your own
Logged

Support Hero
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: 2x CoD4, 1x BF3
Posts: 2627
Offline Offline
Owner of Host4B3.com - Over 70 bots hosted!
WWW
« Reply #4 on: September 18, 2011, 03:14:12 PM »

um, wouldn't regtest work?
Logged

Need B3 Bot hosting? Check out Host4B3.com
Check Twitter.com/Host4B3 for updates if the site it down.

Help will be given to those with a b3.log

System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3
Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4, CoD7
Posts: 24
Offline Offline
WWW
« Reply #5 on: September 18, 2011, 08:57:46 PM »

um, wouldn't regtest work?

I believe the !find name does what he wants as well.
Logged
Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 20
Offline Offline
« Reply #6 on: September 20, 2011, 03:09:45 AM »

no regtest and find would give him his B3 ID, but he wants his connection slot ID. (propably to use /tell to issue silent commands)
Logged
Sr. Member
****
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD2, COD4, COD5WaW, Homefront
Posts: 173
Offline Offline
« Reply #7 on: September 20, 2011, 05:07:38 AM »

/tell is NOT working in COD4...
its only used by the server itself to pm clients...
Logged
Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4, CoD7
Posts: 24
Offline Offline
WWW
« Reply #8 on: September 21, 2011, 06:22:44 AM »

no regtest and find would give him his B3 ID, but he wants his connection slot ID. (propably to use /tell to issue silent commands)

Are you referring to his @ID or his CID? I just checked and !find gave me my CID.
Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal