AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to check if certain plugin is active (https://forums.alliedmods.net/showthread.php?t=253117)

Cv3 12-15-2014 13:31

How to check if certain plugin is active
 
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.

YamiKaitou 12-15-2014 14:07

Re: How to check if certain plugin is active
 
http://amxmodx.org/api/amxmodx/find_plugin_byfile
http://amxmodx.org/api/amxmodx/get_plugin
http://amxmodx.org/api/amxmodx/is_plugin_loaded


All times are GMT -4. The time now is 15:25.

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