sm-plugin-FamilyShareManager
所属分类:游戏
开发工具:SourcePawn
文件大小:0KB
下载次数:0
上传日期:2023-11-19 14:13:48
上 传 者:
sh-1993
说明: 管理由另一个steam帐户共享其游戏的玩家
(Manage players that have their game shared by another steam account)
文件列表:
addons/ (0, 2023-12-21)
addons/sourcemod/ (0, 2023-12-21)
addons/sourcemod/scripting/ (0, 2023-12-21)
addons/sourcemod/scripting/FamilyShareManager.sp (16515, 2023-12-21)
sourceknight.yaml (1179, 2023-12-21)
# sm-plugin-FamilyShareManager
[Family Share Manager](https://forums.alliedmods.net/showthread.php?t=293927) 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.
# Changelog
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
## Configuration
### Whitelist
Format must be a list of steamid then new line with one steam id per line.
#### Example
```
STEAM_0:1:1854617
STEAM_0:1:123
```
## Misc
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:
```
public OnClientPostAdminCheck(client)
{
new bool:whiteListed = false;
if(g_bParsed)
{
decl String:auth[2][64];
GetClientAuthId(client, AuthId_Steam2, auth[0], sizeof(auth[]));
whiteListed = GetTrieString(g_hWhitelistTrie, auth[0], auth[1], sizeof(auth[]));
if(!whiteListed)
{
LogMessage("Whitelist found player: %N", client);
return;
}
}
if(CheckCommandAccess(client, "sm_admin", ADMFLAG_GENERIC) && GetConVarInt(g_hCvar_IgnoreAdmins) > 0)
{
return;
}
if(!IsFakeClient(client))
checkFamilySharing(client);
}
```
近期下载者:
相关文件:
收藏者: