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

Can we please have an example of using request_full_match_info without using classes? #59

Open
Lok3rn3t opened this issue Jul 21, 2023 · 2 comments

Comments

@Lok3rn3t
Copy link

Can we please have an example of using request_full_match_info without using classes?

@Lok3rn3t Lok3rn3t changed the title help Can we please have an example of using request_full_match_info without using classes? Jul 21, 2023
@Lok3rn3t
Copy link
Author

Lok3rn3t commented Jul 22, 2023

The working version, I figured out how it all works.

from steam.client import SteamClient
from csgo.client import CSGOClient
from csgo.enums import ECsgoGCMsg
from csgo import sharecode

client = SteamClient()
cs = CSGOClient(client)

def getSharecodeInfo(matchcode: str):
    info = sharecode.decode(matchcode)
    return info

@client.on('logged_on')
def start_csgo():
   cs.launch()

@cs.on('ready')
def gc_ready():
   print("[CS-GO] info: %s" % cs.ready)

   
   Sharecode = getSharecodeInfo("SHARE CODE THIS!!!!")
   
   cs.request_full_match_info(matchid=Sharecode['matchid'], outcomeid=Sharecode['outcomeid'], token=Sharecode['token'])
   
   response = cs.wait_event('full_match_info')
   
   print("[CS-GO] response: %s" % response)

client.cli_login(username="LOGIN STEAM ACCOUNT THIS!!!!", password="PASSWORD STEAM ACCOUNT THIS!!!!")
client.run_forever()

@sadsergo
Copy link

Thank you!!!

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