Optional resource.adds for clients

Hi there, I am trying to configure some resource.AddWorkshops to only be installed for certain players.
Right now I’m trying to keep it simple and I’m doing it based off of steam id.
Here is the code I’ve made thus far:



gameevent.Listen( "player_connect" )
hook.Add( "player_connect", "selective_workshop", function( data )
if data.networkid == "STEAM_0:1:337" then
resource.AddWorkshop( "200328230" )
resource.AddWorkshop( "330550719" )
else end
hook.Remove( "player_connect", "selective_workshop" )
end )


The problem is that once STEAM_0:1:337 connects, the resource.AddWorkshops are added for all future clients.
If STEAM_0:1:337 doesn’t connect, then players don’t download the resource.AddWorkshops.
I’m all out of ideas and I’m looking for some help. Thanks!

resource.AddWorkshop isn’t clientside.

I realize this, that’s why this is server side code.

How do you think resource.AddWorkshop would only add it for that player if calling it alone forces it to download for everyone already? If you have a SteamID already, just tell the player to subscribe to the content. As of right now, there isn’t a way to be selective about downloads.

I was afraid of this, hopefully at some point this becomes a thing.