Raised This Month: $ Target: $400
 0% 

[SM] Plugin load/unload management


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 06-21-2012 , 13:15   [SM] Plugin load/unload management
Reply With Quote #1

These are a few stocks that a plugin can use to unload/reload itself.

PHP Code:
stock ReloadMyself() {
    
decl String:filename[256];
    
GetPluginFilename(INVALID_HANDLEfilenamesizeof(filename));
    
ServerCommand("sm plugins reload %s"filename);
}

stock UnloadMyself() {
    
decl String:filename[256];
    
GetPluginFilename(INVALID_HANDLEfilenamesizeof(filename));
    
ServerCommand("sm plugins unload %s"filename);

__________________

Last edited by Dr. McKay; 06-21-2012 at 13:18.
Dr. McKay is offline
 



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 18:33.


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