function GM:PlayerSelectSpawn( pl ) local NormalSpawnPoints = ents.FindByClass( "info_player_*" ) if FW_ROUND==0 then return NormalSpawnPoints[math.random(1,table.getn(NormalSpawnPoints))] else local possiblespawns=ents.FindByClass( "prop_fortwars" ) if table.getn(possiblespawns)>0 then local actualspawns={} for _,xent in pairs(possiblespawns) do if xent:GetNetworkedInt("team")==pl:Team() then actualspawns[xent:EntIndex()]=xent end end if table.getn(actualspawns)> 0 then return actualspawns[math.random(1,table.getn(actualspawns))] else return NormalSpawnPoints[math.random(1,table.getn(NormalSpawnPoints))] end else return NormalSpawnPoints[math.random(1,table.getn(NormalSpawnPoints))] end end end