View Single Post
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 11-06-2014 , 22:27   Re: [ANY] SteamWorks
Reply With Quote #178

Quote:
Originally Posted by abrandnewday View Post
So, say I was to want to use this to make a plugin that detects and logs Family Sharing players to a TXT file....would that be possible and if so, what would be a good place to start (like maybe a specific function or something)?
PHP Code:
#include <SteamWorks>

public SteamWorks_OnValidateClient(ownerauthidauthid) {
    if(
ownerauthid && authid && ownerauthid != authid) {
        
decl String:path[PLATFORM_MAX_PATH];
        
BuildPath(Path_SMpathsizeof(path), "logs/familysharing.log");
        
LogToFile(path"[U:1:%d] (STEAM_1:%d:%d) is borrowing the game from [U:1:%d] (STEAM_1:%d:%d)"authidauthid 1authid >> 1ownerauthidownerauthid 1ownerauthid >> 1);
    }

__________________
Dr. McKay is offline