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

Solved Hook moment of onpluginstart done for all plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 09-17-2018 , 15:40   Hook moment of onpluginstart done for all plugins
Reply With Quote #1

I want to hook the moment where OnPluginStart has finished calling for ALL plugins, INCLUDING late load plugins. Is such thing possible?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 09-17-2018 at 17:00.
eyal282 is offline
Vaggelis
Senior Member
Join Date: May 2017
Old 09-17-2018 , 16:15   Re: Hook moment of onpluginstart done for all plugins
Reply With Quote #2

https://sm.alliedmods.net/new-api/so...lPluginsLoaded
Vaggelis is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-17-2018 , 20:03   Re: Hook moment of onpluginstart done for all plugins
Reply With Quote #3

Quote:
Originally Posted by eyal282 View Post
I want to hook the moment where OnPluginStart has finished calling for ALL plugins, INCLUDING late load plugins. Is such thing possible?
What's the use case for this?

If you mean when your own plugin is late loading, OnAllPluginsLoaded is still called for that.

If you're designing a plugin that other plugins can use as an optional dependency, you should call RegPluginLibrary in your OnPluginStart and use OnLibraryAdded / OnLibraryRemoved to load and unload features as those optional dependencies are loaded/unloaded. LibraryExists can also be used in OnAllPluginsLoaded to check for those optional dependencies.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 09-17-2018 at 20:05.
Powerlord is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 09-18-2018 , 10:01   Re: Hook moment of onpluginstart done for all plugins
Reply With Quote #4

Quote:
Originally Posted by Powerlord View Post
What's the use case for this?

If you mean when your own plugin is late loading, OnAllPluginsLoaded is still called for that.

If you're designing a plugin that other plugins can use as an optional dependency, you should call RegPluginLibrary in your OnPluginStart and use OnLibraryAdded / OnLibraryRemoved to load and unload features as those optional dependencies are loaded/unloaded. LibraryExists can also be used in OnAllPluginsLoaded to check for those optional dependencies.
I create extra commands which may exist by another plugin, so I want to wait until all commands are registered and if a command doesn't exist I create them
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 09-18-2018 , 19:37   Re: Hook moment of onpluginstart done for all plugins
Reply With Quote #5

"late load" plugins can be any time, so you would need to wait forever.
__________________
asherkin is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 09-19-2018 , 17:51   Re: Hook moment of onpluginstart done for all plugins
Reply With Quote #6

Quote:
Originally Posted by asherkin View Post
"late load" plugins can be any time, so you would need to wait forever.
Wait, isn't there a limit at which the plugin simply fails because of an issue?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 09-19-2018 , 17:57   Re: Hook moment of onpluginstart done for all plugins
Reply With Quote #7

Plugins are not loaded asynchronously. A late loaded plugin is a plugin that was loaded after normal plugin loading.
Fyren is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 09-20-2018 , 02:56   Re: Hook moment of onpluginstart done for all plugins
Reply With Quote #8

Late load = someone went in and did sm plugins load someplugin

Sourcemod does not include tools that enable you to predict the future, and determine whether any more plugins will be loaded by an admin later.
__________________

Last edited by ddhoward; 09-20-2018 at 02:57.
ddhoward is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 09-20-2018 , 04:27   Re: Hook moment of onpluginstart done for all plugins
Reply With Quote #9

Quote:
Originally Posted by ddhoward View Post
Late load = someone went in and did sm plugins load someplugin

Sourcemod does not include tools that enable you to predict the future, and determine whether any more plugins will be loaded by an admin later.
Oh. That's less ciritcal. Still I was looking for when onpluginstart went for all plugins.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 09-21-2018 , 01:11   Re: Hook moment of onpluginstart done for all plugins
Reply With Quote #10

Quote:
Originally Posted by eyal282 View Post
Oh. That's less ciritcal. Still I was looking for when onpluginstart went for all plugins.
Quote:
Originally Posted by Vaggelis View Post
__________________
ddhoward 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 10:24.


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