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

It doesn't work! #52

Open
Yakuho opened this issue Mar 2, 2022 · 3 comments
Open

It doesn't work! #52

Yakuho opened this issue Mar 2, 2022 · 3 comments

Comments

@Yakuho
Copy link

Yakuho commented Mar 2, 2022

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

@D1abll0
Copy link

D1abll0 commented May 26, 2022

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

@Yakuho
Copy link
Author

Yakuho commented May 28, 2022

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

@oussamadz
Copy link

make sure the account you're using have csgo in it's library.

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

3 participants