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

Solved how to call this method?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ProjectSky
AlliedModders Donor
Join Date: Aug 2020
Old 03-13-2021 , 09:12   how to call this method?
Reply With Quote #1

i try to call IsHibernating, the server crashes.

PHP Code:
StartPrepSDKCall(SDKCall_Raw);
if (
PrepSDKCall_SetFromConf(hGameDataSDKConf_Signature"CGameServer::IsHibernating") == false)
{
    
LogError("Failed to find signature: CGameServer::IsHibernating");
}
else
{
    
PrepSDKCall_SetReturnInfo(SDKType_BoolSDKPass_Plain);
    
g_hSDK_Call_IsHibernating EndPrepSDKCall();
    if (
g_hSDK_Call_IsHibernating == null)
        
LogError("Failed to create SDKCall: CGameServer::IsHibernating");
}

stock bool IsHibernating()
{
    return 
SDKCall(g_hSDK_Call_IsHibernating);

gamedata

Code:
"CGameServer::IsHibernating"
{
  "library"		"engine"
  "linux"		"@_ZNK11CGameServer13IsHibernatingEv"
}

Last edited by ProjectSky; 03-18-2021 at 06:46.
ProjectSky is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 03-13-2021 , 09:39   Re: how to call this method?
Reply With Quote #2

What a coincidence ;D
I'm messing also with Hibernate in CS:S.

Did you test ?
PHP Code:
StartPrepSDKCall(SDKCall_Static); 
__________________
Do not Private Message @me
Bacardi is offline
ProjectSky
AlliedModders Donor
Join Date: Aug 2020
Old 03-13-2021 , 12:08   Re: how to call this method?
Reply With Quote #3

Yes, I test it, no luck, the server crashed again
ProjectSky is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 03-13-2021 , 19:51   Re: how to call this method?
Reply With Quote #4

To find an sv you can use dhooks or manually "calculate" it

PHP Code:
Address sv;
Handle IsHibernating;

public 
void OnPluginStart()
{    
    
StartPrepSDKCall(SDKCall_Raw);
    
PrepSDKCall_SetFromConf(dataSDKConf_Signature"CGameServer::IsHibernating");
    
PrepSDKCall_SetReturnInfo(SDKType_BoolSDKPass_Plain);
    
IsHibernating EndPrepSDKCall();
    
    
/* bool hibernate = SDKCall(IsHibernating, sv) */

__________________
cry
BHaType is offline
Send a message via AIM to BHaType
ProjectSky
AlliedModders Donor
Join Date: Aug 2020
Old 03-18-2021 , 06:46   Re: how to call this method?
Reply With Quote #5

switched ServerHibernationUpdate method, thank all help
ProjectSky is offline
Reply



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 18:05.


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