Add SteamWorks_HasLicenseForAppId
This commit is contained in:
committed by
Josh Allard
parent
9f70645270
commit
d8e87951c1
@@ -179,6 +179,19 @@ static cell_t sm_UserHasLicenseForApp(IPluginContext *pContext, const cell_t *pa
|
|||||||
return pServer->UserHasLicenseForApp(checkid, params[2]);
|
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)
|
static cell_t sm_GetClientSteamID(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
int client = gamehelpers->ReferenceToIndex(params[1]);
|
||||||
@@ -244,6 +257,7 @@ static sp_nativeinfo_t gsnatives[] = {
|
|||||||
{"SteamWorks_ClearRules", sm_ClearRules},
|
{"SteamWorks_ClearRules", sm_ClearRules},
|
||||||
{"SteamWorks_ForceHeartbeat", sm_ForceHeartbeat},
|
{"SteamWorks_ForceHeartbeat", sm_ForceHeartbeat},
|
||||||
{"SteamWorks_HasLicenseForApp", sm_UserHasLicenseForApp},
|
{"SteamWorks_HasLicenseForApp", sm_UserHasLicenseForApp},
|
||||||
|
{"SteamWorks_HasLicenseForAppId", sm_UserHasLicenseForAppId},
|
||||||
{"SteamWorks_GetClientSteamID", sm_GetClientSteamID},
|
{"SteamWorks_GetClientSteamID", sm_GetClientSteamID},
|
||||||
{"SteamWorks_GetUserGroupStatus", sm_GetUserGroupStatus},
|
{"SteamWorks_GetUserGroupStatus", sm_GetUserGroupStatus},
|
||||||
{"SteamWorks_GetUserGroupStatusAuthID", sm_GetUserGroupStatusAuthID},
|
{"SteamWorks_GetUserGroupStatusAuthID", sm_GetUserGroupStatusAuthID},
|
||||||
|
|||||||
@@ -198,6 +198,7 @@ native bool:SteamWorks_GetUserGroupStatus(client, groupid);
|
|||||||
native bool:SteamWorks_GetUserGroupStatusAuthID(authid, groupid);
|
native bool:SteamWorks_GetUserGroupStatusAuthID(authid, groupid);
|
||||||
|
|
||||||
native EUserHasLicenseForAppResult:SteamWorks_HasLicenseForApp(client, app);
|
native EUserHasLicenseForAppResult:SteamWorks_HasLicenseForApp(client, app);
|
||||||
|
native EUserHasLicenseForAppResult:SteamWorks_HasLicenseForAppId(authid, app);
|
||||||
native SteamWorks_GetClientSteamID(client, String:sSteamID[], length);
|
native SteamWorks_GetClientSteamID(client, String:sSteamID[], length);
|
||||||
|
|
||||||
native bool:SteamWorks_RequestStatsAuthID(authid, appid);
|
native bool:SteamWorks_RequestStatsAuthID(authid, appid);
|
||||||
@@ -304,6 +305,7 @@ public __ext_SteamWorks_SetNTVOptional()
|
|||||||
MarkNativeAsOptional("SteamWorks_GetUserGroupStatusAuthID");
|
MarkNativeAsOptional("SteamWorks_GetUserGroupStatusAuthID");
|
||||||
|
|
||||||
MarkNativeAsOptional("SteamWorks_HasLicenseForApp");
|
MarkNativeAsOptional("SteamWorks_HasLicenseForApp");
|
||||||
|
MarkNativeAsOptional("SteamWorks_HasLicenseForAppId");
|
||||||
MarkNativeAsOptional("SteamWorks_GetClientSteamID");
|
MarkNativeAsOptional("SteamWorks_GetClientSteamID");
|
||||||
|
|
||||||
MarkNativeAsOptional("SteamWorks_RequestStatsAuthID");
|
MarkNativeAsOptional("SteamWorks_RequestStatsAuthID");
|
||||||
|
|||||||
Reference in New Issue
Block a user