All pastes #405498 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-03-21 19:49 UTC
rendered paste body
		//Put the spawnpoints in a random order
		local temp = {}
		for _,v in pairs( SpawnTable ) do table.insert( temp, math.random( 1, #temp+1 ), v ) end

		//Check each spawnpoint to see if we're gonna get stuck & use the first 'empty' one we come across
		for _,Spawnpoint in pairs( temp ) do
			if !( #ents.FindInSphere( Spawnpoint:GetPos(), 16 ) > 1 ) then return Spawnpoint end
		end