Raised This Month: $4 Target: $400
 1% 

Solved SteamWorks_GetUserGroupStatus


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 05-17-2020 , 12:09   SteamWorks_GetUserGroupStatus
Reply With Quote #1

Hi,
I'm trying to see if a client is in a group. It's built as a command (!steam) and then it's supposed to reply with 2 alternatives, depending if a client is in the group:
Code:
public Action Cmd_Steamgroup(int client, int args) {

	if(SteamWorks_GetUserGroupStatus(client, 103582791432791390)) {
		// In the group!
	} else {
		// Not in the group
	}

	return Plugin_Handled;
}
However it seems to always say yes, no matter what group ID I enter!
Is this the correct way to use GetUserGroupStatus?
__________________

Last edited by condolent; 05-18-2020 at 16:35.
condolent is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 05-17-2020 , 12:21   Re: SteamWorks_GetUserGroupStatus
Reply With Quote #2

You need to use SteamWorks_OnClientGroupStatus to receive answers from SteamWorks about group data.

Convert authid to client index using loop on all clients and compare authid with GetSteamAccountID.
And check if groupid is actually your group inside SteamWorks_OnClientGroupStatus.
__________________

Last edited by MAGNAT2645; 05-17-2020 at 12:29.
MAGNAT2645 is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 05-17-2020 , 13:14   Re: SteamWorks_GetUserGroupStatus
Reply With Quote #3

Quote:
Originally Posted by MAGNAT2645 View Post
You need to use SteamWorks_OnClientGroupStatus to receive answers from SteamWorks about group data.

Convert authid to client index using loop on all clients and compare authid with GetSteamAccountID.
And check if groupid is actually your group inside SteamWorks_OnClientGroupStatus.
Tried SteamWorks_OnClientGroupStatus but couldn't get it to work, got an error about new-style declarations
__________________
condolent is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 05-17-2020 , 13:37   Re: SteamWorks_GetUserGroupStatus
Reply With Quote #4

I don't see how this isn't the current syntax:
Code:
SteamWorks_OnClientGroupStatus(int authid, int groupAccountID, bool groupMember, bool groupOfficer)
__________________
condolent is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 05-17-2020 , 13:51   Re: SteamWorks_GetUserGroupStatus
Reply With Quote #5

Code:
forward void SteamWorks_OnClientGroupStatus(int authid, int groupid, bool isMember, bool isOfficer)
and in your code
Code:
public void SteamWorks_OnClientGroupStatus(int authid, int groupid, bool isMember, bool isOfficer)
if void gives another error then try with int
__________________

Last edited by MAGNAT2645; 05-17-2020 at 13:52.
MAGNAT2645 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 06:01.


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