Raised This Month: $ Target: $400
 0% 

plugin performance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 01-21-2009 , 14:46   Re: plugin performance
Reply With Quote #1

Quote:
Originally Posted by Exolent[jNr] View Post
3. I think it would be best if you registered the events anyway, then checked to see if the cvar was enabled or disabled when they were called.
This way you can enable the plugin without having to change maps/restart server.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
|PJ| Shorty
Veteran Member
Join Date: Aug 2005
Location: Bavaria, Germany
Old 01-21-2009 , 17:23   Re: plugin performance
Reply With Quote #2

PHP Code:
new plugon 
public plugin_init()

    
register_plugin("moo","moo","mooo"
    
plugon register_cvar("amx_whatever","1"
 
    if( 
get_pcvar_num(plugon)) 
    { 
        
//do_something
    


not really sure...
but i think at this point amx_whatever would be always 1.
all cfgs will be loaded after plugin_init(), so amx_whatever 0 in amxx.cfg would make no difference
__________________
There are only 10 types of people in the world:
Those who understand binary, and those who donīt.
|PJ| Shorty is offline
Send a message via ICQ to |PJ| Shorty Send a message via AIM to |PJ| Shorty Send a message via MSN to |PJ| Shorty Send a message via Yahoo to |PJ| Shorty Send a message via Skype™ to |PJ| Shorty
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-21-2009 , 19:09   Re: plugin performance
Reply With Quote #3

If it was changed, next map it would see the value it changed to.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 01:45.


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