AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   i need a functional steamgroup plugin (https://forums.alliedmods.net/showthread.php?t=325517)

jugule 06-25-2020 19:37

i need a functional steamgroup plugin
 
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!

SSheriFF 06-26-2020 09:45

Re: i need a functional steamgroup plugin
 
use this https://forums.alliedmods.net/showthread.php?p=2542856 along with any shop you would like to use.

jugule 06-27-2020 11:42

Re: i need a functional steamgroup plugin
 
Quote:

Originally Posted by SSheriFF (Post 2707348)
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.

Balimbanana 06-28-2020 23:03

Re: i need a functional steamgroup plugin
 
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;
}


Alex101192 06-30-2020 07:10

Re: i need a functional steamgroup plugin
 
Quote:

Originally Posted by jugule (Post 2707541)
I tested it, it doesn't work.

It works. That's the plugin I use to have players on steamgroup becoming vips automatically.

jugule 08-09-2020 10:12

Re: i need a functional steamgroup plugin
 
Quote:

Originally Posted by Alex101192 (Post 2707950)
It works. That's the plugin I use to have players on steamgroup becoming vips automatically.

not working for me.
I also tried steamid group 64 and the normal one.

Alex101192 08-10-2020 14:21

Re: i need a functional steamgroup plugin
 
Quote:

Originally Posted by jugule (Post 2713638)
not working for me.
I also tried steamid group 64 and the normal one.

Then something is wrong with your steamworks version most likely.


All times are GMT -4. The time now is 13:37.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.