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!