Raised This Month: $ Target: $400
 0% 

Optimization


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

So, basically, all these formats you've used doesn't make any big differente to the compiler, i'm right? The best way is use the original native instead of making new methods like macro, stock, array?

Ah, about this

PHP Code:
if(get_user_flags(id) & ADMIN_KICK)
{
     
client_print(id,print_chat,"[AMXX]: You have not enough money to buy this!")
}
else if(
get_user_flags(id) & ADMIN_SLAY)
{
     
client_print(id,print_chat,"[AMXX]: You have not enough money to buy this! Write /admin for buy admin privilegies")
}
else
{
     
client_print(id,print_chat,"[AMXX]: You have not enough money to buy this! Write /vip for buy vip privilegies")

This should be

PHP Code:
switch(get_user_flags(id))
{
      case 
ADMIN_KICKclient_print(id,print_chat,"[AMXX]: You have not enough money to buy this!")
      case 
ADMIN_SLAYclient_print(id,print_chat,"[AMXX]: You have not enough money to buy this! Write /admin for buy admin privilegies")
      default: 
client_print(id,print_chat,"[AMXX]: You have not enough money to buy this! Write /vip for buy vip privilegies")

Or a stock, because I have that format so much times, like 15-20 I think.

PHP Code:
stock SendUserAdv(id)
{
      switch(
get_user_flags(id))
      {
            case 
ADMIN_KICKclient_print(id,print_chat,"[AMXX]: You have not enough money to buy this!")
            case 
ADMIN_SLAYclient_print(id,print_chat,"[AMXX]: You have not enough money to buy this! Write /admin for buy admin       privilegies")
            default: 
client_print(id,print_chat,"[AMXX]: You have not enough money to buy this! Write /vip for buy vip privilegies")
      }


Edit: off-topic LUL, now I understand your signature, haha gj
__________________
• 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 16:30.
EFFx is offline
 



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