csgo icon indicating copy to clipboard operation
csgo copied to clipboard

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

Open Lok3rn3t opened this issue 2 years ago • 2 comments

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

Lok3rn3t avatar Jul 21 '23 09:07 Lok3rn3t

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()

Lok3rn3t avatar Jul 22 '23 10:07 Lok3rn3t

Thank you!!!

sadsergo avatar Jul 29 '23 21:07 sadsergo