1.0.10 • Published 5 years ago
csgo-current-steamid v1.0.10
csgo-current-steamid
A NodeJS native addon to retrieve the SteamID64 of the current logged Steam Account that owns CSGO.
Usage
const csgoCurrentSteamId = require("csgo-current-steamid");
try {
const steamId = csgoCurrentSteamId();
console.log(steamId);
} catch (error) {
// An error may occurs if Steam is not running or the current Steam account doesn't own CSGO.
}
Build
- Download the Steamworks SDK
- Extract it into the project's root folder and rename it to
steamworks_sdk
. yarn
(it will build the binary usingnode-gyp
).
Notes
It works only if you have CSGO in your Steam Library, otherwise it will throw an error.
If you want to use it with an other game, fork the project and change the appId in the file steam_appid.txt
with the one of your choice.