Raised This Month: $ Target: $400
 0% 

loop through all players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-12-2013 , 12:39   Re: loop through all players
Reply With Quote #5

Quote:
Originally Posted by Xalus View Post
#2 is worse way that I wont recomment.

get_players works like this:
- First it loops trought 32 results, check if they accept with the flags and put it in players[32]. After it did that, you gonna do a loop again, with the amount of results it added to players[32] with the needed flags.

So results in 2 loops, that results in more overlows.

So I recomment #1
This is incorrect. There may be two loops but the get_players() loop is done in a module which is much much faster than any looping in AMX Mod X calling is_user_connected() 32 times.
__________________
fysiks 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 11:11.


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