Raised This Month: $ Target: $400
 0% 

How to check if certain plugin is active


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cv3
Junior Member
Join Date: Sep 2014
Old 12-15-2014 , 13:31   How to check if certain plugin is active
Reply With Quote #1

How is the best way to check on new plugin if other plugin that it depends on is active ?

I tried to put cvar on the independant plugin (ss_myplugin_version) and check if there is such cvar on the new plugin but it was a waste of time .. filled with errors and such.

PS: The inactivity in this forum boosts highly my research skills

This got the cvar on 2nd plugin
PHP Code:
public plugin_cfg(){
    if(
cvar_exists("am")){
        
g_cvar_am get_cvar_pointer("am");
    }else{
        
g_cvar_am register_cvar("am""0");
        
set_cvar_string("am",ISITON);
    }

done.

Last edited by Cv3; 12-15-2014 at 13:58.
Cv3 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-15-2014 , 14:07   Re: How to check if certain plugin is active
Reply With Quote #2

http://amxmodx.org/api/amxmodx/find_plugin_byfile
http://amxmodx.org/api/amxmodx/get_plugin
http://amxmodx.org/api/amxmodx/is_plugin_loaded
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 15:25.


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