03.04.2019, 17:54
Give your random point an id and a boolean, false by defaut.
Every time a player spawns at that point, set the point boolean to true (as someone has already spawned at the said location) and also make a player variable containing that spawn id. When the player dies, set that random point boolean to false (thus it can be used again).
What is left to do is a function that checks whether there is a free (boolean set to false) spawn point. If there is none, just choose a random one from the whole set of spawn points.
Every time a player spawns at that point, set the point boolean to true (as someone has already spawned at the said location) and also make a player variable containing that spawn id. When the player dies, set that random point boolean to false (thus it can be used again).
What is left to do is a function that checks whether there is a free (boolean set to false) spawn point. If there is none, just choose a random one from the whole set of spawn points.