Enables server owners to block family shared accounts and copies of the games, while at the same time enabling other family shared copies to play. Thus, a family share whitelist.
Updated to use SteamWorks on 4/29/2022 since valve removed or (seemingly broke?) IsPlayingSharedGame from the API
Commands:
sm_reloadlist - Reloads the whitelist while plugin is running.
sm_addtolist - Add a player to the white/blacklist.
sm_removefromlist - Remove a player from the white/blacklist.
sm_displaylist - Displays all Steam IDs currently in the list
cfg/sourcemod/plugin.familyshare_manager.cfg
Spoiler
Code:
// This file was auto-generated by SourceMod (v1.8.0.5970)
// ConVars for plugin "familyshare_manager.smx"
// Message to display in sourcebans/on ban
// -
// Default: "Family sharing is disabled."
sm_familyshare_banmessage "Family sharing is disabled"
// Check and unblock admins?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_familyshare_ignoreadmins "1"
// File to use for whitelist (addons/sourcemod/configs/file)
// -
// Default: "familyshare_whitelist.ini"
sm_familyshare_whitelist "familyshare_whitelist.ini"
whitelist format: steamid then new line. one steam id per line.
Code:
STEAM_0:1:1854617
STEAM_0:1:123
A question by ShogoMoe I answered:
If you wanted this to be a blacklist instead, allowing all family shared accounts besides the ones on the list, you could simply add one character to the code:
1.5.5 released on 4/29/2022 since valve either removed or broke IsPlayingSharedGame from the API
patch notes:
it uses steamworks
it dont need an api key
it dont need an appid
it is just better and should've been done this way to begin with
updater works too