AlliedModders (
-   Extensions (
-   -   [ANY] SteamWorks (

KyleS 11-09-2013 17:56

[ANY] SteamWorks
1 Attachment(s)
Hello, this extension actually provides a bunch of things now (originally; Family Sharing detection).

This should function for any SteamWorks enabled game. However, I've only tested using CS:S on Linux. Windows builds are possible, but I can't support them.

Interfaces presently supported (and exposed to Pawn). ISteamGameServer, ISteamHTTP, ISteamGameServerStats. If you'd like more interfaces added (with natives/hooks); by all means just post.

Include File:
Confirmed (maybe) working: CS:GO Lin/Win, CS:S Lin/Win, DoD:S Win, L4D2 Lin/Win, TF2 Lin/Win.

My game doesn't work! Nothing works! :(
That's a bug, let me know and we can probably fix it.

Installation Instructions:
If your server has an outdated Steam Client (presume yes, even if your game has been updated recently; unless if you know for sure), you need the latest SteamClient. I've included this from the redistributable portion of the SteamWorks SDK (1.28). This goes in the bin directory beside your gamedir.
This is no longer the case, Valve has since updated a lot of games with a newer steamclient copy then what's attached. If your game has been updated recently, you should be fine (a lot has changed in 3 years).
If you're still running an ancient game like L4D2 and not something more recent and up to date like CS:S or DoD:S you need any steamclient from the past 4 years to have this work.

The rest is pretty straight forward, just extract SteamWorks to your gamedir.

Thanks to:
VoiDeD - Showing how to use Callback Macros.
psychonic - Example for HTTP, knowing which binaries to replace, significant buildbot help.
Drifter - Significant amb2 help.
Unknown Steamworks Devs - Adding the requested functionality to SteamWorks after Family Sharing was being heavily abused.

Plugins to supplement SteamWorks.ext Functionality:

Plugins using SteamWorks.ext:

Full Documentation:

Hopefully this helps someone.
The latest development version can be found here:
The latest development builds can be found here:
Old development builds can be found here:

Dr. Greg House 11-09-2013 21:10

Re: [ANY] SteamWorks
In L4D2 people can prevent you from joining a server (precisely the one they are currently playing on) by blocking you in steamfriends/-community. This is bullshit because it happens quite regularly that this way people lock you out of your own server and there is nothing you can do about it.
I remember asking asherkin about this, but unfortunately I cannot remember the exact content of the conversation anymore. I THINK "steamworks" came up, I don't know, so this request could turn out to be misplaced. But I would be more than glad to be able to a) know who's preventing who from joining and b) allowing a person to join anyway.

KyleS 11-10-2013 02:13

Re: [ANY] SteamWorks

Originally Posted by Dr. Greg House (Post 2058961)
a) know who's preventing who from joining

I don't know how L4D(2) works. However, looking at the available callbacks, it looks like ComputeNewPlayerCompatibility is probably what you're after (I seem to remember this being a CS:GO thing). I don't think we can do B as that would require SH which removes the game independence, for some strange reason (I'll try to look into if it can be avoided).

If you want to try a test extension, I can add the callback for you :O

Dr. Greg House 11-10-2013 14:20

Re: [ANY] SteamWorks
Ofc, the least I can do is be your guinea pig.

Also, from what I understand how CS:GO works, it bases on many things l4d(2) has introduced.

KyleS 11-10-2013 16:10

Re: [ANY] SteamWorks
1 Attachment(s)

Originally Posted by Dr. Greg House (Post 2059320)
guinea pig

Give this a go :wink:
PHP Code:

forward SW_OnNewCompatibilityResult(EResult:resultPlayersDislikeCandidateCandidateDislikesPlayersClanDislikesCandidateCandidateAuthID); 

Dr. Greg House 11-10-2013 23:54

Re: [ANY] SteamWorks
I will try to test this tomorrow (depends on whether the person who has the right amount of patience is available).

Weasel 11-11-2013 13:03

Re: [ANY] SteamWorks
Is this (just) an extension that makes it possible to ID the owner and player SteamID's? or is there also a plugin or something that makes SourceMod banning work based on that?

KyleS 11-11-2013 13:46

Re: [ANY] SteamWorks

Originally Posted by Weasel (Post 2059697)
Is this (just) an extension that makes it possible to ID the owner and player SteamID's?

The intention isn't just for that, but that's all it officially has at the moment.

Originally Posted by Weasel (Post 2059697)
or is there also a plugin or something that makes SourceMod banning work based on that?

There's a variety of ban systems out there, you're going to need a plugin tailored for your implementation.

Dr. Greg House 11-13-2013 20:03

Re: [ANY] SteamWorks
Had the time to test this now. I wrote a small testplugin to log the output (if any) and nothing happened. So I looked more closely if both the extension and the plugin loaded successfully and they did. So no message is logged, neither on allowed join nor on a blocked attempt.

The console of the blocked client(!) shows this

CSysSessionClient: lobby response 10!
I am giving you this because I think it might be helpful.

KyleS 11-13-2013 20:59

Re: [ANY] SteamWorks

Originally Posted by Dr. Greg House (Post 2060611)
The console of the blocked client(!) shows this

10 is
PHP Code:

k_EChatRoomEnterResponseMemberBlockedYou 10// Join failed - some member in the chat has blocked you from joining 

You can find the List here.

Do you have any output from the server? I can expose:
PHP Code:

// Purpose: Sent on entering a lobby, or on failing to enter
//            m_EChatRoomEnterResponse will be set to k_EChatRoomEnterResponseSuccess on success,
//            or a higher value on failure (see enum EChatRoomEnterResponse)
struct LobbyEnter_t
enum k_iCallback k_iSteamMatchmakingCallbacks };

uint64 m_ulSteamIDLobby;                            // SteamID of the Lobby you have entered
uint32 m_rgfChatPermissions;                        // Permissions of the current user
bool m_bLocked;                                        // If true, then only invited users may join
uint32 m_EChatRoomEnterResponse;    // EChatRoomEnterResponse

but it doesn't look like there's the connecting member's accountid, so I don't think it's even server side(?).

All times are GMT -4. The time now is 00:34.

Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.