Raised This Month: $ Target: $400
 0% 

check if other plugins are running?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-03-2013 , 03:54   check if other plugins are running?
Reply With Quote #1

in my menu system im running other plugins which work with my menu...

how do i fun a check to make sure the other plugin is running or not loaded?

im stuck...

for eg. how do i check if amx_shoopslay is running ?
Blizzard_87 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-03-2013 , 03:56   Re: check if other plugins are running?
Reply With Quote #2

You can use is_plugin_loaded, get_plugin, or find_plugin_byfile
__________________
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
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-03-2013 , 03:58   Re: check if other plugins are running?
Reply With Quote #3

thanks heaps i knew there must of been a way

EDIT:

ok stupid question howto use

is_plugin_loaded("amx_slay2", ??? )

then can it be used in a IF ?

Last edited by Blizzard_87; 03-03-2013 at 04:01.
Blizzard_87 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-03-2013 , 04:13   Re: check if other plugins are running?
Reply With Quote #4

Use either the filename or the Plugin Name (as specified in register_plugin)

Source
__________________
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
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-03-2013 , 04:24   Re: check if other plugins are running?
Reply With Quote #5

PHP Code:
    if(is_plugin_loaded("Admin Slay 2X"false))
    {
        
menu_additem(menu"Lightning Slay""3"0);
        
menu_additem(menu"Blood Slay""4"0);
        
menu_additem(menu"Explosion Slay""5"0);
    }
    else {
        
menu_additem(menu"\dLightning Slay""3"0);
        
menu_additem(menu"\dBlood Slay""4"0);
        
menu_additem(menu"\dExplosion Slay""5"0);
    } 
ok im still doing it wrong cos its not working.
Blizzard_87 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-03-2013 , 04:26   Re: check if other plugins are running?
Reply With Quote #6

PHP Code:
new g_iShoopSlayRunning

public plugin_cfg()
{
    
g_iShoopSlayRunning is_plugin_loaded("Shoop da Whoop Slay")

And if you plain to call public functions from this plugin with callfunc_XXX, cache function(s) index(es) at plugin_cfg in gloval vars to.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-03-2013 , 04:47   Re: check if other plugins are running?
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
PHP Code:
new g_iShoopSlayRunning

public plugin_cfg()
{
    
g_iShoopSlayRunning is_plugin_loaded("Shoop da Whoop Slay")

And if you plain to call public functions from this plugin with callfunc_XXX, cache function(s) index(es) at plugin_cfg in gloval vars to.
thanks i'll test now
Blizzard_87 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-03-2013 , 04:56   Re: check if other plugins are running?
Reply With Quote #8

Your code was fine about plugin runing check, but instead of menu_additem, use menu_addtext
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



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 21:38.


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