Raised This Month: $ Target: $400
 0% 

finding plugin without looping


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
l4ulwtlln
Member
Join Date: Aug 2007
Old 11-17-2007 , 17:25   finding plugin without looping
Reply With Quote #1

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
        }
    } 
l4ulwtlln is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-17-2007 , 17:31   Re: finding plugin without looping
Reply With Quote #2

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...
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-17-2007 , 17:32   Re: finding plugin without looping
Reply With Quote #3

find_plugin_byfile() ?
get_plugin() ?
__________________
Arkshine is offline
l4ulwtlln
Member
Join Date: Aug 2007
Old 11-17-2007 , 17:43   Re: finding plugin without looping
Reply With Quote #4

what if i dunno the plugin file name? thats why i was checking for the plugin name instead of the plugin file name
l4ulwtlln is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-17-2007 , 18:23   Re: finding plugin without looping
Reply With Quote #5

In this case you CAN'T. But why not looping through all plugins? o.O i don't get it
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
l4ulwtlln
Member
Join Date: Aug 2007
Old 11-17-2007 , 19:38   Re: finding plugin without looping
Reply With Quote #6

i dunno... i dont like loops, they scare me! LOL
l4ulwtlln is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-17-2007 , 21:21   Re: finding plugin without looping
Reply With Quote #7

It would be easier if you told us what you need it for.
[ --<-@ ] Black Rose is offline
l4ulwtlln
Member
Join Date: Aug 2007
Old 11-17-2007 , 21:39   Re: finding plugin without looping
Reply With Quote #8

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.
l4ulwtlln is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-17-2007 , 22:33   Re: finding plugin without looping
Reply With Quote #9

Do the loop.
[ --<-@ ] Black Rose is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 11-19-2007 , 11:22   Re: finding plugin without looping
Reply With Quote #10

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 ;-)
purple_pixie 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 01:22.


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