Set max entities as size of the array
What method would be the best for that?:
I want to set the size of the global array. PHP Code:
|
Re: Set max entities as size of the array
sizeof Name
|
Re: Set max entities as size of the array
Ok. Seems my english sucks...
I want to get how many func_door there are on the map and then set it as the size of Name. |
Re: Set max entities as size of the array
Don't understand the last part of your sentence.
|
Re: Set max entities as size of the array
by default, max entity is 900 + (maxplayers * 15)
So it's 1380 But if some launch option are set, it can be more. Put 2048 if you have a doubt. |
Re: Set max entities as size of the array
900 + 15 * ( maxplayers - 1 )
|
Re: Set max entities as size of the array
Quote:
PHP Code:
|
Re: Set max entities as size of the array
Something like this?
Code:
and then, you have array[gTotal] or if you use a loop: Code:
Another method is using dynamic arrays. |
Re: Set max entities as size of the array
I had this same question a while ago. Check my threads that I've made; it should be somewhere toward the middle. There is pretty much always another way to get things done when you're coding, though. Let me know what you need this array for.
EDIT: It's titled something about linking an entity to a bool. |
Re: Set max entities as size of the array
Million hugs, Alucard!
@wrecked_ In fact i didn't need the func_brekable counting stuff. I just wanted to see, how it works. What i needed was getting how much ents are there on the map(ty Alucard, again), so i can set it as the size of the arrays in what i save a data about ents, for example ent classname orsmth. |
| All times are GMT -4. The time now is 05:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.