AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]Get calling plugin within native (https://forums.alliedmods.net/showthread.php?t=244320)

GuskiS 07-16-2014 14:35

[SOLVED]Get calling plugin within native
 
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.

mottzi 07-16-2014 19:43

Re: Get calling plugin within native
 
The first parameter of a style-0 defined native is the plugin id IIRC.

GuskiS 07-16-2014 19:54

Re: Get calling plugin within native
 
You mean get_param(0)? If so, it returned 4 to me, which isn't plugin id, mine would needed to be ~40.

fysiks 07-16-2014 20:47

Re: Get calling plugin within native
 
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).

GuskiS 07-17-2014 06:10

Re: Get calling plugin within native
 
Oh lol, how stupid of me :D Thanks :)


All times are GMT -4. The time now is 13:18.

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