alliedmodders / sourcemod

SourceMod - Source Engine Scripting and Administration
http://www.sourcemod.net/
965 stars 420 forks source link

Add KeyValues.LoadFromAddress #1467

Open dragokas opened 3 years ago

dragokas commented 3 years ago

Help us help you

Description

Please, add the ability to manipulate KeyValues that is already created by the game:

Problematic Code (or Steps to Reproduce)

Like:

game cpp:

/* KeyValues *__cdecl KeyValues::FindKey(KeyValues *this, const char *s, bool a3) */

result = KeyValues::FindKey(v1, "Missions", 0);

And after that, SourcePawn:

// retrieve "result" by some SDKCalls...
// and pass to our new method:
KeyValues kv = KeyValues.LoadFromAddress(result);
asherkin commented 3 years ago

See also: #676, #1458