local maps = find.File("maps/*.bsp", "GAME")
map = (maps[math.random( #maps )])
print("Map randomized to " .. map )
This code above works on "ULX" on Garry's Mod, it uses find.File to read the directory of garrysmod/maps and return (in TABLE) all of the files in it ending with .bsp (all of the maps), however I do not wan't it to include maps that begin with certain parts, like "arena_" and "gm_", is there a way I can go about removing them and/or making it keep checking until It gets a map not beginning with that.
Any way I could do this? and preferable pure Lua please. Oh and the site I'm using to test it is MOAIFiddle