Jump to content
Korean Random
Sign in to follow this  
Budyx69

help my read ClanTag in lobby

Recommended Posts

Hi together,

 

i Need in Lobby the Player Clantag. How to read this?

 

Budyx69

Edited by Budyx69

Share this post


Link to post

Short link
Share on other sites
import BigWorld

def callback(*args):
print args

BigWorld.player().requestPlayerClanInfo(BigWorld.player().databaseID, callback)
Edited by ShadowHunterRUS
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

and another Question:

what is the best hooking for this?

 

EventDispatcher.loadHangar ?

Share this post


Link to post

Short link
Share on other sites
from Account import Account
Account.onBecomePlayer

This is not work, but i have This:

 

from gui.prb_control.events_dispatcher import EventDispatcher

    old_loadHangar = EventDispatcher.loadHangar

    def hook_clantag(self):
        old_loadHangar(self)
        BigWorld.player().requestPlayerClanInfo(BigWorld.player().databaseID, callback)
        return

    EventDispatcher.loadHangar = hook_clantag

    def callback(*args):
        global Usernickname
        nickname = BigWorld.player().name
        if args[3] is not None:
            clantag = args[3][1]
        Usernickname = '&nickname=[' + clantag + '] ' + nickname
        print 'Usernickname   ', Usernickname

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...