Question about loop.
Hello!
Im making here my dynamic hud but have a question. PHP Code:
example if i have only 25 dynamic hud messages right now, loop will check 192 what is maximum number of dhuds. but i cant also create variable what count dhud count and then but it into loop line like this PHP Code:
so i took a new way. creating variable that holds dhud_enable[this number]. example in the variable dhud_enable : { 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, ... } you see 0 is a hole, no needed thing. all 0-s must be in the end but cant do this with one variable so new variable help. inside of new variable: { 0, 3, 4, 6, -1, -1, -1, ... } this variable tell the system where are 1-s in dhud_enable new code: PHP Code:
using way 2 make things more complex ( for me not for cpu : ) ) here comes my question, do i really need to use that new way or the first way is not that bad and does not take so many cpu by doing useless checking? :) |
| All times are GMT -4. The time now is 20:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.