spezi Posted October 23, 2017 Report Posted October 23, 2017 Hello, i cant get requestPlayersProfile to work. var Steam = require('steam-client'); var SteamID = require("steamid"); var GlobalOffensive = require('globaloffensive'); var SteamUser = require('steam-user'); var crypto = require('crypto'); var account_name = "name"; var password = "password"; var client = new SteamUser(); var csgo = new GlobalOffensive(client); var sentryfile = fs.readFileSync(account_name + '.sentry'); var sha = crypto.createHash('sha1').update(sentryfile).digest(); client.setSentry(sha); client.logOn({ "accountName": account_name, "password": password }); client.on('loggedOn', function(details) { console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID()); client.setPersona(SteamUser.EPersonaState.Offline); client.gamesPlayed(730); }); csgo.on("connectedToGC", function() { console.log("connectedToGC"); //setInterval(function(){ if ( csgo.haveGCSession ) { console.log(csgo.inventory); var account_id = new SteamID("76561198340987241"); csgo.requestPlayersProfile(account_id, function(data) { console.log(data); }); } //}, 3000); }); csgo.on("playersProfile", function(data) { console.log("Profile gotten"); }) I placed some console.log() into your code, to see whats coming back. handlers[Language.PlayersProfile] = function (body) { var proto = Protos.CMsgGCCStrike15_v2_PlayersProfile.decode(body); console.log("here"); console.log(proto); // { requestId: null, accountProfiles: [] } console.log(body); // <Buffer >... } always empty. Can you see what i'm doing wrong? Thanks! Quote
Dr. McKay Posted October 23, 2017 Report Posted October 23, 2017 Are you friends with them? I believe you need to be friends and they might even need to be online. Quote
xLeeJYx Posted October 24, 2017 Report Posted October 24, 2017 Maybe because you are set to offline ? Trying going online instead Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.