ItsMods

Full Version: Random spawn.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there any way to teleport people when they spawn, to a random location?

I imagine, you would initially need a plugin that records all the possible locations someone can spawn without being off the map. So a very CPU intensive plugin that saves all the coordinates where a player goes on a particular map to an ini file of the same name. This could be the developer side of the plugin, which also allows people to map their own levels just by playing for a while with the standard spawns..

But then, upon collecting enough data (maybe you could have a limit to HOW many spawns are created), you could teleport a player to a random coordinate.

This is particularly useful for mp_dome sniper only servers, where people end up camping at a spawn. You could even distribute pre-made spawn mappings with the plugin.
I dont know for sure if you could do that. something like player.origin(x,y,z) is already available and you can teleport people to wherever you want but that is after they spawn i think. Ask @JariZ or @Nukem or @zxz0O0
We can teleport yes, but there;s no way to 'calculate' the free spots.
These all need to be added by hand.
You could however, create a plugin and make it run on a populair server for a few days, while it's running it saves all players positions.
These positions never are out of the map because they're players, and you could use this data to do random teleports.
OFC Your server needs to be a normal server (while collecting data) so no high jump / no gravity and all that shit