Raised This Month: $ Target: $400
 0% 

Optimization


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-23-2017 , 15:28   Optimization
Reply With Quote #1

Guys, I've seen to much times here scripters talking about optimizations for good read/visual/style on the plugin. I'm learning more about it reading tutorials and plugins on that forum. I've searched a little bit and I want know more about it.

Ok, so my question is:

If I have so much get_user_flags() or any other native.

if I make something like this

PHP Code:
haveTheFlag(index,id 0)
    return 
bool:(get_user_flags(index) & id
And use instead of all get_user_flags() on the plugin

PHP Code:
if(haveTheFlag(id) & ADMIN_KICK
or

PHP Code:
#define haveTheFlag(%1,%2) (get_user_flags(%1) & %2) 
That can be considered an optimization? What happen with the compiler?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 01-23-2017 at 15:37.
EFFx 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 20:50.


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