AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   finding plugin without looping (https://forums.alliedmods.net/showthread.php?t=63311)

l4ulwtlln 11-17-2007 17:25

finding plugin without looping
 
is it possible to find a specific plugin that is loaded on the server without looping through the other plugins?

like doing this but without having to go through the other plugins
PHP Code:

    new 0num get_pluginsnum(), filename[64], name[64], version[64], author[64]

    while (
num)
    {
        
get_plugin(i++, filename63name63version63author63)

        if (
equali(name"plugins_name"))
        {
            
//do stuff here
            
break
        }
    } 


Alka 11-17-2007 17:31

Re: finding plugin without looping
 
Hum...use this to get the "wanted" plugin index : http://www.amxmodx.org/funcwiki.php?go=func&id=627 , then use this to get the info about plugin : http://www.amxmodx.org/funcwiki.php?go=func&id=225 . Hope you get it...

Arkshine 11-17-2007 17:32

Re: finding plugin without looping
 
find_plugin_byfile() ?
get_plugin() ?

l4ulwtlln 11-17-2007 17:43

Re: finding plugin without looping
 
what if i dunno the plugin file name? thats why i was checking for the plugin name instead of the plugin file name

Alka 11-17-2007 18:23

Re: finding plugin without looping
 
In this case you CAN'T. But why not looping through all plugins? o.O i don't get it :|

l4ulwtlln 11-17-2007 19:38

Re: finding plugin without looping
 
i dunno... i dont like loops, they scare me! LOL

[ --<-@ ] Black Rose 11-17-2007 21:21

Re: finding plugin without looping
 
It would be easier if you told us what you need it for.

l4ulwtlln 11-17-2007 21:39

Re: finding plugin without looping
 
just to see if a certain plugin is loaded and if it is, turn off a feature within this plugin (the one detecting the other plugin) because it doesn't need it as the other plugin has it already.

[ --<-@ ] Black Rose 11-17-2007 22:33

Re: finding plugin without looping
 
Do the loop.

purple_pixie 11-19-2007 11:22

Re: finding plugin without looping
 
If you don't know the plugin's name, how are you supposed to know if it is loaded?

Your loop also requires that you know its name ;-)


All times are GMT -4. The time now is 01:22.

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