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

[ANY] SteamWorks


Post New Thread Reply   
 
Thread Tools Display Modes
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 04-14-2017 , 16:49   Re: [ANY] SteamWorks
Reply With Quote #541

Quote:
Originally Posted by cravenge View Post
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.
More then that, the dude's handling floats as ints and other weirdness... If all he had was this extension, sourcemod, metamod, and loaded it on his game it would probably work fine as it is for everyone else...
KyleS is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 04-14-2017 , 23:20   Re: [ANY] SteamWorks
Reply With Quote #542

Quote:
Originally Posted by KyleS View Post
More then that, the dude's handling floats as ints and other weirdness... If all he had was this extension, sourcemod, metamod, and loaded it on his game it would probably work fine as it is for everyone else...
Could you point it out on a specific line, it's hard for me to see my own mistake.
RumbleFrog is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 04-19-2017 , 08:55   Re: [ANY] SteamWorks
Reply With Quote #543

Quote:
Originally Posted by KyleS View Post
More then that, the dude's handling floats as ints and other weirdness... If all he had was this extension, sourcemod, metamod, and loaded it on his game it would probably work fine as it is for everyone else...
I've noticed it too. The coding seems really complicated to me and near to the point that it is just a bunch of junk, no offense to the coder though.

Quote:
Originally Posted by RumbleFrog View Post
Could you point it out on a specific line, it's hard for me to see my own mistake.
I think re-coding everything should help but I do not guarantee successful pinpointing of those mistakes.

Last edited by cravenge; 04-19-2017 at 08:56.
cravenge is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 04-19-2017 , 17:17   Re: [ANY] SteamWorks
Reply With Quote #544

Quote:
Originally Posted by cravenge View Post
I've noticed it too. The coding seems really complicated to me and near to the point that it is just a bunch of junk, no offense to the coder though.

I think re-coding everything should help but I do not guarantee successful pinpointing of those mistakes.
I fixed this, didn't make changes to that section.
RumbleFrog is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 04-19-2017 , 17:48   Re: [ANY] SteamWorks
Reply With Quote #545

Quote:
Originally Posted by RumbleFrog View Post
I fixed this, didn't make changes to that section.
Wanna share what you did wrong after countless posts including a useless thread because you were impatient?
__________________
Neuro Toxin is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 04-20-2017 , 18:03   Re: [ANY] SteamWorks
Reply With Quote #546

Quote:
Originally Posted by Neuro Toxin View Post
Wanna share what you did wrong after countless posts including a useless thread because you were impatient?
Nah, I think I'm good, thank you for politely asking.
RumbleFrog is offline
dustinandband
Senior Member
Join Date: May 2015
Old 04-26-2017 , 11:07   Re: [ANY] SteamWorks
Reply With Quote #547

Hello,

Trying to get a plugin to work that uses this extention. The plugin requires Steamworks to be installed on the server. However I don't think I installed it correctly.

> Installed latest dev build from http://users.alliedmods.net/~kyles/builds/SteamWorks/
> Not sure where to install the main attached file ("SteamClient.tar.xz") since I can't find any file paths that are similar within the server.

To prevent non-group members from using our L4D2 servers (we're adding a bunch of addon maps and rayman's mutation mod), we're adding a check that on first connect - at least one client is a group member. If none is found - the server will quit (a cron job will then auto-relaunch the server when no screen session is found):

PHP Code:
//Pragma
#pragma semicolon 1
//#pragma newdecls required

//Sourcemod Includes
#include <sourcemod>
#include <sourcemod-misc>
#include <SteamWorks>

//ConVars
ConVar convar_Status;

//Globals
bool g_bIsPartOfGroup[MAXPLAYERS 1];

public 
Plugin myinfo 
{
    
name "Group Check"
    
author "Keith Warren (Drixevel)"
    
description "Checks the players if they're in a group and handles the server with the information."
    
version "1.0.0"
    
url "http://www.drixevel.com/"
};

public 
void OnPluginStart()
{
    
LoadTranslations("common.phrases");
    
    
convar_Status CreateConVar("sm_groupcheck_status""1""Status of the plugin.\n1 = on, 0 = off"FCVAR_NOTIFYtrue0.0true1.0);
    
AutoExecConfig();
    
    
HookEvent("round_freeze_end"Event_OnRoundFreezeEnd);
}

public 
void OnConfigsExecuted()
{

}

public 
void Event_OnRoundFreezeEnd(Event event, const char[] namebool dontBroadcast)
{
    if (!
GetConVarBool(convar_Status))
    {
        return;
    }
    
    
CreateTimer(2.0Timer_CheckStatus_TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action Timer_CheckStatus(Handle timer)
{
    
bool closeserver;
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i) && !g_bIsPartOfGroup[i])
        {
            
closeserver true;
        }
    }
    
    if (
closeserver)
    {
        
PrintToChatAll("\x06[SM] No players in session belong to steam group...");
        
        
CreateTimer(5.0Timer_Message2_TIMER_FLAG_NO_MAPCHANGE);
    }
}

public 
Action Timer_Message2(Handle timer)
{
    
PrintToChatAll("\x06Please join our steam group to use our servers:");
    
PrintToChatAll("\x06 GROUP_URL");
    
    
CreateTimer(5.0Timer_Message3_TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action Timer_Message3(Handle timer)
{
    
PrintToChatAll("\x06[SM] server shutting down in 10 seconds...");
    
    
CreateTimer(10.0Timer_Shutdown_TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action Timer_Shutdown(Handle timer)
{
    
ServerCommand("_restart");
}

public 
void OnClientPutInServer(int client)
{
    if (!
GetConVarBool(convar_Status) || IsFakeClient(client))
    {
        return;
    }
    
    
SteamWorks_GetUserGroupStatus(clientGROUPID);
}

public 
int SteamWorks_OnClientGroupStatus(int authidint groupidbool isMemberbool isOfficer)
{
    
int client GetClientFromAuthId(authid);
    
    if (
client == 0)
    {
        return;
    }
    
    
g_bIsPartOfGroup[client] = isMember;
}

int GetClientFromAuthId(int authid)
{
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && authid == GetSteamAccountID(i))
        {
            return 
i;
        }
    }
    
    return 
0;

dustinandband is offline
dustinandband
Senior Member
Join Date: May 2015
Old 04-26-2017 , 11:36   Re: [ANY] SteamWorks
Reply With Quote #548

Sorry user error - should've at least read the code. Needs to be hooked to OnMapStart instead of round_freeze_end lol
dustinandband is offline
raptor666
Junior Member
Join Date: Aug 2012
Old 04-28-2017 , 18:27   Re: [ANY] SteamWorks
Reply With Quote #549

Hi!

I have 1 server with these:

[01] SourceMod (1.8.0.5982) by AlliedModders LLC
[02] CS Tools (1.8.0.5982) by AlliedModders LLC
[03] SDK Tools (1.8.0.5982) by AlliedModders LLC
[04] SDK Hooks (1.8.0.5982) by AlliedModders LLC
[05] SteamWorks Extension (1.2.1) by Kyle Sanderson

SourceMod Version Information: SourceMod Version: 1.8.0.5982 SourcePawn Engine: SourcePawn 1.8, jit-x86 (build 1.8.0.5982) SourcePawn API: v1 = 4, v2 = 11 Compiled on: Apr 11 2017 05:024 Built from: https://github.com/alliedmodders/sou...commit/fc8f43c Build ID: 5982:fc8f43c http://www.sourcemod.net/

Game Server: Counter Strike Source
OS: Linux, debian 8 64 Bit
Metamod:Source version 1.10.7-dev Built from: https://github.com/alliedmodders/met...commit/b189876 Build ID: 954:b189876 Loaded As: Valve Server Plugin Compiled on: Mar 17 2016 Plugin interface version: 15:14 SourceHook version: 5:5 http://www.metamodsource.net/
With this script it is wrong:
https://forums.alliedmods.net/showthread.php?p=2232352

The server flies when I connect it. It works well until then.
Help!
raptor666 is offline
lowheartrate
Member
Join Date: Apr 2015
Location: United States, New York
Old 04-30-2017 , 02:01   Re: [ANY] SteamWorks
Reply With Quote #550

Not sure what it is that I am doing wrong here but I am trying to install this so that I can use the Updater plugin. I have put the srcds folder into my game directory (/csgo/) and have created a new steamworks.inc file in /addons/sourcemod/scripting/include/ which I pasted the code from the link provided in this thread. I checked to make sure that I have updater.smx in my plugins/ which I do and for some reason the Updater plugin isn't showing up when I check for it using sm_plugins in console.
__________________
lowheartrate 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 04:17.


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