24 channels

I’m interested in 48 2-way radios each with 2 on some sort of separate channel. They will be used at an event where each of 24 rooms can communicate with the main control center if needed, but I don’t want them to hear each other.
What is the best way to go about this? Will two-ways with privacy codes be sufficient? Or is there something better? I will be in the middle of a large city so it’d be nice to lessen the likelihood that someone else is on the same channel of one of the rooms.
Also range would be really short, only 100 feet or so with some temporary walls in between, and they are to be used by unlicensed operators. Would baofeng bf-888’s work if programmed to the proper channels? Or would they still be illegal?

Also range would be really short, only 100 feet or so with some temporary walls in between.

Not sure where you are in the world, but here in the UK, what you want can be licensed. If the idea is that the 48 can talk to the control, but you do not wish them to hear the other outstation, then they use a different frequency for transmit and receive. The control room hear everyone, the outstations ALL hear the control room. If there is a chance that you need them to be able to talk to each other, then you can install a repeater that can be control room switched so radio 2 calls control and asks to speak to radio 33. Control calls 33 and when they respond turns on repeat and the two have a conversation - with everyone listening in. An alternative is to not have the repeater, and for control to receive the request from 2, then call 33 and when both are listening simply say radios 2 and 33 go to channel 2. They do this, and nobody else hears them. When complete they switch back to channel 1. Tone control like CTCSS simple stops a radio hearing things - so while it would in this case stop you hearing car park people nearby on the same channel, it doesn’t really offer much in the way of privacy. So a twin (duplex) frequency and a single extra frequency would seem to be simple and workable.

These licences are available in most countries.

The BF-888 cannot be legally used on any frequency that doesn’t require a license. You would need to buy FRS radios to be used without a license. Then, all you would have are 14 channels (22 channels when new rules take affect) This assumes you are in the USA.