Raised This Month: $179 Target: $400
 44% 

[ANY] SteamWorks


Post New Thread Reply   
 
Thread Tools Display Modes
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 06-13-2014 , 18:06   Re: [ANY] SteamWorks
Reply With Quote #121

Quote:
Originally Posted by Dr. Greg House View Post
"SteamWorks_SetGameDescription" does not work on Linux and CSGO. No errors, just nothing. Extension loads fine as well.
When are you calling it? Before or after Steam loads? Do you have a test plugin?
KyleS is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 06-13-2014 , 20:14   Re: [ANY] SteamWorks
Reply With Quote #122

I'll prepare something for tomorrow.

EDIT:
Attached.
Attached Files
File Type: sp Get Plugin or Get Source (steamworkscsgo.sp - 150 views - 928 Bytes)
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

Last edited by Dr. Greg House; 06-13-2014 at 20:26.
Dr. Greg House is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 06-13-2014 , 21:00   Re: [ANY] SteamWorks
Reply With Quote #123

Quote:
Originally Posted by Dr. Greg House View Post
I'll prepare something for tomorrow.

EDIT:
Attached.
Okay, which version of the steamclient did you copy into your game directory?
KyleS is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 06-13-2014 , 22:12   Re: [ANY] SteamWorks
Reply With Quote #124

The one you attached in the first post, inside the bin directory.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 06-13-2014 , 22:28   Re: [ANY] SteamWorks
Reply With Quote #125

Quote:
Originally Posted by Dr. Greg House View Post
The one you attached in the first post, inside the bin directory.
Which extension binary are you using?
KyleS is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 06-13-2014 , 22:56   Re: [ANY] SteamWorks
Reply With Quote #126

Code:
[07] SteamWorks Extension (1.1): Exposes SteamWorks functions to Developers
I think it is the attached one as well.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
versatile_bfg
Veteran Member
Join Date: Feb 2012
Old 07-17-2014 , 21:29   Re: [ANY] SteamWorks
Reply With Quote #127

This might be a stupid question but steamtools has this native like this:
native bool:Steam_SendHTTPRequest(HTTPRequestHandle: HTTPRequest, HTTPRequestComplete:callbackFunction, any:contextData = 0);

But the steamworks one is like this:
native bool:SteamWorks_SendHTTPRequest(Handle:hReque st);

and what is the equivalent to native Steam_ReleaseHTTPRequest(HTTPRequestHandle:HT TPRequest);?

I'm just mucking around with updater and using steamworks instead of steamtools

PHP Code:
/* Extension Helper - SteamWorks */

Download_SteamWorks(const String:url[], const String:dest[])
{
    
decl String:sURL[MAX_URL_LENGTH];
    
PrefixURL(sURLsizeof(sURL), url);
    
    new 
Handle:hDLPack CreateDataPack();
    
WritePackString(hDLPackdest);

    new 
HTTPRequestHandle:hRequest SteamWorks_CreateHTTPRequest(HTTPMethod_GETsURL);
    
SteamWorks_SetHTTPRequestHeaderValue(hRequest"Pragma""no-cache");
    
SteamWorks_SetHTTPRequestHeaderValue(hRequest"Cache-Control""no-cache");
// need to change this to steamworks
    
Steam_SendHTTPRequest(hRequestOnSteamHTTPCompletehDLPack);
}

public 
OnSteamHTTPComplete(HTTPRequestHandle:HTTPRequestbool:requestSuccessfulHTTPStatusCode:statusCodeany:hDLPack)
{
    
decl String:sDest[PLATFORM_MAX_PATH];
    
ResetPack(hDLPack);
    
ReadPackString(hDLPacksDestsizeof(sDest));
    
CloseHandle(hDLPack);
    
    if (
requestSuccessful && statusCode == HTTPStatusCode_OK)
    {
        
SteamWorks_WriteHTTPResponseBodyToFile(HTTPRequestsDest);
        
DownloadEnded(true);
    }
    else
    {
        
decl String:sError[256];
        
FormatEx(sErrorsizeof(sError), "SteamTools error (status code %i). Request successful: %s"_:statusCoderequestSuccessful "True" "False");
        
DownloadEnded(falsesError);
    }
    
// need to change this to steamworks
    
Steam_ReleaseHTTPRequest(HTTPRequest);
}

// need to change this to steamworks if possible? 
/* Keep track of SteamTools load state.

new bool:g_bSteamLoaded;

public Steam_FullyLoaded()
{
    g_bSteamLoaded = true;
}

public Steam_Shutdown()
{
    g_bSteamLoaded = false;
} */ 
__________________

Last edited by versatile_bfg; 07-17-2014 at 22:58.
versatile_bfg is offline
VoiDeD
SourceMod Plugin Unapprover
Join Date: Mar 2009
Location: Illinois, USA
Old 07-18-2014 , 01:08   Re: [ANY] SteamWorks
Reply With Quote #128

Quote:
Originally Posted by versatile_bfg View Post
This might be a stupid question but steamtools has this native like this:
native bool:Steam_SendHTTPRequest(HTTPRequestHandle: HTTPRequest, HTTPRequestComplete:callbackFunction, any:contextData = 0);

But the steamworks one is like this:
native bool:SteamWorks_SendHTTPRequest(Handle:hReque st);
SteamWorks_SetHTTPCallbacks().

Quote:
Originally Posted by versatile_bfg View Post
and what is the equivalent to native Steam_ReleaseHTTPRequest(HTTPRequestHandle:HT TPRequest);?
CloseHandle().
__________________

Last edited by VoiDeD; 07-18-2014 at 01:09.
VoiDeD is offline
versatile_bfg
Veteran Member
Join Date: Feb 2012
Old 07-18-2014 , 01:36   Re: [ANY] SteamWorks
Reply With Quote #129

Quote:
Originally Posted by VoiDeD View Post
SteamWorks_SetHTTPCallbacks().
I know I'm being a little bit of a dick atm but how do I code it to work in this part?

PHP Code:
Download_SteamTools(const String:url[], const String:dest[])
{
    
decl String:sURL[MAX_URL_LENGTH];
    
PrefixURL(sURLsizeof(sURL), url);
    
    new 
Handle:hDLPack CreateDataPack();
    
WritePackString(hDLPackdest);

    new 
HTTPRequestHandle:hRequest SteamWorks_CreateHTTPRequest(HTTPMethod_GETsURL);
    
SteamWorks_SetHTTPRequestHeaderValue(hRequest"Pragma""no-cache");
    
SteamWorks_SetHTTPRequestHeaderValue(hRequest"Cache-Control""no-cache");
//    Steam_SendHTTPRequest(hRequest, OnSteamHTTPComplete, hDLPack); // part to be replaced
    
SteamWorks_SetHTTPCallbacks(Handle:hHandleSteamWorksHTTPRequestCompleted:fCompleted INVALID_FUNCTIONSteamWorksHTTPHeadersReceived:fHeaders INVALID_FUNCTIONSteamWorksHTTPDataReceived:fData INVALID_FUNCTIONHandle:hCalling INVALID_HANDLE);

I'm just lost on that one part.
__________________
versatile_bfg is offline
VoiDeD
SourceMod Plugin Unapprover
Join Date: Mar 2009
Location: Illinois, USA
Old 07-18-2014 , 16:18   Re: [ANY] SteamWorks
Reply With Quote #130

Quote:
Originally Posted by versatile_bfg View Post
I know I'm being a little bit of a dick atm but how do I code it to work in this part?

PHP Code:
Download_SteamTools(const String:url[], const String:dest[])
{
    
decl String:sURL[MAX_URL_LENGTH];
    
PrefixURL(sURLsizeof(sURL), url);
    
    new 
Handle:hDLPack CreateDataPack();
    
WritePackString(hDLPackdest);

    new 
HTTPRequestHandle:hRequest SteamWorks_CreateHTTPRequest(HTTPMethod_GETsURL);
    
SteamWorks_SetHTTPRequestHeaderValue(hRequest"Pragma""no-cache");
    
SteamWorks_SetHTTPRequestHeaderValue(hRequest"Cache-Control""no-cache");
//    Steam_SendHTTPRequest(hRequest, OnSteamHTTPComplete, hDLPack); // part to be replaced
    
SteamWorks_SetHTTPCallbacks(Handle:hHandleSteamWorksHTTPRequestCompleted:fCompleted INVALID_FUNCTIONSteamWorksHTTPHeadersReceived:fHeaders INVALID_FUNCTIONSteamWorksHTTPDataReceived:fData INVALID_FUNCTIONHandle:hCalling INVALID_HANDLE);

I'm just lost on that one part.
You set the callbacks you want, and then you send the request with SteamWorks_SendHTTPRequest.

PHP Code:
    new Handle:request SteamWorks_CreateHTTPRequestk_EHTTPMethodGETBACKPACK_TF_URL );

    
SteamWorks_SetHTTPRequestGetOrPostParameterrequest"key"key );
    
SteamWorks_SetHTTPRequestGetOrPostParameterrequest"format""vdf" );
    
SteamWorks_SetHTTPRequestGetOrPostParameterrequest"names""1" );

    
SteamWorks_SetHTTPCallbacksrequestOnBackpackTFComplete );

    
SteamWorks_SendHTTPRequestrequest );

...

public 
OnBackpackTFCompleteHandle:requestbool:bIOFailurebool:successfulEHTTPStatusCode:status )
{
    
// ...

__________________
VoiDeD 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 09:23.


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