Raised This Month: $13 Target: $400
 3% 

i need a functional steamgroup plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jugule
Member
Join Date: Apr 2020
Old 06-25-2020 , 19:37   i need a functional steamgroup plugin
Reply With Quote #1

I need a plugin to check if Player X is in the steam group. (I need a shop plugin, if the player is not in the steam group not to have access). I tested over 30 plugins on the forum, but none functional. I'm sure none of them escaped me. I didn't manage to figure it out, can you help me with something functional? Thank you!
jugule is offline
SSheriFF
AlliedModders Donor
Join Date: May 2020
Location: Israel
Old 06-26-2020 , 09:45   Re: i need a functional steamgroup plugin
Reply With Quote #2

use this https://forums.alliedmods.net/showthread.php?p=2542856 along with any shop you would like to use.
__________________
SSheriFF is online now
jugule
Member
Join Date: Apr 2020
Old 06-27-2020 , 11:42   Re: i need a functional steamgroup plugin
Reply With Quote #3

Quote:
Originally Posted by SSheriFF View Post
use this https://forums.alliedmods.net/showthread.php?p=2542856 along with any shop you would like to use.
I tested it, it doesn't work.
jugule is offline
Balimbanana
Member
Join Date: Jan 2017
Old 06-28-2020 , 23:03   Re: i need a functional steamgroup plugin
Reply With Quote #4

Can you give specific examples?
Are you running the latest SourceMod/MetaMod and SteamWorks extensions?
Are you sure the group ID that was used is correct?
What methods are you using to hook the commands to be filtered by group status?
Have you tried any of the SteamWorks natives in a test plugin, something like this:
Code:
#include <sourcemod>
#include <SteamWorks>
#pragma newdecls required;
#pragma semicolon 1;

static int _GroupIDINT = yourgroupID;
int _CLAuthID[128];
bool HasAccess[128];

public void OnMapStart()
{
	for (int i = 0;i<MaxClients+1;i++)
	{
		HasAccess[i] = false;
		_CLAuthID[i] = 0;
	}
}

public void OnClientAuthorized(int client, const char[] auth)
{
	HasAccess[client] = false;
	char authget[128];
	GetClientAuthId(client,AuthId_Steam3,authget,sizeof(authget));
	char authbreak[4][64];
	int lastpos = ExplodeString(authget,":",authbreak,4,64);
	Format(authget,sizeof(authget),"%s",authbreak[lastpos-1]);
	ReplaceString(authget,sizeof(authget),"]","",false);
	_CLAuthID[client] = StringToInt(authget);
	SteamWorks_GetUserGroupStatus(client, _GroupIDINT);
}

public int SteamWorks_OnClientGroupStatus(int authid, int groupid, bool isMember, bool isOfficer)
{
	int client = -1;
	for (int i = 0;i<MaxClients+1;i++)
	{
		if (authid == _CLAuthID[i])
		{
			client = i;
			break;
		}
	}
	if (isMember)
	{
		if (client != -1)
		{
			PrintToServer("Client %i is a member of group %i OfficerStatus: %i",client,groupid,isOfficer);
			HasAccess[client] = true;
			return 1;
		}
	}
	PrintToServer("Client %i is not a member",authid);
	if (client != -1) HasAccess[client] = false;
	return -1;
}

Last edited by Balimbanana; 06-28-2020 at 23:44.
Balimbanana is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 06-30-2020 , 07:10   Re: i need a functional steamgroup plugin
Reply With Quote #5

Quote:
Originally Posted by jugule View Post
I tested it, it doesn't work.
It works. That's the plugin I use to have players on steamgroup becoming vips automatically.
Alex101192 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:01.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode