Raised This Month: $169 Target: $400
 42% 

[ANY] SteamWorks


Post New Thread Reply   
 
Thread Tools Display Modes
RumbleFrog
AlliedModders Donor
Join Date: Dec 2016
Location: US
Old 04-10-2017 , 15:39   Re: [ANY] SteamWorks
Reply With Quote #531

Quote:
Originally Posted by KyleS View Post
You've posted zero code.
As you wish

PHP Code:
public void OnClientPostAdminCheck(int iClient)
{
    if (!
StrEqual(GroupID32"0") && !StrEqual(GroupID32"0.0"))
    {
        if (!
SteamWorks_GetUserGroupStatus(iClientStringToInt(GroupID32)))
        {
            
CPrintToChat(iClient"{lightseagreen}[SGI] {grey}Request overflow. Please try again later.");
            return;
        }
        
        
CPrintToChat(iClient"{lightseagreen}[SGI] {grey}Requesting...");
    }
}

public 
int SteamWorks_OnClientGroupStatus(int authidint groupidbool isMemberbool isOfficer)
{
    
CPrintToChatAll("{lightseagreen}[SGI] {grey}Received Request. %i"groupid);
    
    if (
groupid != StringToInt(GroupID32))
        return;
    
    
int iClient GetUserFromAuthID(authid);    
    
    if (
iClient == -1)
        return;
        
    if (!
isMember && !isOfficer)
    {
        
CPrintToChat(iClient"{lightseagreen}[SGI] {grey}Consider joining our group using !invite.");
        return;
    }
    
    if (
isMember || isOfficer)
    {
        
CPrintToChat(iClient"{lightseagreen}[SGI] {grey}You are in our group, hurray!");
        
InGroup[iClient] = true;
        return;
    }
    

RumbleFrog is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 04-10-2017 , 18:38   Re: [ANY] SteamWorks
Reply With Quote #532

Quote:
Originally Posted by RumbleFrog View Post
As you wish

PHP Code:
public void OnClientPostAdminCheck(int iClient)
{
    if (!
StrEqual(GroupID32"0") && !StrEqual(GroupID32"0.0"))
    {
        if (!
SteamWorks_GetUserGroupStatus(iClientStringToInt(GroupID32)))
        {
            
CPrintToChat(iClient"{lightseagreen}[SGI] {grey}Request overflow. Please try again later.");
            return;
        }
        
        
CPrintToChat(iClient"{lightseagreen}[SGI] {grey}Requesting...");
    }
}

public 
int SteamWorks_OnClientGroupStatus(int authidint groupidbool isMemberbool isOfficer)
{
    
CPrintToChatAll("{lightseagreen}[SGI] {grey}Received Request. %i"groupid);
    
    if (
groupid != StringToInt(GroupID32))
        return;
    
    
int iClient GetUserFromAuthID(authid);    
    
    if (
iClient == -1)
        return;
        
    if (!
isMember && !isOfficer)
    {
        
CPrintToChat(iClient"{lightseagreen}[SGI] {grey}Consider joining our group using !invite.");
        return;
    }
    
    if (
isMember || isOfficer)
    {
        
CPrintToChat(iClient"{lightseagreen}[SGI] {grey}You are in our group, hurray!");
        
InGroup[iClient] = true;
        return;
    }
    

I'm not trying to be a jerk, but this code is very problematic.
KyleS is offline
RumbleFrog
AlliedModders Donor
Join Date: Dec 2016
Location: US
Old 04-10-2017 , 20:42   Re: [ANY] SteamWorks
Reply With Quote #533

Quote:
Originally Posted by KyleS View Post
I'm not trying to be a jerk, but this code is very problematic.
Enlighten me lol, I'm trying to get this to work
RumbleFrog is offline
RumbleFrog
AlliedModders Donor
Join Date: Dec 2016
Location: US
Old 04-11-2017 , 23:09   Re: [ANY] SteamWorks
Reply With Quote #534

Could you provide an example, I can't see to find another example other than this one: https://pastebin.com/FhBRHYsQ
RumbleFrog is offline
psychonic

BAFFLED
Join Date: May 2008
Old 04-12-2017 , 13:44   Re: [ANY] SteamWorks
Reply With Quote #535

Since it internally uses a callback instead of a callresult, it's possible that something else is eating the callbacks before the SteamWorks extension can see them, like the SteamTools extension or the game itself.
psychonic is offline
RumbleFrog
AlliedModders Donor
Join Date: Dec 2016
Location: US
Old 04-12-2017 , 15:44   Re: [ANY] SteamWorks
Reply With Quote #536

Quote:
Originally Posted by psychonic View Post
Since it internally uses a callback instead of a callresult, it's possible that something else is eating the callbacks before the SteamWorks extension can see them, like the SteamTools extension or the game itself.
Any workaround in the case of this?
RumbleFrog is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 04-12-2017 , 18:59   Re: [ANY] SteamWorks
Reply With Quote #537

Quote:
Originally Posted by RumbleFrog View Post
Any workaround in the case of this?
Are you actually mixing these extensions? SteamWorks and Steamtools?
KyleS is offline
RumbleFrog
AlliedModders Donor
Join Date: Dec 2016
Location: US
Old 04-12-2017 , 23:56   Re: [ANY] SteamWorks
Reply With Quote #538

Quote:
Originally Posted by KyleS View Post
Are you actually mixing these extensions? SteamWorks and Steamtools?
No.
RumbleFrog is offline
RumbleFrog
AlliedModders Donor
Join Date: Dec 2016
Location: US
Old 04-13-2017 , 15:33   Re: [ANY] SteamWorks
Reply With Quote #539

Also, what's problematic with the code.
RumbleFrog is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Black Hole
Old 04-14-2017 , 00:45   Re: [ANY] SteamWorks
Reply With Quote #540

Quote:
Originally Posted by RumbleFrog View Post
Also, what's problematic with the code.
By simply looking at the code, you're trying to make the function act like a void instead of an int as it is expecting a return value. Correct me if I'm wrong.
cravenge 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 17:02.


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