Figured I should post here the unstuck addon that I worked on months ago primarily for my Prop Hunt server.
Should work on other gamemodes too.
The aim for my version was to make it least exploitable as I could make it.
I swear, some players make it their mission to find ways to get out of the map.
There are different parts to this addon. I’ve seen other addons that simply respawn the player if they call the unstuck function.
Problem: Players can abuse the command to escape Prop Hunters for example.
Another moved the player up a bit to check if they fall just enough to determine they are free to move around.
Problem: Players can exploit this to move up higher or into the ceiling to get out of maps or areas they are not supposed to be.
The last simply got the surrounding positions and used TraceLine to check if there is a free path to the new position.
Problem: High rate of failure (especially with Prop Hunt) because it doesn’t check around corners.
This addon tries to mix all of these to solve most, if not all of the problems when a player gets stuck. (Except the second problem. I used TraceHull instead of moving the player up a bit. Prevent’s moving into the ceiling.)
It will check the surrounding positions to move into. Then, based on the configuration, will recursively check each of the surrounding positions that the player could move to, with the origin of the TraceLine changing to each of these new positions.
In the end, this will attempt to unstuck the player as best as possible, with minimal amount of exploitation.
A sort of quick and kinda drunk demonstration picture.
Random Paint Image