csgo icon indicating copy to clipboard operation
csgo copied to clipboard

It doesn't work!

Open Yakuho opened this issue 2 years ago • 3 comments

from steam.client import SteamClient
from csgo.client import CSGOClient

client = SteamClient()
cs = CSGOClient(client)
client.cli_login(username="***", password="***")

print("[Steam] Logged on as: %s" % client.user.name)
print("[Steam] Community profile: %s" % client.steam_id.community_url)
print("[Steam] Last logon: %s" % client.user.last_logon)
print("[Steam] Last logoff: %s" % client.user.last_logoff)
print("[Steam] Number of friends: %d" % len(client.friends))
cs.launch()

print("[CS-GO] info: %s" % cs.ready)
inspect_params = {'param_a': 15145586192, 'param_d': 16595344889481721483, 'param_s': 76561198282463169}
cs.send(ECsgoGCMsg.EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockRequest, inspect_params)
response = cs.wait_event(ECsgoGCMsg.EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockResponse, timeout=10)
print("[CS-GO] response: %s" % response)

client.logout()

terminal print:

[Steam] Logged on as: ******
[Steam] Community profile: https://steamcommunity.com/profiles/***********
[Steam] Last logon: 2022-03-02 08:33:48
[Steam] Last logoff: 2022-03-02 08:31:52
[Steam] Number of friends: 0
[CS-GO] info: False
[CS-GO] response: None

I meet some trouble that I get nothing from client callbcak before timeout when I send message to CSGO client. I need help! guys

Yakuho avatar Mar 02 '22 09:03 Yakuho

try this code

from steam.client import SteamClient
from csgo.client import CSGOClient
from csgo.enums import ECsgoGCMsg
client = SteamClient()
cs = CSGOClient(client)

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

@cs.on('ready')
def gc_ready():
   print("[CS-GO] info: %s" % cs.ready)
   inspect_params = {'param_a': 15145586192, 'param_d': 16595344889481721483, 'param_s': 76561198282463169}
   cs.send(ECsgoGCMsg.EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockRequest, inspect_params)
   response = cs.wait_event(ECsgoGCMsg.EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockResponse, timeout=10)
   print("[CS-GO] response: %s" % response)

client.cli_login(username="", password="")
client.run_forever()

D1abll0 avatar May 26 '22 13:05 D1abll0

try this code

from steam.client import SteamClient
from csgo.client import CSGOClient
from csgo.enums import ECsgoGCMsg
client = SteamClient()
cs = CSGOClient(client)

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

@cs.on('ready')
def gc_ready():
   print("[CS-GO] info: %s" % cs.ready)
   inspect_params = {'param_a': 15145586192, 'param_d': 16595344889481721483, 'param_s': 76561198282463169}
   cs.send(ECsgoGCMsg.EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockRequest, inspect_params)
   response = cs.wait_event(ECsgoGCMsg.EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockResponse, timeout=10)
   print("[CS-GO] response: %s" % response)

client.cli_login(username="", password="")
client.run_forever()

Thanks, but It doesn't work again :(

Yakuho avatar May 28 '22 17:05 Yakuho