Raised This Month: $ Target: $400
 0% 

optimising plugins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GhostMan
Senior Member
Join Date: Jun 2012
Old 04-21-2013 , 15:11   optimising plugins
Reply With Quote #1

Just checking if i get it right.

Accoding to this V1 would be more optimised than V2?

V1
PHP Code:
    new team get_user_team(id)
    
    switch(
g_SpecDay)
    {
        case 
3: return PLUGIN_HANDLED
        
case 4:
        {
            if(
team == 1)
                return 
PLUGIN_HANDLED
        
}
        case 
27:
        {
            if(
team == 2)
                return 
PLUGIN_HANDLED
        
}
    } 
V2
PHP Code:
    if(g_SpecDay == 3)
    {
        return 
PLUGIN_HANDLED
    
}
    else if(
g_SpecDay == && get_user_team(id) == 1)
    {
        return 
PLUGIN_HANDLED
    
}
    else if((
g_SpecDay == || g_SpecDay == 7) && get_user_team(id) == 2)
    {
        return 
PLUGIN_HANDLED
    


Last edited by GhostMan; 04-21-2013 at 15:12.
GhostMan is offline
 


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 10:49.


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