Raised This Month: $ Target: $400
 0% 

[SOLVED]Get calling plugin within native


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-16-2014 , 14:35   [SOLVED]Get calling plugin within native
Reply With Quote #1

Is it possible to get calling plugins ID within native to make an debug? I tried get_plugin with -1 but it returns plugin which has the native.
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness

Last edited by GuskiS; 07-17-2014 at 06:12.
GuskiS is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-16-2014 , 19:43   Re: Get calling plugin within native
Reply With Quote #2

The first parameter of a style-0 defined native is the plugin id IIRC.
mottzi is offline
Send a message via MSN to mottzi
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-16-2014 , 19:54   Re: Get calling plugin within native
Reply With Quote #3

You mean get_param(0)? If so, it returned 4 to me, which isn't plugin id, mine would needed to be ~40.
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-16-2014 , 20:47   Re: Get calling plugin within native
Reply With Quote #4

I think he is referring to the actual first parameter of the native's function:

Code:
my_native(iPlugin, iParams)
{
    //  Code
}
iPlugin in this case would be the plugin reference.

The get_param() function get the parameters of the native's arguments (when it is being used).
__________________

Last edited by fysiks; 07-16-2014 at 20:48.
fysiks is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-17-2014 , 06:10   Re: Get calling plugin within native
Reply With Quote #5

Oh lol, how stupid of me Thanks
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS 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 13:18.


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