Question about efficiency [I hail ye might y_less!]
#2

Quote:
Originally Posted by [ЉǾǖŦĦЗŁΛẄ
~ [HellFire] ]
new TextText[PLAYERS]; // PLAYERS is my predefined number for max players on my server [to avoid looping 500]
That's what foreach is for.

Quote:
Originally Posted by [ЉǾǖŦĦЗŁΛẄ
~ [HellFire] ]
And I create this textdraw when a player connects [applying the [ ] to their playerid] I was thinking would it by more efficient to create the text on OnGameModeInit and just loop 10 so 10 get created at startup?
Depends what is in them - if there are only 10 and they have static text there's not point creating one per player. If they are different for each player then you need one each - it's not a question of efficiency, it's a question of what they're used for.
Reply


Messages In This Thread
Question about efficiency [I hail ye might y_less!] - by [HLF]Southclaw - 07.01.2010, 10:42
Re: Question about efficiency [I hail ye might y_less!] - by Y_Less - 07.01.2010, 11:11
Re: Efficiency - by [HLF]Southclaw - 07.01.2010, 11:28

Forum Jump:


Users browsing this thread: 1 Guest(s)