Raised This Month: $51 Target: $400
 12% 

public plugin_* functions execute order


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
benio101
Junior Member
Join Date: Feb 2012
Location: Toruń, Poland
Old 11-09-2012 , 12:14   public plugin_* functions execute order
Reply With Quote #1

Hi,

What`s the public plugin_* functions execute order?

I know, it is
Code:
plugin_precache
plugin_init
plugin_cfg
but where is the plugin_natives? Manual says only "This forward is called immediately after the plugin is initialized in memory, much like the deprecated plugin_modules was."

I found a post saying, that plugin_natives is the very first (before plugin_precache), but manual says that it is "Actually first called forward", so I stay confused.
Could you confirm the linked post true or say, wchich order from thes 4 functions is correct one? Or it depends on somethink we cannot know the order?
benio101 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 11-09-2012 , 12:42   Re: public plugin_* functions execute order
Reply With Quote #2

plugin_natives() is called first.
hleV is offline
bboygrun
CHOMP
Join Date: May 2010
Location: France
Old 11-09-2012 , 13:58   Re: public plugin_* functions execute order
Reply With Quote #3

Test by yourself :

PHP Code:
#include < amxmodx >

public plugin_init( ) 
{
    
log_to_file"test_func.txt""plugin_init" );
}

public 
plugin_cfg( ) 
{
    
log_to_file"test_func.txt""plugin_cfg" );
}

public 
plugin_precache( ) 
{
    
log_to_file"test_func.txt""plugin_precache" );
}

public 
plugin_natives( ) 
{
    
log_to_file"test_func.txt""plugin_natives" );

PHP Code:
L 11/09/2012 19:57:43plugin_natives
L 11
/09/2012 19:57:43plugin_precache
L 11
/09/2012 19:57:47plugin_init
L 11
/09/2012 19:57:47plugin_cfg 
__________________
bboygrun is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-09-2012 , 14:20   Re: public plugin_* functions execute order
Reply With Quote #4

Should happen in that order but at the same time, dunno what you have in precache that takes 4 secs lol.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bboygrun
CHOMP
Join Date: May 2010
Location: France
Old 11-09-2012 , 14:27   Re: public plugin_* functions execute order
Reply With Quote #5

Wooden Computer.
__________________
bboygrun is offline
benio101
Junior Member
Join Date: Feb 2012
Location: Toruń, Poland
Old 11-09-2012 , 15:39   Re: public plugin_* functions execute order
Reply With Quote #6

Thank you for really fast reply. I got
PHP Code:
L 11/09/2012 21:32:11plugin_natives
L 11
/09/2012 21:32:11plugin_precache
L 11
/09/2012 21:32:11plugin_init
L 11
/09/2012 21:32:11plugin_cfg 
Problem solved.
benio101 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 03:26.


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