[H3LP] FindEntityInSphere
Hello. Can someone show me how to use FindEntityInSphere using sdktools?
I want to search for entities in sphere of 100.0 by looping. On AMXX it can be done this way: PHP Code:
Code:
"Games" |
Re: [H3LP] FindEntityInSphere
FindEntityByClassname + GetVectorDistance
|
Re: [H3LP] FindEntityInSphere
Quote:
|
Re: [H3LP] FindEntityInSphere
I'm sure FindEntityInSphere() do the same looping. Devs will correct me if I'm wrong.
+ sm_count https://forums.alliedmods.net/showthread.php?p=1729015 Code:
for( int i = 0; i < 4096; i++ ) |
Re: [H3LP] FindEntityInSphere
Quote:
It looks that way. Also why loop 4096 times you don't need to you only can have 2048 entities +1 for world spawn. |
Re: [H3LP] FindEntityInSphere
GetEntityCount is what I use for looping. I am unaware of any issues.
|
Re: [H3LP] FindEntityInSphere
Quote:
|
Re: [H3LP] FindEntityInSphere
Quote:
|
Re: [H3LP] FindEntityInSphere
Quote:
https://github.com/ValveSoftware/sou...ic/const.h#L65 Quote:
If your game is CSGO you can use backup's extension https://forums.alliedmods.net/showthread.php?t=304710 PHP Code:
|
Re: [H3LP] FindEntityInSphere
If you end up looping, it's probably faster to use FindEntityByClassname with a classname of "*". (It supports wildcarding the end of the string). That will just loop over all entities in the global entity list, rather than checking every possibly index.
|
All times are GMT -4. The time now is 09:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.