GetEntityCount problem.
i am write check to the number of entity and used GetEntityCount () she is gives only one number, and when you create a new entity that number does not change at all. Tested this with the output message in chat
Code message in chat. Code:
PrintToChat(client, "%d", GetEntityCount()); i got in chat 712 and if the creation of new entity is the number does not change. And it was repeated again and again.. I have tested this issue on left 4 dead 2 dedicated server on snapshots 1.5.0-dev (Sourcemod) / 1.9.0-dev (Metamod). help. |
Re: GetEntityCount problem.
This is the method I use, it seems to be fairly accurate.
Code:
new g_iCurEntities; |
Re: GetEntityCount problem.
Quote:
example : in server entities "Total 643 entities (0 empty, 557 edicts)" (Report from the console) in chat message used your method "Entities number: 556" hmmm "edicts" and "Entities number" are very close |
Re: GetEntityCount problem.
There must be something going on that's L4D specific; for CS:S it's accurate to within ~5 props depending on the map. You could try changing OnMapStart to OnMapEnd, and not decreasing g_iCurEntities on destruction if == 0.
|
Re: GetEntityCount problem.
From KyleS's comment on the API page for GetEntityCount:
Quote:
EDIT: I know this is an old thread but it's also the first search result for "sourcemod GetEntityCount" and I was also wondering about the behavior of GetEntityCount, because I often see code that loops through all entities using GetEntityCount as an upper bound. |
All times are GMT -4. The time now is 18:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.