Raised This Month: $ Target: $400
 0% 

attempting to optimize code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-31-2016 , 11:21   Re: attempting to optimize code
Reply With Quote #7

yes?

how plugin works:

death - is_alive[id] = false;
disconnect is_alive[id] = false;
spawn - is_alive[id] = true;

native_is_user_alive(id)
return is_alive(id)


when you use is_user_alive(id), don't you get already cached value?

the thing is that when you use is_alive , you acces global array from plugin but when you call native is_user_alive, you call array from module, which is faster.

Last edited by siriusmd99; 05-31-2016 at 11:25.
siriusmd99 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 18:39.


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