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

Detect when a plugin unload


Post New Thread Reply   
 
Thread Tools Display Modes
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 01-27-2014 , 14:45   Re: Detect when a plugin unload
Reply With Quote #21

Quote:
Originally Posted by friagram View Post
If you want to use libraries, you could just pass the caller's library name in your native. Store this in a dynamic array in the core plugin, and onlibraryremoved, search through your models and use the dynamic array to see if that library belongs to said model. Then remove the library name from your dynamic array.
This is probably the best choice..
In the child plugin, you reg the library, and when you call your native, just pass that library name, very easy to implement.
Onlibraryremoved isnt bad to use if you findstringinarray the libraries, though if you have a lot of models in the main array, it could take a while to parse them, but what can you do.
Could work in a senses, auto assign child libraries to the core when native is called, but anyway I just put it in the model structure for test purpose, it won't be use there but it will probably be use in some other future DA.

I will look into that but I think that a global forward OnPluginUnload(Handle:plugin) could be really useful into the sourcemod core.

EDIT: double post my bad

Last edited by Mathias.; 01-27-2014 at 14:45.
Mathias. is offline
Reply


Thread Tools
Display Modes

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 22:14.


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