Code:
findinShere(entity():pos(),10000)
findByClass("player")
findExcludePlayer(entity():owner())
Target = find() First you search for all entities in a sphere.
Then you search for a players.
After searching you exclude the owner from future finds
And then you return the first find of the player search?
That is in theory at least.
In practice:
You first put every single entity, from a huge sphere, in a index.
And straight afterwards you try to do the same with every player.
Entity discovery takes a lot of resources, doing it twice will high likely will cause your errors.
It's pointless anyway... findByClass("player") Will delete everything found in the sphere
This should give you better results:
Code:
## Maybe needed, maybe not.
## findClearWhiteList()
## findClearBlackList()
findAllowClass("player")
findExcludePlayer(entity():owner())
findinSphere(entity():pos(),10000)
Target = find() But again, don't runOnTick this code. Once every 1 second should be plenty.
Bookmarks