Raised This Month: $32 Target: $400
 8% 

Solved [dhooks] How to get special return data


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ProjectSky
AlliedModders Donor
Join Date: Aug 2020
Old 03-11-2023 , 14:09   [dhooks] How to get special return data
Reply With Quote #1

CMatchExtL4D::GetGameModeInfo return keyvalue data, but dhooks only have these return type

Code:
ReturnType_Void: "void"
ReturnType_Int: "int"
ReturnType_Bool: "bool"
ReturnType_Float: "float"
ReturnType_String: "string"
ReturnType_StringPtr: "stringptr"
ReturnType_CharPtr: "charptr"
ReturnType_Vector: "vector"
ReturnType_VectorPtr: "vectorptr"
ReturnType_CBaseEntity: "cbaseentity"
ReturnType_Edict: "edict"
gamedata
PHP Code:
"CMatchExtL4D::GetGameModeInfo"
{
    
"signature"        "CMatchExtL4D::GetGameModeInfo"
    "callconv"        "thiscall"
    "return"        "int"
    "this"            "ignore"
    "arguments"
    
{
        
"mode"
        
{
            
"type"    "charptr"
        
}
    }

i know sdkcall method, but i need to hook it.
so how get keyvalue data from this function?

Last edited by ProjectSky; 03-11-2023 at 22:41. Reason: solved! just need to use post hook
ProjectSky is offline
Vit_amin
Senior Member
Join Date: Dec 2015
Location: Russian Federation
Old 03-11-2023 , 15:16   Re: [dhooks] How to get special return data
Reply With Quote #2

Use the return value as an integer and access variables using the KeyValue structure in memory. Value = (this + Offset in class/struct KeyValue)*
this = return value (this of KeyValue)

Last edited by Vit_amin; 03-11-2023 at 15:17.
Vit_amin 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:23.


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