I have a problem;
How to detect all of the spawn points that exists in the map?
I see there is a spawn point for T out of the map and i couldnt find it because when somebody spawns there the server is crashing.
for _, e in pairs( entitylist(0) ) do 	print('Info_T entity coordinations @ ' .. e.x .. ' as X path and ' .. e.y .. ' as Y path.') end
forloop will iterate all over the entities with value ID as 0 (hence Info_T) and will print onto the console their coordination. This as to not iterate to the whole entities since we're focusing on the T spawn paths.
function GLITCH_SPAWN_REMOVE() 	for _,e in pairs(entitylist()) do 		if (entity(e.x,e.y,"typename") == "Info_T" ) then 			if ( e.x > map("xsize") or e.y > map("ysize") ) then 			parse("triggerposition "..e.x.." "..e.y) 			print("\169255255255Found glitched spawn point - "..e.x.."|"..e.y) 			end 		end 	end end GLITCH_SPAWN_REMOVE()
local mapSizeX, mapSizeY = map("xsize"), map("ysize") local brokenCount = 0 print("OutOfBoundaries Entity check started!\n") print("Map: ".. map("name")) print("Map size in tiles: ".. mapSizeX .." | ".. mapSizeY) local list = entitylist() for k, ent in pairs( list ) do 	if ent.x > mapSizeX or ent.x < 0 or ent.y > mapSizeY or ent.y < 0 then 		brokenCount = brokenCount + 1 		print("Entity with ID ".. entity(ent.x, ent.y, "type") ..", ".. entity(ent.x, ent.y, "typename") .." called '".. entity(ent.x, ent.y, "name") .."' @ ".. ent.x .."|".. ent.y) 	end end print("OutOfBoundaries Entity check finished!\n") msg("Check of broken entities finished, ".. brokenCount .." invalid entities found")
UPDATE MAP: Found unknown entity type: 102 @ 195273387 , 544108393
msg("Entity : "..entity(e.x,e.y,"typename").." @ "..e.x.."|"..e.y)