Raised This Month: $119 Target: $400
 29% 

How i can get object pointer?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
client21
Member
Join Date: Apr 2013
Old 01-10-2020 , 16:11   How i can get object pointer?
Reply With Quote #1

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;



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

Last edited by client21; 01-11-2020 at 18:54.
client21 is offline
CrazyHackGUT
AlliedModders Donor
Join Date: Feb 2016
Location: Izhevsk, Russia
Old 01-11-2020 , 16:42   Re: How i can get object pointer?
Reply With Quote #2

Post solution.
__________________
My english is very bad. I am live in Russia. Learning english language - very hard task for me...
CrazyHackGUT is offline
Send a message via ICQ to CrazyHackGUT Send a message via Skype™ to CrazyHackGUT
client21
Member
Join Date: Apr 2013
Old 01-11-2020 , 18:48   Re: How i can get object pointer?
Reply With Quote #3

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.
client21 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-12-2020 , 19:03   Re: How i can get object pointer?
Reply With Quote #4

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?
__________________

Last edited by asherkin; 01-12-2020 at 19:04.
asherkin is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 01-13-2020 , 01:43   Re: How i can get object pointer?
Reply With Quote #5

Quote:
Originally Posted by asherkin View Post
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.
__________________
TheDS1337 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 00:20.


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