diff --git a/Extension/gsnatives.cpp b/Extension/gsnatives.cpp index 44717a9..17dbb5f 100644 --- a/Extension/gsnatives.cpp +++ b/Extension/gsnatives.cpp @@ -179,6 +179,19 @@ static cell_t sm_UserHasLicenseForApp(IPluginContext *pContext, const cell_t *pa return pServer->UserHasLicenseForApp(checkid, params[2]); } +static cell_t sm_UserHasLicenseForAppId(IPluginContext *pContext, const cell_t *params) +{ + ISteamGameServer *pServer = GetGSPointer(); + + if (pServer == NULL) + { + return k_EUserHasLicenseResultNoAuth; + } + + CSteamID checkid = CreateCommonCSteamID(params[1], params, 3, 4); + return pServer->UserHasLicenseForApp(checkid, params[2]); +} + static cell_t sm_GetClientSteamID(IPluginContext *pContext, const cell_t *params) { int client = gamehelpers->ReferenceToIndex(params[1]); @@ -244,6 +257,7 @@ static sp_nativeinfo_t gsnatives[] = { {"SteamWorks_ClearRules", sm_ClearRules}, {"SteamWorks_ForceHeartbeat", sm_ForceHeartbeat}, {"SteamWorks_HasLicenseForApp", sm_UserHasLicenseForApp}, + {"SteamWorks_HasLicenseForAppId", sm_UserHasLicenseForAppId}, {"SteamWorks_GetClientSteamID", sm_GetClientSteamID}, {"SteamWorks_GetUserGroupStatus", sm_GetUserGroupStatus}, {"SteamWorks_GetUserGroupStatusAuthID", sm_GetUserGroupStatusAuthID}, diff --git a/Pawn/includes/SteamWorks.inc b/Pawn/includes/SteamWorks.inc index 6c1649c..2642c08 100644 --- a/Pawn/includes/SteamWorks.inc +++ b/Pawn/includes/SteamWorks.inc @@ -198,6 +198,7 @@ native bool:SteamWorks_GetUserGroupStatus(client, groupid); native bool:SteamWorks_GetUserGroupStatusAuthID(authid, groupid); native EUserHasLicenseForAppResult:SteamWorks_HasLicenseForApp(client, app); +native EUserHasLicenseForAppResult:SteamWorks_HasLicenseForAppId(authid, app); native SteamWorks_GetClientSteamID(client, String:sSteamID[], length); native bool:SteamWorks_RequestStatsAuthID(authid, appid); @@ -304,6 +305,7 @@ public __ext_SteamWorks_SetNTVOptional() MarkNativeAsOptional("SteamWorks_GetUserGroupStatusAuthID"); MarkNativeAsOptional("SteamWorks_HasLicenseForApp"); + MarkNativeAsOptional("SteamWorks_HasLicenseForAppId"); MarkNativeAsOptional("SteamWorks_GetClientSteamID"); MarkNativeAsOptional("SteamWorks_RequestStatsAuthID");