Raised This Month: $ Target: $400
 0% 

Is this optimization?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 02-03-2017 , 11:55   Is this optimization?
Reply With Quote #1

Well, look this please.

PHP Code:
//on plugin_init()
register_event("AmmoX""event_ammo_x""be")

public 
event_ammo_x(id)
{
    
// code....

    
static amountamount read_data(2)
    
    if (
amount 120// bp ammo
    
{
        
// do whatever 
    
}

I don't use "amount" anymore.

Is it optimization create a static to do that, or I just use read_data(2) without creating a static variable?

Why?

Last edited by baneado; 02-03-2017 at 11:59.
baneado 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:43.


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