Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the approach to make class inherited csgo client #58

Open
oussamadz opened this issue Jul 12, 2023 · 1 comment
Open

what is the approach to make class inherited csgo client #58

oussamadz opened this issue Jul 12, 2023 · 1 comment

Comments

@oussamadz
Copy link

oussamadz commented Jul 12, 2023

i would like to launch multiple csgo clients in multi threaded env.
and i'm thinking of making it class based, i tried the following code but got no luck:

class ClientHandle():           
    client = SteamClient()  
    cs = CSGOClient(client)

    def __init__(self, username, password, inspectLink, clientName):
        self.username = username
        self.password = password
        self.clientName = clientName
        self.client.login(self.username, self.password)
        self.inspectLink = inspectLink
                                          
    @cs.on("logged_in")              
    def loggedIN(self):
        print(f"{self.clientName} Logged in.")
                                          
    @cs.on("ready")                                                                  
    def ready(self):                                                                 
        print(f"{self.clientName} Ready.")                          
@valeXeich
Copy link

@oussamadz did you solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants