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

Get native owner


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
client21
Senior Member
Join Date: Apr 2013
Old 12-16-2017 , 13:43   Get native owner
Reply With Quote #1

For example we have native "MyNative" (CreateNative).
It created in other plugin or exstension.
We can know who created this native?
client21 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 12-16-2017 , 20:06   Re: Get native owner
Reply With Quote #2

An extension could probably iterate plugins and check each to see if a native with the right name exists. Off the top of my head, that's the only relevant exposed functionality.

Why do you want this?
Fyren is offline
Reiko1231
Member
Join Date: Apr 2013
Location: Russia
Old 12-17-2017 , 05:47   Re: Get native owner
Reply With Quote #3

Extending Fyren answer, you can probably iterate plugins with SourceMod using GetPluginIterator, MorePlugins, ReadPlugin and check plugin for native using GetFunctionByName.
Reiko1231 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-17-2017 , 07:07   Re: Get native owner
Reply With Quote #4

That wouldn't work, since the function you register as native callback in CreateNative has a different name than the native itself. You can't access the list of registered natives by a plugin from within a plugin.
Again, what are you trying to solve with this?
__________________
Peace-Maker 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:33.


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