Raised This Month: $ Target: $400
 0% 

last terrorist help


Post New Thread Reply   
 
Thread Tools Display Modes
vitorrd
Senior Member
Join Date: Jul 2009
Old 10-07-2009 , 12:24   Re: last terrorist help
Reply With Quote #11

It's amazing how they completely ignore what I said, heh.
vitorrd is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 10-07-2009 , 12:41   Re: last terrorist help
Reply With Quote #12

Quote:
Originally Posted by vitorrd View Post
It's amazing how they completely ignore what I said, heh.
Only Jagged ignored it. It's not really as simple as you say. Looping through all players and checking alive and team could equal to 64 module calls before getting the player, but with get_players you call the module once and you got the information. The checks are basically the same in both but they differ a lot. Obviously get_players is setting the array but that's because the native isn't designed for this usage. The best method would be using a native that provides only the num, but that kind of doesn't exist at least not yet.
SnoW is offline
Send a message via MSN to SnoW
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-07-2009 , 19:29   Re: last terrorist help
Reply With Quote #13

vitorrd, one can then argue that you are wasting loop iterations always looping 1-maxplayers while calling 1+ natives each time. Any angle you go there are positive\negative aspects. I highly doubt you will see even the slightest difference in CPU usage whether you go with 1->maxplayers or use get_players(). Of course it is good to be efficient but unless it is being called very frequently (in prethink or something) then it doesn't make a notable difference. Hopefully a future AMX-X release will give us a nicer get_players function.
__________________

Last edited by Bugsy; 10-07-2009 at 19:37.
Bugsy is offline
Reply



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 22:41.


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