Gamemode Help

I’m currently working on a gamemode that is essentially freezetag. My problem is when someone is frozen, I want someone to have to stay within a certain radius around them for a certain amount of time. I know to use timers and ents.FindInSphere but my problem is when someone leaves that sphere. I want it so when someone leaves the sphere, it destroys the timer that would unfreeze them. I have tried multiple times but still never figured it out.

If there are no players inside the sphere, or just one since I assume a frozen player would also be in there, do timer.Destroy.

I’ve tried that before. I’ve inserted the people in the sphere in the table or just used the sphere’s table. But the thing is with using something like: plyinsphere = ents.FindInSphere(ply:GetPos(), 30) is that you cant filter out the world or stuff like that I believe.

Do a distance check instead of find-in-sphere. Distance will give you a natural sphere.

Believe it or not, player.GetAll( ) running Distance to the points can be faster than ents.FindInXXXX

Hmm never thought of that… I’ll give that a try

[editline]29th April 2014[/editline]

Thanks Acecool, that works and it is better than findinsphere!