AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Coding MM:S Plugins & SM Extensions (https://forums.alliedmods.net/forumdisplay.php?f=75)
-   -   How i can get object pointer? (https://forums.alliedmods.net/showthread.php?t=320810)

client21 01-10-2020 15:11

How i can get object pointer?
 
sourcemod 1.6.3 (don't ask why).

How get pointer/object for class ISourcePawnEngine2
https://github.com/alliedmodders/sou...vm_api.h#L1184

We can use this
https://github.com/alliedmodders/sou...urceMod.h#L209

But it's
ISourcePawnEngine *g_pSourcePawn = NULL;

But we need it
ISourcePawnEngine2 *g_pSourcePawn2 = NULL;

:cry:

---
Ok i found solution, but now GetSymbolAddress returns me NULL =\

CrazyHackGUT 01-11-2020 15:42

Re: How i can get object pointer?
 
Post solution.

client21 01-11-2020 17:48

Re: How i can get object pointer?
 
Solution in core/sourcemod.cpp
But you must take into account that there are different methods for obtaining a pointer in old and new versions sm.

asherkin 01-12-2020 18:03

Re: How i can get object pointer?
 
ISourcePawnEngine2 isn't part of the Extension API and isn't safe to use outside of SourceMod.

What is it from it that you need?

TheDS1337 01-13-2020 00:43

Re: How i can get object pointer?
 
Quote:

Originally Posted by asherkin (Post 2679976)
ISourcePawnEngine2 isn't part of the Extension API and isn't safe to use outside of SourceMod.

What is it from it that you need?

If I recall correctly:
PHP Code:

IPluginRuntime *CreateEmptyRuntime(const char *nameuint32_t memory

is what the OP asked for.


All times are GMT -4. The time now is 19:40.

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