Raised This Month: $ Target: $400
 0% 

if(plugin is loaded) help.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EvolDay
Senior Member
Join Date: Apr 2008
Location: Canada
Old 08-19-2008 , 21:55   if(plugin is loaded) help.
Reply With Quote #1

if(plugin.amxx == loaded){
blah blah
}

is there a way to check if i plugin is loaded. like how would the code look like i know what i made doesnt mean anything but i just made it up so maybe you can understand what i am asking. Thank you to whoever can help.
__________________
EvolDay is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-19-2008 , 22:17   Re: if(plugin is loaded) help.
Reply With Quote #2

http://www.amxmodx.org/funcwiki.php?go=func&id=627
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
EvolDay
Senior Member
Join Date: Apr 2008
Location: Canada
Old 08-20-2008 , 01:34   Re: if(plugin is loaded) help.
Reply With Quote #3

Thank you
__________________
EvolDay is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 08-20-2008 , 02:50   Re: if(plugin is loaded) help.
Reply With Quote #4

Dosent find_plugin_byfile just return if it exsist in your plugins folder.
Think he wants to use is_plugin_loaded
__________________
If one of my plugins become broken, contact me by mail. [email protected]
fxfighter is offline
Send a message via MSN to fxfighter
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-20-2008 , 12:07   Re: if(plugin is loaded) help.
Reply With Quote #5

Quote:
Originally Posted by fxfighter View Post
Dosent find_plugin_byfile just return if it exsist in your plugins folder.
I don't think so since this native returns the plugin id (and INVALID_PLUGIN_ID = -1 if not founded).
I still prefer using is_plugin_loaded ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 08-20-2008 , 12:23   Re: if(plugin is loaded) help.
Reply With Quote #6

But if you get badload then find_plugin_byfile will still show the plugin id right?
Because it dose exsist if not then the nativs name is a bit misleading.
__________________
If one of my plugins become broken, contact me by mail. [email protected]
fxfighter is offline
Send a message via MSN to fxfighter
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 08-20-2008 , 12:38   Re: if(plugin is loaded) help.
Reply With Quote #7

Quote:
Originally Posted by fxfighter View Post
But if you get badload then find_plugin_byfile will still show the plugin id right?
Because it dose exsist if not then the nativs name is a bit misleading.
As far as I know,a bad load will return an invalid plugin id. Think like this, if the file doesn't exist, how could the plugin be loaded? The amxx list is just a reference,it is not a copy of what exists in memory.
danielkza is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 08-20-2008 , 13:09   Re: if(plugin is loaded) help.
Reply With Quote #8

But if the file dose exsist and the user just wrote the wrong name in plugins.ini
It will not return what its suppose to do if the thingy you mentioned danielkza is correct about find_plugin_byfile.

So the only diffrence betwin the nativs is what they compare?(filename or the one in register_plugin)
Or dose it return correct if it dont get loaded?
If not the name is really misleading and file_exists is a better option.
__________________
If one of my plugins become broken, contact me by mail. [email protected]

Last edited by fxfighter; 08-20-2008 at 13:15.
fxfighter is offline
Send a message via MSN to fxfighter
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 03:14.


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