Jump to content
McKay Development

Tom

Member
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Tom

  1. Got it running if anyone else needs it 

    user.on('friendMessage', (steamID, message) => {
        if (message == 'stats') {
            if (csgo.haveGCSession) {
                const steamid = new SteamID(steamID.toString());
                const final = steamid.accountid.toString();
                csgo.requestPlayersProfile(steamid, function(data) {
                    // console.log(data);
                    user.chatMessage(steamID, 'Wins in Matchmaking: ' + data.ranking.wins + '\n' + 'Wins in Wingman: ' + data.rankings[0].wins + '\n' + 'Wins in Dangerzone: ' + data.rankings[1].wins);
                });
            }else {
                user.chatMessage(steamID, 'Nö');
            }
        }
    });

     

  2. Hey, 

    im pretty new to JS and i don't know on how to get the accountData from a specific user.  i know that this works, but it just gets me the accountData of my logged in account.

     

    csgo.on('accountData', (accountData) => {
        console.log(accountData);
        console.log(accountData.player_level);
    });

    How would i make a function to call the accountData of a specific player? Like if someone writes the bot stats it gets the accountData from the player that requested it.

     

     

×
×
  • Create New...