The only way I can think of is waypoints.
The logic is quite simple, but will take some work.
1. You need to set the waypoints for each map and save the data, similar to map spawns editor.
2. In the zombie "walk function", check if there is any obstacle. If false, keep moving, if true, look for the waypoint closest to the zombie towards of its target and move it towards that point.
3. When there's no more obstacle or case the zombie has already walked to the waypoint, repeat from step 2
4. When the zombie reach its target, attack!
You can try to take a look at the artificial intelligence codes to see how it works like Podbots, HL1 source code or an open source game engine like Godot, and try to implement with amxx.
It's not impossible, it will just take some work. Good luck!
__________________