Raised This Month: $ Target: $400
 0% 

Most efficiently get all user ids


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Misery
Senior Member
Join Date: Dec 2010
Old 12-30-2010 , 05:12   Most efficiently get all user ids
Reply With Quote #1

Hi,

I'd like to know how I can fill an array[32] containing valid user ids.
Since this code is to be implemented in a callback initialized using set_task(), I need the most efficient way to do this.

Would it be faster to... use get_players(), get the highest user ID. On each disconnect, update the table instead of re-using get_players() to re-fill it, using a list of empty indexes (lookup table). On each player connect, consult the lookup table, fill the element corresponding to the retrieved index, delete the index, go to next.

Or... simply use get_players() on each iteration?

Please advise! Thanks!

Misery
Misery 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 02:06.


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