If you add the "gamemode" key to different entities, then it will only be there in those game modes. So, for KOTH, you'd set "gamemode" to 16 on the flag and hill and it will only show up on those game modes. If you also want to have that same flag for 1-Flag CTF, you'd add the respective gamemode to the flag. So, the flag would have the "gamemode" key set to 18.